Andrew Eikum : oleaut32: Only copy previous function name if both are property accessors.
Alexandre Julliard
julliard at winehq.org
Tue Jun 4 15:48:35 CDT 2013
Module: wine
Branch: master
Commit: 0210cb93856df5432101a8df71da1f9060ed3860
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0210cb93856df5432101a8df71da1f9060ed3860
Author: Andrew Eikum <aeikum at codeweavers.com>
Date: Tue Jun 4 08:18:58 2013 -0500
oleaut32: Only copy previous function name if both are property accessors.
---
dlls/oleaut32/typelib.c | 23 ++++++++++++++++-------
1 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index 725bf2f..bb3be43 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -2240,6 +2240,13 @@ static void MSFT_ResolveReferencedTypes(TLBContext *pcx, ITypeInfoImpl *pTI, TYP
}
}
+static int TLB_is_propgetput(INVOKEKIND invkind)
+{
+ return (invkind == INVOKE_PROPERTYGET ||
+ invkind == INVOKE_PROPERTYPUT ||
+ invkind == INVOKE_PROPERTYPUTREF);
+}
+
static void
MSFT_DoFuncs(TLBContext* pcx,
ITypeInfoImpl* pTI,
@@ -2294,13 +2301,6 @@ MSFT_DoFuncs(TLBContext* pcx,
MSFT_ReadLEDWords(&nameoffset, sizeof(INT), pcx,
offset + infolen + (cFuncs + cVars + i + 1) * sizeof(INT));
- /* nameoffset is sometimes -1 on the second half of a propget/propput
- * pair of functions */
- if ((nameoffset == -1) && (i > 0))
- ptfd->Name = ptfd_prev->Name;
- else
- ptfd->Name = MSFT_ReadName(pcx, nameoffset);
-
/* read the function information record */
MSFT_ReadLEDWords(&reclength, sizeof(pFuncRec->Info), pcx, recoffset);
@@ -2351,6 +2351,15 @@ MSFT_DoFuncs(TLBContext* pcx,
ptfd->funcdesc.oVft = pFuncRec->VtableOffset & ~1;
ptfd->funcdesc.wFuncFlags = LOWORD(pFuncRec->Flags) ;
+ /* nameoffset is sometimes -1 on the second half of a propget/propput
+ * pair of functions */
+ if ((nameoffset == -1) && (i > 0) &&
+ TLB_is_propgetput(ptfd_prev->funcdesc.invkind) &&
+ TLB_is_propgetput(ptfd->funcdesc.invkind))
+ ptfd->Name = ptfd_prev->Name;
+ else
+ ptfd->Name = MSFT_ReadName(pcx, nameoffset);
+
MSFT_GetTdesc(pcx,
pFuncRec->DataType,
&ptfd->funcdesc.elemdescFunc.tdesc,
More information about the wine-cvs
mailing list