diff options
author | Steve Bennett <steveb@workware.net.au> | 2010-09-28 07:47:28 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2010-10-15 11:02:55 +1000 |
commit | 9e64d4521dbf5247580929eb0a00c9f83cd311f8 (patch) | |
tree | 6a153be3ebe57df79a88a03572f87fa9d8ffb4a9 /jim-readline.c | |
parent | 0833de336567cccd1de4d246eed30b7fd5ce0413 (diff) | |
download | jimtcl-9e64d4521dbf5247580929eb0a00c9f83cd311f8.zip jimtcl-9e64d4521dbf5247580929eb0a00c9f83cd311f8.tar.gz jimtcl-9e64d4521dbf5247580929eb0a00c9f83cd311f8.tar.bz2 |
Ensure that Tcl extensions can be built-in or external
All C extensions must call Jim_PackageProvide()
make-c-ext ensures that Tcl extensions call Jim_PackageProvide()
if compiled in.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'jim-readline.c')
-rw-r--r-- | jim-readline.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/jim-readline.c b/jim-readline.c index 0b59216..6ad3e41 100644 --- a/jim-readline.c +++ b/jim-readline.c @@ -52,6 +52,9 @@ static int JimRlAddHistoryCommand(Jim_Interp *interp, int argc, Jim_Obj *const * int Jim_readlineInit(Jim_Interp *interp) { + if (Jim_PackageProvide(interp, "readline", "1.0", JIM_ERRMSG)) + return JIM_ERR; + Jim_CreateCommand(interp, "readline.readline", JimRlReadlineCommand, NULL, NULL); Jim_CreateCommand(interp, "readline.addhistory", JimRlAddHistoryCommand, NULL, NULL); return JIM_OK; |