From: Khat Harr Date: 2009-08-27T00:55:18+09:00 Subject: Help with C embedding I'm having trouble with a weird error that I don't understand the cause of. I'm pretty new to embedding so I'm sure I'm overlooking something. The relevant C code is as follows: ======================================== VALUE input_trigger(VALUE button) { PspCtrlButtons cbutt = (PspCtrlButtons)NUM2ULONG(button); if((pad.Buttons & cbutt) && !(oldpad.Buttons & cbutt)) {return Qtrue;} return Qfalse; } //this gets called during initialization: rb_define_module_function(ruby_input_mod, "trigger?", (VALUE (*)(...))input_trigger, 1); ======================================== I get errors when calling the method though: ======================================== result = Input.trigger?(16) ======================================== It's saying ======================================== can't convert Module into Integer ======================================== I don't understand why it expects a Module there. Can anyone see what I'm doing wrong here? I'd really appreciate any advice. :) -- Posted via http://www.ruby-forum.com/.