static void releaseDecompStruct(struct structDecomp const structDecomp) { unsigned int i; for (i = 0; i < structDecomp.mbrCnt; ++i) { releaseDecomposition(structDecomp.mbrArray[i].decompTreeP); } }
static void releaseDecompArray(struct arrayDecomp const arrayDecomp) { unsigned int i; for (i = 0; i < arrayDecomp.itemCnt; ++i) { releaseDecomposition(arrayDecomp.itemArray[i]); } }
static void releaseDecompArray(struct arrayDecomp const arrayDecomp, bool const oldstyleMemMgmt) { unsigned int i; for (i = 0; i < arrayDecomp.itemCnt; ++i) { releaseDecomposition(arrayDecomp.itemArray[i], oldstyleMemMgmt); } }
static void releaseDecompStruct(struct structDecomp const structDecomp, bool const oldstyleMemMgmt) { unsigned int i; for (i = 0; i < structDecomp.mbrCnt; ++i) { releaseDecomposition(structDecomp.mbrArray[i].decompTreeP, oldstyleMemMgmt); } }
static void parsestruct(xmlrpc_env *const envP, xmlrpc_value *const structP, struct structDecomp const structDecomp, bool const oldstyleMemMgmt) { unsigned int doneCount; doneCount = 0; /* No members done yet */ while (doneCount < structDecomp.mbrCnt && !envP->fault_occurred) { const char *const key = structDecomp.mbrArray[doneCount].key; xmlrpc_value *valueP; xmlrpc_struct_read_value(envP, structP, key, &valueP); if (!envP->fault_occurred) { decomposeValueWithTree( envP, valueP, oldstyleMemMgmt, structDecomp.mbrArray[doneCount].decompTreeP); if (!envP->fault_occurred) ++doneCount; xmlrpc_DECREF(valueP); } } if (envP->fault_occurred) { if (!oldstyleMemMgmt) { /* Release the items we completed before we failed. */ unsigned int i; for (i = 0; i < doneCount; ++i) releaseDecomposition(structDecomp.mbrArray[i].decompTreeP); } } }
static void parsearray(xmlrpc_env *const envP, const xmlrpc_value *const arrayP, struct arrayDecomp const arrayDecomp, bool const oldstyleMemMgmt) { validateArraySize(envP, arrayP, arrayDecomp); if (!envP->fault_occurred) { unsigned int doneCnt; doneCnt = 0; while (doneCnt < arrayDecomp.itemCnt && !envP->fault_occurred) { xmlrpc_value *itemP; xmlrpc_array_read_item(envP, arrayP, doneCnt, &itemP); if (!envP->fault_occurred) { XMLRPC_ASSERT(doneCnt < ARRAY_SIZE(arrayDecomp.itemArray)); decomposeValueWithTree(envP, itemP, oldstyleMemMgmt, arrayDecomp.itemArray[doneCnt]); if (!envP->fault_occurred) ++doneCnt; xmlrpc_DECREF(itemP); } } if (envP->fault_occurred) { if (!oldstyleMemMgmt) { /* Release the items we completed before we failed. */ unsigned int i; for (i = 0; i < doneCnt; ++i) releaseDecomposition(arrayDecomp.itemArray[i]); } } } }