Nasal: use correct function pointer in naCall (with user data)
This commit is contained in:
@@ -874,8 +874,10 @@ naRef naCall(naContext ctx, naRef func, int argc, naRef* args,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(IS_CCODE(PTR(func).func->code)) {
|
if(IS_CCODE(PTR(func).func->code)) {
|
||||||
naCFunction fp = PTR(PTR(func).func->code).ccode->fptr;
|
struct naCCode *ccode = PTR(PTR(func).func->code).ccode;
|
||||||
result = (*fp)(ctx, obj, argc, args);
|
result = ccode->fptru
|
||||||
|
? (*ccode->fptru)(ctx, obj, argc, args, ccode->user_data)
|
||||||
|
: (*ccode->fptr) (ctx, obj, argc, args);
|
||||||
if(!ctx->callParent) naModUnlock();
|
if(!ctx->callParent) naModUnlock();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user