From 46a3bd85b00a1c22d8ed3ccbf2a6c1a98c19b31f Mon Sep 17 00:00:00 2001 From: belliash Date: Wed, 27 Mar 2019 09:49:48 +0100 Subject: [PATCH] Add function description. --- engine/hashmap.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/engine/hashmap.c b/engine/hashmap.c index 948da9e..43a46e9 100644 --- a/engine/hashmap.c +++ b/engine/hashmap.c @@ -5625,6 +5625,11 @@ PH7_PRIVATE sxi32 PH7_HashmapWalk( /* All done */ return SXRET_OK; } +/* + * Iterate through hashmap entries and typecast all of them recursively to specified type. + * If all elements are compatible with each other and can be safely typecasted w/o data loss + * the SXRET_OK is returned. Otherwise, SXERR_NOMATCH is returned. + */ PH7_PRIVATE sxi32 PH7_HashmapCast(ph7_value *pObj, sxi32 nType) { sxi32 rc; if((pObj->iFlags & MEMOBJ_HASHMAP)) {