aboutsummaryrefslogtreecommitdiffstats
path: root/gawkapi.h
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2020-07-15 20:31:09 +0300
committerArnold D. Robbins <arnold@skeeve.com>2020-07-15 20:31:09 +0300
commit654019bde25f87c7954641610298299a68d267e4 (patch)
tree0dfe321da764c6f4763cb0dcc437033e335e9af4 /gawkapi.h
parent20cd6406b8a5c30d17cd78da4fda4ab94755df7e (diff)
parent7c68a667125ffc144ba76a52e67b019b49ba60ac (diff)
downloadegawk-654019bde25f87c7954641610298299a68d267e4.tar.gz
egawk-654019bde25f87c7954641610298299a68d267e4.tar.bz2
egawk-654019bde25f87c7954641610298299a68d267e4.zip
Merge branch 'gawk-5.1-stable'
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 *