*/
typelib_op_dcl(TreeState *state){    XPTInterfaceDescriptor *id = CURRENT(state);    XPTMethodDescriptor *meth;    struct _IDL_OP_DCL *op = &IDL_OP_DCL(state->tree);    IDL_tree iter;    uint16 num_args = 0;    uint8 op_flags = 0;    gboolean op_notxpcom = (IDL_tree_property_get(op->ident, "notxpcom")                            != NULL);    gboolean op_noscript = (IDL_tree_property_get(op->ident, "noscript")                            != NULL);    if (!verify_method_declaration(state->tree))        return FALSE;    if (!XPT_InterfaceDescriptorAddMethods(id, 1))        return FALSE;    meth = &id->method_descriptors[NEXT_METH(state)];    for (iter = op->parameter_dcls; iter; iter = IDL_LIST(iter).next)        num_args++;             /* count params */    if (op->op_type_spec && !op_notxpcom)        num_args++;             /* fake param for _retval */    if (op_noscript || op_notxpcom)        op_flags |= XPT_MD_HIDDEN;    if (op->f_varargs)        op_flags |= XPT_MD_VARARGS;    /* XXXshaver constructor? */#ifdef DEBUG_shaver_method    fprintf(stdout, "DBG: adding method %s (nargs %d)\n",            IDL_IDENT(op->ident).str, num_args);#endif    if (!XPT_FillMethodDescriptor(meth, op_flags, IDL_IDENT(op->ident).str,                                  (uint8) num_args))        return FALSE;    for (num_args = 0, iter = op->parameter_dcls; iter;         iter = IDL_LIST(iter).next, num_args++) {        if (!fill_pd_from_param(state, &meth->params[num_args],                                IDL_LIST(iter).data))            return FALSE;    }    /* XXX unless [notxpcom] */    if (!op_notxpcom) {        if (op->op_type_spec) {            if (!fill_pd_from_type(state, &meth->params[num_args],                                   XPT_PD_RETVAL | XPT_PD_OUT,                                   op->op_type_spec))                return FALSE;        }        if (!fill_pd_as_nsresult(meth->result))            return FALSE;    } else {#ifdef DEBUG_shaver_notxpcom        fprintf(stderr, "%s is notxpcom\n", IDL_IDENT(op->ident).str);#endif        if (!fill_pd_from_type(state, meth->result, XPT_PD_RETVAL,                               op->op_type_spec))            return FALSE;    }    NEXT_METH(state)++;    return TRUE;}