diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2020-07-15 20:28:41 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2020-07-15 20:28:41 +0300 |
commit | cc6c57ad36d1eb12cd6fac15c3b43e4b6f2ae46e (patch) | |
tree | e76e55ecb6675484bdb8094cbd2f5808ae2c13c1 /gawkapi.h | |
parent | d10a27cb61fbbbe09490e46f379411a4a90b74f8 (diff) | |
download | egawk-cc6c57ad36d1eb12cd6fac15c3b43e4b6f2ae46e.tar.gz egawk-cc6c57ad36d1eb12cd6fac15c3b43e4b6f2ae46e.tar.bz2 egawk-cc6c57ad36d1eb12cd6fac15c3b43e4b6f2ae46e.zip |
Finish up MPFR valgrind issues.
Diffstat (limited to 'gawkapi.h')
-rw-r--r-- | gawkapi.h | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -329,6 +329,13 @@ enum AWK_NUMBER_TYPE { AWK_NUMBER_TYPE_MPZ }; +/* + * When type is AWK_NUMBER_MPFR or AWK_NUMBER_MPZ, the memory pointed to + * by the ptr member belongs to gawk if it came from gawk. Otherwise the + * memory belongs to the extension and gawk copies it when its received. + * See the manual for further discussion. + */ + typedef struct awk_number { double d; /* always populated in data received from gawk */ enum AWK_NUMBER_TYPE type; @@ -1035,8 +1042,7 @@ make_number(double num, awk_value_t *result) /* * make_number_mpz --- make an mpz number value in result. - * The mpz_ptr must be from a call to get_mpz_ptr. Gawk will now - * take ownership of this memory. + * The mpz_ptr must be from a call to get_mpz_ptr. */ static inline awk_value_t * @@ -1050,8 +1056,7 @@ make_number_mpz(void *mpz_ptr, awk_value_t *result) /* * make_number_mpfr --- make an mpfr number value in result. - * The mpfr_ptr must be from a call to get_mpfr_ptr. Gawk will now - * take ownership of this memory. + * The mpfr_ptr must be from a call to get_mpfr_ptr. */ static inline awk_value_t * |