Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
The following should break when a handled signal is caught.
catch -signal { vwait forever }
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
The API function definition for Jim_InitStringRep() has been removed
by the commit:
commit 2e8b9ddb92ed1cea3054ed8180d363c9dcc72dd9
Author: Steve Bennett <steveb@workware.net.au>
Date: Sat Feb 18 14:47:11 2012 +1000
Small cleanup/optimisation in object create/dup
Remove the declaration from the headers as well.
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
|
|
No perf difference measured using bench.tcl.
Signed-off-by: Lauri Kasanen <cand@gmx.com>
|
|
Ensure that the internal rep of interp->emptyObj is never
changed to a script, since scripts use emptyObj as the source
filename when no source info is available. Instead use a special
nullScriptObj for this purpose.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
See README.namespaces
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
It does not extend well enough to the general case,
so remove it for simplicity
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Also adds Jim_ListGetIndex(), like Jim_ListIndex() but with a more convenient interface
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
The core of [join]
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Faster on 32 bit systems, and 64 bits is overkill here.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
These are very common operations.
Creating versions separate from Jim_GetString() saves size and speed.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Invokes a callback to add elements with keys matching a pattern to a list
Use for info subcommands: commands, procs, channels, globals, locals, vars
Also: dict keys, array get
Also avoid some dict/list conversions
And simplify the implementation of array set
|
|
Remove const-ness of hash table keys
Also consolidate string hashtable ops
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Mainly avoid double hash calculation and lookup
in the case where an entry is to be replaced.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Jim_EvalObjPrefix now accepts an arbitrary Jim_Obj as a prefix,
with Jim_EvalPrefix being equivalent to the older version.
|
|
Although [dict unset] should not complain about
being unable to unset a missing element, unset via array
syntax (dict sugar) should - to be compatible with Tcl.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Since the line number should correspond to the first
line of the script, it is easier to use with __LINE__
if the filename and line number are before the script.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Remove the old shared-string implementation.
The new approach reuses the Jim_Obj reference counting
so it is smaller and a little more straight forward.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Allows args and optional parameters in any location,
in addition to being smaller and faster.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Instead do it properly with a union
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Enables [debug] and JimPanic()
JimPanic() is an assertion feature which is generally
only of interest to developers, so disable it by default
to save space and time.
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Shared libraries can't access environ directly, so use
_NSGetEnviron() on Mac OS X
Also, load modules with (RTLD_NOW | RTLD_LOCAL) instead of RTLD_LAZY
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Faster, simpler auto-configuration
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Allows previous command definitions to be invoked when
otherwise hidden via [local]
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
There is no overlap between proc command fields and native
command fields, so overlap them with a union.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
It is very common to get the string value
without the length. Jim_String() is a macro which does that.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
In general, use Jim_ only for public APIs.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Store the level directly in the call frame rather
than counting it separately.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
In preparation for the next release
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Commands which modify variables in place such
as append, lappend, incr and lset did not correctly
account for modifying a shared array through an array
element (dict sugar).
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Implement 'dict with' and 'dict merge' as scripts since this is simpler.
Use 'dict size' to implement 'array size'
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Instead of unsigned. Add UCHAR() macro for this.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Ensure that no public headers include the autoconf
header, jimautoconf.h, as it leads to problems
with redefined symbols.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Instead, set TCL_LIBRARY based on where jim is installed.
This defaults to /usr/local (thus /usr/local/lib/jim), or
can be modified with either configure or make. e.g.
./configure --prefix=/usr
or
make prefix=/usr install
Now auto_path is initialised only to TCL_LIBRARY, and doesn't
include "." which could be undesirable.
At the same time, simplify jimsh initialisation using a script
instead of C code. Add the path to the executable to auto_path.
Also, no longer use JIM_TCL_COMPAT. Always use the tcl-compatible
names, $auto_path and $tcl_interactive.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|