summaryrefslogtreecommitdiffstats
path: root/win/tclWinLoad.c
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2024-06-20 07:44:32 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2024-06-20 07:44:32 (GMT)
commite83954d81f5ad30df0736d1cb12f5240bb8e896c (patch)
treebcc7064efa50ae367f8843e46d36b864e91b24af /win/tclWinLoad.c
parent2de684d18bf96b3de8c6e42f5aafbdb832096475 (diff)
parent58e07be6174a8195b83da655731626e99b605c86 (diff)
downloadtcl-e83954d81f5ad30df0736d1cb12f5240bb8e896c.zip
tcl-e83954d81f5ad30df0736d1cb12f5240bb8e896c.tar.gz
tcl-e83954d81f5ad30df0736d1cb12f5240bb8e896c.tar.bz2
Merge trunk
Diffstat (limited to 'win/tclWinLoad.c')
-rw-r--r--win/tclWinLoad.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/win/tclWinLoad.c b/win/tclWinLoad.c
index 1cc7ae1..b0c4c3b 100644
--- a/win/tclWinLoad.c
+++ b/win/tclWinLoad.c
@@ -90,11 +90,11 @@ TclpDlopen(
Tcl_DString ds;
- /*
- * Remember the first error on load attempt to be used if the
- * second load attempt below also fails.
- */
- firstError = (nativeName == NULL) ?
+ /*
+ * Remember the first error on load attempt to be used if the
+ * second load attempt below also fails.
+ */
+ firstError = (nativeName == NULL) ?
ERROR_MOD_NOT_FOUND : GetLastError();
Tcl_DStringInit(&ds);
@@ -106,19 +106,19 @@ TclpDlopen(
if (hInstance == NULL) {
DWORD lastError;
- Tcl_Obj *errMsg;
-
- /*
- * We choose to only use the error from the second call if the first
- * call failed due to the file not being found. Else stick to the
- * first error for reporting purposes.
- */
- if (firstError == ERROR_MOD_NOT_FOUND ||
+ Tcl_Obj *errMsg;
+
+ /*
+ * We choose to only use the error from the second call if the first
+ * call failed due to the file not being found. Else stick to the
+ * first error for reporting purposes.
+ */
+ if (firstError == ERROR_MOD_NOT_FOUND ||
firstError == ERROR_DLL_NOT_FOUND) {
- lastError = GetLastError();
- } else {
- lastError = firstError;
- }
+ lastError = GetLastError();
+ } else {
+ lastError = firstError;
+ }
errMsg = Tcl_ObjPrintf("couldn't load library \"%s\": ",
TclGetString(pathPtr));
@@ -157,11 +157,11 @@ TclpDlopen(
Tcl_AppendToObj(errMsg, "the library initialization"
" routine failed", TCL_INDEX_NONE);
break;
- case ERROR_BAD_EXE_FORMAT:
+ case ERROR_BAD_EXE_FORMAT:
Tcl_SetErrorCode(interp, "WIN_LOAD", "BAD_EXE_FORMAT", (char *)NULL);
Tcl_AppendToObj(errMsg, "Bad exe format. Possibly a 32/64-bit mismatch.", TCL_INDEX_NONE);
- break;
- default:
+ break;
+ default:
Tcl_WinConvertError(lastError);
Tcl_AppendToObj(errMsg, Tcl_PosixError(interp), TCL_INDEX_NONE);
}