[Date Index] [Thread Index] [Author Index]
Passing a CompiledFunction to mathlink C function
I have a mathlink C function f that accepts a mathematica function g as an argument. When defining f in the mprep .tm file, I use _Symbol in :Pattern: and Symbol in :ArgumentTypes:. f can then call g fine with MLPutFunction. I then made a Compile'd version of g to improve speed, but can no longer pass it to f as CompiledFunction is not a Symbol. How should I define f so that it can accept both regular and compiled functions? Should I pass the function name as a String instead? Or handle it with Manual somehow. Thanks for any pointers, Art.