zsaleeba / picoc

A very small C interpreter
1.45k stars 183 forks source link

callbacks #36

Open horchi opened 6 years ago

horchi commented 6 years ago

is it possible to pass a function pointer (e.g. by argv) to main() and call the function from inside the c-'script'?

I tested successfully with a struct pointer, but I don't found a solution for a function pointer. Or is there another way to access data of the main program over the API?

Thy and best Regards Jörg