ctypes on Mac OS X 10.4 with gcc 4.0
Posted on January 22, 2006 by oubiwann

python :: programming :: macosx
since...For the search engines, I will post the error message (where xxx are
your line numbers):
I had some trouble installing ctypes on a 10.4 server tonight, and found
this
little post
that gave a patch for it. Unfortunately, this was for the file in 2004
and I had to manually edit the current 4000+ line file.
since...For the search engines, I will post the error message (where xxx are
your line numbers):
And here's a copy of my diff against _ctypes.c in ctypes 0.9.6:
source/ctypes.c:xxx: error: static declaration of 'PointerType'
follows non-static declaration
source/ctypes.h:xxx: error: previous declaration of 'Pointer_Type' was
here
— third-party/ctypes-0.9.6/source/_ctypes.c (revision 53)
+++ third-party/ctypes-0.9.6/source/_ctypes.c (working copy)
@@ -2449,7 +2449,7 @@
"sO|O" - function name, dll object (with an integer handle)
"is|O" - vtable index, method name, creates callable calling COM vtbl
/
-static PyObject
+PyObject *
CFuncPtr_new(PyTypeObject type, PyObject args, PyObject *kwds)
{
CFuncPtrObject *self;
@@ -3880,7 +3880,7 @@
(inquiry)Pointernonzero, / nbnonzero /
};-static PyTypeObject PointerType = {
+PyTypeObject PointerType = {
PyObjectHEADINIT(NULL)
0,
"ctypes.Pointer",
Comments?
This blog doesn't use standard (embedded) comments; however, since
the site is hosted on Github, if there is
something you'd like to share, please do so by
opening a
"comment" ticket!