Hi,
The interface of the engine makes it possible to manually bind imported functions to native functions (instead of scripted functions from a module), which is very convenient if you want to create pseudo modules using native code: you can simply call BindImportedFunction() with the native function you want to bind.
However, the engine currently assumes that bound functions are always script functions (so doing what I described above crashes). Is there any good reason for that?
The attached patch seems to fix this (that's an ugly copy/paste from function call code so it can probably be cleaner than that). Would it make sense to support this behavior?