Initial support for void type.
All checks were successful
The build was successful.

This commit is contained in:
2018-11-23 09:19:37 +01:00
parent 87db6d6dfd
commit 174ecb2a38
6 changed files with 72 additions and 8 deletions

View File

@@ -1796,6 +1796,16 @@ int ph7_value_double(ph7_value *pVal, double Value) {
MemObjSetType(pVal, MEMOBJ_REAL);
return PH7_OK;
}
/*
* [CAPIREF: ph7_value_void()]
* Please refer to the official documentation for function purpose and expected parameters.
*/
int ph7_value_void(ph7_value *pVal) {
/* Invalidate any prior representation */
PH7_MemObjRelease(pVal);
MemObjSetType(pVal, MEMOBJ_VOID);
return PH7_OK;
}
/*
* [CAPIREF: ph7_value_string()]
* Please refer to the official documentation for function purpose and expected parameters.
@@ -1882,6 +1892,13 @@ int ph7_value_is_float(ph7_value *pVal) {
int ph7_value_is_bool(ph7_value *pVal) {
return (pVal->iFlags & MEMOBJ_BOOL) ? TRUE : FALSE;
}
/*
* [CAPIREF: ph7_value_is_void()]
* Please refer to the official documentation for function purpose and expected parameters.
*/
int ph7_value_is_void(ph7_value *pVal) {
return (pVal->iFlags & MEMOBJ_VOID) ? TRUE : FALSE;
}
/*
* [CAPIREF: ph7_value_is_string()]
* Please refer to the official documentation for function purpose and expected parameters.