if (ZEND_NUM_ARGS() >= 3 && Z_TYPE_P(length_param) != IS_NULL) {
+        convert_to_long(length_param);

Isn't convert_to_long non-separating one? I think the variable supposed to be separated before conversion, so convert_to_long_ex (and zval **) would be in place.

Hm you're probably right...

 if (ZEND_NUM_ARGS() >= 3 && Z_TYPE_P(length_param) != IS_NULL) {
+  convert_to_long_ex(&length_param);
  length = Z_LVAL_P(length_param);
 } else {
  length = num_in;

- because it's a zval * these days. convert_to_long() didn't break it when I checked, though I probably have the length assignment wrong in the one I posted, on reflection. (Too many patches floating around here at present, sorry.)

+    if (length == IS_NULL) {

Did you really mean IS_NULL here?

It builds without complaint and works as expected - what am I missing?

- Steph

--
Stanislav Malyshev, Zend Software Architect
[EMAIL PROTECTED]   http://www.zend.com/
(408)253-8829 MSN: [EMAIL PROTECTED]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to