From 6d3ef3ecd45bc5ecc922da97c1409e1f1a4e35c7 Mon Sep 17 00:00:00 2001 From: Watson Date: Tue, 22 Oct 2013 13:22:52 +0900 Subject: [PATCH] fix where Boxed#new doesn't work for GLKKit structure. http://hipbyte.myjetbrains.com/youtrack/issue/RM-293 GLKKit structures are declared as the following. If use union type when generate bridgesupport, it is not output the definition of a data structure using tag into bridgesupport file. So, Boxed#new does not work for these structure. #if defined(__STRICT_ANSI__) struct _GLKMatrix4 { float m[16]; } __attribute__((aligned(16))); typedef struct _GLKMatrix4 GLKMatrix4; #else union _GLKMatrix4 { struct { float m00, m01, m02, m03; float m10, m11, m12, m13; float m20, m21, m22, m23; float m30, m31, m32, m33; }; float m[16]; } __attribute__((aligned(16))); typedef union _GLKMatrix4 GLKMatrix4; #endif --- lib/motion/project/xcode_config.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/motion/project/xcode_config.rb b/lib/motion/project/xcode_config.rb index 96ee6007..4ee74892 100644 --- a/lib/motion/project/xcode_config.rb +++ b/lib/motion/project/xcode_config.rb @@ -307,7 +307,7 @@ EOS (OSX_VERSION >= 10.7 && sdk_version < '7.0') ? '--no-64-bit' : '' end end - sh "RUBYOPT='' '#{File.join(bindir, 'gen_bridge_metadata')}' --format complete #{extra_flags} --cflags \" #{c_flags} -isysroot \"#{sdk_path}\" -miphoneos-version-min=#{sdk_version} -D__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__=#{sdk_version_headers} -I. #{includes.join(' ')}\" #{headers.map { |x| "\"#{x}\"" }.join(' ')} -o \"#{bs_file}\" #{ "-e #{exceptions}" if exceptions.length != 0}" + sh "RUBYOPT='' '#{File.join(bindir, 'gen_bridge_metadata')}' --format complete #{extra_flags} --cflags \" #{c_flags} -isysroot \"#{sdk_path}\" -miphoneos-version-min=#{sdk_version} -D__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__=#{sdk_version_headers} -D__STRICT_ANSI__ -I. #{includes.join(' ')}\" #{headers.map { |x| "\"#{x}\"" }.join(' ')} -o \"#{bs_file}\" #{ "-e #{exceptions}" if exceptions.length != 0}" end def define_global_env_txt