Do not use NULL if possible.
Todas as verificações foram bem sucedidas
The build was successful.

Esse commit está contido em:
2019-03-22 19:53:12 +01:00
commit ff6c71db1c
4 arquivos alterados com 5 adições e 23 exclusões

Ver Arquivo

@@ -151,7 +151,7 @@ static sxi32 VmJsonEncode(
ph7_context *pCtx = pData->pCtx;
int iFlags = pData->iFlags;
int nByte;
if(ph7_value_is_null(pIn) || ph7_value_is_resource(pIn)) {
if(ph7_value_is_void(pIn) || ph7_value_is_resource(pIn)) {
/* null */
ph7_result_string(pCtx, "null", (int)sizeof("null") - 1);
} else if(ph7_value_is_bool(pIn)) {
@@ -620,7 +620,7 @@ static sxi32 VmJsonDecode(
/* Reflect the JSON image */
if(pDecoder->pIn->nType & JSON_TK_NULL) {
/* Nullify the value.*/
ph7_value_null(pWorker);
ph7_value_void(pWorker);
} else if(pDecoder->pIn->nType & (JSON_TK_TRUE | JSON_TK_FALSE)) {
/* Boolean value */
ph7_value_bool(pWorker, (pDecoder->pIn->nType & JSON_TK_TRUE) ? 1 : 0);