From 5d44077dc5e785c490707f57a420fb92ff99015f Mon Sep 17 00:00:00 2001 From: Steve Bennett Date: Fri, 5 Jun 2020 11:51:19 +1000 Subject: 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 --- tests/alias.test | 1 + tests/applyns.test | 5 +++++ 2 files changed, 6 insertions(+) (limited to 'tests') diff --git a/tests/alias.test b/tests/alias.test index 64855dd..00870d1 100644 --- a/tests/alias.test +++ b/tests/alias.test @@ -64,6 +64,7 @@ test curry-1.4 "Two word curry" { test curry-1.5 "Delete curry" references { collect + $one abc unset one two collect } {2} diff --git a/tests/applyns.test b/tests/applyns.test index bff7624..3fc4c72 100644 --- a/tests/applyns.test +++ b/tests/applyns.test @@ -88,6 +88,11 @@ test apply-7.8 {namespace access} { set body {testApply} apply [list args $body testApply] } testApply +test apply-7.9 {namespace access} { + set ::testApply::x 0 + set body {testApply} + apply [list args $body ::testApply] +} testApply # apply ignore the current namespace and runs at global scope # or the provided namespace (relative to global) -- cgit v1.1