MCPcopy Create free account
hub / github.com/Siv3D/OpenSiv3D / asCScriptFunction

Method asCScriptFunction

Siv3D/src/ThirdParty/angelscript/as_scriptfunction.cpp:344–384  ·  view source on GitHub ↗

internal

Source from the content-addressed store, hash-verified

342
343// internal
344asCScriptFunction::asCScriptFunction(asCScriptEngine *engine, asCModule *mod, asEFuncType _funcType)
345{
346 funcType = _funcType;
347 if( funcType == asFUNC_DELEGATE )
348 {
349 // Delegates behave like object instances, rather than script code
350 externalRefCount.set(1);
351 internalRefCount.set(0);
352 }
353 else
354 {
355 internalRefCount.set(1);
356 externalRefCount.set(0);
357 }
358
359 this->engine = engine;
360 this->scriptData = 0;
361 module = mod;
362 objectType = 0;
363 name = "";
364 sysFuncIntf = 0;
365 signatureId = 0;
366 dontCleanUpOnException = false;
367 vfTableIdx = -1;
368 gcFlag = false;
369 userData = 0;
370 id = 0;
371 accessMask = 0xFFFFFFFF;
372 nameSpace = engine->nameSpaces[0];
373 objForDelegate = 0;
374 funcForDelegate = 0;
375 listPattern = 0;
376 funcdefType = 0;
377
378 if( funcType == asFUNC_SCRIPT )
379 AllocateScriptFunctionData();
380
381 // Notify the GC of delegates
382 if( funcType == asFUNC_DELEGATE )
383 engine->gc.AddScriptObjectToGC(this, &engine->functionBehaviours);
384}
385
386void asCScriptFunction::AllocateScriptFunctionData()
387{

Callers

nothing calls this directly

Calls 2

AddScriptObjectToGCMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected