VirtualBox

Changeset 108340 in vbox


Ignore:
Timestamp:
Feb 24, 2025 8:20:08 AM (3 weeks ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
167694
Message:

libs/xpcom18a4/xpidl: Restore some error messages, bugref:10321

Location:
trunk/src/libs/xpcom18a4/xpcom/typelib/xpidl
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl.h

    r108321 r108340  
    289289 * @param   pInput      The original input file to generate for.
    290290 * @param   pParse      The parsing state.
    291  */
    292 typedef DECLCALLBACKTYPE(int, FNXPIDLDISPATCH,(FILE *pFile, PCXPIDLINPUT pInput, PCXPIDLPARSE pParse));
     291 * @param   pErrInfo    Error information.
     292 */
     293typedef DECLCALLBACKTYPE(int, FNXPIDLDISPATCH,(FILE *pFile, PCXPIDLINPUT pInput, PCXPIDLPARSE pParse, PRTERRINFO pErrInfo));
    293294/** Pointer to a dispatch callback. */
    294295typedef FNXPIDLDISPATCH *PFNXPIDLDISPATCH;
    295296
    296297
    297 DECL_HIDDEN_CALLBACK(int) xpidl_header_dispatch(FILE *pFile, PCXPIDLINPUT pInput, PCXPIDLPARSE pParse);
    298 DECL_HIDDEN_CALLBACK(int) xpidl_typelib_dispatch(FILE *pFile, PCXPIDLINPUT pInput, PCXPIDLPARSE pParse);
     298DECL_HIDDEN_CALLBACK(int) xpidl_header_dispatch(FILE *pFile, PCXPIDLINPUT pInput, PCXPIDLPARSE pParse, PRTERRINFO pErrInfo);
     299DECL_HIDDEN_CALLBACK(int) xpidl_typelib_dispatch(FILE *pFile, PCXPIDLINPUT pInput, PCXPIDLPARSE pParse, PRTERRINFO pErrInfo);
    299300
    300301typedef struct ModeData {
     
    358359
    359360
     361DECLHIDDEN(int) xpidlIdlError(PRTERRINFO pErrInfo, PCXPIDLNODE pNd, int rc, const char *pszFmt, ...);
     362
    360363/* Try to common a little node-handling stuff. */
    361364
  • trunk/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_header.c

    r108336 r108340  
    530530
    531531
    532 static int xpidlHdrWriteInterface(PCXPIDLNODE pNd, FILE *pFile)
     532static int xpidlHdrWriteInterface(PCXPIDLNODE pNd, FILE *pFile, PRTERRINFO pErrInfo)
    533533{
    534534    char *classNameUpper = NULL;
     
    553553
    554554        /* Redundant, but a better error than 'cannot parse.' */
    555         if (strlen(pAttrIid->pszVal) != 36) {
    556             //IDL_tree_error(state->tree, "IID %s is the wrong length\n", iid);
     555        if (strlen(pAttrIid->pszVal) != 36)
     556        {
     557            rc = xpidlIdlError(pErrInfo, pNd, VERR_INVALID_STATE,
     558                               "IID %s is the wrong length", pAttrIid->pszVal);
    557559            FAIL;
    558560        }
     
    562564         * uuid and normalize resulting .h files.
    563565         */
    564         if (!xpidl_parse_iid(&id, pAttrIid->pszVal)) {
    565             //IDL_tree_error(state->tree, "cannot parse IID %s\n", iid);
     566        if (!xpidl_parse_iid(&id, pAttrIid->pszVal))
     567        {
     568            rc = xpidlIdlError(pErrInfo, pNd, VERR_INVALID_STATE,
     569                               "cannot parse IID %s\n", pAttrIid->pszVal);
    566570            FAIL;
    567571        }
    568         if (!xpidl_sprint_iid(&id, iid_parsed)) {
    569             //IDL_tree_error(state->tree, "error formatting IID %s\n", iid);
     572        if (!xpidl_sprint_iid(&id, iid_parsed))
     573        {
     574            rc = xpidlIdlError(pErrInfo, pNd, VERR_INVALID_STATE,
     575                               "error formatting IID %s\n", pAttrIid->pszVal);
    570576            FAIL;
    571577        }
     
    588594                id.m3[4], id.m3[5], id.m3[6], id.m3[7]);
    589595        fputc('\n', pFile);
    590     } else {
    591         //IDL_tree_error(state->tree, "interface %s lacks a uuid attribute\n",
    592         //    className);
     596    }
     597    else
     598    {
     599        rc = xpidlIdlError(pErrInfo, pNd, VERR_INVALID_STATE,
     600                           "interface %s lacks a uuid attribute\n", pNd->u.If.pszIfName);
    593601        FAIL;
    594602    }
     
    875883
    876884
    877 DECL_HIDDEN_CALLBACK(int) xpidl_header_dispatch(FILE *pFile, PCXPIDLINPUT pInput, PCXPIDLPARSE pParse)
     885DECL_HIDDEN_CALLBACK(int) xpidl_header_dispatch(FILE *pFile, PCXPIDLINPUT pInput, PCXPIDLPARSE pParse, PRTERRINFO pErrInfo)
    878886{
    879887    char *define = RTPathFilename(pInput->pszBasename);
     
    940948            case kXpidlNdType_Interface_Def:
    941949            {
    942                 rc = xpidlHdrWriteInterface(pNd, pFile);
     950                rc = xpidlHdrWriteInterface(pNd, pFile, pErrInfo);
    943951                break;
    944952            }
  • trunk/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_idl.c

    r108336 r108340  
    13731373            pFile = stdout;
    13741374
    1375         rc = mode->dispatch(pFile, pInput, &ParseState);
     1375        rc = mode->dispatch(pFile, pInput, &ParseState, &ParseState.ErrInfo.Core);
    13761376
    13771377        if (pFile != stdout)
  • trunk/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_typelib.c

    r108339 r108340  
    5757    uint16 next_const;
    5858    uint16 next_type;   /* used for 'additional_types' for idl arrays */
     59    PRTERRINFO pErrInfo;
    5960} XPIDLTYPELIBSTATE;
    6061typedef XPIDLTYPELIBSTATE *PXPIDLTYPELIBSTATE;
     
    287288
    288289/* fill the interface_directory IDE table from the interface_map */
    289 static bool fill_ide_table(PXPIDLTYPELIBSTATE pThis)
     290static int fill_ide_table(PXPIDLTYPELIBSTATE pThis)
    290291{
    291292    NewInterfaceHolder *pIt, *pItNext;
     
    301302#endif
    302303
    303         if (pIt->iid) {
    304             if (strlen(pIt->iid) != 36) {
    305                 //IDL_tree_error(state->tree, "IID %s is the wrong length\n",
    306                 //               pIt->iid);
    307                 return false;
    308             }
    309             if (!xpidl_parse_iid(&id, pIt->iid)) {
    310                 //IDL_tree_error(state->tree, "cannot parse IID %s\n", holder->iid);
    311                 return false;
    312             }
    313         } else {
     304        if (pIt->iid)
     305        {
     306            if (strlen(pIt->iid) != 36)
     307                return xpidlIdlError(pThis->pErrInfo, NULL /*pNd*/, VERR_INVALID_STATE,
     308                                     "IID %s is the wrong length", pIt->iid);
     309
     310            if (!xpidl_parse_iid(&id, pIt->iid))
     311                return xpidlIdlError(pThis->pErrInfo, NULL /*pNd*/, VERR_INVALID_STATE,
     312                                     "cannot parse IID %s\n", pIt->iid);
     313        }
     314        else
    314315            memset(&id, 0, sizeof(id));
    315         }
    316316
    317317        ide = &(HEADER(pThis)->interface_directory[IFACES(pThis)]);
    318318        if (!XPT_FillInterfaceDirectoryEntry(ARENA(pThis), ide, &id, pIt->name,
    319                                              pIt->name_space, NULL)) {
    320             //IDL_tree_error(state->tree, "INTERNAL: XPT_FillIDE failed for %s\n",
    321             //               holder->full_name);
    322             return false;
    323         }
     319                                             pIt->name_space, NULL))
     320            return xpidlIdlError(pThis->pErrInfo, NULL /*pNd*/, VERR_INVALID_STATE,
     321                                 "INTERNAL: XPT_FillIDE failed for %s\n", pIt->full_name);
    324322
    325323        IFACES(pThis)++;
     
    327325        DeleteNewInterfaceHolder(pIt);
    328326    }
    329     return true;
     327    return VINF_SUCCESS;
    330328}
    331329
     
    404402    /* fill IDEs from hash table */
    405403    IFACES(pThis) = 0;
    406     if (!fill_ide_table(pThis))
    407         return VERR_NO_MEMORY;
     404    int rc = fill_ide_table(pThis);
     405    if (RT_FAILURE(rc))
     406        return rc;
    408407
    409408    /* if any are left then we must have failed in fill_ide_table */
     
    548547
    549548/* return value is for success or failure */
    550 static bool get_size_and_length(PCXPIDLNODE pNdType,
    551                                 int16 *size_is_argnum, int16 *length_is_argnum,
    552                                 bool *has_size_is, bool *has_length_is)
     549static int get_size_and_length(PXPIDLTYPELIBSTATE pThis, PCXPIDLNODE pNdType,
     550                               int16 *size_is_argnum, int16 *length_is_argnum,
     551                               bool *has_size_is, bool *has_length_is)
    553552{
    554553    *has_size_is = false;
     
    564563            return false;
    565564
    566         if (!find_arg_with_name(pNdType, pAttr->pszVal, size_is_argnum)) {
    567             //IDL_tree_error(state->tree, "can't find matching argument for "
    568             //               "[size_is(%s)]\n", size_is);
    569             return false;
    570         }
     565        if (!find_arg_with_name(pNdType, pAttr->pszVal, size_is_argnum))
     566            return xpidlIdlError(pThis->pErrInfo, NULL /*pNd*/, VERR_INVALID_STATE,
     567                                 "can't find matching argument for [size_is(%s)]", pAttr->pszVal);
    571568        *has_size_is = true;
    572569
     
    578575            return false;
    579576
    580         if (!find_arg_with_name(pNdType, pAttr->pszVal, length_is_argnum)) {
    581             //IDL_tree_error(state->tree, "can't find matching argument for "
    582             //               "[length_is(%s)]\n", length_is);
    583             return false;
    584         }
     577        if (!find_arg_with_name(pNdType, pAttr->pszVal, length_is_argnum))
     578            return xpidlIdlError(pThis->pErrInfo, NULL /*pNd*/, VERR_INVALID_STATE,
     579                                 "can't find matching argument for [length_is(%s)]\n", pAttr->pszVal);
    585580        *has_length_is = true;
    586581    }
    587     return true;
    588 }
    589 
    590 
    591 static bool fill_td_from_type(PXPIDLTYPELIBSTATE pThis, XPTTypeDescriptor *td, PCXPIDLNODE pNdType)
     582
     583    return VINF_SUCCESS;
     584}
     585
     586
     587static int fill_td_from_type(PXPIDLTYPELIBSTATE pThis, XPTTypeDescriptor *td, PCXPIDLNODE pNdType)
    592588{
    593589    int16 size_is_argnum;
     
    613609
    614610            /* size_is is required! */
    615             if (!get_size_and_length(pNdParam,
    616                                      &size_is_argnum, &length_is_argnum,
    617                                      &has_size_is, &has_length_is)) {
    618                 /* error was reported by helper function */
    619                 return false;
    620             }
     611            int rc = get_size_and_length(pThis, pNdParam,
     612                                         &size_is_argnum, &length_is_argnum,
     613                                         &has_size_is, &has_length_is);
     614            if (RT_FAILURE(rc))
     615                return rc; /* error was reported by helper function */
    621616
    622617            if (!has_size_is)
    623             {
    624                 //IDL_tree_error(pThis->tree, "[array] requires [size_is()]\n");
    625                 return false;
    626             }
     618                return xpidlIdlError(pThis->pErrInfo, NULL /*pNd*/, VERR_NOT_FOUND,
     619                                     "[array] requires [size_is()]\n");
    627620
    628621            td->prefix.flags = TD_ARRAY | XPT_TDP_POINTER;
     
    643636            /* setup the additional_type */               
    644637            if (!XPT_InterfaceDescriptorAddTypes(ARENA(pThis), CURRENT(pThis), 1))
    645                 return false;
     638                return xpidlIdlError(pThis->pErrInfo, pNdType, VERR_NO_MEMORY,
     639                                     "Failed to add types to interface descriptor\n");
    646640
    647641            td->type.additional_type = NEXT_TYPE(pThis);
     
    690684                    else
    691685                    {
    692                         if (!get_size_and_length(pNdType,
    693                                                  &size_is_argnum, &length_is_argnum,
    694                                                  &has_size_is, &has_length_is))
    695                         {
    696                             /* error was reported by helper function */
    697                             return false;
    698                         }
     686                        int rc = get_size_and_length(pThis, pNdType,
     687                                                     &size_is_argnum, &length_is_argnum,
     688                                                     &has_size_is, &has_length_is);
     689                        if (RT_FAILURE(rc))
     690                            return rc; /* error was reported by helper function */
     691
    699692                        if (has_size_is)
    700693                        {
     
    715708                    else
    716709                    {
    717                         if (!get_size_and_length(pNdType,
    718                                                  &size_is_argnum, &length_is_argnum,
    719                                                  &has_size_is, &has_length_is))
    720                         {
    721                             /* error was reported by helper function */
    722                             return false;
    723                         }
     710                        int rc = get_size_and_length(pThis, pNdType,
     711                                                     &size_is_argnum, &length_is_argnum,
     712                                                     &has_size_is, &has_length_is);
     713                        if (RT_FAILURE(rc))
     714                            return rc; /* error was reported by helper function */
     715
    724716                        if (has_size_is)
    725717                        {
     
    748740        {
    749741            if (!pNdType->pNdTypeRef)
    750             {
    751                 //IDL_tree_error(state->tree,
    752                 //               "ERROR: orphan ident %s in param list\n",
    753                 //              IDL_IDENT(type).str);
    754                 return false;
    755             }
     742                return xpidlIdlError(pThis->pErrInfo, pNdType, VERR_NOT_FOUND,
     743                                     "ERROR: orphan ident %s in param list\n", pNdType->u.pszIde);
    756744
    757745            /* This whole section is abominably ugly */
     
    792780                    if (iid_is) {
    793781                        int16 argnum;
    794                         if (!find_arg_with_name(pNdParam, iid_is, &argnum)) {
    795                             //IDL_tree_error(state->tree,
    796                             //               "can't find matching argument for "
    797                             //               "[iid_is(%s)]\n", iid_is);
    798                             return false;
    799                         }
     782                        if (!find_arg_with_name(pNdParam, iid_is, &argnum))
     783                            return xpidlIdlError(pThis->pErrInfo, pNdParam, VERR_NOT_FOUND,
     784                                                 "can't find matching argument for [iid_is(%s)]", iid_is);
     785
    800786                        td->prefix.flags = TD_INTERFACE_IS_TYPE | XPT_TDP_POINTER;
    801787                        td->argnum = argnum;
     
    804790                        ide = FindInterfaceByName(ides, num_ifaces, className, NULL);
    805791                        if (!ide || ide < ides || ide > ides + num_ifaces)
    806                         {
    807                             //IDL_tree_error(state->tree,
    808                             //               "unknown iface %s in param\n",
    809                             //               className);
    810                             return false;
    811                         }
     792                            return xpidlIdlError(pThis->pErrInfo, pNdParam, VERR_NOT_FOUND,
     793                                                 "unknown iface %s in param\n", className);
     794
    812795                        td->type.iface = ide - ides + 1;
    813796#ifdef DEBUG_shaver_index
     
    873856                        /* do what we would do in recursion if !type */
    874857                        td->prefix.flags = TD_VOID;
    875                         return true;
     858                        return VINF_SUCCESS;
    876859                    }
    877860                }
    878861                default:
    879                     //IDL_tree_error(state->tree,
    880                     //               "can't handle %s ident in param list\n",
    881                     //               /* XXX is this safe to use on Win now? */
    882                     //               IDL_NODE_TYPE_NAME(IDL_NODE_UP(type))
    883                     //               );
    884                     AssertFailedReturn(false);
     862                    xpidlIdlError(pThis->pErrInfo, pNdType, VERR_INTERNAL_ERROR,
     863                                  "can't handle %s ident in param list\n",
     864                                  pNdType->u.pszIde);
     865                    AssertFailedReturn(VERR_INTERNAL_ERROR);
    885866            }
    886867        }
    887868        else
    888             AssertFailedReturn(false);
    889     }
    890 
    891     return true;
    892 }
    893 
    894 
    895 static bool fill_pd_from_type(PXPIDLTYPELIBSTATE pThis, XPTParamDescriptor *pd, uint8 flags, PCXPIDLNODE pNd)
     869            AssertFailedReturn(VERR_INTERNAL_ERROR);
     870    }
     871
     872    return VINF_SUCCESS;
     873}
     874
     875
     876static int fill_pd_from_type(PXPIDLTYPELIBSTATE pThis, XPTParamDescriptor *pd, uint8 flags, PCXPIDLNODE pNd)
    896877{
    897878    pd->flags = flags;
     
    899880}
    900881
    901 static bool fill_pd_from_param(PXPIDLTYPELIBSTATE pThis, XPTParamDescriptor *pd, PCXPIDLNODE pNd)
     882static int fill_pd_from_param(PXPIDLTYPELIBSTATE pThis, XPTParamDescriptor *pd, PCXPIDLNODE pNd)
    902883{
    903884    uint8 flags = 0;
     
    922903    {
    923904        if (flags != XPT_PD_OUT)
    924         {
    925             //IDL_tree_error(tree, "can't have [retval] with in%s param "
    926             //               "(only out)\n",
    927             //               flags & XPT_PD_OUT ? "out" : "");
    928             return false;
    929         }
     905            return xpidlIdlError(pThis->pErrInfo, NULL /*pNd*/, VERR_INVALID_STATE,
     906                                 "can't have [retval] with in%s param (only out)",
     907                                 flags & XPT_PD_OUT ? "out" : "");
     908
    930909        flags |= XPT_PD_RETVAL;
    931910    }
     
    940919    {
    941920        if (flags & XPT_PD_IN)
    942         {
    943             //IDL_tree_error(tree, "can't have [shared] with in%s param "
    944             //               "(only out)\n",
    945             //               flags & XPT_PD_OUT ? "out" : "");
    946             return false;
    947         }
     921            return xpidlIdlError(pThis->pErrInfo, NULL /*pNd*/, VERR_INVALID_STATE,
     922                                 "can't have [shared] with in%s param (only out)",
     923                                 flags & XPT_PD_OUT ? "out" : "");
     924
    948925        flags |= XPT_PD_SHARED;
    949926    }
     
    953930
    954931
    955 static bool fill_pd_as_nsresult(XPTParamDescriptor *pd)
     932static int fill_pd_as_nsresult(XPTParamDescriptor *pd)
    956933{
    957934    pd->type.prefix.flags = TD_UINT32; /* TD_NSRESULT */
    958     return true;
    959 }
    960 
    961 static bool typelib_attr_accessor(PXPIDLTYPELIBSTATE pThis, PCXPIDLNODE pNd,
    962                                   XPTMethodDescriptor *meth, bool getter, bool hidden)
     935    return VINF_SUCCESS;
     936}
     937
     938static int typelib_attr_accessor(PXPIDLTYPELIBSTATE pThis, PCXPIDLNODE pNd,
     939                                 XPTMethodDescriptor *meth, bool getter, bool hidden)
    963940{
    964941    uint8 methflags = 0;
     
    969946    if (!XPT_FillMethodDescriptor(ARENA(pThis), meth, methflags,
    970947                                  (char *)pNd->u.Attribute.pszName, 1))
    971         return false;
     948        return xpidlIdlError(pThis->pErrInfo, pNd, VERR_NO_MEMORY,
     949                             "Failed to fill method descriptor for attribute '%s'",
     950                             pNd->u.Attribute.pszName);
    972951
    973952    if (getter)
     
    982961        pdflags |= XPT_PD_IN;
    983962
    984     if (!fill_pd_from_type(pThis, meth->params, pdflags, pNd->u.Attribute.pNdTypeSpec))
    985         return false;
     963    int rc = fill_pd_from_type(pThis, meth->params, pdflags, pNd->u.Attribute.pNdTypeSpec);
     964    if (RT_FAILURE(rc))
     965        return rc; /* error info already set. */
    986966
    987967    fill_pd_as_nsresult(meth->result);
    988968    NEXT_METH(pThis)++;
    989     return true;
     969    return VINF_SUCCESS;
    990970}
    991971
     
    1008988    meth = &id->method_descriptors[NEXT_METH(pThis)];
    1009989
    1010     bool fOk =    typelib_attr_accessor(pThis, pNd, meth, true, hidden)
    1011                && (   pNd->u.Attribute.fReadonly
    1012                    || typelib_attr_accessor(pThis, pNd, meth + 1, false, hidden));
    1013     return fOk ? VINF_SUCCESS : VERR_INVALID_PARAMETER;
     990    int rc = typelib_attr_accessor(pThis, pNd, meth, true, hidden);
     991    if (RT_FAILURE(rc))
     992        return rc;
     993
     994    if (!pNd->u.Attribute.fReadonly)
     995    {
     996        rc = typelib_attr_accessor(pThis, pNd, meth + 1, false, hidden);
     997        if (RT_FAILURE(rc))
     998            return rc;
     999    }
     1000
     1001    return VINF_SUCCESS;
    10141002}
    10151003
     
    10611049    {
    10621050        XPTParamDescriptor *pd = &meth->params[num_args++];
    1063         if (!fill_pd_from_param(pThis, pd, pIt))
    1064             return VERR_INVALID_PARAMETER;
     1051        int rc = fill_pd_from_param(pThis, pd, pIt);
     1052        if (RT_FAILURE(rc))
     1053            return rc;
    10651054    }
    10661055
     
    10801069#endif
    10811070
    1082         if (!fill_pd_as_nsresult(meth->result))
    1083             return VERR_INVALID_PARAMETER;
     1071        int rc = fill_pd_as_nsresult(meth->result);
     1072        if (RT_FAILURE(rc))
     1073            return rc;
    10841074    }
    10851075    else
     
    10881078        fprintf(stderr, "%s is notxpcom\n", pNd->u.Method.pszName);
    10891079#endif
    1090         if (!fill_pd_from_type(pThis, meth->result, XPT_PD_RETVAL,
    1091                                pNd->u.Method.pNdTypeSpecRet))
    1092             return VERR_INVALID_PARAMETER;
     1080        int rc = fill_pd_from_type(pThis, meth->result, XPT_PD_RETVAL,
     1081                                   pNd->u.Method.pNdTypeSpecRet);
     1082        if (RT_FAILURE(rc))
     1083            return rc;
    10931084    }
    10941085    NEXT_METH(pThis)++;
     
    11261117    fprintf(stderr, "DBG: adding const %s\n", cd->name);
    11271118#endif
    1128     if (!fill_td_from_type(pThis, &cd->type, pNd->u.Const.pNdTypeSpec))
    1129         return VERR_INVALID_PARAMETER;
     1119    int rc = fill_td_from_type(pThis, &cd->type, pNd->u.Const.pNdTypeSpec);
     1120    if (RT_FAILURE(rc))
     1121        return rc;
    11301122   
    11311123    if (is_long)
     
    11591151                              HEADER(pThis)->num_interfaces, name,
    11601152                              NULL);
    1161     if (!ide) {
    1162         //IDL_tree_error(iface, "ERROR: didn't find interface %s in "
    1163         //               "IDE block. Giving up.\n", name);
    1164         return VERR_NOT_FOUND;
    1165     }
     1153    if (!ide)
     1154        return xpidlIdlError(pThis->pErrInfo, NULL /*pNd*/, VERR_NOT_FOUND,
     1155                             "ERROR: didn't find interface %s in IDE block. Giving up.\n",
     1156                             name);
    11661157
    11671158    if (pNd->u.If.pszIfInherit)
     
    11701161                                 HEADER(pThis)->num_interfaces, pNd->u.If.pszIfInherit,
    11711162                                 &parent_id))
    1172         {
    1173             //IDL_tree_error(iface,
    1174             //               "ERROR: no index found for %s. Giving up.\n",
    1175             //               parent);
    1176             return VERR_NOT_FOUND;
    1177         }
     1163            return xpidlIdlError(pThis->pErrInfo, NULL /*pNd*/, VERR_NOT_FOUND,
     1164                                 "ERROR: no index found for %s. Giving up.\n",
     1165                                 pNd->u.If.pszIfInherit);
    11781166    }
    11791167
     
    12251213
    12261214
    1227 DECL_HIDDEN_CALLBACK(int) xpidl_typelib_dispatch(FILE *pFile, PCXPIDLINPUT pInput, PCXPIDLPARSE pParse)
     1215DECL_HIDDEN_CALLBACK(int) xpidl_typelib_dispatch(FILE *pFile, PCXPIDLINPUT pInput, PCXPIDLPARSE pParse, PRTERRINFO pErrInfo)
    12281216{
    12291217    XPIDLTYPELIBSTATE This; RT_ZERO(This);
     1218    This.pErrInfo = pErrInfo;
    12301219    int rc = typelib_prolog(&This, pInput, pParse);
    12311220    AssertRC(rc);
  • trunk/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_util.c

    r108338 r108340  
    800800    return NULL;
    801801}
     802
     803
     804DECLHIDDEN(int) xpidlIdlError(PRTERRINFO pErrInfo, PCXPIDLNODE pNd, int rc, const char *pszFmt, ...)
     805{
     806    RT_NOREF(pNd);
     807
     808    va_list Args;
     809    va_start(Args, pszFmt);
     810    rc = RTErrInfoSetV(pErrInfo, rc, pszFmt, Args);
     811    va_end(Args);
     812    return rc;
     813}
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette