Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3k
Changeset: r59052:ba3363aa624b
Date: 2012-11-22 22:46 +0100
http://bitbucket.org/pypy/pypy/changeset/ba3363aa624b/
Log: cpyext: add PyLong_AS_LONG
diff --git a/pypy/module/cpyext/include/Python.h
b/pypy/module/cpyext/include/Python.h
--- a/pypy/module/cpyext/include/Python.h
+++ b/pypy/module/cpyext/include/Python.h
@@ -109,6 +109,7 @@
#include "tupleobject.h"
#include "dictobject.h"
#include "intobject.h"
+#include "longobject.h"
#include "listobject.h"
#include "unicodeobject.h"
#include "compile.h"
diff --git a/pypy/module/cpyext/include/intobject.h
b/pypy/module/cpyext/include/intobject.h
--- a/pypy/module/cpyext/include/intobject.h
+++ b/pypy/module/cpyext/include/intobject.h
@@ -15,4 +15,4 @@
#ifdef __cplusplus
}
#endif
-#endif /* !Py_BOOLOBJECT_H */
+#endif /* !Py_INTOBJECT_H */
diff --git a/pypy/module/cpyext/include/longobject.h
b/pypy/module/cpyext/include/longobject.h
new file mode 100644
--- /dev/null
+++ b/pypy/module/cpyext/include/longobject.h
@@ -0,0 +1,15 @@
+
+/* Int object interface */
+
+#ifndef Py_LONGOBJECT_H
+#define Py_LONGOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define PyLong_AS_LONG(op) PyLong_AsLong(op)
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_LONGOBJECT_H */
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit