diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-04-12 11:22:43 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-04-12 11:22:43 (GMT) |
commit | 9b0ea3ca88021b82e77d81413e57d3d05d78a58a (patch) | |
tree | 17e79aba97d2060fe04dd26148f10bb53a7c857e /generic/tclPkg.c | |
parent | f2aea5424eee60a9044e1af01eeb7e2b42846e46 (diff) | |
parent | a0b6194b822a8e53746ff811f3e014e7d4848230 (diff) | |
download | tcl-9b0ea3ca88021b82e77d81413e57d3d05d78a58a.zip tcl-9b0ea3ca88021b82e77d81413e57d3d05d78a58a.tar.gz tcl-9b0ea3ca88021b82e77d81413e57d3d05d78a58a.tar.bz2 |
Implement Tcl_Pkg* functions as macro's around Tcl_Pkg*Ex. This saves stack space, is (marginally) faster, while still being fully up/down compatible. It makes pkgb.so loadable in "novem" without the need to change the Tcl_PkgProvide() call to Tcl_PkgProvideEx().
Diffstat (limited to 'generic/tclPkg.c')
-rw-r--r-- | generic/tclPkg.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/generic/tclPkg.c b/generic/tclPkg.c index b3396e6..52f33c3 100644 --- a/generic/tclPkg.c +++ b/generic/tclPkg.c @@ -106,6 +106,7 @@ static const char * PkgRequireCore(Tcl_Interp *interp, const char *name, *---------------------------------------------------------------------- */ +#undef Tcl_PkgProvide int Tcl_PkgProvide( Tcl_Interp *interp, /* Interpreter in which package is now @@ -186,6 +187,7 @@ Tcl_PkgProvideEx( *---------------------------------------------------------------------- */ +#undef Tcl_PkgRequire const char * Tcl_PkgRequire( Tcl_Interp *interp, /* Interpreter in which package is now @@ -655,6 +657,7 @@ PkgRequireCore( *---------------------------------------------------------------------- */ +#undef Tcl_PkgPresent const char * Tcl_PkgPresent( Tcl_Interp *interp, /* Interpreter in which package is now @@ -921,7 +924,7 @@ Tcl_PackageObjCmd( version = TclGetString(objv[3]); } } - Tcl_PkgPresent(interp, name, version, exact); + Tcl_PkgPresentEx(interp, name, version, exact, NULL); return TCL_ERROR; break; } @@ -945,7 +948,7 @@ Tcl_PackageObjCmd( if (CheckVersionAndConvert(interp, argv3, NULL, NULL) != TCL_OK) { return TCL_ERROR; } - return Tcl_PkgProvide(interp, argv2, argv3); + return Tcl_PkgProvideEx(interp, argv2, argv3, NULL); case PKG_REQUIRE: require: if (objc < 3) { |