Construct a new class given a C:
class klass
(CUnion
, CStruct
, or other that provide an entity_class)
types
(Fiddle::TYPE_INT, Fiddle::TYPE_SIZE_T, etc., see the C types constants)
corresponding members
Fiddle::Importer#struct
and Fiddle::Importer#union
wrap this functionality in an easy-to-use manner.
Examples:
require 'fiddle/struct' require 'fiddle/cparser' include Fiddle::CParser types, members = parse_struct_signature(['int i','char c']) MyStruct = Fiddle::CStructBuilder.create(Fiddle::CUnion, types, members) MyStruct.malloc(Fiddle::RUBY_FREE) do |obj| ... end obj = MyStruct.malloc(Fiddle::RUBY_FREE) begin ... ensure obj.call_free end obj = MyStruct.malloc begin ... ensure Fiddle.free obj.to_ptr end
Reads at most maxlen bytes from the stream. If buf is provided it must reference a string which will receive the data.
See IO#readpartial
for full details.
Return true
if the PRNG has been seeded with enough data, false
otherwise.
The current status of GC profile mode.
Starts the GC profiler.
Returns whether the form contained multipart/form-data
Parses self
destructively and returns self
containing the rest arguments left unparsed.
Create a new Location
object
Create a new ArgumentsNode
node
Create a new AssocSplatNode
node
Create a new BlockArgumentNode
node
Create a new CallOperatorWriteNode
node
Create a new ClassVariableOperatorWriteNode
node
Create a new ConstantOperatorWriteNode
node
Create a new FloatNode
node
Create a new ForwardingArgumentsNode
node
Create a new GlobalVariableOperatorWriteNode
node
Create a new HashNode
node
Create a new ImaginaryNode
node
Create a new IndexOperatorWriteNode
node
Create a new InterpolatedStringNode
node
Create a new InterpolatedSymbolNode
node
Create a new InterpolatedXStringNode
node