diff options
author | Steve Bennett <steveb@workware.net.au> | 2021-01-10 13:12:36 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2021-01-10 15:33:15 +1000 |
commit | 8f3e1ce80995c42a200db98fbfe02e4a60771c26 (patch) | |
tree | 79cfcc498292df506fb71660caa3527f03823246 /jim-json.c | |
parent | a95647743db1816f54368c8b515b6cc6d4c3c745 (diff) | |
download | jimtcl-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-json.c')
-rw-r--r-- | jim-json.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -418,10 +418,7 @@ done: int Jim_jsonInit(Jim_Interp *interp) { - if (Jim_PackageProvide(interp, "json", "1.0", JIM_ERRMSG) != JIM_OK) { - return JIM_ERR; - } - + Jim_PackageProvideCheck(interp, "json"); Jim_CreateCommand(interp, "json::decode", json_decode, NULL, NULL); /* Load the Tcl implementation of the json encoder if possible */ Jim_PackageRequire(interp, "jsonencode", 0); |