Hi,
I have noticed that adding a function using the CompileFunction method is not equivalent to adding the same function using AddScriptSection: when using CompileFunction, even with the asCOMP_ADD_TO_MODULE, it is not available from sections that may be added to the module and compiled later. Is this expected?
int r=module->CompileFunction("KittyPrivate","void print(const string &s){}",-1,asCOMP_ADD_TO_MODULE,NULL);assert(r>=0);
int r=module->AddScriptSection("KittyPrivate", "void print(const string &s){}");assert(r>=0);
Also, as a side note, it seems that adding the same global function using first CompileFunction and then as part of a Script section does not raise any error (I guess the second one just overrides the first silently). That's perfect for what I am doing, but I'd prefer to check that this is the expected behavior!