[Forensics-changes] [yara] 66/415: Fix undeclared "Py_ssize_t" compilation error with Python2.4
Hilko Bengen
bengen at moszumanska.debian.org
Thu Apr 3 05:42:45 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch debian
in repository yara.
commit fef1570ec08182ef916c4a2a4e9720fc787afe55
Author: Victor M. Alvarez <plusvic at gmail.com>
Date: Wed Sep 29 13:16:39 2010 +0000
Fix undeclared "Py_ssize_t" compilation error with Python2.4
---
yara-python/yara-python.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/yara-python/yara-python.c b/yara-python/yara-python.c
index d095de1..87a12ce 100644
--- a/yara-python/yara-python.c
+++ b/yara-python/yara-python.c
@@ -21,6 +21,12 @@ GNU General Public License for more details.
#include <yara.h>
+#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
+typedef int Py_ssize_t;
+#define PY_SSIZE_T_MAX INT_MAX
+#define PY_SSIZE_T_MIN INT_MIN
+#endif
+
/* Module globals */
static PyObject *YaraError = NULL;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/forensics/yara.git
More information about the forensics-changes
mailing list