From: Lloyd D. <ll...@no...> - 2005-05-19 23:01:58
|
BTW, which other list would be appropriate for such function? I want to do a binding to ObjectiveC Basically I need to implement a function like retval_t objc_msg_send(id obj, SEL sel, ...); which would forward its call (same arguments, including the unidentified = ... (va_list)) to an other function know by pointer which would be = looked up from the 1st 2 parameters. the return value should be = forwarded too!! I was thinking to something as below (a simple jump!), but I'm not sure: 1. it will work (maye the puch/pop will overwrite fct?! my ASM is ten = years old...) 2. of the syntax pseudo code to be corrected (for x86/windows/gcc): return_t objc_msg_send(id obj, SEL sel, ...) { asm pushall; void (*)() fct =3D lookup(obj, sel); asm popall; asm longjmp fct; } |