aboutsummaryrefslogtreecommitdiffstats
path: root/gawkapi.h
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2012-07-20 12:09:24 +0300
committerArnold D. Robbins <arnold@skeeve.com>2012-07-20 12:09:24 +0300
commit43a12b8c65b687489e0dbb29cd707eeff92e5865 (patch)
tree32759c846c8a0c63c92ebea5aa152e0aa000823e /gawkapi.h
parent91049b1eef7366b3223e36125d6cfca898f8c3dd (diff)
parentffbf8454171c0ef037db425f436c735da3691d9f (diff)
downloadegawk-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.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/gawkapi.h b/gawkapi.h
index 5cc8fc10..90df6293 100644
--- a/gawkapi.h
+++ b/gawkapi.h
@@ -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;