diff Modules/_ctypes/ctypes.h @ 63831:e13ea83e2edb 2.7

Fis issue5504: ctypes does now work with systems where mmap can't be PROT_WRITE and PROT_EXEC.
author Thomas Heller <theller@ctypes.org>
date Sun, 08 Aug 2010 17:56:41 +0000
parents fd25030223b0
children b36cb4602e21
line wrap: on
line diff
--- a/Modules/_ctypes/ctypes.h	Sun Aug 08 16:18:45 2010 +0000
+++ b/Modules/_ctypes/ctypes.h	Sun Aug 08 17:56:41 2010 +0000
@@ -95,7 +95,8 @@
 
 typedef struct {
     PyObject_VAR_HEAD
-    ffi_closure *pcl; /* the C callable */
+    ffi_closure *pcl_write; /* the C callable, writeable */
+    void *pcl_exec;         /* the C callable, executable */
     ffi_cif cif;
     int flags;
     PyObject *converters;
@@ -428,9 +429,6 @@
 #endif
 #endif
 
-extern void _ctypes_free_closure(void *);
-extern void *_ctypes_alloc_closure(void);
-
 extern void _ctypes_add_traceback(char *, char *, int);
 
 extern PyObject *PyCData_FromBaseObj(PyObject *type, PyObject *base, Py_ssize_t index, char *adr);