array C_nextFree159 integer C_firstFree127 integer C_maxIndex951 array C_typeId503 integer C_firstFree127 = 0 integer C_maxIndex951 = 0 function initGlobals154() { } function main130() { initGlobals154(); init_test155(); } function config423() { } function init_test155() { local integer c187 c_187 = new_C185(); if (C_typeId_503[c_187] == 0) { if (c_187 == 0) { error847("Nullpointer exception when calling C.foo"); } else { error847("Called C.foo on invalid object."); }; } else { }; testSuccess149(); } IS_NATIVE function testSuccess149() { } function new_C185() returns integer { local integer this176 if (C_firstFree_127 == 0) { if (C_maxIndex_951 < 32768) { C_maxIndex_951 = (C_maxIndex_951 + 1); this_176 = C_maxIndex_951; C_typeId_503[this_176] = 1; } else { error847("Out of memory: Could not create C."); this_176 = 0; }; } else { C_firstFree_127 = (C_firstFree_127 - 1); this_176 = C_nextFree_159[C_firstFree_127]; C_typeId_503[this_176] = 1; }; return this_176; } function error847(string msg404) { $debugPrint211((msg_404 + (" " + #getStackTrace()))); }