From: timsuth@... (Tim Sutherland) Date: 2004-11-24T15:18:01+09:00 Subject: Re: Ruby DL::Importable struct issue In article , Kevin Howe wrote: >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::DLTypeError) > 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 >#------- Try "char* bp" or "unsigned char* bp".