Rob Shearman : mshtml: Don't use typeof as it's not portable.

Alexandre Julliard julliard at winehq.org
Wed Feb 27 08:03:11 CST 2008


Module: wine
Branch: master
Commit: 26ad119d3a2620ff8ce6dadc9f8d4c09804e9aa3
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=26ad119d3a2620ff8ce6dadc9f8d4c09804e9aa3

Author: Rob Shearman <rob at codeweavers.com>
Date:   Tue Feb 26 11:13:07 2008 +0000

mshtml: Don't use typeof as it's not portable.

---

 dlls/mshtml/install.c |    4 ++--
 dlls/mshtml/main.c    |    4 ++--
 dlls/mshtml/nsembed.c |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/dlls/mshtml/install.c b/dlls/mshtml/install.c
index 1f5777d..fd36290 100644
--- a/dlls/mshtml/install.c
+++ b/dlls/mshtml/install.c
@@ -133,7 +133,7 @@ static BOOL install_cab(LPCWSTR file_name)
 {
     HMODULE advpack;
     char install_dir[MAX_PATH];
-    typeof(ExtractFilesA) *pExtractFilesA;
+    HRESULT (WINAPI *pExtractFilesA)(LPCSTR,LPCSTR,DWORD,LPCSTR,LPVOID,DWORD);
     LPSTR file_name_a;
     DWORD res, len;
     HRESULT hres;
@@ -158,7 +158,7 @@ static BOOL install_cab(LPCWSTR file_name)
     }
 
     advpack = LoadLibraryW(wszAdvpack);
-    pExtractFilesA = (typeof(ExtractFilesA)*)GetProcAddress(advpack, "ExtractFiles");
+    pExtractFilesA = (void *)GetProcAddress(advpack, "ExtractFiles");
 
     len = WideCharToMultiByte(CP_ACP, 0, file_name, -1, NULL, 0, NULL, NULL);
     file_name_a = heap_alloc(len);
diff --git a/dlls/mshtml/main.c b/dlls/mshtml/main.c
index 74fba4c..1c81c36 100644
--- a/dlls/mshtml/main.c
+++ b/dlls/mshtml/main.c
@@ -369,7 +369,7 @@ static HRESULT register_server(BOOL do_register)
 {
     HRESULT hres;
     HMODULE hAdvpack;
-    typeof(RegInstallA) *pRegInstall;
+    HRESULT (WINAPI *pRegInstall)(HMODULE hm, LPCSTR pszSection, const STRTABLEA* pstTable);
     STRTABLEA strtable;
     STRENTRYA pse[35];
     static CLSID const *clsids[35];
@@ -427,7 +427,7 @@ static HRESULT register_server(BOOL do_register)
     strtable.pse = pse;
 
     hAdvpack = LoadLibraryW(wszAdvpack);
-    pRegInstall = (typeof(RegInstallA)*)GetProcAddress(hAdvpack, "RegInstall");
+    pRegInstall = (void *)GetProcAddress(hAdvpack, "RegInstall");
 
     hres = pRegInstall(hInst, do_register ? "RegisterDll" : "UnregisterDll", &strtable);
 
diff --git a/dlls/mshtml/nsembed.c b/dlls/mshtml/nsembed.c
index 5563c6f..08d13af 100644
--- a/dlls/mshtml/nsembed.c
+++ b/dlls/mshtml/nsembed.c
@@ -166,7 +166,7 @@ static BOOL load_xpcom(const PRUnichar *gre_path)
     }
 
 #define NS_DLSYM(func) \
-    func = (typeof(func))GetProcAddress(hXPCOM, #func); \
+    func = (void *)GetProcAddress(hXPCOM, #func); \
     if(!func) \
         ERR("Could not GetProcAddress(" #func ") failed\n")
 




More information about the wine-cvs mailing list