aboutsummaryrefslogtreecommitdiffstats
path: root/gawkapi.h
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2020-07-15 20:28:41 +0300
committerArnold D. Robbins <arnold@skeeve.com>2020-07-15 20:28:41 +0300
commitcc6c57ad36d1eb12cd6fac15c3b43e4b6f2ae46e (patch)
treee76e55ecb6675484bdb8094cbd2f5808ae2c13c1 /gawkapi.h
parentd10a27cb61fbbbe09490e46f379411a4a90b74f8 (diff)
downloadegawk-cc6c57ad36d1eb12cd6fac15c3b43e4b6f2ae46e.tar.gz
egawk-cc6c57ad36d1eb12cd6fac15c3b43e4b6f2ae46e.tar.bz2
egawk-cc6c57ad36d1eb12cd6fac15c3b43e4b6f2ae46e.zip
Finish up MPFR valgrind issues.
Diffstat (limited to 'gawkapi.h')
-rw-r--r--gawkapi.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/gawkapi.h b/gawkapi.h
index 0876d614..a300fc9a 100644
--- a/gawkapi.h
+++ b/gawkapi.h
@@ -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 *