if CY_OBJECTIVEC
filters += ObjectiveC
libcycript_la_SOURCES += ObjectiveC/Output.mm ObjectiveC/Replace.cpp ObjectiveC/Library.mm
-
-ObjectiveC/Library.lo: Struct.hpp
-
-# XXX: this is not architecture-specific... isn't this just totally wrong?!
-# XXX: clang doesn't support this feature... that makes me really very sad.
-CLEANFILES += Struct.hpp
-Struct.hpp:
- $$($(OBJCXX) -print-prog-name=cc1obj) -print-objc-runtime-info </dev/null >$@
endif
if CY_MACH
**/
/* }}} */
-#ifdef __APPLE__
-#include "Struct.hpp"
-#endif
-
#include <Foundation/Foundation.h>
#include "ObjectiveC/Internal.hpp"
}
#ifdef __APPLE__
+#if defined(__i386__) || defined(__x86_64__)
+#define OBJC_MAX_STRUCT_BY_VALUE 8
+static int struct_forward_array[] = {
+ 0, 0, 0, 1, 0, 1, 1, 1, 0 };
+#elif defined(__arm__)
+#define OBJC_MAX_STRUCT_BY_VALUE 1
+static int struct_forward_array[] = {
+ 0, 0 };
+#else
+#error missing objc-runtime-info
+#endif
+
static bool stret(ffi_type *ffi_type) {
return ffi_type->type == FFI_TYPE_STRUCT && (
ffi_type->size > OBJC_MAX_STRUCT_BY_VALUE ||