summaryrefslogtreecommitdiff
path: root/Zend
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2000-03-13 15:43:40 +0000
committerAndi Gutmans <andi@php.net>2000-03-13 15:43:40 +0000
commite92f6f15cb8970c0ded522becedd3c04cefdddf6 (patch)
treee3331257c46eee811755beae347475ec678b0583 /Zend
parenta32c54bdbb68f4f9126217893fca51c62c02c702 (diff)
downloadphp-git-e92f6f15cb8970c0ded522becedd3c04cefdddf6.tar.gz
- define zend_uint and zend_uchar and use them in a few places
Diffstat (limited to 'Zend')
-rw-r--r--Zend/zend.h2
-rw-r--r--Zend/zend_compile.h39
2 files changed, 21 insertions, 20 deletions
diff --git a/Zend/zend.h b/Zend/zend.h
index 6104146337..aac08cc057 100644
--- a/Zend/zend.h
+++ b/Zend/zend.h
@@ -107,6 +107,8 @@
#include "zend_alloc.h"
typedef unsigned char zend_bool;
+typedef unsigned char zend_uchar;
+typedef unsigned int zend_uint;
#undef SUCCESS
#undef FAILURE
diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h
index af5673999b..f62713b0c4 100644
--- a/Zend/zend_compile.h
+++ b/Zend/zend_compile.h
@@ -58,20 +58,20 @@ typedef struct _znode {
union {
zval constant;
- int var;
- int opline_num;
- int fetch_type;
+ zend_uint var;
+ int opline_num; /* Needs to be signed */
+ zend_uchar fetch_type;
zend_op_array *op_array;
struct {
- int var; /* dummy */
- int type;
+ zend_uint var; /* dummy */
+ zend_uint type;
} EA;
} u;
} znode;
typedef struct _zend_op {
- int opcode;
+ zend_uchar opcode;
znode result;
znode op1;
znode op2;
@@ -89,23 +89,22 @@ typedef struct _zend_brk_cont_element {
struct _zend_op_array {
- unsigned char type; /* MUST be the first element of this struct! */
+ zend_uchar type; /* MUST be the first element of this struct! */
- unsigned char *arg_types; /* MUST be the second element of this struct! */
+ zend_uchar *arg_types; /* MUST be the second element of this struct! */
char *function_name; /* MUST be the third element of this struct! */
- int *refcount;
+ zend_uint *refcount;
zend_op *opcodes;
- int last, size;
-
- int T;
+ zend_uint last, size;
+ zend_uint T;
zend_brk_cont_element *brk_cont_array;
- int last_brk_cont;
- int current_brk_cont;
- unsigned char uses_globals;
+ zend_uint last_brk_cont;
+ zend_uint current_brk_cont;
+ zend_bool uses_globals;
/* static variables support */
HashTable *static_variables;
@@ -122,9 +121,9 @@ struct _zend_op_array {
typedef struct _zend_internal_function {
- unsigned char type; /* MUST be the first element of this struct! */
+ zend_uchar type; /* MUST be the first element of this struct! */
- unsigned char *arg_types; /* MUST be the second element of this struct */
+ zend_uchar *arg_types; /* MUST be the second element of this struct */
char *function_name; /* MUST be the third element of this struct */
void (*handler)(INTERNAL_FUNCTION_PARAMETERS);
@@ -132,10 +131,10 @@ typedef struct _zend_internal_function {
typedef union _zend_function {
- unsigned char type; /* MUST be the first element of this struct! */
+ zend_uchar type; /* MUST be the first element of this struct! */
struct {
- unsigned char type; /* never used */
- unsigned char *arg_types;
+ zend_uchar type; /* never used */
+ zend_uchar *arg_types;
char *function_name;
} common;