internal
| 342 | |
| 343 | // internal |
| 344 | asCScriptFunction::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 | |
| 386 | void asCScriptFunction::AllocateScriptFunctionData() |
| 387 | { |
nothing calls this directly
no test coverage detected