diff options
author | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2012-07-17 17:23:42 -0400 |
---|---|---|
committer | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2012-07-17 17:23:42 -0400 |
commit | ffbf8454171c0ef037db425f436c735da3691d9f (patch) | |
tree | 221c84cc8b3cc882435cbf44d466b2eaf27e3a28 /gawkapi.h | |
parent | 2abd3979c829934905f5a84dd2f5836b1d8eec37 (diff) | |
download | egawk-ffbf8454171c0ef037db425f436c735da3691d9f.tar.gz egawk-ffbf8454171c0ef037db425f436c735da3691d9f.tar.bz2 egawk-ffbf8454171c0ef037db425f436c735da3691d9f.zip |
Clean up support for AWK_SCALAR and AWK_VALUE_COOKIE.
Diffstat (limited to 'gawkapi.h')
-rw-r--r-- | gawkapi.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -421,9 +421,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; |