diff --git a/engine/builtin.c b/engine/builtin.c index 695bd01..1aa1518 100644 --- a/engine/builtin.c +++ b/engine/builtin.c @@ -2334,7 +2334,7 @@ static int PH7_builtin_ord(ph7_context *pCtx, int nArg, ph7_value **apArg) { return PH7_OK; } /* Extract the target string */ - zString = ph7_value_to_string(apArg[0], &nLen); + zString = (const unsigned char *)ph7_value_to_string(apArg[0], &nLen); if(nLen < 1) { /* Empty string,return -1 */ ph7_result_int(pCtx, -1); diff --git a/engine/hashmap.c b/engine/hashmap.c index dc93fc5..53a2758 100644 --- a/engine/hashmap.c +++ b/engine/hashmap.c @@ -5391,7 +5391,7 @@ PH7_PRIVATE sxi32 PH7_HashmapWalk( * 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) { +PH7_PRIVATE sxi32 PH7_HashmapCast(ph7_value *pObj, sxu32 nType) { sxi32 rc; if((pObj->nType & MEMOBJ_HASHMAP)) { if((pObj->nType & nType) == 0) { diff --git a/include/ph7int.h b/include/ph7int.h index dd666db..36161dc 100644 --- a/include/ph7int.h +++ b/include/ph7int.h @@ -1750,7 +1750,7 @@ PH7_PRIVATE void PH7_HashmapExtractNodeKey(ph7_hashmap_node *pNode, ph7_value *p PH7_PRIVATE void PH7_RegisterHashmapFunctions(ph7_vm *pVm); PH7_PRIVATE sxi32 PH7_HashmapDump(SyBlob *pOut, ph7_hashmap *pMap, int ShowType, int nTab, int nDepth); PH7_PRIVATE sxi32 PH7_HashmapWalk(ph7_hashmap *pMap, int (*xWalk)(ph7_value *, ph7_value *, void *), void *pUserData); -PH7_PRIVATE sxi32 PH7_HashmapCast(ph7_value *pObj, sxi32 nType); +PH7_PRIVATE sxi32 PH7_HashmapCast(ph7_value *pObj, sxu32 nType); PH7_PRIVATE int PH7_HashmapValuesToSet(ph7_hashmap *pMap, SySet *pOut); /* builtin.c function prototypes */ PH7_PRIVATE sxi32 PH7_InputFormat(int (*xConsumer)(ph7_context *, const char *, int, void *),