diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2012-07-20 12:09:24 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2012-07-20 12:09:24 +0300 |
commit | 43a12b8c65b687489e0dbb29cd707eeff92e5865 (patch) | |
tree | 32759c846c8a0c63c92ebea5aa152e0aa000823e /gawkapi.h | |
parent | 91049b1eef7366b3223e36125d6cfca898f8c3dd (diff) | |
parent | ffbf8454171c0ef037db425f436c735da3691d9f (diff) | |
download | egawk-43a12b8c65b687489e0dbb29cd707eeff92e5865.tar.gz egawk-43a12b8c65b687489e0dbb29cd707eeff92e5865.tar.bz2 egawk-43a12b8c65b687489e0dbb29cd707eeff92e5865.zip |
Merge branch 'extgawk' of ssh://git.sv.gnu.org/srv/git/gawk into extgawk
Diffstat (limited to 'gawkapi.h')
-rw-r--r-- | gawkapi.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -426,9 +426,20 @@ typedef struct gawk_api { awk_array_t a_cookie, awk_flat_array_t *data); + /* + * Cache a string or numeric value for efficient later assignment. + * This improves performance when you want to assign the same value + * to one or more variables repeatedly. Only AWK_NUMBER and AWK_STRING + * values are allowed. Any other type is rejected. We disallow + * AWK_UNDEFINED since that case would result in inferior performance. + */ awk_bool_t (*api_create_value)(awk_ext_id_t id, awk_value_t *value, awk_value_cookie_t *result); + /* + * Release the memory associated with a cookie from api_create_value. + * Please call this to free memory when the value is no longer needed. + */ awk_bool_t (*api_release_value)(awk_ext_id_t id, awk_value_cookie_t vc); } gawk_api_t; |