From 7080c8d98ebc46fef3bedcb457e0be4643616a3d Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 9 Feb 2006 12:17:38 +0100 Subject: [PATCH] mshtml: Better ns*String handling. --- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/nsembed.c | 11 +++++++++-- dlls/mshtml/nsiface.idl | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 6640f9012a9..019111e3e80 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -151,6 +151,7 @@ void init_nsio(nsIComponentManager*,nsIComponentRegistrar*); nsIURI *get_nsIURI(LPCWSTR); nsACString *nsACString_Create(void); +PRUint32 nsACString_GetData(const nsACString*,const char**,PRBool*); void nsACString_SetData(nsACString*,const char*); void nsACString_Destroy(nsACString*); diff --git a/dlls/mshtml/nsembed.c b/dlls/mshtml/nsembed.c index 004901ea005..93533afaaf2 100644 --- a/dlls/mshtml/nsembed.c +++ b/dlls/mshtml/nsembed.c @@ -50,6 +50,13 @@ struct nsStringContainer { void *d3; }; +struct nsCStringContainer { + void *v; + void *d1; + PRUint32 d2; + void *d3; +}; + static nsresult (*NS_InitXPCOM2)(nsIServiceManager**,void*,void*); static nsresult (*NS_ShutdownXPCOM)(nsIServiceManager*); static nsresult (*NS_GetComponentRegistrar)(nsIComponentRegistrar**); @@ -60,7 +67,7 @@ static nsresult (*NS_CStringContainerFinish)(nsCStringContainer*); static nsresult (*NS_StringSetData)(nsAString*,const PRUnichar*,PRUint32); static nsresult (*NS_CStringSetData)(nsACString*,const char*,PRUint32); static nsresult (*NS_NewLocalFile)(const nsAString*,PRBool,nsIFile**); -static PRUint32 (*NS_CStringGetData)(nsACString*,const char**,PRBool*); +static PRUint32 (*NS_CStringGetData)(const nsACString*,const char**,PRBool*); static HINSTANCE hXPCOM = NULL; @@ -370,7 +377,7 @@ void nsACString_SetData(nsACString *str, const char *data) NS_CStringSetData(str, data, PR_UINT32_MAX); } -static PRUint32 nsACString_GetData(nsACString *str, const char **data, PRBool *termited) +PRUint32 nsACString_GetData(const nsACString *str, const char **data, PRBool *termited) { return NS_CStringGetData(str, data, termited); } diff --git a/dlls/mshtml/nsiface.idl b/dlls/mshtml/nsiface.idl index d97c3bd8899..cc2c7d073a8 100644 --- a/dlls/mshtml/nsiface.idl +++ b/dlls/mshtml/nsiface.idl @@ -46,9 +46,9 @@ typedef LARGE_INTEGER PRInt64; typedef ULARGE_INTEGER PRUint64; typedef PRUint64 DOMTimeStamp; +typedef struct nsCStringContainer nsCStringContainer; typedef struct nsStringContainer nsStringContainer; -typedef nsStringContainer nsCStringContainer; -typedef nsStringContainer nsACString; +typedef nsCStringContainer nsACString; typedef nsStringContainer nsAString; interface nsIWebBrowserChrome;