mshtml: Write-strings warnings fix (Try 2)
Andrew Talbot
Andrew.Talbot at talbotville.com
Thu Aug 17 17:00:32 CDT 2006
According to http://developer.mozilla.org/en/docs/XPCOM_API_Reference/,
the affected functions' string and wide-string parameters are "in strings",
which seems to mean that they are read-only, so may be constified. Hence,
this patch.
Please use this one, instead. (I forgot to replace all of the occurrences of
nsstring/nswstring with nscstring/nscwstring, earlier.)
---
Changelog:
mshtml: Write-strings warnings fix.
diff -urN a/dlls/mshtml/nsiface.idl b/dlls/mshtml/nsiface.idl
--- a/dlls/mshtml/nsiface.idl 2006-08-09 17:22:40.000000000 +0100
+++ b/dlls/mshtml/nsiface.idl 2006-08-17 22:43:19.000000000 +0100
@@ -34,9 +34,9 @@
typedef nsIIDRef nsCIDRef;
typedef void** nsQIResult;
-typedef LPSTR nsstring;
+typedef LPCSTR nscstring;
typedef WCHAR PRUnichar;
-typedef LPWSTR nswstring;
+typedef LPCWSTR nscwstring;
typedef ULONG PRUint32;
typedef LONG PRInt32;
typedef WORD PRUint16;
@@ -116,9 +116,9 @@
interface nsIServiceManager : nsISupports
{
nsresult GetService(nsCIDRef aClass, nsIIDRef aIID, void **result);
- nsresult GetServiceByContactID(nsstring aContactID, nsIIDRef aIID, void **result);
+ nsresult GetServiceByContactID(nscstring aContactID, nsIIDRef aIID, void **result);
nsresult IsServiceInstantiated(nsCIDRef aClass, nsIIDRef aIID, BOOL *_retval);
- nsresult IsServiceInstantiatedByContractID(nsstring aContractID, nsIIDRef aIID, BOOL *_retval);
+ nsresult IsServiceInstantiatedByContractID(nscstring aContractID, nsIIDRef aIID, BOOL *_retval);
}
[
@@ -137,7 +137,7 @@
]
interface nsIObserver : nsISupports
{
- nsresult Observe(nsISupports *aSubject, nsstring aTopic, nswstring aData);
+ nsresult Observe(nsISupports *aSubject, nscstring aTopic, nscwstring aData);
}
[
@@ -147,10 +147,10 @@
interface nsIComponentManager : nsISupports
{
nsresult GetClassObject(nsCIDRef aClass, nsIIDRef aIID, nsQIResult result);
- nsresult GetClassObjectByContractID(nsstring aContractID, nsIIDRef aIID, nsQIResult result);
+ nsresult GetClassObjectByContractID(nscstring aContractID, nsIIDRef aIID, nsQIResult result);
nsresult CreateInstance(nsCIDRef aClass, nsISupports *aDelegate, nsIIDRef aIID,
nsQIResult result);
- nsresult CreateInstanceByContractID(nsstring aContractID, nsISupports *aDelegate,
+ nsresult CreateInstanceByContractID(nscstring aContractID, nsISupports *aDelegate,
nsIIDRef aIID, nsQIResult result);
}
More information about the wine-patches
mailing list