ÿØÿà JFIF    ÿÛ „ ( %!1!%*+...983,7(-.- PK` ],j dlunwrap-c.rinu[U:RDoc::AnyMethod[iI" dlunwrap:ETI"Fiddle::dlunwrap;TT: publico:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"NReturns the hexadecimal representation of a memory pointer address +addr+;To:RDoc::Markup::BlankLineo; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [ I"0lib = Fiddle.dlopen('/lib64/libc-2.15.so') ;TI"+=> # ;TI" ;TI"lib['strcpy'].to_s(16) ;TI"=> "7f59de6dd240" ;TI" ;TI" "7f59de6dd240";T: @format0: @fileI"ext/fiddle/fiddle.c;T:0@omit_headings_from_table_of_contents_below0I"Fiddle.dlunwrap(addr) ;T0[I" (p1);T@FI" Fiddle;TcRDoc::NormalModule00PK` ]:9d{fflast_error%3d-c.rinu[U:RDoc::AnyMethod[iI"last_error=:EFI"Fiddle::last_error=;TT: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GSets the last +Error+ of the current executing +Thread+ to +error+;T: @fileI"ext/fiddle/lib/fiddle.rb;T:0@omit_headings_from_table_of_contents_below000[I" (error);T@FI" Fiddle;TcRDoc::NormalModule00PK` ]<win32_last_error-c.rinu[U:RDoc::AnyMethod[iI"win32_last_error:EFI"Fiddle::win32_last_error;TT: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MReturns the last win32 +Error+ of the current executing +Thread+ or nil ;TI" if none;T: @fileI"ext/fiddle/lib/fiddle.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Fiddle;TcRDoc::NormalModule00PK` ]_kCRRHandle/file_name-i.rinu[U:RDoc::AnyMethod[iI"file_name:ETI"Fiddle::Handle#file_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Returns the file name of this handle.;T: @fileI"ext/fiddle/handle.c;T:0@omit_headings_from_table_of_contents_below0I"file_name ;T0[I"();T@FI" Handle;TcRDoc::NormalClass00PK` ]SHandle/%5b%5d-c.rinu[U:RDoc::AnyMethod[iI"[]:ETI"Fiddle::Handle::[];TT: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PGet the address as an Integer for the function named +name+. The function ;TI"(is searched via dlsym on RTLD_NEXT.;To:RDoc::Markup::BlankLineo; ; [I"&See man(3) dlsym() for more info.;T: @fileI"ext/fiddle/handle.c;T:0@omit_headings_from_table_of_contents_below0I"sym(name) ;T0[I" (p1);T@FI" Handle;TcRDoc::NormalClass00PK` ]E^^Handle/sym-i.rinu[U:RDoc::AnyMethod[iI"sym:ETI"Fiddle::Handle#sym;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AGet the address as an Integer for the function named +name+.;T: @fileI"ext/fiddle/handle.c;T:0@omit_headings_from_table_of_contents_below0I"sym(name) ;T0[I" (p1);T@FI" Handle;TcRDoc::NormalClass00PK` ]OzHandle/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Fiddle::Handle::new;TT: publico:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"man 3 dlopen for more.;T@o:RDoc::Markup::Verbatim; [I"lib = Fiddle::Handle.new ;T: @format0o; ; [I"LThe default is dependent on OS, and provide a handle for all libraries ;TI"Ralready loaded. For example, in most cases you can use this to access +libc+ ;TI"4functions, or ruby functions like +rb_str_new+.;T: @fileI"ext/fiddle/handle.c;T:0@omit_headings_from_table_of_contents_below0I"Inew(library = nil, flags = Fiddle::RTLD_LAZY | Fiddle::RTLD_GLOBAL) ;T0[I"(p1 = v1, p2 = v2);T@FI" Handle;TcRDoc::NormalClass00PK` ],HHHandle/to_i-i.rinu[U:RDoc::AnyMethod[iI" to_i:ETI"Fiddle::Handle#to_i;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Returns the memory address for this handle.;T: @fileI"ext/fiddle/handle.c;T:0@omit_headings_from_table_of_contents_below0I" to_i ;T0[I"();T@FI" Handle;TcRDoc::NormalClass00PK` ] zzHandle/disable_close-i.rinu[U:RDoc::AnyMethod[iI"disable_close:ETI"!Fiddle::Handle#disable_close;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GDisable a call to dlclose() when this handle is garbage collected.;T: @fileI"ext/fiddle/handle.c;T:0@omit_headings_from_table_of_contents_below0I"disable_close ;T0[I"();T@FI" Handle;TcRDoc::NormalClass00PK` ] Handle/cdesc-Handle.rinu[U:RDoc::NormalClass[iI" Handle:ETI"Fiddle::Handle;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"CThe Fiddle::Handle is the manner to access the dynamic library;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;T@S; ; i; I" Setup;T@o:RDoc::Markup::Verbatim;[ I""libc_so = "/lib64/libc.so.6" ;TI"=> "/lib64/libc.so.6" ;TI"+@handle = Fiddle::Handle.new(libc_so) ;TI"+=> # ;T: @format0S; ; i; I"Setup, with flags;T@o;;[ I""libc_so = "/lib64/libc.so.6" ;TI"=> "/lib64/libc.so.6" ;TI"T@handle = Fiddle::Handle.new(libc_so, Fiddle::RTLD_LAZY | Fiddle::RTLD_GLOBAL) ;TI"+=> # ;T;0o; ;[I""See RTLD_LAZY and RTLD_GLOBAL;T@S; ; i; I"Addresses to symbols;T@o;;[I"%strcpy_addr = @handle['strcpy'] ;TI"=> 140062278451968 ;T;0o; ;[I"or;T@o;;[I")strcpy_addr = @handle.sym('strcpy') ;TI"=> 140062278451968;T;0: @fileI"ext/fiddle/handle.c;T:0@omit_headings_from_table_of_contents_below0;0;0[[ U:RDoc::Constant[iI" NEXT;TI"Fiddle::Handle::NEXT;T00o;;[ o; ;[I" NEXT;T@o; ;[I",A predefined pseudo-handle of RTLD_NEXT;T@o; ;[I"KWhich will find the next occurrence of a function in the search order ;TI"after the current library.;T;@4;0@4@cRDoc::NormalClass0U;[iI" DEFAULT;TI"Fiddle::Handle::DEFAULT;T00o;;[ o; ;[I" DEFAULT;T@o; ;[I"/A predefined pseudo-handle of RTLD_DEFAULT;T@o; ;[I"JWhich will find the first occurrence of the desired symbol using the ;TI"!default library search order;T;@4;0@4@@G0U;[iI"RTLD_GLOBAL;TI" Fiddle::Handle::RTLD_GLOBAL;T00o;;[ o; ;[I"RTLD_GLOBAL;T@o; ;[I"rtld Fiddle::Handle flag.;T@o; ;[I"KThe symbols defined by this library will be made available for symbol ;TI"1resolution of subsequently loaded libraries.;T;@4;0@4@@G0U;[iI"RTLD_LAZY;TI"Fiddle::Handle::RTLD_LAZY;T00o;;[ o; ;[I"RTLD_LAZY;T@o; ;[I"rtld Fiddle::Handle flag.;T@o; ;[ I"MPerform lazy binding. Only resolve symbols as the code that references ;TI"Mthem is executed. If the symbol is never referenced, then it is never ;TI"Iresolved. (Lazy binding is only performed for function references; ;TI"Kreferences to variables are always immediately bound when the library ;TI"is loaded.);T;@4;0@4@@G0U;[iI" RTLD_NOW;TI"Fiddle::Handle::RTLD_NOW;T00o;;[ o; ;[I" RTLD_NOW;T@o; ;[I"rtld Fiddle::Handle flag.;T@o; ;[ I"KIf this value is specified or the environment variable LD_BIND_NOW is ;TI"Hset to a nonempty string, all undefined symbols in the library are ;TI"Mresolved before Fiddle.dlopen returns. If this cannot be done an error ;TI"is returned.;T;@4;0@4@@G0[[[I" class;T[[: public[[I"[];TI"ext/fiddle/handle.c;T[I"new;T@[I"sym;T@[:protected[[: private[[I" instance;T[[;[ [I"[];T@[I" close;T@[I"close_enabled?;T@[I"disable_close;T@[I"enable_close;T@[I"sym;T@[I" to_i;T@[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[I"ext/fiddle/closure.c;TI" Fiddle;TcRDoc::NormalModulePK` ]Handle/close-i.rinu[U:RDoc::AnyMethod[iI" close:ETI"Fiddle::Handle#close;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Close this handle.;To:RDoc::Markup::BlankLineo; ; [I"ICalling close more than once will raise a Fiddle::DLError exception.;T: @fileI"ext/fiddle/handle.c;T:0@omit_headings_from_table_of_contents_below0I" close ;T0[I"();T@FI" Handle;TcRDoc::NormalClass00PK` ]xǘtvvHandle/enable_close-i.rinu[U:RDoc::AnyMethod[iI"enable_close:ETI" Fiddle::Handle#enable_close;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FEnable a call to dlclose() when this handle is garbage collected.;T: @fileI"ext/fiddle/handle.c;T:0@omit_headings_from_table_of_contents_below0I"enable_close ;T0[I"();T@FI" Handle;TcRDoc::NormalClass00PK` ]9s\\Handle/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"Fiddle::Handle#[];TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AGet the address as an Integer for the function named +name+.;T: @fileI"ext/fiddle/handle.c;T:0@omit_headings_from_table_of_contents_below0I"sym(name) ;T0[I" (p1);T@FI" Handle;TcRDoc::NormalClass00PK` ]`MOOHandle/to_ptr-i.rinu[U:RDoc::AnyMethod[iI" to_ptr:ETI"Fiddle::Handle#to_ptr;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Returns the Fiddle::Pointer of this handle.;T: @fileI"ext/fiddle/handle.c;T:0@omit_headings_from_table_of_contents_below0I" to_ptr ;T0[I"();T@FI" Handle;TcRDoc::NormalClass00PK` ]|Handle/close_enabled%3f-i.rinu[U:RDoc::AnyMethod[iI"close_enabled?:ETI""Fiddle::Handle#close_enabled?;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"VReturns +true+ if dlclose() will be called when this handle is garbage collected.;To:RDoc::Markup::BlankLineo; ; [I"(See man(3) dlclose() for more info.;T: @fileI"ext/fiddle/handle.c;T:0@omit_headings_from_table_of_contents_below0I"close_enabled? ;T0[I"();T@FI" Handle;TcRDoc::NormalClass00PK` ]7E^^Handle/sym-c.rinu[U:RDoc::AnyMethod[iI"sym:ETI"Fiddle::Handle::sym;TT: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AGet the address as an Integer for the function named +name+.;T: @fileI"ext/fiddle/handle.c;T:0@omit_headings_from_table_of_contents_below0I"sym(name);T0[I" (p1);T@FI" Handle;TcRDoc::NormalClass00PK` ]B2Pointer/free-i.rinu[U:RDoc::AnyMethod[iI" free:ETI"Fiddle::Pointer#free;TF: publico:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I",Get the free function for this pointer.;To:RDoc::Markup::BlankLineo; ; [I"0Returns a new instance of Fiddle::Function.;T@o; ; [I"See Fiddle::Function.new;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"free => Fiddle::Function ;T0[I"();T@FI" Pointer;TcRDoc::NormalClass00PK` ]O_VPointer/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Fiddle::Pointer#inspect;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns a string formatted with an easily readable representation of the ;TI"#internal state of the pointer.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I" inspect ;T0[I"();T@FI" Pointer;TcRDoc::NormalClass00PK` ]MPointer/%5b%5d-c.rinu[U:RDoc::AnyMethod[iI"[]:ETI"Fiddle::Pointer::[];TT: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IGet the underlying pointer for ruby object +val+ and return it as a ;TI"Fiddle::Pointer object.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"?Fiddle::Pointer[val] => cptr to_ptr(val) => cptr ;T0[I" (p1);T@FI" Pointer;TcRDoc::NormalClass00PK` ]-Pointer/free%3d-i.rinu[U:RDoc::AnyMethod[iI" free=:ETI"Fiddle::Pointer#free=;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GSet the free function for this pointer to +function+ in the given ;TI"Fiddle::Function.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"free=(function) ;T0[I" (p1);T@FI" Pointer;TcRDoc::NormalClass00PK` ]UE9Pointer/eql%3f-i.rinu[U:RDoc::AnyMethod[iI" eql?:ETI"Fiddle::Pointer#eql?;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns true if +other+ wraps the same pointer, otherwise returns ;TI" false.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"%ptr.eql?(other) => true or false;T0[I" (p1);T@FI" Pointer;TcRDoc::NormalClass00PK` ]U vvPointer/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Fiddle::Pointer::new;TT: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NCreate a new pointer to +address+ with an optional +size+ and +freefunc+.;To:RDoc::Markup::BlankLineo; ; [I"F+freefunc+ will be called when the instance is garbage collected.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"Fiddle::Pointer.new(address) => fiddle_cptr new(address, size) => fiddle_cptr new(address, size, freefunc) => fiddle_cptr ;T0[I"(p1, p2 = v2, p3 = v3);T@FI" Pointer;TcRDoc::NormalClass00PK` ]L߱Pointer/ref-i.rinu[U:RDoc::AnyMethod[iI"ref:ETI"Fiddle::Pointer#ref;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QReturns a new Fiddle::Pointer instance that is a reference pointer for this ;TI" pointer.;To:RDoc::Markup::BlankLineo; ; [I".Analogous to the ampersand operator in C.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"ref;T0[I"();T@FI" Pointer;TcRDoc::NormalClass00PK` ]eSSPointer/to_i-i.rinu[U:RDoc::AnyMethod[iI" to_i:ETI"Fiddle::Pointer#to_i;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Returns the integer memory location of this pointer.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I" to_i;T0[I"();T@FI" Pointer;TcRDoc::NormalClass00PK` ]{Pointer/%2b%40-i.rinu[U:RDoc::AnyMethod[iI"+@:ETI"Fiddle::Pointer#+@;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns a new Fiddle::Pointer instance that is a dereferenced pointer for ;TI"this pointer.;To:RDoc::Markup::BlankLineo; ; [I")Analogous to the star operator in C.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I" ptr ;T0[I"();T@FI" Pointer;TcRDoc::NormalClass00PK` ]OOPointer/to_value-i.rinu[U:RDoc::AnyMethod[iI" to_value:ETI"Fiddle::Pointer#to_value;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Cast this pointer to a ruby object.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"to_value ;T0[I"();T@FI" Pointer;TcRDoc::NormalClass00PK` ]6"J==Pointer/size-i.rinu[U:RDoc::AnyMethod[iI" size:ETI"Fiddle::Pointer#size;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Get the size of this pointer.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I" size ;T0[I"();T@FI" Pointer;TcRDoc::NormalClass00PK` ]'˜Pointer/to_ptr-c.rinu[U:RDoc::AnyMethod[iI" to_ptr:ETI"Fiddle::Pointer::to_ptr;TT: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IGet the underlying pointer for ruby object +val+ and return it as a ;TI"Fiddle::Pointer object.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"to_ptr(val) => cptr;T0[I" (p1);T@FI" Pointer;TcRDoc::NormalClass00PK` ]_Pointer/to_str-i.rinu[U:RDoc::AnyMethod[iI" to_str:ETI"Fiddle::Pointer#to_str;TF: publico:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I".Returns the pointer contents as a string.;To:RDoc::Markup::BlankLineo; ; [I"RWhen called with no arguments, this method will return the contents with the ;TI"%length of this pointer's +size+.;T@o; ; [I"FWhen called with +len+, a string of +len+ bytes will be returned.;T@o; ; [I" See to_s;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"=ptr.to_str => string ptr.to_str(len) => string ;T0[I"(p1 = v1);T@FI" Pointer;TcRDoc::NormalClass00PK` ]61..Pointer/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"Fiddle::Pointer#[];TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Returns integer stored at _index_.;To:RDoc::Markup::BlankLineo; ; [I"KIf _start_ and _length_ are given, a string containing the bytes from ;TI"*_start_ of _length_ will be returned.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"Sptr[index] -> an_integer ptr[start, length] -> a_string ;T0[I"(p1, p2 = v2);T@FI" Pointer;TcRDoc::NormalClass00PK` ]#{{Pointer/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Fiddle::Pointer#to_s;TF: publico:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I".Returns the pointer contents as a string.;To:RDoc::Markup::BlankLineo; ; [I"OWhen called with no arguments, this method will return the contents until ;TI"the first NULL byte.;T@o; ; [I"FWhen called with +len+, a string of +len+ bytes will be returned.;T@o; ; [I"See to_str;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"9ptr.to_s => string ptr.to_s(len) => string ;T0[I"(p1 = v1);T@FI" Pointer;TcRDoc::NormalClass00PK` ]:JLLPointer/null%3f-i.rinu[U:RDoc::AnyMethod[iI" null?:ETI"Fiddle::Pointer#null?;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns +true+ if this is a null pointer.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I" null? ;T0[I"();T@FI" Pointer;TcRDoc::NormalClass00PK` ]"6XXPointer/to_int-i.rinu[U:RDoc::AnyMethod[iI" to_int:ETI"Fiddle::Pointer#to_int;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Returns the integer memory location of this pointer.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I" to_i ;T0[I"();T@FI" Pointer;TcRDoc::NormalClass00PK` ]IjmmPointer/freed%3f-i.rinu[U:RDoc::AnyMethod[iI" freed?:ETI"Fiddle::Pointer#freed?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns if the free function for this pointer has been called.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"freed? => bool ;T0[I"();T@FI" Pointer;TcRDoc::NormalClass00PK` ]'IPointer/%5b%5d%3d-i.rinu[U:RDoc::AnyMethod[iI"[]=:ETI"Fiddle::Pointer#[]=;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Set the value at +index+ to +int+.;To:RDoc::Markup::BlankLineo; ; [I"QOr, set the memory at +start+ until +length+ with the contents of +string+, ;TI"Othe memory from +dl_cptr+, or the memory pointed at by the memory address ;TI" +addr+.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"~ptr[index] = int -> int ptr[start, length] = string or cptr or addr -> string or dl_cptr or addr ;T0[I"(p1, p2, p3 = v3);T@FI" Pointer;TcRDoc::NormalClass00PK` ]>Pointer/call_free-i.rinu[U:RDoc::AnyMethod[iI"call_free:ETI"Fiddle::Pointer#call_free;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MCall the free function for this pointer. Calling more than once will do ;TI"Anothing. Does nothing if there is no free function attached.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"call_free => nil ;T0[I"();T@FI" Pointer;TcRDoc::NormalClass00PK` ]]1+Pointer/%2d%40-i.rinu[U:RDoc::AnyMethod[iI"-@:ETI"Fiddle::Pointer#-@;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QReturns a new Fiddle::Pointer instance that is a reference pointer for this ;TI" pointer.;To:RDoc::Markup::BlankLineo; ; [I".Analogous to the ampersand operator in C.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I" ref ;T0[I"();T@FI" Pointer;TcRDoc::NormalClass00PK` ]:mmPointer/%2b-i.rinu[U:RDoc::AnyMethod[iI"+:ETI"Fiddle::Pointer#+;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns a new pointer instance that has been advanced +n+ bytes.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"ptr + n => new cptr ;T0[I" (p1);T@FI" Pointer;TcRDoc::NormalClass00PK` ]C+ooPointer/%2d-i.rinu[U:RDoc::AnyMethod[iI"-:ETI"Fiddle::Pointer#-;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns a new pointer instance that has been moved back +n+ bytes.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"ptr - n => new cptr ;T0[I" (p1);T@FI" Pointer;TcRDoc::NormalClass00PK` ]`YQQPointer/size%3d-i.rinu[U:RDoc::AnyMethod[iI" size=:ETI"Fiddle::Pointer#size=;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Set the size of this pointer to +size+;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"size=(size) ;T0[I" (p1);T@FI" Pointer;TcRDoc::NormalClass00PK` ]Z} Pointer/cdesc-Pointer.rinu[U:RDoc::NormalClass[iI" Pointer:ETI"Fiddle::Pointer;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"4Fiddle::Pointer is a class to handle C pointers;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[ [I"[];TI"ext/fiddle/pointer.c;T[I" malloc;T@[I"new;T@[I" to_ptr;T@[:protected[[: private[[I" instance;T[[; [[I"+;T@[I"+@;T@[I"-;T@[I"-@;T@[I"<=>;T@[I"==;T@[I"[];T@[I"[]=;T@[I" eql?;T@[I" free;T@[I" free=;T@[I" inspect;T@[I" null?;T@[I"ptr;T@[I"ref;T@[I" size;T@[I" size=;T@[I" to_i;T@[I" to_int;T@[I" to_s;T@[I" to_str;T@[I" to_value;T@[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/fiddle/closure.c;TI" Fiddle;TcRDoc::NormalModulePK` ]#Pointer/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"Fiddle::Pointer#==;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns true if +other+ wraps the same pointer, otherwise returns ;TI" false.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"%ptr == other => true or false;T0[I" (p1);T@FI" Pointer;TcRDoc::NormalClass00PK` ]K Pointer/ptr-i.rinu[U:RDoc::AnyMethod[iI"ptr:ETI"Fiddle::Pointer#ptr;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns a new Fiddle::Pointer instance that is a dereferenced pointer for ;TI"this pointer.;To:RDoc::Markup::BlankLineo; ; [I")Analogous to the star operator in C.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"ptr;T0[I"();T@FI" Pointer;TcRDoc::NormalClass00PK` ]CW%Pointer/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI"Fiddle::Pointer#<=>;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns -1 if less than, 0 if equal to, 1 if greater than +other+.;To:RDoc::Markup::BlankLineo; ; [I"8Returns nil if +ptr+ cannot be compared to +other+.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I")ptr <=> other => -1, 0, 1, or nil ;T0[I" (p1);T@FI" Pointer;TcRDoc::NormalClass00PK` ]okPointer/malloc-c.rinu[U:RDoc::AnyMethod[iI" malloc:ETI"Fiddle::Pointer::malloc;TT: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GAllocate +size+ bytes of memory and associate it with an optional ;TI"J+freefunc+ that will be called when the pointer is garbage collected.;To:RDoc::Markup::BlankLineo; ; [I"L+freefunc+ must be an address pointing to a function or an instance of ;TI"Fiddle::Function;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"NFiddle::Pointer.malloc(size, freefunc = nil) => fiddle pointer instance ;T0[I"(p1, p2 = v2);T@FI" Pointer;TcRDoc::NormalClass00PK` ] zwin32_last_socket_error%3d-c.rinu[U:RDoc::AnyMethod[iI"win32_last_socket_error=:ETI"%Fiddle::win32_last_socket_error=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ASets the last win32 socket +Error+ of the current executing ;TI"+Thread+ to +error+;T: @fileI"ext/fiddle/lib/fiddle.rb;T:0@omit_headings_from_table_of_contents_below000[I" (error);T@FI" Fiddle;TcRDoc::NormalModule00PK` ]"Error/cdesc-Error.rinu[U:RDoc::NormalClass[iI" Error:ETI"Fiddle::Error;TI"StandardError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"#Generic error class for Fiddle;T: @fileI"ext/fiddle/fiddle.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/fiddle/closure.c;TI" Fiddle;TcRDoc::NormalModulePK` ]qmBasicTypes/cdesc-BasicTypes.rinu[U:RDoc::NormalModule[iI"BasicTypes:EFI"Fiddle::BasicTypes;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"RAdds basic type aliases to the including class for use with Fiddle::Importer.;To:RDoc::Markup::BlankLineo; ;[I"JThe aliases added are +uint+ and +u_int+ (unsigned int) and ;TI"2+ulong+ and +u_long+ (unsigned long);T: @fileI"#ext/fiddle/lib/fiddle/types.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[@I" Fiddle;TcRDoc::NormalModulePK` ]!皕win32_last_socket_error-c.rinu[U:RDoc::AnyMethod[iI"win32_last_socket_error:ETI"$Fiddle::win32_last_socket_error;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns the last win32 socket +Error+ of the current executing ;TI"+Thread+ or nil if none;T: @fileI"ext/fiddle/lib/fiddle.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Fiddle;TcRDoc::NormalModule00PK` ]A dlopen-c.rinu[U:RDoc::AnyMethod[iI" dlopen:EFI"Fiddle::dlopen;TT: publico:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"LCreates a new handler that opens +library+, and returns an instance of ;TI"Fiddle::Handle.;To:RDoc::Markup::BlankLineo; ; [I"QIf +nil+ is given for the +library+, Fiddle::Handle::DEFAULT is used, which ;TI"Ois the equivalent to RTLD_DEFAULT. See man 3 dlopen for more.;T@o:RDoc::Markup::Verbatim; [I"lib = Fiddle.dlopen(nil) ;T: @format0o; ; [I"LThe default is dependent on OS, and provide a handle for all libraries ;TI"Kalready loaded. For example, in most cases you can use this to access ;TI";+libc+ functions, or ruby functions like +rb_str_new+.;T@o; ; [I"%See Fiddle::Handle.new for more.;T: @fileI"ext/fiddle/lib/fiddle.rb;T:0@omit_headings_from_table_of_contents_below0I"'dlopen(library) => Fiddle::Handle ;T0[I"(library);T@FI" Fiddle;TcRDoc::NormalModule00PK` ]":xx dlwrap-c.rinu[U:RDoc::AnyMethod[iI" dlwrap:ETI"Fiddle::dlwrap;TT: publico:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PReturns a memory pointer of a function's hexadecimal address location +val+;To:RDoc::Markup::BlankLineo; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [ I"0lib = Fiddle.dlopen('/lib64/libc-2.15.so') ;TI"+=> # ;TI" ;TI"+Fiddle.dlwrap(lib['strcpy'].to_s(16)) ;TI"=> 25522520;T: @format0: @fileI"ext/fiddle/fiddle.c;T:0@omit_headings_from_table_of_contents_below0I"Fiddle.dlwrap(val) ;T0[I" (p1);T@FI" Fiddle;TcRDoc::NormalModule00PK` ]CUnionEntity/set_ctypes-i.rinu[U:RDoc::AnyMethod[iI"set_ctypes:EFI"$Fiddle::CUnionEntity#set_ctypes;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MCalculate the necessary offset and for each union member with the given ;TI" +types+;T: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I" (types);T@FI"CUnionEntity;TcRDoc::NormalClass00PK` ]@&<<"CUnionEntity/cdesc-CUnionEntity.rinu[U:RDoc::NormalClass[iI"CUnionEntity:ETI"Fiddle::CUnionEntity;TI"Fiddle::CStructEntity;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"A C union wrapper;T: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[I" malloc;FI"$ext/fiddle/lib/fiddle/struct.rb;T[I" size;F@[:protected[[: private[[I" instance;T[[; [[I"set_ctypes;F@[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[@I" Fiddle;TcRDoc::NormalModulePK` ]!>6SSCUnionEntity/size-c.rinu[U:RDoc::AnyMethod[iI" size:EFI"Fiddle::CUnionEntity::size;TT: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturns the size needed for the union with the given +types+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I" Fiddle::CUnionEntity.size( ;TI" [ Fiddle::TYPE_DOUBLE, ;TI" Fiddle::TYPE_INT, ;TI" Fiddle::TYPE_CHAR, ;TI"$ Fiddle::TYPE_VOIDP ]) #=> 8;T: @format0: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I" (types);T@FI"CUnionEntity;TcRDoc::NormalClass00PK` ]FYdCUnion/cdesc-CUnion.rinu[U:RDoc::NormalClass[iI" CUnion:ETI"Fiddle::CUnion;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"C union shell;T: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[I"entity_class;FI"$ext/fiddle/lib/fiddle/struct.rb;T[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[@I" Fiddle;TcRDoc::NormalModulePK` ]"jkOOCUnion/entity_class-c.rinu[U:RDoc::AnyMethod[iI"entity_class:EFI"!Fiddle::CUnion::entity_class;TT: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%accessor to Fiddle::CUnionEntity;T: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" CUnion;TcRDoc::NormalClass00PK` ]=Rfflast_error-c.rinu[U:RDoc::AnyMethod[iI"last_error:EFI"Fiddle::last_error;TT: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns the last +Error+ of the current executing +Thread+ or nil if none;T: @fileI"ext/fiddle/lib/fiddle.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Fiddle;TcRDoc::NormalModule00PK` ]<JJClosure/ctype-i.rinu[U:RDoc::Attr[iI" ctype:ETI"Fiddle::Closure#ctype;TI"R;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0the C type of the return of the FFI closure;T: @fileI"%ext/fiddle/lib/fiddle/closure.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Fiddle::Closure;TcRDoc::NormalClass0PK` ]h!!Closure/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Fiddle::Closure::new;TT: publico:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"$Construct a new Closure object.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"'+ret+ is the C type to be returned;To;;0; [o; ; [I"E+args+ is an Array of arguments, passed to the callback function;To;;0; [o; ; [I"$+abi+ is the abi of the closure;T@o; ; [I"HIf there is an error in preparing the ffi_cif or ffi_prep_closure, ;TI"(then a RuntimeError will be raised.;T: @fileI"ext/fiddle/closure.c;T:0@omit_headings_from_table_of_contents_below0I"+new(ret, args, abi = Fiddle::DEFAULT) ;T0[I"(p1, p2, p3 = v3);T@$FI" Closure;TcRDoc::NormalClass00PK` ]:Closure/cdesc-Closure.rinu[U:RDoc::NormalClass[iI" Closure:ETI"Fiddle::Closure;TI" Object;To:RDoc::Markup::Document: @parts[o;;[ S:RDoc::Markup::Heading: leveli: textI"Description;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"4An FFI closure wrapper, for handling callbacks.;T@S; ; i; I" Example;T@o:RDoc::Markup::Verbatim;[I",closure = Class.new(Fiddle::Closure) { ;TI" def call ;TI" 10 ;TI" end ;TI"!}.new(Fiddle::TYPE_INT, []) ;TI": #=> #<#:0x0000000150d240> ;TI"@func = Fiddle::Function.new(closure, [], Fiddle::TYPE_INT) ;TI"1 #=> # ;TI"func.call ;TI" #=> 10;T: @format0: @fileI"ext/fiddle/closure.c;T:0@omit_headings_from_table_of_contents_below0o;;[;I"%ext/fiddle/lib/fiddle/closure.rb;T;0;0;0[[ I" args;TI"R;T: publicFI"%ext/fiddle/lib/fiddle/closure.rb;T[ I" ctype;TI"R;T;F@*[[[[I" class;T[[;[[I"new;TI"ext/fiddle/closure.c;T[:protected[[: private[[I" instance;T[[;[[I" to_i;T@8[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[@"@%I" Fiddle;TcRDoc::NormalModulePK` ]HG@@Closure/to_i-i.rinu[U:RDoc::AnyMethod[iI" to_i:ETI"Fiddle::Closure#to_i;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Returns the memory address for this closure;T: @fileI"ext/fiddle/closure.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Closure;TcRDoc::NormalClass00PK` ]H99Closure/args-i.rinu[U:RDoc::Attr[iI" args:ETI"Fiddle::Closure#args;TI"R;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!arguments of the FFI closure;T: @fileI"%ext/fiddle/lib/fiddle/closure.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Fiddle::Closure;TcRDoc::NormalClass0PK` ]=?UUClosure/BlockCaller/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"&Fiddle::Closure::BlockCaller::new;TT: publico:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI"Description;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph; [I"(Construct a new BlockCaller object.;T@ o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o;; [I")+ctype+ is the C type to be returned;To;;0; [o;; [I"#+args+ are passed the callback;To;;0; [o;; [I"$+abi+ is the abi of the closure;T@ o;; [I"LIf there is an error in preparing the +ffi_cif+ or +ffi_prep_closure+, ;TI"(then a RuntimeError will be raised.;T@ S; ; i; I" Example;T@ o:RDoc::Markup::Verbatim; [ I"include Fiddle ;TI" ;TI"Bcb = Closure::BlockCaller.new(TYPE_INT, [TYPE_INT]) do |one| ;TI" one ;TI" end ;TI" ;TI"2func = Function.new(cb, [TYPE_INT], TYPE_INT);T: @format0: @fileI"%ext/fiddle/lib/fiddle/closure.rb;T:0@omit_headings_from_table_of_contents_below000[I";(ctype, args, abi = Fiddle::Function::DEFAULT, &block);T@1TI"BlockCaller;TcRDoc::NormalClass00PK` ]gbb(Closure/BlockCaller/cdesc-BlockCaller.rinu[U:RDoc::NormalClass[iI"BlockCaller:ETI"!Fiddle::Closure::BlockCaller;TI"Fiddle::Closure;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"IExtends Fiddle::Closure to allow for building the closure in a block;T: @fileI"%ext/fiddle/lib/fiddle/closure.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[I"new;TI"%ext/fiddle/lib/fiddle/closure.rb;T[:protected[[: private[[I" instance;T[[; [[I" call;F@[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[@I"Fiddle::Closure;TcRDoc::NormalClassPK` ]IFClosure/BlockCaller/call-i.rinu[U:RDoc::AnyMethod[iI" call:EFI"&Fiddle::Closure::BlockCaller#call;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Calls the constructed BlockCaller, with +args+;To:RDoc::Markup::BlankLineo; ; [I"8For an example see Fiddle::Closure::BlockCaller.new;T: @fileI"%ext/fiddle/lib/fiddle/closure.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI"BlockCaller;TcRDoc::NormalClass00PK` ]s7==Importer/bind_function-i.rinu[U:RDoc::AnyMethod[iI"bind_function:EFI"#Fiddle::Importer#bind_function;TF: publico:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I";Returns a new closure wrapper for the +name+ function.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I"/+ctype+ is the return type of the function;To;;0; [o; ; [I"H+argtype+ is an Array of arguments, passed to the callback function;To;;0; [o; ; [I"*+call_type+ is the abi of the closure;To;;0; [o; ; [I"&+block+ is passed to the callback;T@o; ; [I"See Fiddle::Closure;T: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below000[I"4(name, ctype, argtype, call_type = nil, &block);T@(FI" Importer;FcRDoc::NormalModule00PK` ]SImporter/cdesc-Importer.rinu[U:RDoc::NormalModule[iI" Importer:EFI"Fiddle::Importer;T0o:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"KA DSL that provides the means to dynamically load libraries and build ;TI"Imodules around them including calling extern functions within the C ;TI""library that has been loaded.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;T@o:RDoc::Markup::Verbatim;[I"require 'fiddle' ;TI"require 'fiddle/import' ;TI" ;TI"module LibSum ;TI" extend Fiddle::Importer ;TI" dlload './libsum.so' ;TI") extern 'double sum(double*, int)' ;TI"% extern 'double split(double)' ;TI"end;T: @format0: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[I" Fiddle;To;;[;@ ;0I"$ext/fiddle/lib/fiddle/import.rb;T[I" CParser;To;;[;@ ;0@([[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[I"[];F@([I" bind;F@([I"bind_function;F@([I"create_value;F@([I" dlload;F@([I" extern;F@([I" handler;F@([I"import_function;F@([I"import_symbol;F@([I"import_value;F@([I" sizeof;F@([I" struct;F@([I"typealias;F@([I" union;F@([I" value;F@([;[[;[[I"parse_bind_options;F@([[I" Importer;To;;[;@ ;0@([U:RDoc::Context::Section[i0o;;[;0;0[@ I" Fiddle;TcRDoc::NormalModulePK` ]7,Importer/handler-i.rinu[U:RDoc::AnyMethod[iI" handler:EFI"Fiddle::Importer#handler;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*The Fiddle::CompositeHandler instance;To:RDoc::Markup::BlankLineo; ; [I"1Will raise an error if no handlers are open.;T: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Importer;FcRDoc::NormalModule00PK` ]i4Importer/sizeof-i.rinu[U:RDoc::AnyMethod[iI" sizeof:EFI"Fiddle::Importer#sizeof;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns the sizeof +ty+, using Fiddle::Importer.parse_ctype to determine ;TI"4the C type and the appropriate Fiddle constant.;T: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below000[I" (ty);T@FI" Importer;FcRDoc::NormalModule00PK` ] JImporter/type_alias-i.rinu[U:RDoc::Attr[iI"type_alias:ETI" Fiddle::Importer#type_alias;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Fiddle::Importer;TcRDoc::NormalModule0PK` ]\b}Importer/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:EFI"Fiddle::Importer#[];TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns the function mapped to +name+, that was created by either ;TI"5Fiddle::Importer.extern or Fiddle::Importer.bind;T: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI" Importer;FcRDoc::NormalModule00PK` ]PImporter/struct-i.rinu[U:RDoc::AnyMethod[iI" struct:EFI"Fiddle::Importer#struct;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CCreates a class to wrap the C struct described by +signature+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"*MyStruct = struct ['int i', 'char c'];T: @format0: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below000[I"(signature);T@FI" Importer;FcRDoc::NormalModule00PK` ]vuuImporter/typealias-i.rinu[U:RDoc::AnyMethod[iI"typealias:EFI"Fiddle::Importer#typealias;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Sets the type alias for +alias_type+ as +orig_type+;T: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below000[I"(alias_type, orig_type);T@FI" Importer;FcRDoc::NormalModule00PK` ]uGllImporter/extern-i.rinu[U:RDoc::AnyMethod[iI" extern:EFI"Fiddle::Importer#extern;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Creates a global method from the given C +signature+.;T: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below000[I"(signature, *opts);T@FI" Importer;FcRDoc::NormalModule00PK` ]`ƨImporter/import_function-i.rinu[U:RDoc::AnyMethod[iI"import_function:EFI"%Fiddle::Importer#import_function;TF: publico:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PReturns a new Fiddle::Function instance at the memory address of the given ;TI"+name+ function.;To:RDoc::Markup::BlankLineo; ; [I"2Raises a DLError if the +name+ doesn't exist.;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"G+argtype+ is an Array of arguments, passed to the +name+ function.;To;;0; [o; ; [I"/+ctype+ is the return type of the function;To;;0; [o; ; [I"++call_type+ is the ABI of the function;T@o; ; [I"!See also Fiddle:Function.new;T@o; ; [I"=See Fiddle::CompositeHandler.sym and Fiddle::Handler.sym;T: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below000[I",(name, ctype, argtype, call_type = nil);T@*FI" Importer;FcRDoc::NormalModule00PK` ].5Importer/import_value-i.rinu[U:RDoc::AnyMethod[iI"import_value:EFI""Fiddle::Importer#import_value;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns a new instance of the C struct with the value +ty+ at the +addr+ ;TI" address.;T: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below000[I"(ty, addr);T@FI" Importer;FcRDoc::NormalModule00PK` ]LXImporter/create_value-i.rinu[U:RDoc::AnyMethod[iI"create_value:EFI""Fiddle::Importer#create_value;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Creates a class to wrap the C struct with the value +ty+;To:RDoc::Markup::BlankLineo; ; [I"%See also Fiddle::Importer.struct;T: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below000[[I" value;Fo;; [; @; 0I"(ty, val=nil);T@FI" Importer;FcRDoc::NormalModule00PK` ]  Importer/parse_bind_options-i.rinu[U:RDoc::AnyMethod[iI"parse_bind_options:EFI"(Fiddle::Importer#parse_bind_options;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below000[I" (opts);T@ FI" Importer;FcRDoc::NormalModule00PK` ]Importer/union-i.rinu[U:RDoc::AnyMethod[iI" union:EFI"Fiddle::Importer#union;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BCreates a class to wrap the C union described by +signature+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"(MyUnion = union ['int i', 'char c'];T: @format0: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below000[I"(signature);T@FI" Importer;FcRDoc::NormalModule00PK` ]rt1Importer/bind-i.rinu[U:RDoc::AnyMethod[iI" bind:EFI"Fiddle::Importer#bind;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JCreates a global method from the given C +signature+ using the given ;TI"4+opts+ as bind parameters with the given block.;T: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below000[I"(signature, *opts, &blk);T@FI" Importer;FcRDoc::NormalModule00PK` ]AڷC77Importer/import_symbol-i.rinu[U:RDoc::AnyMethod[iI"import_symbol:EFI"#Fiddle::Importer#import_symbol;TF: publico:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OReturns a new Fiddle::Pointer instance at the memory address of the given ;TI"+name+ symbol.;To:RDoc::Markup::BlankLineo; ; [I"2Raises a DLError if the +name+ doesn't exist.;T@o; ; [I" # ;TI"f = Fiddle::Function.new( ;TI" @libc['strcpy'], ;TI"1 [Fiddle::TYPE_VOIDP, Fiddle::TYPE_VOIDP], ;TI" Fiddle::TYPE_VOIDP) ;TI"1 #=> # ;TI"buff = "000" ;TI" #=> "000" ;TI"str = f.call(buff, "123") ;TI"b #=> # ;TI"str.to_s ;TI"=> "123" ;T: @format0S; ; i; I"ABI check;T@o;;[ I"(@libc = DL.dlopen "/lib/libc.so.6" ;TI"/ #=> # ;TI"Uf = Fiddle::Function.new(@libc['strcpy'], [TYPE_VOIDP, TYPE_VOIDP], TYPE_VOIDP) ;TI"1 #=> # ;TI"(f.abi == Fiddle::Function::DEFAULT ;TI" #=> true;T;0: @fileI"ext/fiddle/function.c;T:0@omit_headings_from_table_of_contents_below0o;;[;I"&ext/fiddle/lib/fiddle/function.rb;T;0;0;0[[ I"abi;TI"R;T: publicFI"&ext/fiddle/lib/fiddle/function.rb;T[ I" name;TI"R;T;F@9[ I"ptr;TI"R;T;F@9[U:RDoc::Constant[iI" DEFAULT;TI"Fiddle::Function::DEFAULT;T00o;;[o; ;[I" DEFAULT;T@o; ;[I"Default ABI;T;@1;0@1@cRDoc::NormalClass0U;[iI" STDCALL;TI"Fiddle::Function::STDCALL;T00o;;[o; ;[I" STDCALL;T@o; ;[I"3FFI implementation of WIN32 stdcall convention;T;@1;0@1@@M0[[[I" class;T[[;[[I"new;TI"ext/fiddle/function.c;T[:protected[[: private[[I" instance;T[[;[[I" call;T@c[I" to_i;F@9[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[I"ext/fiddle/closure.c;T@4I" Fiddle;TcRDoc::NormalModulePK` ]bJJFunction/to_proc-i.rinu[U:RDoc::AnyMethod[iI" to_proc:ETI"Fiddle::Function#to_proc;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Turn this function in to a proc;T: @fileI"&ext/fiddle/lib/fiddle/function.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Function;TcRDoc::NormalClass00PK` ]qFunction/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Fiddle::Function::new;TT: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Constructs a Function object.;To:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I"8+ptr+ is a referenced function, of a Fiddle::Handle;To;;0; [o; ; [I"B+args+ is an Array of arguments, passed to the +ptr+ function;To;;0; [o; ; [I"2+ret_type+ is the return type of the function;To;;0; [o; ; [I"%+abi+ is the ABI of the function;T: @fileI"ext/fiddle/function.c;T:0@omit_headings_from_table_of_contents_below0I"-new(ptr, args, ret_type, abi = DEFAULT) ;T0[I"#(p1, p2, p3, p4 = v4, p5 = {});T@$FI" Function;TcRDoc::NormalClass00PK` ]dL[PPFunction/to_i-i.rinu[U:RDoc::AnyMethod[iI" to_i:EFI"Fiddle::Function#to_i;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1The integer memory location of this function;T: @fileI"&ext/fiddle/lib/fiddle/function.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Function;TcRDoc::NormalClass00PK` ]gFunction/call-i.rinu[U:RDoc::AnyMethod[iI" call:ETI"Fiddle::Function#call;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Calls the constructed Function, with +args+;To:RDoc::Markup::BlankLineo; ; [I"(For an example see Fiddle::Function;T: @fileI"ext/fiddle/function.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Function;TcRDoc::NormalClass00PK` ]%~ZZFunction/need_gvl%3f-i.rinu[U:RDoc::AnyMethod[iI"need_gvl?:ETI"Fiddle::Function#need_gvl?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Whether GVL is needed to call this function;T: @fileI"&ext/fiddle/lib/fiddle/function.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Function;TcRDoc::NormalClass00PK` ]^h99Function/name-i.rinu[U:RDoc::Attr[iI" name:ETI"Fiddle::Function#name;TI"R;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The name of this function;T: @fileI"&ext/fiddle/lib/fiddle/function.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Fiddle::Function;TcRDoc::NormalClass0PK` ]&z>::Function/ptr-i.rinu[U:RDoc::Attr[iI"ptr:ETI"Fiddle::Function#ptr;TI"R;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!The address of this function;T: @fileI"&ext/fiddle/lib/fiddle/function.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Fiddle::Function;TcRDoc::NormalClass0PK` ]Z66Function/abi-i.rinu[U:RDoc::Attr[iI"abi:ETI"Fiddle::Function#abi;TI"R;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The ABI of the Function.;T: @fileI"&ext/fiddle/lib/fiddle/function.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Fiddle::Function;TcRDoc::NormalClass0PK` ].cPDLError/cdesc-DLError.rinu[U:RDoc::NormalClass[iI" DLError:ETI"Fiddle::DLError;TI"StandardError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"$standard dynamic load exception;T: @fileI"ext/fiddle/fiddle.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/fiddle/closure.c;TI" Fiddle;TcRDoc::NormalModulePK` ]RbbCompositeHandler/handlers-i.rinu[U:RDoc::AnyMethod[iI" handlers:EFI"&Fiddle::CompositeHandler#handlers;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Array of the currently loaded libraries.;T: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"CompositeHandler;TcRDoc::NormalClass00PK` ]CompositeHandler/sym-i.rinu[U:RDoc::AnyMethod[iI"sym:EFI"!Fiddle::CompositeHandler#sym;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KReturns the address as an Integer from any handlers with the function ;TI"named +symbol+.;To:RDoc::Markup::BlankLineo; ; [I".Raises a DLError if the handle is closed.;T: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below000[I" (symbol);T@FI"CompositeHandler;TcRDoc::NormalClass00PK` ]eHCompositeHandler/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI""Fiddle::CompositeHandler::new;TT: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Create a new handler with the open +handlers+;To:RDoc::Markup::BlankLineo; ; [I"/Used internally by Fiddle::Importer.dlload;T: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below000[I"(handlers);T@FI"CompositeHandler;TcRDoc::NormalClass00PK` ]TTCompositeHandler/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:EFI" Fiddle::CompositeHandler#[];TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%See Fiddle::CompositeHandler.sym;T: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below000[I" (symbol);T@FI"CompositeHandler;TcRDoc::NormalClass00PK` ]UNN*CompositeHandler/cdesc-CompositeHandler.rinu[U:RDoc::NormalClass[iI"CompositeHandler:ETI"Fiddle::CompositeHandler;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"(Used internally by Fiddle::Importer;T: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[I"new;TI"$ext/fiddle/lib/fiddle/import.rb;T[:protected[[: private[[I" instance;T[[; [[I"[];F@[I" handlers;F@[I"sym;F@[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[@I" Fiddle;TcRDoc::NormalModulePK` ]a dlopen-i.rinu[U:RDoc::AnyMethod[iI" dlopen:EFI"Fiddle#dlopen;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"LCreates a new handler that opens +library+, and returns an instance of ;TI"Fiddle::Handle.;To:RDoc::Markup::BlankLineo; ; [I"QIf +nil+ is given for the +library+, Fiddle::Handle::DEFAULT is used, which ;TI"Ois the equivalent to RTLD_DEFAULT. See man 3 dlopen for more.;T@o:RDoc::Markup::Verbatim; [I"lib = Fiddle.dlopen(nil) ;T: @format0o; ; [I"LThe default is dependent on OS, and provide a handle for all libraries ;TI"Kalready loaded. For example, in most cases you can use this to access ;TI";+libc+ functions, or ruby functions like +rb_str_new+.;T@o; ; [I"%See Fiddle::Handle.new for more.;T: @fileI"ext/fiddle/lib/fiddle.rb;T:0@omit_headings_from_table_of_contents_below0I"'dlopen(library) => Fiddle::Handle ;T0[I"(library);T@FI" Fiddle;TcRDoc::NormalModule00PK` ]L8CStructEntity/alignment-c.rinu[U:RDoc::AnyMethod[iI"alignment:ETI"%Fiddle::CStructEntity::alignment;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I" (types);T@ FI"CStructEntity;TcRDoc::NormalClass00PK` ]= CStructEntity/set_ctypes-i.rinu[U:RDoc::AnyMethod[iI"set_ctypes:EFI"%Fiddle::CStructEntity#set_ctypes;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JCalculates the offsets and sizes for the given +types+ in the struct.;T: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I" (types);T@FI"CStructEntity;TcRDoc::NormalClass00PK` ]vC!!CStructEntity/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Fiddle::CStructEntity::new;TT: publico:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"EWraps the C pointer +addr+ as a C struct with the given +types+.;To:RDoc::Markup::BlankLineo; ; [I"MWhen the instance is garbage collected, the C function +func+ is called.;T@o; ; [I"!See also Fiddle::Pointer.new;T: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I"(addr, types, func = nil);T@TI"CStructEntity;TcRDoc::NormalClass00PK` ]VFFCStructEntity/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:EFI"Fiddle::CStructEntity#[];TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Fetch struct member +name+;T: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@TI"CStructEntity;TcRDoc::NormalClass00PK` ]PPXXCStructEntity/size-c.rinu[U:RDoc::AnyMethod[iI" size:EFI" Fiddle::CStructEntity::size;TT: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns the offset for the packed sizes for the given +types+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"!Fiddle::CStructEntity.size( ;TI" [ Fiddle::TYPE_DOUBLE, ;TI" Fiddle::TYPE_INT, ;TI" Fiddle::TYPE_CHAR, ;TI"% Fiddle::TYPE_VOIDP ]) #=> 24;T: @format0: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I" (types);T@FI"CStructEntity;TcRDoc::NormalClass00PK` ]oyy$CStructEntity/cdesc-CStructEntity.rinu[U:RDoc::NormalClass[iI"CStructEntity:ETI"Fiddle::CStructEntity;TI"Fiddle::Pointer;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"A C struct wrapper;T: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[I" malloc;FI"$ext/fiddle/lib/fiddle/struct.rb;T[I"new;T@[I" size;F@[:protected[[: private[[I" instance;T[[; [ [I"[];F@[I"[]=;F@[I"assign_names;F@[I"set_ctypes;F@[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[@I" Fiddle;TcRDoc::NormalModulePK` ]s[[CStructEntity/%5b%5d%3d-i.rinu[U:RDoc::AnyMethod[iI"[]=:EFI"Fiddle::CStructEntity#[]=;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Set struct member +name+, to value +val+;T: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, val);T@TI"CStructEntity;TcRDoc::NormalClass00PK` ]g rrCStructEntity/assign_names-i.rinu[U:RDoc::AnyMethod[iI"assign_names:EFI"'Fiddle::CStructEntity#assign_names;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Set the names of the +members+ in this C struct;T: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I"(members);T@FI"CStructEntity;TcRDoc::NormalClass00PK` ]ʕ.CStructEntity/malloc-c.rinu[U:RDoc::AnyMethod[iI" malloc:EFI""Fiddle::CStructEntity::malloc;TT: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Allocates a C struct with the +types+ provided.;To:RDoc::Markup::BlankLineo; ; [I"MWhen the instance is garbage collected, the C function +func+ is called.;T: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I"(types, func = nil);T@FI"CStructEntity;TcRDoc::NormalClass00PK` ]pgGG free-c.rinu[U:RDoc::AnyMethod[iI" free:ETI"Fiddle::free;TT: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Free the memory at address +addr+;T: @fileI"ext/fiddle/fiddle.c;T:0@omit_headings_from_table_of_contents_below0I"Fiddle.free(addr) ;T0[I" (p1);T@FI" Fiddle;TcRDoc::NormalModule00PK` ]^ N N cdesc-Fiddle.rinu[U:RDoc::NormalModule[iI" Fiddle:ET@0o:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/fiddle/closure.c;T:0@omit_headings_from_table_of_contents_below0o;;[o:RDoc::Markup::Paragraph;[I"A libffi wrapper for Ruby.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"Description;T@o; ;[I"LFiddle is an extension to translate a foreign function interface (FFI) ;TI"with ruby.;T@o; ;[I"KIt wraps {libffi}[http://sourceware.org/libffi/], a popular C library ;TI"Iwhich provides a portable interface that allows code written in one ;TI"7language to call code written in another language.;T@S; ;i;I" Example;T@o; ;[I">Here we will use Fiddle::Function to wrap {floor(3) from ;TI",libm}[http://linux.die.net/man/3/floor];T@o:RDoc::Markup::Verbatim;[I"require 'fiddle' ;TI" ;TI",libm = Fiddle.dlopen('/lib/libm.so.6') ;TI" ;TI"#floor = Fiddle::Function.new( ;TI" libm['floor'], ;TI" [Fiddle::TYPE_DOUBLE], ;TI" Fiddle::TYPE_DOUBLE ;TI") ;TI" ;TI"%puts floor.call(3.14159) #=> 3.0;T: @format0; I"ext/fiddle/fiddle.c;T; 0o;;[; I"ext/fiddle/lib/fiddle.rb;T; 0o;;[; I"%ext/fiddle/lib/fiddle/closure.rb;T; 0o;;[; I"%ext/fiddle/lib/fiddle/cparser.rb;T; 0o;;[; I"&ext/fiddle/lib/fiddle/function.rb;T; 0o;;[; I"$ext/fiddle/lib/fiddle/import.rb;T; 0o;;[; I""ext/fiddle/lib/fiddle/pack.rb;T; 0o;;[; I"$ext/fiddle/lib/fiddle/struct.rb;T; 0o;;[; I"#ext/fiddle/lib/fiddle/types.rb;T; 0o;;[; I"#ext/fiddle/lib/fiddle/value.rb;T; 0; 0; 0[[0U:RDoc::Constant[iI"TYPE_VOID;TI"Fiddle::TYPE_VOID;T00o;;[o; ;[I"TYPE_VOID;T@o; ;[I"C type - void;T; @1; 0@1@cRDoc::NormalModule0U;[iI"TYPE_VOIDP;TI"Fiddle::TYPE_VOIDP;T00o;;[o; ;[I"TYPE_VOIDP;T@o; ;[I"C type - void*;T; @1; 0@1@@[0U;[iI"TYPE_CHAR;TI"Fiddle::TYPE_CHAR;T00o;;[o; ;[I"TYPE_CHAR;T@o; ;[I"C type - char;T; @1; 0@1@@[0U;[iI"TYPE_SHORT;TI"Fiddle::TYPE_SHORT;T00o;;[o; ;[I"TYPE_SHORT;T@o; ;[I"C type - short;T; @1; 0@1@@[0U;[iI" TYPE_INT;TI"Fiddle::TYPE_INT;T00o;;[o; ;[I" TYPE_INT;T@o; ;[I"C type - int;T; @1; 0@1@@[0U;[iI"TYPE_LONG;TI"Fiddle::TYPE_LONG;T00o;;[o; ;[I"TYPE_LONG;T@o; ;[I"C type - long;T; @1; 0@1@@[0U;[iI"TYPE_LONG_LONG;TI"Fiddle::TYPE_LONG_LONG;T00o;;[o; ;[I"TYPE_LONG_LONG;T@o; ;[I"C type - long long;T; @1; 0@1@@[0U;[iI"TYPE_FLOAT;TI"Fiddle::TYPE_FLOAT;T00o;;[o; ;[I"TYPE_FLOAT;T@o; ;[I"C type - float;T; @1; 0@1@@[0U;[iI"TYPE_DOUBLE;TI"Fiddle::TYPE_DOUBLE;T00o;;[o; ;[I"TYPE_DOUBLE;T@o; ;[I"C type - double;T; @1; 0@1@@[0U;[iI"TYPE_SIZE_T;TI"Fiddle::TYPE_SIZE_T;T00o;;[o; ;[I"TYPE_SIZE_T;T@o; ;[I"C type - size_t;T; @1; 0@1@@[0U;[iI"TYPE_SSIZE_T;TI"Fiddle::TYPE_SSIZE_T;T00o;;[o; ;[I"TYPE_SSIZE_T;T@o; ;[I"C type - ssize_t;T; @1; 0@1@@[0U;[iI"TYPE_PTRDIFF_T;TI"Fiddle::TYPE_PTRDIFF_T;T00o;;[o; ;[I"TYPE_PTRDIFF_T;T@o; ;[I"C type - ptrdiff_t;T; @1; 0@1@@[0U;[iI"TYPE_INTPTR_T;TI"Fiddle::TYPE_INTPTR_T;T00o;;[o; ;[I"TYPE_INTPTR_T;T@o; ;[I"C type - intptr_t;T; @1; 0@1@@[0U;[iI"TYPE_UINTPTR_T;TI"Fiddle::TYPE_UINTPTR_T;T00o;;[o; ;[I"TYPE_UINTPTR_T;T@o; ;[I"C type - uintptr_t;T; @1; 0@1@@[0U;[iI"ALIGN_VOIDP;TI"Fiddle::ALIGN_VOIDP;T00o;;[o; ;[I"ALIGN_VOIDP;T@o; ;[I""The alignment size of a void*;T; @1; 0@1@@[0U;[iI"ALIGN_CHAR;TI"Fiddle::ALIGN_CHAR;T00o;;[o; ;[I"ALIGN_CHAR;T@o; ;[I"!The alignment size of a char;T; @1; 0@1@@[0U;[iI"ALIGN_SHORT;TI"Fiddle::ALIGN_SHORT;T00o;;[o; ;[I"ALIGN_SHORT;T@o; ;[I""The alignment size of a short;T; @1; 0@1@@[0U;[iI"ALIGN_INT;TI"Fiddle::ALIGN_INT;T00o;;[o; ;[I"ALIGN_INT;T@o; ;[I"!The alignment size of an int;T; @1; 0@1@@[0U;[iI"ALIGN_LONG;TI"Fiddle::ALIGN_LONG;T00o;;[o; ;[I"ALIGN_LONG;T@o; ;[I"!The alignment size of a long;T; @1; 0@1@@[0U;[iI"ALIGN_LONG_LONG;TI"Fiddle::ALIGN_LONG_LONG;T00o;;[o; ;[I"ALIGN_LONG_LONG;T@o; ;[I"&The alignment size of a long long;T; @1; 0@1@@[0U;[iI"ALIGN_FLOAT;TI"Fiddle::ALIGN_FLOAT;T00o;;[o; ;[I"ALIGN_FLOAT;T@o; ;[I""The alignment size of a float;T; @1; 0@1@@[0U;[iI"ALIGN_DOUBLE;TI"Fiddle::ALIGN_DOUBLE;T00o;;[o; ;[I"ALIGN_DOUBLE;T@o; ;[I"#The alignment size of a double;T; @1; 0@1@@[0U;[iI"ALIGN_SIZE_T;TI"Fiddle::ALIGN_SIZE_T;T00o;;[o; ;[I"ALIGN_SIZE_T;T@o; ;[I"#The alignment size of a size_t;T; @1; 0@1@@[0U;[iI"ALIGN_SSIZE_T;TI"Fiddle::ALIGN_SSIZE_T;T00o;;[o; ;[I"ALIGN_SSIZE_T;T@o; ;[I"$The alignment size of a ssize_t;T; @1; 0@1@@[0U;[iI"ALIGN_PTRDIFF_T;TI"Fiddle::ALIGN_PTRDIFF_T;T00o;;[o; ;[I"ALIGN_PTRDIFF_T;T@o; ;[I"&The alignment size of a ptrdiff_t;T; @1; 0@1@@[0U;[iI"ALIGN_INTPTR_T;TI"Fiddle::ALIGN_INTPTR_T;T00o;;[o; ;[I"ALIGN_INTPTR_T;T@o; ;[I"%The alignment size of a intptr_t;T; @1; 0@1@@[0U;[iI"ALIGN_UINTPTR_T;TI"Fiddle::ALIGN_UINTPTR_T;T00o;;[o; ;[I"ALIGN_UINTPTR_T;T@o; ;[I"&The alignment size of a uintptr_t;T; @1; 0@1@@[0U;[iI" WINDOWS;TI"Fiddle::WINDOWS;T00o;;[o; ;[I":Returns a boolean regarding whether the host is WIN32;T; @1; 0@1@@[0U;[iI"SIZEOF_VOIDP;TI"Fiddle::SIZEOF_VOIDP;T00o;;[o; ;[I"SIZEOF_VOIDP;T@o; ;[I"size of a void*;T; @1; 0@1@@[0U;[iI"SIZEOF_CHAR;TI"Fiddle::SIZEOF_CHAR;T00o;;[o; ;[I"SIZEOF_CHAR;T@o; ;[I"size of a char;T; @1; 0@1@@[0U;[iI"SIZEOF_SHORT;TI"Fiddle::SIZEOF_SHORT;T00o;;[o; ;[I"SIZEOF_SHORT;T@o; ;[I"size of a short;T; @1; 0@1@@[0U;[iI"SIZEOF_INT;TI"Fiddle::SIZEOF_INT;T00o;;[o; ;[I"SIZEOF_INT;T@o; ;[I"size of an int;T; @1; 0@1@@[0U;[iI"SIZEOF_LONG;TI"Fiddle::SIZEOF_LONG;T00o;;[o; ;[I"SIZEOF_LONG;T@o; ;[I"size of a long;T; @1; 0@1@@[0U;[iI"SIZEOF_LONG_LONG;TI"Fiddle::SIZEOF_LONG_LONG;T00o;;[o; ;[I"SIZEOF_LONG_LONG;T@o; ;[I"size of a long long;T; @1; 0@1@@[0U;[iI"SIZEOF_FLOAT;TI"Fiddle::SIZEOF_FLOAT;T00o;;[o; ;[I"SIZEOF_FLOAT;T@o; ;[I"size of a float;T; @1; 0@1@@[0U;[iI"SIZEOF_DOUBLE;TI"Fiddle::SIZEOF_DOUBLE;T00o;;[o; ;[I"SIZEOF_DOUBLE;T@o; ;[I"size of a double;T; @1; 0@1@@[0U;[iI"SIZEOF_SIZE_T;TI"Fiddle::SIZEOF_SIZE_T;T00o;;[o; ;[I"SIZEOF_SIZE_T;T@o; ;[I"size of a size_t;T; @1; 0@1@@[0U;[iI"SIZEOF_SSIZE_T;TI"Fiddle::SIZEOF_SSIZE_T;T00o;;[o; ;[I"SIZEOF_SSIZE_T;T@o; ;[I"size of a ssize_t;T; @1; 0@1@@[0U;[iI"SIZEOF_PTRDIFF_T;TI"Fiddle::SIZEOF_PTRDIFF_T;T00o;;[o; ;[I"SIZEOF_PTRDIFF_T;T@o; ;[I"size of a ptrdiff_t;T; @1; 0@1@@[0U;[iI"SIZEOF_INTPTR_T;TI"Fiddle::SIZEOF_INTPTR_T;T00o;;[o; ;[I"SIZEOF_INTPTR_T;T@o; ;[I"size of a intptr_t;T; @1; 0@1@@[0U;[iI"SIZEOF_UINTPTR_T;TI"Fiddle::SIZEOF_UINTPTR_T;T00o;;[o; ;[I"SIZEOF_UINTPTR_T;T@o; ;[I"size of a uintptr_t;T; @1; 0@1@@[0U;[iI"RUBY_FREE;TI"Fiddle::RUBY_FREE;T00o;;[o; ;[I"RUBY_FREE;T@o; ;[I")Address of the ruby_xfree() function;T; @1; 0@1@@[0U;[iI"BUILD_RUBY_PLATFORM;TI" Fiddle::BUILD_RUBY_PLATFORM;T00o;;[ o; ;[I"BUILD_RUBY_PLATFORM;T@o; ;[I"7Platform built against (i.e. "x86_64-linux", etc.);T@o; ;[I"See also RUBY_PLATFORM;T; @1; 0@1@@[0[[[I" class;T[[: public[[I" dlopen;FI"ext/fiddle/lib/fiddle.rb;T[I" dlunwrap;TI"ext/fiddle/fiddle.c;T[I" dlwrap;T@[[I" free;T@[[I"last_error;F@X[I"last_error=;F@X[I" malloc;T@[[I" realloc;T@[[I"win32_last_error;F@X[I"win32_last_error=;F@X[:protected[[: private[[I" instance;T[[;[[;[[;[[@W@X[[U:RDoc::Context::Section[i0o;;[; 0; 0[@ @1@4@7@:@=@@@C@F@I@L@LcRDoc::TopLevelPK` ]h4ClearedReferenceError/cdesc-ClearedReferenceError.rinu[U:RDoc::NormalClass[iI"ClearedReferenceError:ETI""Fiddle::ClearedReferenceError;TI"rb_eFiddleError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I" Cleared reference exception;T: @fileI"ext/fiddle/pinned.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/fiddle/closure.c;TI" Fiddle;TcRDoc::NormalModulePK` ]SSPinned/clear-i.rinu[U:RDoc::AnyMethod[iI" clear:ETI"Fiddle::Pinned#clear;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Clear the reference to the object this is pinning.;T: @fileI"ext/fiddle/pinned.c;T:0@omit_headings_from_table_of_contents_below0I" clear ;T0[I"();T@FI" Pinned;TcRDoc::NormalClass00PK` ]оPinned/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Fiddle::Pinned::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MCreate a new pinned object reference. The Fiddle::Pinned instance will ;TI")prevent the GC from moving +object+.;T: @fileI"ext/fiddle/pinned.c;T:0@omit_headings_from_table_of_contents_below0I"6Fiddle::Pinned.new(object) => pinned_object ;T0[I" (p1);T@FI" Pinned;TcRDoc::NormalClass00PK` ]`ixRRPinned/ref-i.rinu[U:RDoc::AnyMethod[iI"ref:ETI"Fiddle::Pinned#ref;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Object ;TI" ;TI"'parse_ctype('int increment(int)') ;TI"> #=> ["increment", Fiddle::TYPE_INT, [Fiddle::TYPE_INT]];T: @format0: @fileI"%ext/fiddle/lib/fiddle/cparser.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[I"parse_ctype;FI"%ext/fiddle/lib/fiddle/cparser.rb;T[I"parse_signature;F@1[I"parse_struct_signature;F@1[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[@I" Fiddle;TcRDoc::NormalModulePK` ]ō8%%CParser/split_arguments-i.rinu[U:RDoc::AnyMethod[iI"split_arguments:ETI"$Fiddle::CParser#split_arguments;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"%ext/fiddle/lib/fiddle/cparser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(arguments, sep=',');T@ FI" CParser;TcRDoc::NormalModule00PK` ]txCParser/parse_ctype-i.rinu[U:RDoc::AnyMethod[iI"parse_ctype:EFI" Fiddle::CParser#parse_ctype;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NGiven a String of C type +ty+, returns the corresponding Fiddle constant.;To:RDoc::Markup::BlankLineo; ; [I"N+ty+ can also accept an Array of C type Strings, and will be returned in ;TI"a corresponding Array.;T@o; ; [I"JIf Hash +tymap+ is provided, +ty+ is expected to be the key, and the ;TI".value will be the C type to be looked up.;T@o; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [I"include Fiddle::CParser ;TI" #=> Object ;TI" ;TI"parse_ctype('int') ;TI" #=> Fiddle::TYPE_INT ;TI" ;TI"parse_ctype('double') ;TI" #=> Fiddle::TYPE_DOUBLE ;TI" ;TI""parse_ctype('unsigned char') ;TI" #=> -Fiddle::TYPE_CHAR;T: @format0: @fileI"%ext/fiddle/lib/fiddle/cparser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(ty, tymap=nil);T@'FI" CParser;FcRDoc::NormalModule00PK` ]Da  CParser/compact-i.rinu[U:RDoc::AnyMethod[iI" compact:ETI"Fiddle::CParser#compact;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"%ext/fiddle/lib/fiddle/cparser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(signature);T@ FI" CParser;TcRDoc::NormalModule00PK` ]!ZL#CParser/parse_struct_signature-i.rinu[U:RDoc::AnyMethod[iI"parse_struct_signature:EFI"+Fiddle::CParser#parse_struct_signature;TF: publico:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I" Parses a C struct's members;To:RDoc::Markup::BlankLineo; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [ I"include Fiddle::CParser ;TI" #=> Object ;TI" ;TI"1parse_struct_signature(['int i', 'char c']) ;TI"> #=> [[Fiddle::TYPE_INT, Fiddle::TYPE_CHAR], ["i", "c"]];T: @format0: @fileI"%ext/fiddle/lib/fiddle/cparser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(signature, tymap=nil);T@FI" CParser;FcRDoc::NormalModule00PK` ]HwIICParser/parse_signature-i.rinu[U:RDoc::AnyMethod[iI"parse_signature:EFI"$Fiddle::CParser#parse_signature;TF: publico:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"#Parses a C prototype signature;To:RDoc::Markup::BlankLineo; ; [I"NIf Hash +tymap+ is provided, the return value and the arguments from the ;TI"N+signature+ are expected to be keys, and the value will be the C type to ;TI"be looked up.;T@o; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [ I"include Fiddle::CParser ;TI" #=> Object ;TI" ;TI"3parse_signature('double sum(double, double)') ;TI"S #=> ["sum", Fiddle::TYPE_DOUBLE, [Fiddle::TYPE_DOUBLE, Fiddle::TYPE_DOUBLE]];T: @format0: @fileI"%ext/fiddle/lib/fiddle/cparser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(signature, tymap=nil);T@FI" CParser;FcRDoc::NormalModule00PK` ]]tyStructArray/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Fiddle::StructArray::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I" (ptr, type, initial_values);T@ TI"StructArray;TcRDoc::NormalClass00PK` ]c+AStructArray/to_ptr-i.rinu[U:RDoc::AnyMethod[iI" to_ptr:ETI"Fiddle::StructArray#to_ptr;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"StructArray;TcRDoc::NormalClass00PK` ]  StructArray/%5b%5d%3d-i.rinu[U:RDoc::AnyMethod[iI"[]=:ETI"Fiddle::StructArray#[]=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I"(index, value);T@ TI"StructArray;TcRDoc::NormalClass00PK` ]^WW StructArray/cdesc-StructArray.rinu[U:RDoc::NormalClass[iI"StructArray:ETI"Fiddle::StructArray;TI" Array;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"'Wrapper for arrays within a struct;T: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"$ext/fiddle/lib/fiddle/struct.rb;T[I" instance;T[[; [[; [[;[[I"[]=;T@![I" to_ptr;T@![[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$ext/fiddle/lib/fiddle/struct.rb;TI" Fiddle;TcRDoc::NormalModulePK` ]_zCStruct/unstruct-i.rinu[U:RDoc::AnyMethod[iI" unstruct:ETI"Fiddle::CStruct#unstruct;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I" (value);T@ FI" CStruct;TcRDoc::NormalClass00PK` ][KCStruct/each_pair-i.rinu[U:RDoc::AnyMethod[iI"each_pair:ETI"Fiddle::CStruct#each_pair;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below00I"name, self;T[I"();T@ FI" CStruct;TcRDoc::NormalClass00PK` ]~'CStruct/replace-i.rinu[U:RDoc::AnyMethod[iI" replace:ETI"Fiddle::CStruct#replace;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I"(another);T@ FI" CStruct;TcRDoc::NormalClass00PK` ]aCStruct/cdesc-CStruct.rinu[U:RDoc::NormalClass[iI" CStruct:ETI"Fiddle::CStruct;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"C struct shell;T: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[I"entity_class;FI"$ext/fiddle/lib/fiddle/struct.rb;T[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[@I" Fiddle;TcRDoc::NormalModulePK` ]N]RRCStruct/entity_class-c.rinu[U:RDoc::AnyMethod[iI"entity_class:EFI""Fiddle::CStruct::entity_class;TT: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&accessor to Fiddle::CStructEntity;T: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" CStruct;TcRDoc::NormalClass00PK` ]CStruct/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"Fiddle::CStruct#each;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below00I" self;T[I"();T@ FI" CStruct;TcRDoc::NormalClass00PK` ]CStruct/to_h-i.rinu[U:RDoc::AnyMethod[iI" to_h:ETI"Fiddle::CStruct#to_h;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" CStruct;TcRDoc::NormalClass00PK` ]P| malloc-c.rinu[U:RDoc::AnyMethod[iI" malloc:ETI"Fiddle::malloc;TT: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KAllocate +size+ bytes of memory and return the integer memory address ;TI"for the allocated memory.;T: @fileI"ext/fiddle/fiddle.c;T:0@omit_headings_from_table_of_contents_below0I"Fiddle.malloc(size) ;T0[I" (p1);T@FI" Fiddle;TcRDoc::NormalModule00PK` ]\8CStructBuilder/create-i.rinu[U:RDoc::AnyMethod[iI" create:EFI""Fiddle::CStructBuilder#create;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"%Construct a new class given a C:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I">class +klass+ (CUnion, CStruct, or other that provide an ;TI"#entity_class);To;;0; [o; ; [I"K+types+ (Fiddle::TYPE_INT, Fiddle::TYPE_SIZE_T, etc., see the C types ;TI"constants);To;;0; [o; ; [I"corresponding +members+;To:RDoc::Markup::BlankLineo; ; [I"VFiddle::Importer#struct and Fiddle::Importer#union wrap this functionality in an ;TI"easy-to-use manner.;T@!o; ; [I" Example:;T@!o:RDoc::Markup::Verbatim; [I"require 'fiddle/struct' ;TI"require 'fiddle/cparser' ;TI" ;TI"include Fiddle::CParser ;TI" ;TI"Atypes, members = parse_struct_signature(['int i','char c']) ;TI" ;TI"NMyStruct = Fiddle::CStructBuilder.create(Fiddle::CUnion, types, members) ;TI" ;TI"obj = MyStruct.allocate;T: @format0: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I"(klass, types, members);T@5FI"CStructBuilder;FcRDoc::NormalModule00PK` ]CStructBuilder/create-c.rinu[U:RDoc::AnyMethod[iI" create:EFI"#Fiddle::CStructBuilder::create;TT: publico:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"%Construct a new class given a C:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I">class +klass+ (CUnion, CStruct, or other that provide an ;TI"#entity_class);To;;0; [o; ; [I"K+types+ (Fiddle::TYPE_INT, Fiddle::TYPE_SIZE_T, etc., see the C types ;TI"constants);To;;0; [o; ; [I"corresponding +members+;To:RDoc::Markup::BlankLineo; ; [I"VFiddle::Importer#struct and Fiddle::Importer#union wrap this functionality in an ;TI"easy-to-use manner.;T@!o; ; [I" Example:;T@!o:RDoc::Markup::Verbatim; [I"require 'fiddle/struct' ;TI"require 'fiddle/cparser' ;TI" ;TI"include Fiddle::CParser ;TI" ;TI"Atypes, members = parse_struct_signature(['int i','char c']) ;TI" ;TI"NMyStruct = Fiddle::CStructBuilder.create(Fiddle::CUnion, types, members) ;TI" ;TI"obj = MyStruct.allocate;T: @format0: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I"(klass, types, members);T@5FI"CStructBuilder;FcRDoc::NormalModule00PK` ]_؏&CStructBuilder/cdesc-CStructBuilder.rinu[U:RDoc::NormalModule[iI"CStructBuilder:EFI"Fiddle::CStructBuilder;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"7Used to construct C classes (CUnion, CStruct, etc);To:RDoc::Markup::BlankLineo; ;[I"VFiddle::Importer#struct and Fiddle::Importer#union wrap this functionality in an ;TI"easy-to-use manner.;T: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[I" create;FI"$ext/fiddle/lib/fiddle/struct.rb;T[:protected[[: private[[I" instance;T[[; [[;[[;[[@ @![[U:RDoc::Context::Section[i0o;;[; 0; 0[@I" Fiddle;TcRDoc::NormalModulePK%]ZCUnionEntity/malloc-c.rinu[U:RDoc::AnyMethod[iI" malloc:EFI"!Fiddle::CUnionEntity::malloc;TT: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Allocates a C union the +types+ provided.;To:RDoc::Markup::BlankLineo; ; [I"MWhen the instance is garbage collected, the C function +func+ is called.;T: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I"(types, func=nil);T@FI"CUnionEntity;TcRDoc::NormalClass00PK` ],j dlunwrap-c.rinu[PK` ]:9d{fflast_error%3d-c.rinu[PK` ]<win32_last_error-c.rinu[PK` ]_kCRR|Handle/file_name-i.rinu[PK` ]SHandle/%5b%5d-c.rinu[PK` ]E^^6 Handle/sym-i.rinu[PK` ]Oz Handle/new-c.rinu[PK` ],HHHandle/to_i-i.rinu[PK` ] zz(Handle/disable_close-i.rinu[PK` ] Handle/cdesc-Handle.rinu[PK` ]Handle/close-i.rinu[PK` ]xǘtvv!Handle/enable_close-i.rinu[PK` ]9s\\#Handle/%5b%5d-i.rinu[PK` ]`MOO1%Handle/to_ptr-i.rinu[PK` ]|&Handle/close_enabled%3f-i.rinu[PK` ]7E^^(Handle/sym-c.rinu[PK` ]B2*Pointer/free-i.rinu[PK` ]O_V,Pointer/inspect-i.rinu[PK` ]My.Pointer/%5b%5d-c.rinu[PK` ]-r0Pointer/free%3d-i.rinu[PK` ]UE9?2Pointer/eql%3f-i.rinu[PK` ]U vv4Pointer/new-c.rinu[PK` ]L߱6Pointer/ref-i.rinu[PK` ]eSS8Pointer/to_i-i.rinu[PK` ]{b:Pointer/%2b%40-i.rinu[PK` ]OOl<Pointer/to_value-i.rinu[PK` ]6"J==>Pointer/size-i.rinu[PK` ]'˜~?Pointer/to_ptr-c.rinu[PK` ]_YAPointer/to_str-i.rinu[PK` ]61..,DPointer/%5b%5d-i.rinu[PK` ]#{{FPointer/to_s-i.rinu[PK` ]:JLLYIPointer/null%3f-i.rinu[PK` ]"6XXJPointer/to_int-i.rinu[PK` ]IjmmLPointer/freed%3f-i.rinu[PK` ]'I6NPointer/%5b%5d%3d-i.rinu[PK` ]>QPointer/call_free-i.rinu[PK` ]]1+"SPointer/%2d%40-i.rinu[PK` ]:mm.UPointer/%2b-i.rinu[PK` ]C+ooVPointer/%2d-i.rinu[PK` ]`YQQXPointer/size%3d-i.rinu[PK` ]Z} ZPointer/cdesc-Pointer.rinu[PK` ]#]Pointer/%3d%3d-i.rinu[PK` ]K _Pointer/ptr-i.rinu[PK` ]CW%aPointer/%3c%3d%3e-i.rinu[PK` ]okcPointer/malloc-c.rinu[PK` ] zfwin32_last_socket_error%3d-c.rinu[PK` ]"hError/cdesc-Error.rinu[PK` ]qmjBasicTypes/cdesc-BasicTypes.rinu[PK` ]!皕mwin32_last_socket_error-c.rinu[PK` ]A odlopen-c.rinu[PK` ]":xx sdlwrap-c.rinu[PK` ]OvCUnionEntity/set_ctypes-i.rinu[PK` ]@&<<",xCUnionEntity/cdesc-CUnionEntity.rinu[PK` ]!>6SSzCUnionEntity/size-c.rinu[PK` ]FYdS}CUnion/cdesc-CUnion.rinu[PK` ]"jkOOCUnion/entity_class-c.rinu[PK` ]=Rff/last_error-c.rinu[PK` ]<JJԂClosure/ctype-i.rinu[PK` ]h!!`Closure/new-c.rinu[PK` ]:Closure/cdesc-Closure.rinu[PK` ]HG@@Closure/to_i-i.rinu[PK` ]H99Closure/args-i.rinu[PK` ]=?UUClosure/BlockCaller/new-c.rinu[PK` ]gbb(1Closure/BlockCaller/cdesc-BlockCaller.rinu[PK` ]IFClosure/BlockCaller/call-i.rinu[PK` ]s7==Importer/bind_function-i.rinu[PK` ]SImporter/cdesc-Importer.rinu[PK` ]7,]Importer/handler-i.rinu[PK` ]i4FImporter/sizeof-i.rinu[PK` ] J2Importer/type_alias-i.rinu[PK` ]\b}Importer/%5b%5d-i.rinu[PK` ]P`Importer/struct-i.rinu[PK` ]vuuImporter/typealias-i.rinu[PK` ]uGll=Importer/extern-i.rinu[PK` ]`ƨImporter/import_function-i.rinu[PK` ].5Importer/import_value-i.rinu[PK` ]LXѴImporter/create_value-i.rinu[PK` ]  Importer/parse_bind_options-i.rinu[PK` ]fImporter/union-i.rinu[PK` ]rt1Importer/bind-i.rinu[PK` ]AڷC77wImporter/import_symbol-i.rinu[PK` ] 66Importer/value-i.rinu[PK` ]\oYddrImporter/dlload-i.rinu[PK` ]p3 realloc-c.rinu[PK` ]Wps]Function/cdesc-Function.rinu[PK` ]bJJFunction/to_proc-i.rinu[PK` ]q6Function/new-c.rinu[PK` ]dL[PPeFunction/to_i-i.rinu[PK` ]gFunction/call-i.rinu[PK` ]%~ZZFunction/need_gvl%3f-i.rinu[PK` ]^h99qFunction/name-i.rinu[PK` ]&z>::Function/ptr-i.rinu[PK` ]Z66gFunction/abi-i.rinu[PK` ].cPDLError/cdesc-DLError.rinu[PK` ]RbbCompositeHandler/handlers-i.rinu[PK` ]CompositeHandler/sym-i.rinu[PK` ]eHCompositeHandler/new-c.rinu[PK` ]TTCompositeHandler/%5b%5d-i.rinu[PK` ]UNN*CompositeHandler/cdesc-CompositeHandler.rinu[PK` ]a ;dlopen-i.rinu[PK` ]L89CStructEntity/alignment-c.rinu[PK` ]= CStructEntity/set_ctypes-i.rinu[PK` ]vC!!kCStructEntity/new-c.rinu[PK` ]VFFCStructEntity/%5b%5d-i.rinu[PK` ]PPXXaCStructEntity/size-c.rinu[PK` ]oyy$CStructEntity/cdesc-CStructEntity.rinu[PK` ]s[[CStructEntity/%5b%5d%3d-i.rinu[PK` ]g rrtCStructEntity/assign_names-i.rinu[PK` ]ʕ.5CStructEntity/malloc-c.rinu[PK` ]pgGG afree-c.rinu[PK` ]^ N N cdesc-Fiddle.rinu[PK` ]h4n ClearedReferenceError/cdesc-ClearedReferenceError.rinu[PK` ]SS"Pinned/clear-i.rinu[PK` ]оl$Pinned/new-c.rinu[PK` ]`ixRRi&Pinned/ref-i.rinu[PK` ]Ab'Pinned/cdesc-Pinned.rinu[PK` ]3trr5*Pinned/cleared%3f-i.rinu[PK` ]xx+win32_last_error%3d-c.rinu[PK` ],o#%%-Win32Types/cdesc-Win32Types.rinu[PK` ]:s˵ 3CParser/cdesc-CParser.rinu[PK` ]ō8%%7CParser/split_arguments-i.rinu[PK` ]tx8CParser/parse_ctype-i.rinu[PK` ]Da  <CParser/compact-i.rinu[PK` ]!ZL# >CParser/parse_struct_signature-i.rinu[PK` ]HwII@CParser/parse_signature-i.rinu[PK` ]]typDStructArray/new-c.rinu[PK` ]c+AEStructArray/to_ptr-i.rinu[PK` ]  GStructArray/%5b%5d%3d-i.rinu[PK` ]^WW tHStructArray/cdesc-StructArray.rinu[PK` ]_zKCStruct/unstruct-i.rinu[PK` ][KhLCStruct/each_pair-i.rinu[PK` ]~'MCStruct/replace-i.rinu[PK` ]aOCStruct/cdesc-CStruct.rinu[PK` ]N]RRYQCStruct/entity_class-c.rinu[PK` ]RCStruct/each-i.rinu[PK` ]:TCStruct/to_h-i.rinu[PK` ]P| vUmalloc-c.rinu[PK` ]\8CWCStructBuilder/create-i.rinu[PK` ]R\CStructBuilder/create-c.rinu[PK` ]_؏&aaCStructBuilder/cdesc-CStructBuilder.rinu[PK%]ZudCUnionEntity/malloc-c.rinu[PKe/f