diff options
author | Steve Bennett <steveb@workware.net.au> | 2020-06-05 11:51:19 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2020-06-05 21:48:01 +1000 |
commit | 5d44077dc5e785c490707f57a420fb92ff99015f (patch) | |
tree | 560aa66f38cc1a6b340cff81489de6e5f5084e41 /jim.h | |
parent | 7dbb01f6ca673f3b46231215695c848ffbee3989 (diff) | |
download | jimtcl-5d44077dc5e785c490707f57a420fb92ff99015f.zip jimtcl-5d44077dc5e785c490707f57a420fb92ff99015f.tar.gz jimtcl-5d44077dc5e785c490707f57a420fb92ff99015f.tar.bz2 |
core: command (proc) names may now contained embedded nulls
The hash table used to store commands now uses Jim_Obj keys rather
than allocated char *, so embedded nulls are supported.
This means that some API function such as Jim_RenameCommand()
now take Jim_Obj * rather than const char *, however Jim_CreateCommand()
is retained with const char * for convenience and the new Jim_CreateCommandObj()
is added.
This is generally a performance win as the existing Jim_Obj can be used
as the key.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'jim.h')
-rw-r--r-- | jim.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -724,9 +724,9 @@ JIM_EXPORT int Jim_CreateCommand (Jim_Interp *interp, const char *cmdName, Jim_CmdProc *cmdProc, void *privData, Jim_DelCmdProc *delProc); JIM_EXPORT int Jim_DeleteCommand (Jim_Interp *interp, - const char *cmdName); + Jim_Obj *cmdNameObj); JIM_EXPORT int Jim_RenameCommand (Jim_Interp *interp, - const char *oldName, const char *newName); + Jim_Obj *oldNameObj, Jim_Obj *newNameObj); JIM_EXPORT Jim_Cmd * Jim_GetCommand (Jim_Interp *interp, Jim_Obj *objPtr, int flags); JIM_EXPORT int Jim_SetVariable (Jim_Interp *interp, |