From 8f3e1ce80995c42a200db98fbfe02e4a60771c26 Mon Sep 17 00:00:00 2001 From: Steve Bennett Date: Sun, 10 Jan 2021 13:12:36 +1000 Subject: 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 --- jim-file.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'jim-file.c') diff --git a/jim-file.c b/jim-file.c index 53f81f6..56fb314 100644 --- a/jim-file.c +++ b/jim-file.c @@ -1119,9 +1119,7 @@ static int Jim_PwdCmd(Jim_Interp *interp, int argc, Jim_Obj *const *argv) int Jim_fileInit(Jim_Interp *interp) { - if (Jim_PackageProvide(interp, "file", "1.0", JIM_ERRMSG)) - return JIM_ERR; - + Jim_PackageProvideCheck(interp, "file"); Jim_CreateCommand(interp, "file", Jim_SubCmdProc, (void *)file_command_table, NULL); Jim_CreateCommand(interp, "pwd", Jim_PwdCmd, NULL, NULL); Jim_CreateCommand(interp, "cd", Jim_CdCmd, NULL, NULL); -- cgit v1.1