-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
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.
Metadata
Metadata
Assignees
Labels
No labels