2 # DLTYPE[INT][:rb2c]["arg0"] => "NUM2INT(arg0)"
3 # DLTYPE[DOUBLE][:c2rb]["r"] => "rb_float_new(r)"
17 :rb2c => proc{|x| "NUM2CHR(#{x})"},
18 :c2rb => proc{|x| "CHR2FIX(#{x})"},
26 :rb2c => proc{|x| "FIX2INT(#{x})"},
27 :c2rb => proc{|x| "INT2FIX(#{x})"},
35 :rb2c => proc{|x| "NUM2INT(#{x})"},
36 :c2rb => proc{|x| "INT2NUM(#{x})"},
44 :rb2c => proc{|x| "NUM2INT(#{x})"},
45 :c2rb => proc{|x| "INT2NUM(#{x})"},
53 :rb2c => proc{|x| "(float)(RFLOAT(#{x})->value)"},
54 :c2rb => proc{|x| "rb_float_new((double)#{x})"},
62 :rb2c => proc{|x| "RFLOAT(#{x})->value"},
63 :c2rb => proc{|x| "rb_float_new(#{x})"},
71 :rb2c => proc{|x| "rb_dlptr2cptr(#{x})"},
72 :c2rb => proc{|x| "rb_dlptr_new(#{x},sizeof(void*),0)"},
85 (t & (0x07 << (i * 3))) >> (i * 3)
101 while( (t != VOID && i > 0) || (i == 0) )
102 ts.push(DLTYPE[t][:ctype])
109 def types2ctypes(types)
112 res.push(DLTYPE[t][:ctype])