uintn scratch;
XPT_DoMethodDescriptor(XPTCursor *cursor, XPTMethodDescriptor *md){    XPTMode mode = cursor->state->mode;    uintn scratch;    int i;    if (!XPT_Do8(cursor, &md->flags) ||        !XPT_DoCString(cursor, &md->name) ||        !XPT_Do8(cursor, &md->num_args))        return PR_FALSE;    if (mode == XPT_DECODE) {        if (md->num_args)            md->params = PR_CALLOC(md->num_args * sizeof(XPTParamDescriptor));        if (!md->params)            return PR_FALSE;    }    for(i = 0; i < md->num_args; i++) {        if (!XPT_DoParamDescriptor(cursor, &md->params[i]))            goto error;    }        if (!XPT_DoParamDescriptor(cursor, md->result))        goto error;        return PR_TRUE;        XPT_ERROR_HANDLE(md->params);    }