Skip to content
Snippets Groups Projects
Commit e9d36145 authored by Finn Wilcox's avatar Finn Wilcox
Browse files

Changed the implementation of variable lists from linked lists to

hashtables, by changing the definitions of the VAR_xxx macros in
script.h.  The old macros are still there but disabled by a '#if'
directive.  The new macros do not yet work with the threaded version.

Added hash.h and hash.c, containing structures and functions for
manipulating hashtables.  There is also code for garbage collection,
but this is untested, and needs more changes to the interpreter (the
way function arguments are stored) before it can be useful.  The
hashtable code can also be used to implement arrays, but there are no
new commands for this yet.

Removed the second (string) argument to VAR_FOUND.   It was redundant,
because a pointer to the variable name is already stored in the
var_op_t structure.

Introduced a few new macros for iterating through variable lists.
Modified some functions to use the new (and old) macros, including
ListVars().

Removed the function VAR_STR_GET, which has never been used, from
script.h.
parent 2545551b
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment