aboutsummaryrefslogtreecommitdiff
path: root/jim-clock.c
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2021-01-10 13:12:36 +1000
committerSteve Bennett <steveb@workware.net.au>2021-01-10 15:33:15 +1000
commit8f3e1ce80995c42a200db98fbfe02e4a60771c26 (patch)
tree79cfcc498292df506fb71660caa3527f03823246 /jim-clock.c
parenta95647743db1816f54368c8b515b6cc6d4c3c745 (diff)
downloadjimtcl-8f3e1ce80995c42a200db98fbfe02e4a60771c26.zip
jimtcl-8f3e1ce80995c42a200db98fbfe02e4a60771c26.tar.gz
jimtcl-8f3e1ce80995c42a200db98fbfe02e4a60771c26.tar.bz2
package: add ABI version checking
jim.h now includes JIM_ABI_VERSION that should be incremented whenever the ABI changes. Then all loadable modules should call Jim_CheckAbiVersion() to make sure they are loaded against the correct version. Add Jim_PackageProvideCheck() that does both Jim_CheckAbiVersion() and Jim_PackageProvide() to simplify the implementation of loadable extensions. Also rename the "big" sqlite3 extension to just sqlite to avoid a naming conflict with the smaller jim-sqlite3 extension. Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'jim-clock.c')
-rw-r--r--jim-clock.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/jim-clock.c b/jim-clock.c
index cc24319..0ca3e7b 100644
--- a/jim-clock.c
+++ b/jim-clock.c
@@ -228,9 +228,7 @@ static const jim_subcmd_type clock_command_table[] = {
int Jim_clockInit(Jim_Interp *interp)
{
- if (Jim_PackageProvide(interp, "clock", "1.0", JIM_ERRMSG))
- return JIM_ERR;
-
+ Jim_PackageProvideCheck(interp, "clock");
Jim_CreateCommand(interp, "clock", Jim_SubCmdProc, (void *)clock_command_table, NULL);
return JIM_OK;
}