From f882c6c5fea88ca1eca664b6755ba1d2a7c2b3f5 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 9 Nov 2022 16:01:32 +0100 Subject: [PATCH] Rename private functions to avoid problems with MSYS stdio.h. --- jsproperty.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/jsproperty.c b/jsproperty.c index 5e136fb..9b2d9f2 100644 --- a/jsproperty.c +++ b/jsproperty.c @@ -104,16 +104,16 @@ static void freeproperty(js_State *J, js_Object *obj, js_Property *node) --obj->count; } -static js_Property *unlink(js_State *J, js_Object *obj, js_Property *node, const char *name, js_Property **garbage) +static js_Property *unlinkproperty(js_State *J, js_Object *obj, js_Property *node, const char *name, js_Property **garbage) { js_Property *temp, *succ; if (node != &sentinel) { int c = strcmp(name, node->name); if (c < 0) { - node->left = unlink(J, obj, node->left, name, garbage); + node->left = unlinkproperty(J, obj, node->left, name, garbage); } else if (c > 0) { - node->right = unlink(J, obj, node->right, name, garbage); + node->right = unlinkproperty(J, obj, node->right, name, garbage); } else { if (node->left == &sentinel) { *garbage = node; @@ -126,7 +126,7 @@ static js_Property *unlink(js_State *J, js_Object *obj, js_Property *node, const succ = node->right; while (succ->left != &sentinel) succ = succ->left; - succ->right = unlink(J, obj, node->right, succ->name, &temp); + succ->right = unlinkproperty(J, obj, node->right, succ->name, &temp); succ->left = node->left; node = succ; } @@ -147,10 +147,10 @@ static js_Property *unlink(js_State *J, js_Object *obj, js_Property *node, const return node; } -static js_Property *delete(js_State *J, js_Object *obj, js_Property *tree, const char *name) +static js_Property *deleteproperty(js_State *J, js_Object *obj, js_Property *tree, const char *name) { js_Property *garbage = NULL; - tree = unlink(J, obj, tree, name, &garbage); + tree = unlinkproperty(J, obj, tree, name, &garbage); if (garbage != NULL) freeproperty(J, obj, garbage); return tree; @@ -230,7 +230,7 @@ js_Property *jsV_setproperty(js_State *J, js_Object *obj, const char *name) void jsV_delproperty(js_State *J, js_Object *obj, const char *name) { - obj->properties = delete(J, obj, obj->properties, name); + obj->properties = deleteproperty(J, obj, obj->properties, name); } /* Flatten hierarchy of enumerable properties into an iterator object */