diff options
author | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2016-12-04 16:30:34 -0500 |
---|---|---|
committer | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2016-12-04 16:30:34 -0500 |
commit | 2b9a30b2ab91ea465a649be0fd0927c2aebc67ff (patch) | |
tree | ca9073a1b05fbcb388a9f2d7bbdb23def42dfce1 /doc/gawktexi.in | |
parent | 4bcb4e30c50e95c6fd58b4b418d9fc56bb2d3ce3 (diff) | |
download | egawk-2b9a30b2ab91ea465a649be0fd0927c2aebc67ff.tar.gz egawk-2b9a30b2ab91ea465a649be0fd0927c2aebc67ff.tar.bz2 egawk-2b9a30b2ab91ea465a649be0fd0927c2aebc67ff.zip |
Add flatten_array_typed to the API.
Diffstat (limited to 'doc/gawktexi.in')
-rw-r--r-- | doc/gawktexi.in | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/doc/gawktexi.in b/doc/gawktexi.in index c79cda32..17206bce 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -33000,9 +33000,9 @@ The array remains an array, but after calling this function, it has no elements. This is equivalent to using the @code{delete} statement (@pxref{Delete}). -@item awk_bool_t flatten_array(awk_array_t a_cookie, awk_flat_array_t **data); +@item awk_bool_t flatten_array_typed(awk_array_t a_cookie, awk_flat_array_t **data, awk_valtype_t index_type, awk_valtype_t value_type); For the array represented by @code{a_cookie}, create an @code{awk_flat_array_t} -structure and fill it in. Set the pointer whose address is passed as @code{data} +structure and fill it in with indices and values of the requested types. Set the pointer whose address is passed as @code{data} to point to this structure. Return true upon success, or false otherwise. @ifset FOR_PRINT @@ -33014,6 +33014,12 @@ See the next @value{SECTION} for a discussion of how to flatten an array and work with it. +@item awk_bool_t flatten_array(awk_array_t a_cookie, awk_flat_array_t **data); +For the array represented by @code{a_cookie}, create an @code{awk_flat_array_t} +structure and fill it in with @code{AWK_STRING} indices and +@code{AWK_UNDEFINED} values. This is superseded by @code{flatten_array_typed} +and retained only for legacy binary compatibility. + @item awk_bool_t release_flattened_array(awk_array_t a_cookie, @itemx @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ awk_flat_array_t *data); When done with a flattened array, release the storage using this function. @@ -33126,7 +33132,7 @@ to double-check that the count in the @code{awk_flat_array_t} is the same as the count just retrieved: @example - if (! flatten_array(value2.array_cookie, & flat_array)) @{ + if (! flatten_array_typed(value2.array_cookie, & flat_array, AWK_STRING, AWK_UNDEFINED)) @{ printf("dump_array_and_delete: could not flatten array\n"); goto out; @} |