if (!state) return NULL;  state->mode = mode; state->pool = XPT_NEW(XPTDatapool); state->next_cursor[0] = state->next_cursor[1] = 1; if (!state->pool) goto err_free_state;  state->pool->count = 0; state->pool->offset_map = XPT_NewHashTable();    if (!state->pool->offset_map) goto err_free_pool; if (mode == XPT_DECODE) { state->pool->data = data; state->pool->allocated = len; } else { state->pool->data = XPT_MALLOC(XPT_GROW_CHUNK); if (!state->pool->data) goto err_free_hash; state->pool->allocated = XPT_GROW_CHUNK; }  return state;  err_free_hash: XPT_HashTableDestroy(state->pool->offset_map);  err_free_pool: XPT_DELETE(state->pool); err_free_state: XPT_DELETE(state); return NULL;
return skipped == 8 ? 0 : skipped; #endif
XPT_PUBLIC_API(XPTState *)XPT_NewXDRState(XPTMode mode, char *data, PRUint32 len){    XPTState *state;    state = XPT_NEW(XPTState);    if (!state)        return NULL;    state->mode = mode;    state->pool = XPT_NEW(XPTDatapool);    state->next_cursor[0] = state->next_cursor[1] = 1;    if (!state->pool)        goto err_free_state;    state->pool->count = 0;    state->pool->offset_map = XPT_NewHashTable();/*      state->pool->offset_map = PL_NewHashTable(32, null_hash, PL_CompareValues, *//*                                                PL_CompareValues, NULL, NULL); */    if (!state->pool->offset_map)        goto err_free_pool;    if (mode == XPT_DECODE) {        state->pool->data = data;        state->pool->allocated = len;    } else {        state->pool->data = XPT_MALLOC(XPT_GROW_CHUNK);        if (!state->pool->data)            goto err_free_hash;        state->pool->allocated = XPT_GROW_CHUNK;    }    return state; err_free_hash:    XPT_HashTableDestroy(state->pool->offset_map);/*      PL_HashTableDestroy(state->pool->offset_map); */ err_free_pool:    XPT_DELETE(state->pool); err_free_state:    XPT_DELETE(state);    return NULL;}