--- Modules/AppKit/_AppKitMapping_NSBezierPath.m.orig Sat Jun 17 00:51:58 2006 +++ Modules/AppKit/_AppKitMapping_NSBezierPath.m Fri Dec 15 14:15:47 2006 @@ -340,9 +340,19 @@ PyObjCSelector_GetClass(method), PyObjCObject_GetObject(self)); +#ifdef GNU_RUNTIME + (super.self == NULL) ? 0 : + ((void(*)(struct objc_super*,SEL,float*,int,float)) + class_get_instance_method(super.class, + PyObjCSelector_GetSelector(method) + )->method_imp)(super.self, + PyObjCSelector_GetSelector(method), + pattern, count, phase); +#else ((void(*)(struct objc_super*,SEL,float*,int,float))objc_msgSendSuper)(&super, PyObjCSelector_GetSelector(method), pattern, count, phase); +#endif } PyObjC_HANDLER PyObjCErr_FromObjC(localException); --- Modules/Foundation/_Foundation.m.orig Sat Jun 17 00:51:59 2006 +++ Modules/Foundation/_Foundation.m Fri Dec 15 14:48:01 2006 @@ -14,6 +14,7 @@ /* GNUstep's Foundation.h doesn't include these while we do use them */ #import #import +#import #endif #include "pyobjc-api.h" --- Modules/objc/class-builder.m.orig Sat Jun 17 00:52:04 2006 +++ Modules/objc/class-builder.m Fri Dec 15 12:48:47 2006 @@ -1287,7 +1287,11 @@ state = PyGILState_Ensure(); +#ifdef GNU_RUNTIME + cls = self->class_pointer; +#else cls = self->isa; +#endif while (cls != (Class)userdata) { struct objc_ivar_list* ivars = cls->ivars; if (ivars != NULL) { --- Scripts/CodeGenerators/cocoa_generator.py.orig Sat Jun 17 00:51:44 2006 +++ Scripts/CodeGenerators/cocoa_generator.py Fri Dec 15 11:39:19 2006 @@ -127,6 +127,7 @@ QUARTZ_HDRS=None QUARTZ2_HDRS=None QUARTZ3_HDRS=None + SENTESTINGKIT_HDRS=None --- Scripts/CodeGenerators/enum_generator.py.orig Sat Jun 17 00:51:44 2006 +++ Scripts/CodeGenerators/enum_generator.py Fri Dec 15 14:49:15 2006 @@ -98,6 +98,8 @@ continue ident = m.group('identifier') + if ident in ['typedef', 'NSSearchPathDirectory', 'ifdef', 'ET_HANDLE', 'ET_WINMSG']: + continue if not ident in ['if', 'endif', 'else']: entry(outfp, ident) --- Modules/objc/formal-protocol.m.orig Sat Jun 17 00:52:04 2006 +++ Modules/objc/formal-protocol.m Fri Dec 15 12:46:50 2006 @@ -5,6 +5,14 @@ */ #include "pyobjc.h" +#ifdef GNU_RUNTIME +#include "objc/Protocol.h" +struct objc_method_description_list { + int count; + struct objc_method_description list[1]; +}; +#endif + struct Protocol_struct { @defs(Protocol); }; --- Modules/objc/ivar-accessor.m.orig Sat Jun 17 00:52:04 2006 +++ Modules/objc/ivar-accessor.m Fri Dec 15 12:54:05 2006 @@ -2,11 +2,19 @@ */ #include "pyobjc.h" +#ifdef GNU_RUNTIME +static Ivar_t +#else static Ivar +#endif find_ivar(NSObject* base, char* name) { Class cur = GETISA((id)base); +#ifdef GNU_RUNTIME + Ivar_t ivar; +#else Ivar ivar; +#endif while (cur != nil) { ivar = class_getInstanceVariable(cur, name); @@ -41,7 +49,11 @@ while (cur != nil) { Py_ssize_t i, len; +#ifdef GNU_RUNTIME + Ivar_t ivar; +#else Ivar ivar; +#endif PyObject* v; int r; @@ -78,7 +90,11 @@ static char* keywords[] = {"obj", "name", NULL }; PyObject* anObject; char* name; +#ifdef GNU_RUNTIME + Ivar_t ivar; +#else Ivar ivar; +#endif NSObject* objcValue; PyObject* result; @@ -119,7 +135,11 @@ static char* keywords[] = {"obj", "name", "value", "updateRefCounts", NULL }; PyObject* anObject; char* name; +#ifdef GNU_RUNTIME + Ivar_t ivar; +#else Ivar ivar; +#endif PyObject* value; PyObject* updateRefCounts = NULL; NSObject* objcValue; --- Modules/objc/libffi_support.m.orig Sat Jun 17 00:52:04 2006 +++ Modules/objc/libffi_support.m Fri Dec 15 13:13:04 2006 @@ -34,12 +34,15 @@ #endif +#else + +# define SMALL_STRUCT_LIMIT 8 + #endif /* MACOSX */ #ifndef FFI_CLOSURES -# error "Need FFI_CLOSURES!" #endif #if 0 /* Usefull during debugging, only used in the debugger */ --- Modules/objc/pyobjc.h.orig Sat Jun 17 00:52:05 2006 +++ Modules/objc/pyobjc.h Fri Dec 15 14:58:18 2006 @@ -19,7 +19,7 @@ #ifdef GNU_RUNTIME //#include -#include +#include #else #include #include @@ -99,8 +99,6 @@ char* PyObjC_SELToPythonName(SEL, char*, size_t); -#ifdef MACOSX - /* toll-free-bridging.m */ id PyObjC_CFTypeToID(PyObject* argument); PyObject* PyObjC_IDToCFType(id argument); @@ -113,7 +111,6 @@ extern PyObject* PyObjC_NULL; extern PyObject* PyObjCInitNULL(void); -#endif #define PyObjCErr_InternalError() \ PyErr_Format(PyObjCExc_InternalError, \ --- setup.py.orig Sat Jun 17 00:52:31 2006 +++ setup.py Fri Dec 15 12:03:25 2006 @@ -216,18 +216,9 @@ CFLAGS.append('-Ibuild/codegen/') -FFI_CFLAGS=['-Ilibffi-src/include'] +FFI_CFLAGS=['-I%%FFI%%'] -# The list below includes the source files for all CPU types that we run on -# this makes it easier to build fat binaries on Mac OS X. FFI_SOURCE=[ - "libffi-src/src/types.c", - "libffi-src/src/prep_cif.c", - "libffi-src/src/x86/ffi_darwin.c", - "libffi-src/src/x86/darwin.S", - "libffi-src/src/powerpc/ffi_darwin.c", - "libffi-src/src/powerpc/darwin.S", - "libffi-src/src/powerpc/darwin_closure.S", ] # Patch distutils: it needs to compile .S files as well. --- Scripts/CodeGenerators/strconst_generator.py.orig Sat Jun 17 00:51:44 2006 +++ Scripts/CodeGenerators/strconst_generator.py Fri Dec 15 14:57:01 2006 @@ -77,6 +77,8 @@ m = MATCH_RE.search(ln) if m: ident = m.group(2) + if ident in ['name']: + continue entry(outfp, ident, ignore) @@ -106,6 +108,8 @@ process_file(fp, f, ignore) for item in append: + if item in ['NSUnknownKeyException']: + continue entry(fp, item, ignore)