array C_nextFree105 integer C_firstFree124 integer C_maxIndex156 array C_typeId899 integer C_firstFree124 = 0 integer C_maxIndex156 = 0 function initGlobals445() { } function main484() { initGlobals445(); init_test542(); } function config179() { } function init_test542() { local integer c143 c_143 = new_C138(); if (C_typeId_899[c_143] == 0) { if (c_143 == 0) { error126("Nullpointer exception when calling C.foo"); } else { error126("Called C.foo on invalid object."); }; } else { }; testSuccess188(); } IS_NATIVE function testSuccess188() { } function new_C138() returns integer { local integer this130 if (C_firstFree_124 == 0) { if (C_maxIndex_156 < 32768) { C_maxIndex_156 = (C_maxIndex_156 + 1); this_130 = C_maxIndex_156; C_typeId_899[this_130] = 1; } else { error126("Out of memory: Could not create C."); this_130 = 0; }; } else { C_firstFree_124 = (C_firstFree_124 - 1); this_130 = C_nextFree_105[C_firstFree_124]; C_typeId_899[this_130] = 1; }; return this_130; } function error126(string msg187) { $debugPrint152((msg_187 + (" " + #getStackTrace()))); }