Ronald Oussoren committed b49c639

- fix buglet in closure_pool.m
- ensure that the code now actually compiles on ppc64, still untested.

Comments (0)

Files changed (4)


 	((freelist*)cl)->next = closure_freelist;
 	closure_freelist = (freelist*)cl;
+	return 0;


 #import <Foundation/NSHost.h>
 #import <CoreFoundation/CoreFoundation.h>
+#ifdef __ppc64__
+extern bool ffi64_stret_needs_ptr(const ffi_type* inType,
+		        unsigned short*, unsigned short*);
  * Define SMALL_STRUCT_LIMIT as the largest struct that will be returned
  * in registers instead of with a hidden pointer argument.
 #   define SMALL_STRUCT_LIMIT	4
+#elif defined(__ppc64__)
+#   define SMALL_STRUCT_LIMIT	8
 #elif defined(__i386__) 
 #   define SMALL_STRUCT_LIMIT 	8
 		useStret = 0;
 		if (*rettype == _C_STRUCT_B && 
+#ifdef  __ppc64__
+			ffi64_stret_needs_ptr(signature_to_ffi_return_type(rettype), NULL, NULL)
+#else /* !__ppc64__ */
 			(resultSize > SMALL_STRUCT_LIMIT
 #ifdef __i386__
 			 /* darwin/x86 ABI is slightly odd ;-) */
 				&& resultSize != 16
-			)) {
+			)
+#endif /* !__ppc64__ */
+			) {
 			useStret = 1;


   NOTE: 64-bit support is beta quality, that is: all unittests pass, but I haven't tried
   running real programs yet and hence there might be issues lurking below the surface.
+  NOTE2: PPC64 support is completely untested, aka "it compiles and therefore must work".
   This requires Leopard (OSX 10.5), earlier version of the OS don't have a 64-bit
   Objective-C runtime at all.  This currently also requires a copy of python that was
   build with ``MACOSX_DEPLOYMENT_TARGET=10.5``.


+    #'-arch', 'x86_64', '-arch', 'ppc64',
     # Loads of warning flags
     "-Wall", "-Wstrict-prototypes", "-Wmissing-prototypes",
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.