summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--generic/tclDecls.h10
-rw-r--r--generic/tclPkg.c4
-rw-r--r--unix/dltest/pkgb.c4
4 files changed, 19 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index db248ac..8619a9f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-04-12 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * generic/tclDecls.h: Implement Tcl_Pkg* functions as
+ (faster/stack-saving) macros around Tcl_Pkg*Ex functions.
+
2013-04-08 Don Porter <dgp@users.sourceforge.net>
* generic/regc_color.c: [Bug 3610026] Stop crash when the number of
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index a1c0bf4..5fda514 100644
--- a/generic/tclDecls.h
+++ b/generic/tclDecls.h
@@ -3809,6 +3809,16 @@ extern const TclStubs *tclStubsPtr;
#undef Tcl_SeekOld
#undef Tcl_TellOld
+#undef Tcl_PkgPresent
+#define Tcl_PkgPresent(interp, name, version, exact) \
+ Tcl_PkgPresentEx(interp, name, version, exact, NULL)
+#undef Tcl_PkgProvide
+#define Tcl_PkgProvide(interp, name, version) \
+ Tcl_PkgProvideEx(interp, name, version, NULL)
+#undef Tcl_PkgRequire
+#define Tcl_PkgRequire(interp, name, version, exact) \
+ Tcl_PkgRequireEx(interp, name, version, exact, NULL)
+
/*
* Deprecated Tcl procedures:
*/
diff --git a/generic/tclPkg.c b/generic/tclPkg.c
index 07f62a4..df90cea 100644
--- a/generic/tclPkg.c
+++ b/generic/tclPkg.c
@@ -949,7 +949,7 @@ Tcl_PackageObjCmd(
version = TclGetString(objv[3]);
}
}
- Tcl_PkgPresent(interp, name, version, exact);
+ Tcl_PkgPresentEx(interp, name, version, exact, NULL);
return TCL_ERROR;
break;
}
@@ -974,7 +974,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) {
diff --git a/unix/dltest/pkgb.c b/unix/dltest/pkgb.c
index ad61d77..f102496 100644
--- a/unix/dltest/pkgb.c
+++ b/unix/dltest/pkgb.c
@@ -144,7 +144,7 @@ Pkgb_Init(
if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
return TCL_ERROR;
}
- code = Tcl_PkgProvideEx(interp, "Pkgb", "2.3", NULL);
+ code = Tcl_PkgProvide(interp, "Pkgb", "2.3");
if (code != TCL_OK) {
return code;
}
@@ -181,7 +181,7 @@ Pkgb_SafeInit(
if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
return TCL_ERROR;
}
- code = Tcl_PkgProvideEx(interp, "Pkgb", "2.3", NULL);
+ code = Tcl_PkgProvide(interp, "Pkgb", "2.3");
if (code != TCL_OK) {
return code;
}