static */
| 358 | } |
| 359 | |
| 360 | /* static */ SQInteger ScriptObject::_cloned(HSQUIRRELVM vm) |
| 361 | { |
| 362 | ScriptObject *original = static_cast<ScriptObject *>(Squirrel::GetRealInstance(vm, 2, "Object")); |
| 363 | if (ScriptObject *clone = original->CloneObject(); clone != nullptr) { |
| 364 | clone->AddRef(); |
| 365 | sq_setinstanceup(vm, 1, clone); |
| 366 | sq_setreleasehook(vm, 1, SQConvert::DefSQDestructorCallback<ScriptObject>); |
| 367 | return 0; |
| 368 | } |
| 369 | |
| 370 | throw Script_FatalError("This instance is not cloneable"); |
| 371 | } |
nothing calls this directly
no test coverage detected