diff options
author | Steve Bennett <steveb@workware.net.au> | 2014-02-06 11:33:28 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2014-02-06 11:33:28 +1000 |
commit | 769d198e1e1ea936d21523bb1b301255dc79233e (patch) | |
tree | 7412a2f739d548c734fc36296dd6b5b6367de06c | |
parent | ade2e02e90aedff5b036f4d7ec4bc755030091d7 (diff) | |
download | jimtcl-0.75.zip jimtcl-0.75.tar.gz jimtcl-0.75.tar.bz2 |
package: fix corruption of versions string0.75
Partially revert 5f31686cb40c5b84638dbb5ffe1ad327440e1903
The version isn't allocated in the hash table, so we
can't take a reference to a version object.
Packages once again have a fixed, dummy "1.0" version.
Reported-by: Florian Schäfer <florian.schaefer+github@gmail.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
-rw-r--r-- | jim-package.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/jim-package.c b/jim-package.c index 3dc9d54..8b37c0a 100644 --- a/jim-package.c +++ b/jim-package.c @@ -9,7 +9,7 @@ #define R_OK 4 #endif -/* All Tcl packages have a fixed, dummy version */ +/* All packages have a fixed, dummy version */ static const char *package_version_1 = "1.0"; /* ----------------------------------------------------------------------------- @@ -157,14 +157,13 @@ int Jim_PackageRequire(Jim_Interp *interp, const char *name, int flags) * The package must not already be provided in the interpreter. * * Results: - * Returns JIM_OK and sets the results to the version (defaults to "1.0") + * Returns JIM_OK and sets results as "1.0" (the given version is ignored) * *---------------------------------------------------------------------- */ static int package_cmd_provide(Jim_Interp *interp, int argc, Jim_Obj *const *argv) { - return Jim_PackageProvide(interp, Jim_String(argv[0]), - argc > 1 ? Jim_String(argv[1]) : package_version_1, JIM_ERRMSG); + return Jim_PackageProvide(interp, Jim_String(argv[0]), package_version_1, JIM_ERRMSG); } /* |