Re: Calling call_back addresses
- Posted by jimcbrown (admin) Dec 23, 2008
- 1340 views
Why is this in the Code Golf thread?
SDPringle said...
I would like to call a call back address from EUPHORIA to simulate a call from C.
So, suppose I have a function like:
function five() return 5 end function atom five_cb = call_back("five")
How do I call five using five_cb?
Shawn
include std/machine.e include std/dll.e function five() return 5 end function atom five_cb = call_back(routine_id("five")) integer cb = define_c_func("", {'+', five_cb}, {}, C_INT) ? c_func(cb, {})