#738: A character string cannot be taken out of the variable made by
Pointer.new('c').
----------------------------------+-----------------------------------------
Reporter: watson1...@… | Owner: lsansone...@…
Type: defect | Status: new
Priority: blocker | Milestone:
Component: MacRuby | Keywords:
----------------------------------+-----------------------------------------
{{{
$ cat test_js.rb
framework "JavaScriptCore"
string = JSStringCreateWithUTF8CString("hello")
size = JSStringGetMaximumUTF8CStringSize(string)
buffer = Pointer.new('c')
JSStringGetUTF8CString(string, buffer, size)
puts buffer[0] # expect "hello"
}}}
{{{
$ macruby test_js.rb
104
}}}
I was expecting the display as "hello".
But a decimal number of the first character is only displayed.
--
Ticket URL: <http://www.macruby.org/trac/ticket/738>
MacRuby <http://macruby.org/>
_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel