diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-03-31 07:09:46 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-03-31 07:09:46 (GMT) |
commit | 998384d14959533914f0aa6cacaa0bd26a590ba2 (patch) | |
tree | b13d31bc0ccbff66c34e7e358f9ee5b9402ae16d /generic | |
parent | c578a1e4fab8865107a12a0b38f2c50d9c0d6741 (diff) | |
download | tcl-998384d14959533914f0aa6cacaa0bd26a590ba2.zip tcl-998384d14959533914f0aa6cacaa0bd26a590ba2.tar.gz tcl-998384d14959533914f0aa6cacaa0bd26a590ba2.tar.bz2 |
Internal API simplifications: Don't use types like HINSTANCE/HMODULE any more, just void*. Has effect only on Win32 and Cygwin.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclInt.decls | 8 | ||||
-rw-r--r-- | generic/tclIntPlatDecls.h | 12 | ||||
-rw-r--r-- | generic/tclZipfs.c | 2 |
3 files changed, 11 insertions, 11 deletions
diff --git a/generic/tclInt.decls b/generic/tclInt.decls index 82d9249..b9cec96 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -1082,11 +1082,11 @@ interface tclIntPlat # Windows specific functions declare 0 win { - void TclWinConvertError(DWORD errCode) + void TclWinConvertError(int errCode) } # Removed in 9.0: #declare 1 win { -# void TclWinConvertWSAError(DWORD errCode) +# void TclWinConvertWSAError(int errCode) #} # Removed in 9.0: #declare 2 win { @@ -1099,7 +1099,7 @@ declare 0 win { # char *optval, int *optlen) #} declare 4 win { - HINSTANCE TclWinGetTclInstance(void) + void *TclWinGetTclInstance(void) } # new for 8.4.20+/8.5.12+ Cygwin only declare 5 win { @@ -1177,7 +1177,7 @@ declare 19 win { TclFile TclpOpenFile(const char *fname, int mode) } declare 20 win { - void TclWinAddProcess(HANDLE hProcess, size_t id) + void TclWinAddProcess(void *hProcess, size_t id) } # Removed in 9.0: #declare 21 win { diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h index fc6cd0b..87a25db 100644 --- a/generic/tclIntPlatDecls.h +++ b/generic/tclIntPlatDecls.h @@ -114,12 +114,12 @@ EXTERN int TclUnixOpenTemporaryFile(Tcl_Obj *dirObj, #endif /* UNIX */ #if defined(_WIN32) || defined(__CYGWIN__) /* WIN */ /* 0 */ -EXTERN void TclWinConvertError(DWORD errCode); +EXTERN void TclWinConvertError(int errCode); /* Slot 1 is reserved */ /* Slot 2 is reserved */ /* Slot 3 is reserved */ /* 4 */ -EXTERN HINSTANCE TclWinGetTclInstance(void); +EXTERN void * TclWinGetTclInstance(void); /* 5 */ EXTERN int TclUnixWaitForFile(int fd, int mask, int timeout); /* Slot 6 is reserved */ @@ -155,7 +155,7 @@ EXTERN TclFile TclpMakeFile(Tcl_Channel channel, int direction); /* 19 */ EXTERN TclFile TclpOpenFile(const char *fname, int mode); /* 20 */ -EXTERN void TclWinAddProcess(HANDLE hProcess, size_t id); +EXTERN void TclWinAddProcess(void *hProcess, size_t id); /* Slot 21 is reserved */ /* 22 */ EXTERN TclFile TclpCreateTempFile(const char *contents); @@ -285,11 +285,11 @@ typedef struct TclIntPlatStubs { int (*tclUnixOpenTemporaryFile) (Tcl_Obj *dirObj, Tcl_Obj *basenameObj, Tcl_Obj *extensionObj, Tcl_Obj *resultingNameObj); /* 30 */ #endif /* UNIX */ #if defined(_WIN32) || defined(__CYGWIN__) /* WIN */ - void (*tclWinConvertError) (DWORD errCode); /* 0 */ + void (*tclWinConvertError) (int errCode); /* 0 */ void (*reserved1)(void); void (*reserved2)(void); void (*reserved3)(void); - HINSTANCE (*tclWinGetTclInstance) (void); /* 4 */ + void * (*tclWinGetTclInstance) (void); /* 4 */ int (*tclUnixWaitForFile) (int fd, int mask, int timeout); /* 5 */ void (*reserved6)(void); void (*reserved7)(void); @@ -305,7 +305,7 @@ typedef struct TclIntPlatStubs { int (*tclUnixCopyFile) (const char *src, const char *dst, const Tcl_StatBuf *statBufPtr, int dontCopyAtts); /* 17 */ TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 18 */ TclFile (*tclpOpenFile) (const char *fname, int mode); /* 19 */ - void (*tclWinAddProcess) (HANDLE hProcess, size_t id); /* 20 */ + void (*tclWinAddProcess) (void *hProcess, size_t id); /* 20 */ void (*reserved21)(void); TclFile (*tclpCreateTempFile) (const char *contents); /* 22 */ void (*reserved23)(void); diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c index aa68935..7398ab8 100644 --- a/generic/tclZipfs.c +++ b/generic/tclZipfs.c @@ -3205,7 +3205,7 @@ TclZipfs_TclLibrary(void) */ #if defined(_WIN32) - hModule = TclWinGetTclInstance(); + hModule = (HMODULE)TclWinGetTclInstance(); GetModuleFileNameW(hModule, wName, MAX_PATH); WideCharToMultiByte(CP_UTF8, 0, wName, -1, dllName, sizeof(dllName), NULL, NULL); |