aboutsummaryrefslogtreecommitdiffstats
path: root/gawkapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'gawkapi.c')
-rw-r--r--gawkapi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gawkapi.c b/gawkapi.c
index 7bba07f6..958c3c16 100644
--- a/gawkapi.c
+++ b/gawkapi.c
@@ -396,6 +396,8 @@ static struct {
size_t i, size;
} scopy;
+/* free_api_string_copies --- release memory used by string copies */
+
void
free_api_string_copies()
{
@@ -406,7 +408,7 @@ free_api_string_copies()
scopy.i = 0;
}
-/* return a node string with nul termination */
+/* assign_string --- return a string node with NUL termination */
static inline void
assign_string(NODE *node, awk_value_t *val)
@@ -418,6 +420,7 @@ assign_string(NODE *node, awk_value_t *val)
* This should happen only for $n where n > 0 and n < NF.
*/
char *s;
+
assert((node->flags & MALLOC) == 0);
if (scopy.i == scopy.size) {
/* expand list */