array C_nextFree254 integer C_firstFree132 integer C_maxIndex552 array C_typeId546 integer C_firstFree132 = 0 integer C_maxIndex552 = 0 function initGlobals957() { } function main557() { initGlobals957(); init_test106(); } function config517() { } function init_test106() { local integer c109 c_109 = new_C159(); if (C_typeId_546[c_109] == 0) { if (c_109 == 0) { error648("Nullpointer exception when calling C.foo"); } else { error648("Called C.foo on invalid object."); }; } else { }; testSuccess137(); } IS_NATIVE function testSuccess137() { } function new_C159() returns integer { local integer this189 if (C_firstFree_132 == 0) { if (C_maxIndex_552 < 32768) { C_maxIndex_552 = (C_maxIndex_552 + 1); this_189 = C_maxIndex_552; C_typeId_546[this_189] = 1; } else { error648("Out of memory: Could not create C."); this_189 = 0; }; } else { C_firstFree_132 = (C_firstFree_132 - 1); this_189 = C_nextFree_254[C_firstFree_132]; C_typeId_546[this_189] = 1; }; return this_189; } function error648(string msg105) { $debugPrint169((msg_105 + (" " + #getStackTrace()))); }