diff options
Diffstat (limited to 'generic/tclPkg.c')
-rw-r--r-- | generic/tclPkg.c | 55 |
1 files changed, 7 insertions, 48 deletions
diff --git a/generic/tclPkg.c b/generic/tclPkg.c index df90cea..ec5d0e6 100644 --- a/generic/tclPkg.c +++ b/generic/tclPkg.c @@ -39,7 +39,7 @@ typedef struct PkgAvail { * "Tk" (no version number). */ -typedef struct Package { +typedef struct { char *version; /* Version that has been supplied in this * interpreter via "package provide" * (malloc'ed). NULL means the package doesn't @@ -88,7 +88,7 @@ static const char * PkgRequireCore(Tcl_Interp *interp, const char *name, /* *---------------------------------------------------------------------- * - * Tcl_PkgProvide / Tcl_PkgProvideEx -- + * Tcl_PkgProvideEx -- * * This function is invoked to declare that a particular version of a * particular package is now present in an interpreter. There must not be @@ -106,17 +106,6 @@ 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 - * available. */ - const char *name, /* Name of package. */ - const char *version) /* Version string for package. */ -{ - return Tcl_PkgProvideEx(interp, name, version, NULL); -} - int Tcl_PkgProvideEx( Tcl_Interp *interp, /* Interpreter in which package is now @@ -165,7 +154,7 @@ Tcl_PkgProvideEx( /* *---------------------------------------------------------------------- * - * Tcl_PkgRequire / Tcl_PkgRequireEx / Tcl_PkgRequireProc -- + * Tcl_PkgRequireEx / Tcl_PkgRequireProc -- * * This function is called by code that depends on a particular version * of a particular package. If the package is not already provided in the @@ -189,21 +178,6 @@ Tcl_PkgProvideEx( *---------------------------------------------------------------------- */ -#undef Tcl_PkgRequire -const char * -Tcl_PkgRequire( - Tcl_Interp *interp, /* Interpreter in which package is now - * available. */ - const char *name, /* Name of desired package. */ - const char *version, /* Version string for desired version; NULL - * means use the latest version available. */ - int exact) /* Non-zero means that only the particular - * version given is acceptable. Zero means use - * the latest compatible version. */ -{ - return Tcl_PkgRequireEx(interp, name, version, exact, NULL); -} - const char * Tcl_PkgRequireEx( Tcl_Interp *interp, /* Interpreter in which package is now @@ -654,7 +628,7 @@ PkgRequireCore( /* *---------------------------------------------------------------------- * - * Tcl_PkgPresent / Tcl_PkgPresentEx -- + * Tcl_PkgPresentEx -- * * Checks to see whether the specified package is present. If it is not * then no additional action is taken. @@ -672,21 +646,6 @@ PkgRequireCore( *---------------------------------------------------------------------- */ -#undef Tcl_PkgPresent -const char * -Tcl_PkgPresent( - Tcl_Interp *interp, /* Interpreter in which package is now - * available. */ - const char *name, /* Name of desired package. */ - const char *version, /* Version string for desired version; NULL - * means use the latest version available. */ - int exact) /* Non-zero means that only the particular - * version given is acceptable. Zero means use - * the latest compatible version. */ -{ - return Tcl_PkgPresentEx(interp, name, version, exact, NULL); -} - const char * Tcl_PkgPresentEx( Tcl_Interp *interp, /* Interpreter in which package is now @@ -1893,7 +1852,7 @@ Tcl_PkgInitStubsCheck( const char * version, int exact) { - const char *actualVersion = Tcl_PkgPresent(interp, "Tcl", version, 0); + const char *actualVersion = Tcl_PkgPresentEx(interp, "Tcl", version, 0, NULL); if (exact && actualVersion) { const char *p = version; @@ -1905,11 +1864,11 @@ Tcl_PkgInitStubsCheck( if (count == 1) { if (0 != strncmp(version, actualVersion, strlen(version))) { /* Construct error message */ - Tcl_PkgPresent(interp, "Tcl", version, 1); + Tcl_PkgPresentEx(interp, "Tcl", version, 1, NULL); return NULL; } } else { - return Tcl_PkgPresent(interp, "Tcl", version, 1); + return Tcl_PkgPresentEx(interp, "Tcl", version, 1, NULL); } } return actualVersion; |