MCPcopy Create free account
hub / github.com/anjo76/angelscript / asCScriptFunction

Method asCScriptFunction

sdk/angelscript/source/as_scriptfunction.cpp:346–385  ·  view source on GitHub ↗

internal

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

setMethod · 0.80
AddScriptObjectToGCMethod · 0.80

Tested by

no test coverage detected