diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-06-29 11:39:00 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-06-29 11:39:00 (GMT) |
commit | b2522c9c24b283a616ac38c4c987827c4fa86167 (patch) | |
tree | 7ce411d2af949b4e0efb15ac084505dc3427742a /unix | |
parent | 23a0290873b671c61ba3bc112ffc158fb859667a (diff) | |
download | tcl-b2522c9c24b283a616ac38c4c987827c4fa86167.zip tcl-b2522c9c24b283a616ac38c4c987827c4fa86167.tar.gz tcl-b2522c9c24b283a616ac38c4c987827c4fa86167.tar.bz2 |
Tcl_SetVar -> Tcl_SetVar2 and comparable replacements, eliminating functions which are deprecated.
Diffstat (limited to 'unix')
-rw-r--r-- | unix/dltest/pkgua.c | 6 | ||||
-rw-r--r-- | unix/tclUnixInit.c | 24 | ||||
-rw-r--r-- | unix/tclUnixSock.c | 2 |
3 files changed, 16 insertions, 16 deletions
diff --git a/unix/dltest/pkgua.c b/unix/dltest/pkgua.c index 417bedb..5de0101 100644 --- a/unix/dltest/pkgua.c +++ b/unix/dltest/pkgua.c @@ -224,7 +224,7 @@ Pkgua_Init( return code; } - Tcl_SetVar(interp, "::pkgua_loaded", ".", TCL_APPEND_VALUE); + Tcl_SetVar2(interp, "::pkgua_loaded", NULL, ".", TCL_APPEND_VALUE); cmdTokens = PkguaInterpToTokens(interp); cmdTokens[cmdIndex++] = @@ -299,7 +299,7 @@ Pkgua_Unload( PkguaDeleteTokens(interp); - Tcl_SetVar(interp, "::pkgua_detached", ".", TCL_APPEND_VALUE); + Tcl_SetVar2(interp, "::pkgua_detached", NULL, ".", TCL_APPEND_VALUE); if (flags == TCL_UNLOAD_DETACH_FROM_PROCESS) { /* @@ -309,7 +309,7 @@ Pkgua_Unload( */ PkguaFreeTokensHashTable(); - Tcl_SetVar(interp, "::pkgua_unloaded", ".", TCL_APPEND_VALUE); + Tcl_SetVar2(interp, "::pkgua_unloaded", NULL, ".", TCL_APPEND_VALUE); } return TCL_OK; } diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c index 5fc0035..71b20e3 100644 --- a/unix/tclUnixInit.c +++ b/unix/tclUnixInit.c @@ -780,7 +780,7 @@ TclpSetVariables( if (!Tcl_CreateNamespace(interp, "::tcl::mac", NULL, NULL)) { Tcl_ResetResult(interp); } - Tcl_SetVar(interp, "::tcl::mac::locale", loc, TCL_GLOBAL_ONLY); + Tcl_SetVar2(interp, "::tcl::mac::locale", NULL, loc, TCL_GLOBAL_ONLY); } } CFRelease(localeRef); @@ -791,9 +791,9 @@ TclpSetVariables( const char *str; CFBundleRef bundleRef; - Tcl_SetVar(interp, "tclDefaultLibrary", tclLibPath, TCL_GLOBAL_ONLY); - Tcl_SetVar(interp, "tcl_pkgPath", tclLibPath, TCL_GLOBAL_ONLY); - Tcl_SetVar(interp, "tcl_pkgPath", " ", + Tcl_SetVar2(interp, "tclDefaultLibrary", NULL, tclLibPath, TCL_GLOBAL_ONLY); + Tcl_SetVar2(interp, "tcl_pkgPath", NULL, tclLibPath, TCL_GLOBAL_ONLY); + Tcl_SetVar2(interp, "tcl_pkgPath", NULL, " ", TCL_GLOBAL_ONLY | TCL_APPEND_VALUE); str = TclGetEnv("DYLD_FRAMEWORK_PATH", &ds); @@ -809,9 +809,9 @@ TclpSetVariables( *p = ' '; } } while (*p++); - Tcl_SetVar(interp, "tcl_pkgPath", Tcl_DStringValue(&ds), + Tcl_SetVar2(interp, "tcl_pkgPath", NULL, Tcl_DStringValue(&ds), TCL_GLOBAL_ONLY | TCL_APPEND_VALUE); - Tcl_SetVar(interp, "tcl_pkgPath", " ", + Tcl_SetVar2(interp, "tcl_pkgPath", NULL, " ", TCL_GLOBAL_ONLY | TCL_APPEND_VALUE); Tcl_DStringFree(&ds); } @@ -826,9 +826,9 @@ TclpSetVariables( (unsigned char*) tclLibPath, MAXPATHLEN) && ! TclOSstat(tclLibPath, &statBuf) && S_ISDIR(statBuf.st_mode)) { - Tcl_SetVar(interp, "tcl_pkgPath", tclLibPath, + Tcl_SetVar2(interp, "tcl_pkgPath", NULL, tclLibPath, TCL_GLOBAL_ONLY | TCL_APPEND_VALUE); - Tcl_SetVar(interp, "tcl_pkgPath", " ", + Tcl_SetVar2(interp, "tcl_pkgPath", NULL, " ", TCL_GLOBAL_ONLY | TCL_APPEND_VALUE); } CFRelease(frameworksURL); @@ -839,20 +839,20 @@ TclpSetVariables( (unsigned char*) tclLibPath, MAXPATHLEN) && ! TclOSstat(tclLibPath, &statBuf) && S_ISDIR(statBuf.st_mode)) { - Tcl_SetVar(interp, "tcl_pkgPath", tclLibPath, + Tcl_SetVar2(interp, "tcl_pkgPath", NULL, tclLibPath, TCL_GLOBAL_ONLY | TCL_APPEND_VALUE); - Tcl_SetVar(interp, "tcl_pkgPath", " ", + Tcl_SetVar2(interp, "tcl_pkgPath", NULL, " ", TCL_GLOBAL_ONLY | TCL_APPEND_VALUE); } CFRelease(frameworksURL); } } - Tcl_SetVar(interp, "tcl_pkgPath", pkgPath, + Tcl_SetVar2(interp, "tcl_pkgPath", NULL, pkgPath, TCL_GLOBAL_ONLY | TCL_APPEND_VALUE); } else #endif /* HAVE_COREFOUNDATION */ { - Tcl_SetVar(interp, "tcl_pkgPath", pkgPath, TCL_GLOBAL_ONLY); + Tcl_SetVar2(interp, "tcl_pkgPath", NULL, pkgPath, TCL_GLOBAL_ONLY); } #ifdef DJGPP diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c index 9c5cd4b..8167077 100644 --- a/unix/tclUnixSock.c +++ b/unix/tclUnixSock.c @@ -735,7 +735,7 @@ TcpHostPortList( #endif /* NEED_FAKE_RFC2553 */ } /* Check if reverse DNS has been switched off globally */ - if (interp != NULL && Tcl_GetVar(interp, SUPPRESS_RDNS_VAR, 0) != NULL) { + if (interp != NULL && Tcl_GetVar2(interp, SUPPRESS_RDNS_VAR, NULL, 0) != NULL) { flags |= NI_NUMERICHOST; } if (getnameinfo(&addr.sa, salen, host, sizeof(host), NULL, 0, flags) == 0) { |