diff options
author | Sven 'sleipnir' Rebhan <odinshorse@googlemail.com> | 2009-07-02 16:31:01 +0000 |
---|---|---|
committer | Sven 'sleipnir' Rebhan <odinshorse@googlemail.com> | 2009-07-02 16:31:01 +0000 |
commit | ce8a485ae50eefaf2f0b6a9d32d4eceb7500eb2f (patch) | |
tree | dbf259ebee091430d4ff0703f157419490c24b71 | |
parent | Add up-to-date kernel snapshot and keyword it. (diff) | |
download | embedded-cross-ce8a485ae50eefaf2f0b6a9d32d4eceb7500eb2f.tar.gz embedded-cross-ce8a485ae50eefaf2f0b6a9d32d4eceb7500eb2f.tar.bz2 embedded-cross-ce8a485ae50eefaf2f0b6a9d32d4eceb7500eb2f.zip |
Make the _ctypes module compile again for python-2.5.4.
-rw-r--r-- | dev-lang/python/Manifest | 2 | ||||
-rw-r--r-- | dev-lang/python/files/python-2.5.4-enable-ctypes-module.patch | 50 |
2 files changed, 38 insertions, 14 deletions
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest index 07353b6..d9cf377 100644 --- a/dev-lang/python/Manifest +++ b/dev-lang/python/Manifest @@ -12,7 +12,7 @@ AUX python-2.5.2-cross-enable-ctypes-module.patch 3830 RMD160 52e92eae2ba60d67ef AUX python-2.5.2-cross-setup-sysroot.patch 11356 RMD160 4d19bfc67e298a6b9b24adfcc367b72194c21985 SHA1 b628aaaa61bcc48efe25e9d2ca274f5ea8532c82 SHA256 a395d40f79a1f5188de031ec239283b637d68791a59c4870b8dd2ae914303b55 AUX python-2.5.2_turkish.patch 4882 RMD160 69486e369849e0706f4261410f231649397cf793 SHA1 1dc369bdfb10bc9ddb63a5672fa561acf8dee32c SHA256 bf4019ae2acd4b6868db0b625910f668f857711ae00b29f638d038611444b169 AUX python-2.5.4-cross-Makefile.pre.in.patch 349 RMD160 c46f87b9b232e1d2f55a60e2558edcb2fa0efd50 SHA1 04e915c1e29c8e15f48a240853af1ee6c9210674 SHA256 a0b6313dcd6aeed2cb1b82353a2e339fe79cd9b861811cb67e90739ec84deec7 -AUX python-2.5.4-enable-ctypes-module.patch 3034 RMD160 6374bbd2ad13e180324aa5d97ff42ab52a3d3118 SHA1 77b2d479d0ba37cec4d71c29c8d6ffe651a15765 SHA256 4f3ba96b5a5986adbffc8385299780b2a2b3aa7b6875c2c46d16a50bba258516 +AUX python-2.5.4-enable-ctypes-module.patch 3646 RMD160 da8a3a30024bda2a3aef483031a86168a151ce53 SHA1 eef2a90cf256f212c6e555b5a9a10c24ef0a8d00 SHA256 8efce0566a33bcda4842226e182a41a6ddbb92822d459e5ff0daa57bf05c2089 AUX python-2.6-chflags-cross.patch 1716 RMD160 b0ec772a41a24d51f4c7430b19bcc6251cd6be87 SHA1 4745cd53cef503c41c50573ad97f40eb89fd4bcd SHA256 7c36689db47720052069725036983c2fb6959f425e3777aae55976b2788d463f AUX python-2.6-cross-distutils-sysconfig.patch 1802 RMD160 346449ad5f2f77411dd59e489c22900e40a51bb1 SHA1 59d147726780a131c693e8a6c309f07ac1e52597 SHA256 b0782e2a98103c55a37ca05ad17845762eaaa63ca2bf29d0d342be996a7019d9 AUX python-2.6-cross-patch-tweak.patch 717 RMD160 4791a798b494de925100c33ad42c214038414d7f SHA1 c84d19c2846136eb5cfb2da6a316f7d9688b7c90 SHA256 9a5c4142738daf1fe0f78747ee4b03c4402c2b84f1349150dce99f6631688abd diff --git a/dev-lang/python/files/python-2.5.4-enable-ctypes-module.patch b/dev-lang/python/files/python-2.5.4-enable-ctypes-module.patch index e4355f0..a3fb0d6 100644 --- a/dev-lang/python/files/python-2.5.4-enable-ctypes-module.patch +++ b/dev-lang/python/files/python-2.5.4-enable-ctypes-module.patch @@ -36,8 +36,20 @@ enables the cross compilation of the ctypes module. union _tagITEM *next; } ITEM; ---- Modules/_ctypes/callbacks.c 2008-04-25 19:55:19.000000000 +0000 -+++ Modules/_ctypes/callbacks.c.new 2009-04-19 18:22:59.000000000 +0000 +--- Modules/_ctypes/ctypes.h 2009-04-19 18:35:49.000000000 +0000 ++++ Modules/_ctypes/ctypes.h.new 2009-04-19 18:36:34.000000000 +0000 +@@ -69,7 +69,9 @@ + + typedef struct { + PyObject_VAR_HEAD ++#if FFI_CLOSURES + ffi_closure *pcl; /* the C callable */ ++#endif + ffi_cif cif; + PyObject *converters; + PyObject *callable; +--- Modules/_ctypes/callbacks.c 2009-07-02 14:23:24.000000000 +0200 ++++ Modules/_ctypes/callbacks.c.new 2009-07-02 14:21:05.000000000 +0200 @@ -20,8 +20,10 @@ Py_XDECREF(self->converters); Py_XDECREF(self->callable); @@ -49,7 +61,17 @@ enables the cross compilation of the ctypes module. PyObject_Del(self); } -@@ -365,12 +367,13 @@ +@@ -336,7 +338,9 @@ + return NULL; + } + ++#if FFI_CLOSURES + p->pcl = NULL; ++#endif + memset(&p->cif, 0, sizeof(p->cif)); + p->converters = NULL; + p->callable = NULL; +@@ -365,12 +369,13 @@ assert(CThunk_CheckExact(p)); @@ -64,7 +86,7 @@ enables the cross compilation of the ctypes module. for (i = 0; i < nArgs; ++i) { PyObject *cnv = PySequence_GetItem(converters, i); if (cnv == NULL) -@@ -409,13 +412,14 @@ +@@ -409,13 +414,14 @@ "ffi_prep_cif failed with %d", result); goto error; } @@ -80,15 +102,17 @@ enables the cross compilation of the ctypes module. Py_INCREF(converters); p->converters = converters; Py_INCREF(callable); ---- Modules/_ctypes/ctypes.h 2009-04-19 18:35:49.000000000 +0000 -+++ Modules/_ctypes/ctypes.h.new 2009-04-19 18:36:34.000000000 +0000 -@@ -69,7 +69,9 @@ +--- Modules/_ctypes/_ctypes.c 2008-10-18 23:33:44.000000000 +0200 ++++ Modules/_ctypes/_ctypes.c.new 2009-07-02 14:28:31.000000000 +0200 +@@ -2952,7 +2952,11 @@ + self->callable = callable; - typedef struct { - PyObject_VAR_HEAD + self->thunk = thunk; +#if FFI_CLOSURES - ffi_closure *pcl; /* the C callable */ + *(void **)self->b_ptr = (void *)thunk->pcl; ++#else ++ *(void **)self->b_ptr = NULL; +#endif - ffi_cif cif; - PyObject *converters; - PyObject *callable; + + Py_INCREF((PyObject *)thunk); /* for KeepRef */ + if (-1 == KeepRef((CDataObject *)self, 0, (PyObject *)thunk)) { |