K
Kevin Howe
Hi,
The ruby182-14RC9.exe (one click installer) version of Ruby breaks some DL
code in a gem of mine (tidy on rubyforge). The problem is with the first
struct item which defines "byte* bp". I get the following error when I run
the script at the bottom. If "byte*" is deliberately no longer supported,
what would be a valid equivalent?
(eval):2 in '[]': unsupported type 'p' (DL:
LTypeError)
from (eval):2:in 'bp'
#-------
require 'dl/import'
require 'dl/struct'
extend DL::Importable
# http://tidy.sourceforge.net/docs/api/struct__TidyBuffer.html
TidyBuffer = struct [
"byte* bp",
"uint size",
"uint allocated",
"uint next"
]
struct = TidyBuffer.malloc
puts struct.bp
#-------
The ruby182-14RC9.exe (one click installer) version of Ruby breaks some DL
code in a gem of mine (tidy on rubyforge). The problem is with the first
struct item which defines "byte* bp". I get the following error when I run
the script at the bottom. If "byte*" is deliberately no longer supported,
what would be a valid equivalent?
(eval):2 in '[]': unsupported type 'p' (DL:
from (eval):2:in 'bp'
#-------
require 'dl/import'
require 'dl/struct'
extend DL::Importable
# http://tidy.sourceforge.net/docs/api/struct__TidyBuffer.html
TidyBuffer = struct [
"byte* bp",
"uint size",
"uint allocated",
"uint next"
]
struct = TidyBuffer.malloc
puts struct.bp
#-------