diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-06-29 15:28:36 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-06-29 15:28:36 (GMT) |
commit | 964477ea367a07c99f36ff8dd83af5be6ad23a6e (patch) | |
tree | 45c99d49da58a2bc779003cada3433f80398197e /win | |
parent | 88fc841203408d81942346c602bc76dd7a97fc3b (diff) | |
download | tcl-964477ea367a07c99f36ff8dd83af5be6ad23a6e.zip tcl-964477ea367a07c99f36ff8dd83af5be6ad23a6e.tar.gz tcl-964477ea367a07c99f36ff8dd83af5be6ad23a6e.tar.bz2 |
Eliminate internal use of TCL_STORAGE_CLASS, as it will be gone in 9.0 anyway
Diffstat (limited to 'win')
-rw-r--r-- | win/tclWinDde.c | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/win/tclWinDde.c b/win/tclWinDde.c index ce0b413..c852728 100644 --- a/win/tclWinDde.c +++ b/win/tclWinDde.c @@ -34,16 +34,6 @@ #endif /* - * TCL_STORAGE_CLASS is set unconditionally to DLLEXPORT because the Dde_Init - * declaration is in the source file itself, which is only accessed when we - * are building a library. DO NOT MOVE BEFORE ANY #include LINES. ONLY USE - * EXTERN TO INDICATE EXPORTED FUNCTIONS FROM NOW ON. - */ - -#undef TCL_STORAGE_CLASS -#define TCL_STORAGE_CLASS DLLEXPORT - -/* * The following structure is used to keep track of the interpreters * registered by this process. */ @@ -69,13 +59,13 @@ typedef struct Conversation { Tcl_Obj *returnPackagePtr; /* The result package for this conversation. */ } Conversation; -typedef struct DdeEnumServices { +struct DdeEnumServices { Tcl_Interp *interp; int result; ATOM service; ATOM topic; HWND hwnd; -} DdeEnumServices; +}; typedef struct ThreadSpecificData { Conversation *currentConversations; @@ -135,8 +125,8 @@ static int DdeObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); -EXTERN int Dde_Init(Tcl_Interp *interp); -EXTERN int Dde_SafeInit(Tcl_Interp *interp); +DLLEXPORT int Dde_Init(Tcl_Interp *interp); +DLLEXPORT int Dde_SafeInit(Tcl_Interp *interp); /* *---------------------------------------------------------------------- @@ -399,7 +389,7 @@ DdeSetServerName( Tcl_DString ds; Tcl_ListObjIndex(interp, srvPtrPtr[n], 1, &namePtr); - Tcl_WinUtfToTChar(Tcl_GetString(namePtr), -1, &ds); + Tcl_WinUtfToTChar(Tcl_GetString(namePtr), -1, &ds); if (_tcscmp(actualName, (TCHAR *)Tcl_DStringValue(&ds)) == 0) { suffix++; Tcl_DStringFree(&ds); @@ -1757,8 +1747,7 @@ DdeObjCmd( objPtr = Tcl_GetVar2Ex(sendInterp, "errorInfo", NULL, TCL_GLOBAL_ONLY); if (objPtr) { - string = Tcl_GetStringFromObj(objPtr, &length); - Tcl_AddObjErrorInfo(interp, string, length); + Tcl_AppendObjToErrorInfo(interp, objPtr); } objPtr = Tcl_GetVar2Ex(sendInterp, "errorCode", NULL, @@ -1853,9 +1842,7 @@ DdeObjCmd( Tcl_DecrRefCount(resultPtr); goto invalidServerResponse; } - length = -1; - string = Tcl_GetStringFromObj(objPtr, &length); - Tcl_AddObjErrorInfo(interp, string, length); + Tcl_AppendObjToErrorInfo(interp, objPtr); Tcl_ListObjIndex(NULL, resultPtr, 2, &objPtr); Tcl_SetObjErrorCode(interp, objPtr); |