summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2024-07-22 07:07:51 -0700
committerKaz Kylheku <kaz@kylheku.com>2024-07-22 07:07:51 -0700
commit955fa5af407155124977adf8914f825423c21584 (patch)
tree49430c9f8b4b101b93c1dad2ed59915c62da1797 /eval.c
parentec566bdca6dc3d41c6a7e5342fdeeef9d10dab89 (diff)
downloadtxr-955fa5af407155124977adf8914f825423c21584.tar.gz
txr-955fa5af407155124977adf8914f825423c21584.tar.bz2
txr-955fa5af407155124977adf8914f825423c21584.zip
parser: remove some wasteful string object allocations.
* lib.c (int_str_wc): New function, made out of int_str. This can be used by the parser to work with a wchar_t * string without having to create a string object. (int_str): Implemented in terms of int_str_wc. * parser.l (grammar): Remove string_own calls from numerous rule bodies that use int_str to return a number. These rules now capture the wchar_t string, pass it to int_str_wc and then immediately free it. Whereas string_own allocates an extra object and leaves it to the garbage collector. * lex.yy.c.shipped: Regenerated.
Diffstat (limited to 'eval.c')
0 files changed, 0 insertions, 0 deletions