Fix var_dump() for mixed arrays.
The build was successful. Details

This commit is contained in:
Rafal Kupiec 2018-11-13 20:24:55 +01:00
parent 7a34716298
commit e727453ccf
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
2 changed files with 10 additions and 2 deletions

View File

@ -5569,7 +5569,13 @@ PH7_PRIVATE sxi32 PH7_HashmapDump(SyBlob *pOut, ph7_hashmap *pMap, int ShowType,
}
SyBlobAppend(&(*pOut), "}", sizeof(char));
} else {
SyBlobAppend(&(*pOut), ")", sizeof(char));
SyBlobAppend(&(*pOut), "0) {", sizeof("0) {"));
#ifdef __WINNT__
SyBlobAppend(&(*pOut), "\r\n", sizeof("\r\n") - 1);
#else
SyBlobAppend(&(*pOut), "\n", sizeof(char));
#endif
SyBlobAppend(&(*pOut), " }", sizeof(" }"));
}
return rc;
}

View File

@ -1125,7 +1125,9 @@ PH7_PRIVATE const char *PH7_MemObjTypeDump(ph7_value *pVal) {
zType = "null";
} else {
if(pVal->iFlags & MEMOBJ_HASHMAP) {
if(pVal->iFlags & MEMOBJ_OBJ) {
if(pVal->iFlags & MEMOBJ_MIXED) {
zType = "array(mixed, ";
} else if(pVal->iFlags & MEMOBJ_OBJ) {
zType = "array(object, ";
} else if(pVal->iFlags & MEMOBJ_INT) {
zType = "array(int, ";