This simple patch gives modules the ability to redefine the default
value for ticks generation. This patch assists another that I am
currently working on, which modifies pcntl to use TICKS as the backend,
instead of debug hooks in the zend engine.
Questions, Comments?
Thanks,
-Jason
? zend_ticks_default.diff
Index: zend.c
===================================================================
RCS file: /repository/Zend/zend.c,v
retrieving revision 1.146
diff -u -r1.146 zend.c
--- zend.c 18 Jun 2002 07:29:13 -0000 1.146
+++ zend.c 15 Jul 2002 05:36:21 -0000
@@ -265,6 +265,7 @@
CG(short_tags) = 1;
CG(allow_call_time_pass_reference) = 1;
CG(extended_info) = 0;
+ CG(declarables).ticks_default = 0;
}
Index: zend_compile.c
===================================================================
RCS file: /repository/Zend/zend_compile.c,v
retrieving revision 1.232
diff -u -r1.232 zend_compile.c
--- zend_compile.c 29 Jun 2002 11:25:20 -0000 1.232
+++ zend_compile.c 15 Jul 2002 05:36:24 -0000
@@ -63,7 +63,7 @@
static void init_compiler_declarables(TSRMLS_D)
{
CG(declarables).ticks.type = IS_LONG;
- CG(declarables).ticks.value.lval = 0;
+ CG(declarables).ticks.value.lval = CG(declarables).ticks_default;
}
Index: zend_globals.h
===================================================================
RCS file: /repository/Zend/zend_globals.h,v
retrieving revision 1.86
diff -u -r1.86 zend_globals.h
--- zend_globals.h 22 Jun 2002 14:25:27 -0000 1.86
+++ zend_globals.h 15 Jul 2002 05:36:25 -0000
@@ -61,6 +61,7 @@
typedef struct _zend_declarables {
zval ticks;
+ long ticks_default;
} zend_declarables;
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php