if (!verify_interface_declaration(iface)) return FALSE;
typelib_interface(TreeState *state){    IDL_tree iface = state->tree, iter;    char *name = IDL_IDENT(IDL_INTERFACE(iface).ident).str;    XPTInterfaceDirectoryEntry *ide;    XPTInterfaceDescriptor *id;    uint16 parent_id = 0;    PRUint8 interface_flags = 0;    if (IDL_tree_property_get(IDL_INTERFACE(iface).ident, "scriptable"))        interface_flags |= XPT_ID_SCRIPTABLE;    if (IDL_tree_property_get(IDL_INTERFACE(iface).ident, "function"))        interface_flags |= XPT_ID_FUNCTION;    ide = FindInterfaceByName(HEADER(state)->interface_directory,                              HEADER(state)->num_interfaces, name);    if (!ide) {        IDL_tree_error(iface, "ERROR: didn't find interface %s in "                       "IDE block. Giving up.\n", name);        return FALSE;    }    if ((iter = IDL_INTERFACE(iface).inheritance_spec)) {        char *parent;        if (IDL_LIST(iter).next) {            IDL_tree_error(iface,                           "ERROR: more than one parent interface for %s\n",                           name);            return FALSE;        }        parent = IDL_IDENT(IDL_LIST(iter).data).str;        parent_id = (uint16)(uint32)g_hash_table_lookup(IFACE_MAP(state),                                                        parent);        if (!parent_id) {            IDL_tree_error(iface,                           "ERROR: no index found for %s. Giving up.\n",                           parent);            return FALSE;        }    }    id = XPT_NewInterfaceDescriptor(ARENA(state), parent_id, 0, 0,                                     interface_flags);    if (!id)        return FALSE;    CURRENT(state) = ide->interface_descriptor = id;#ifdef DEBUG_shaver_ifaces    fprintf(stderr, "DBG: starting interface %s @ %p\n", name, id);#endif    NEXT_METH(state) = 0;    NEXT_CONST(state) = 0;    NEXT_TYPE(state) = 0;    state->tree = IDL_INTERFACE(iface).body;    if (state->tree && !xpidl_process_node(state))        return FALSE;#ifdef DEBUG_shaver_ifaces    fprintf(stderr, "DBG: ending interface %s\n", name);#endif    return TRUE;}