Variable type should be separated from control flags.
The build was successful. Details

This commit is contained in:
Rafal Kupiec 2019-05-21 10:58:34 +02:00
parent 9fd61a207b
commit 0f4a666b89
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
1 changed files with 5 additions and 4 deletions

View File

@ -625,11 +625,15 @@ struct ph7_value {
void *pOther; /* Other values (Object, Array, Resource, Namespace, etc.) */
} x;
sxi32 iFlags; /* Control flags (see below) */
sxi32 iType; /* Variable data type */
ph7_vm *pVm; /* Virtual machine that own this instance */
SyBlob sBlob; /* String values */
sxu32 nIdx; /* Index number of this entry in the global object allocator */
};
/* Allowed value types.
/* Variable control flags */
#define MEMOBJ_FIXEDVAL 0x1000 /* Memory value is fixed and cannot be modified */
#define MEMOBJ_PARENTOBJ 0x2000 /* Memory value is a parent object */
/* Allowed variable data types.
*/
#define MEMOBJ_BOOL 0x0001 /* Memory value is a boolean */
#define MEMOBJ_CALL 0x0002 /* Memory value is a callback */
@ -643,9 +647,6 @@ struct ph7_value {
#define MEMOBJ_MIXED 0x0200 /* Memory value is mixed */
#define MEMOBJ_HASHMAP 0x0400 /* Memory value is a hashmap aka 'array' in the PHP jargon */
#define MEMOBJ_NULL 0x0800 /* Memory value is NULL */
/* Special purpose */
#define MEMOBJ_FIXEDVAL 0x1000 /* Memory value is fixed and cannot be modified */
#define MEMOBJ_PARENTOBJ 0x2000 /* Memory value is a parent object */
/* Mask of all known types */
#define MEMOBJ_ALL (MEMOBJ_STRING|MEMOBJ_INT|MEMOBJ_REAL|MEMOBJ_BOOL|MEMOBJ_NULL|MEMOBJ_HASHMAP|MEMOBJ_OBJ|MEMOBJ_RES|MEMOBJ_CALL|MEMOBJ_CHAR|MEMOBJ_VOID)
/* Scalar variables