array C_nextFree984 integer C_firstFree136 integer C_maxIndex341 array C_typeId294 integer C_firstFree136 = 0 integer C_maxIndex341 = 0 function initGlobals272() { } function main577() { initGlobals272(); init_test385(); } function config100() { } function init_test385() { local integer c164 c_164 = new_C193(); if (C_typeId_294[c_164] == 0) { if (c_164 == 0) { error171("Nullpointer exception when calling C.foo"); } else { error171("Called C.foo on invalid object."); }; } else { }; if (C_typeId_294[c_164] == 0) { if (c_164 == 0) { error171("Nullpointer exception when calling C.bar"); } else { error171("Called C.bar on invalid object."); }; } else { }; testSuccess210(); } IS_NATIVE function testSuccess210() { } function new_C193() returns integer { local integer this111 if (C_firstFree_136 == 0) { if (C_maxIndex_341 < 32768) { C_maxIndex_341 = (C_maxIndex_341 + 1); this_111 = C_maxIndex_341; C_typeId_294[this_111] = 1; } else { error171("Out of memory: Could not create C."); this_111 = 0; }; } else { C_firstFree_136 = (C_firstFree_136 - 1); this_111 = C_nextFree_984[C_firstFree_136]; C_typeId_294[this_111] = 1; }; return this_111; } function error171(string msg153) { $debugPrint243((msg_153 + (" " + #getStackTrace()))); }