whitepages/thrift — pull request #4 by axos88 (2013-06-21 23:01:30+00:00)
Title: T monkeypatch thrift module

Added fastcall struct that may be used to call by supplying a C function pointer or by rb_funcall if the C fptr is unavailable.

use by initailizing the fastcall by either fastcall_init_ruby (use rb_funcall), or fastcall_init_c (use a C fptr), and the call using fastcall_call(fastcall_struct, object, parameters)

Drawback is that one parameter must be supplied, even if the needed parameters is 0, supply Qnil in this case.

Added a new function to the protocol layer API, named get_protocol_method_table, which - if implemented - will return a C protocol_method_table structure containing the fastcall objectc to call its API. This is used to prevent having to switch ro ruby and back to C when two communicating layers are both implemented in C.