]> granicus.if.org Git - php/commitdiff
Improve dependencies
authorZeev Suraski <zeev@php.net>
Tue, 1 Feb 2000 22:04:52 +0000 (22:04 +0000)
committerZeev Suraski <zeev@php.net>
Tue, 1 Feb 2000 22:04:52 +0000 (22:04 +0000)
Zend/ZendTS.dsp
Zend/zend_compile.h
Zend/zend_execute.c
Zend/zend_execute_API.c
Zend/zend_execute_locks.h [new file with mode: 0644]

index 9582f361e6590aa856da6d147373b9c5da944614..549f01e432430390ca4d00b8ec5141f6e9a5eb0b 100644 (file)
@@ -251,6 +251,10 @@ SOURCE=.\zend_execute.h
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=.\zend_execute_locks.h\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=.\zend_extensions.h\r
 # End Source File\r
 # Begin Source File\r
index 1fb22e3765f6bfd356c648980a657f2376b1eb48..3f304892b07638f959945bc94432c7369b97de97 100644 (file)
@@ -580,25 +580,6 @@ int zendlex(znode *zendlval CLS_DC);
 
 #define PZVAL_IS_REF(z)                ((z)->is_ref)
 
-#define PZVAL_LOCK(z)  ((z)->refcount++)
-#define PZVAL_UNLOCK(z)        { ((z)->refcount--);                                                            \
-                                                       if (!(z)->refcount) {                                                   \
-                                                               (z)->refcount = 1;                                                      \
-                                                               (z)->is_ref = 0;                                                        \
-                                                               EG(garbage)[EG(garbage_ptr)++] = (z);           \
-                                                               if (EG(garbage_ptr) == 4) {                                     \
-                                                                       zval_ptr_dtor(&EG(garbage)[0]);                 \
-                                                                       zval_ptr_dtor(&EG(garbage)[1]);                 \
-                                                                       EG(garbage)[0] = EG(garbage)[2];                \
-                                                                       EG(garbage)[1] = EG(garbage)[3];                \
-                                                                       EG(garbage_ptr) -= 2;                                   \
-                                                               }                                                                                       \
-                                                       }                                                                                               \
-                                               }
-
-#define SELECTIVE_PZVAL_LOCK(pzv, pzn)         if (!((pzn)->u.EA.type & EXT_TYPE_UNUSED)) { PZVAL_LOCK(pzv); }
-
-
 /* Lost In Stupid Parentheses */
 #define ARG_SHOULD_BE_SENT_BY_REF(offset, conduct_check, arg_types)    \
        (                                                                                                                               \
index 24bbe10e8eb3a5872868f88d58c4a3182892bcea..2407e4768f4d5cc264e423391ed547ac89747019 100644 (file)
@@ -31,6 +31,7 @@
 #include "zend_constants.h"
 #include "zend_extensions.h"
 #include "zend_fast_cache.h"
+#include "zend_execute_locks.h"
 
 #if defined(HAVE_ALLOCA) && defined(HAVE_ALLOCA_H)
 # include <alloca.h>
index 52f0e17f18a1282188d2fc5e2117081effeb6bd6..ba97c184103ceb08d1a68c13de7f612f73c5d0f1 100644 (file)
@@ -30,6 +30,7 @@
 #include "zend_operators.h"
 #include "zend_constants.h"
 #include "zend_extensions.h"
+#include "zend_execute_locks.h"
 
 
 ZEND_API void (*zend_execute)(zend_op_array *op_array ELS_DC);
diff --git a/Zend/zend_execute_locks.h b/Zend/zend_execute_locks.h
new file mode 100644 (file)
index 0000000..b24ec64
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef _ZEND_EXECUTE_LOCKS_H
+#define _ZEND_EXECUTE_LOCKS_H
+
+#define PZVAL_LOCK(z)  ((z)->refcount++)
+#define PZVAL_UNLOCK(z)        { ((z)->refcount--);                                                            \
+                                                       if (!(z)->refcount) {                                                   \
+                                                               (z)->refcount = 1;                                                      \
+                                                               (z)->is_ref = 0;                                                        \
+                                                               EG(garbage)[EG(garbage_ptr)++] = (z);           \
+                                                               if (EG(garbage_ptr) == 4) {                                     \
+                                                                       zval_ptr_dtor(&EG(garbage)[0]);                 \
+                                                                       zval_ptr_dtor(&EG(garbage)[1]);                 \
+                                                                       EG(garbage)[0] = EG(garbage)[2];                \
+                                                                       EG(garbage)[1] = EG(garbage)[3];                \
+                                                                       EG(garbage_ptr) -= 2;                                   \
+                                                               }                                                                                       \
+                                                       }                                                                                               \
+                                               }
+
+#define SELECTIVE_PZVAL_LOCK(pzv, pzn)         if (!((pzn)->u.EA.type & EXT_TYPE_UNUSED)) { PZVAL_LOCK(pzv); }
+
+#endif /* _ZEND_EXECUTE_LOCKS_H */