You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On OSX objc_allocateClassPair parameters or return value gets mangled somehow.
The last output line of this example should be "Test" and not a blank string ""
obj = CFunc::call(CFunc::Pointer, "objc_getClass", 'NSObject')
v = CFunc::Int.new
v.value = 0
klass = CFunc::call(CFunc::Pointer, "objc_allocateClassPair", obj, 'Test', v)
name = CFunc::call(CFunc::Pointer, "class_getName", obj)
puts name.to_s.inspect # => "NSObject"
name = CFunc::call(CFunc::Pointer, "class_getName", klass)
puts name.to_s.inspect # => ""
Both ffi library itself using c and ruby ffi behaves as expected with the exact same sequence of calls.
The text was updated successfully, but these errors were encountered:
On OSX objc_allocateClassPair parameters or return value gets mangled somehow.
The last output line of this example should be "Test" and not a blank string ""
Both ffi library itself using c and ruby ffi behaves as expected with the exact same sequence of calls.
The text was updated successfully, but these errors were encountered: