From: Michael Wallner Date: Mon, 7 Nov 2005 20:49:05 +0000 (+0000) Subject: - Countable also requires PHP-5.1+ X-Git-Tag: RELEASE_0_18_0~31 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=d99e874511efaa8053f6fec4dc562a3da8331683;p=m6w6%2Fext-http - Countable also requires PHP-5.1+ --- diff --git a/http_message_object.c b/http_message_object.c index c9505f6..e69010c 100644 --- a/http_message_object.c +++ b/http_message_object.c @@ -31,9 +31,9 @@ #ifndef WONKY # include "zend_interfaces.h" -#endif -#ifdef HAVE_SPL -# include "ext/spl/spl_array.h" +# if defined(HAVE_SPL) +# include "ext/spl/spl_array.h" +# endif #endif ZEND_EXTERN_MODULE_GLOBALS(http); @@ -158,10 +158,6 @@ PHP_MINIT_FUNCTION(http_message_object) # else zend_class_implements(http_message_object_ce TSRMLS_CC, 1, zend_ce_serializable); # endif -#else -# ifdef HAVE_SPL - zend_class_implements(http_message_object_ce TSRMLS_CC, 1, spl_ce_Countable); -# endif #endif HTTP_LONG_CONSTANT("HTTP_MSG_NONE", HTTP_MSG_NONE); diff --git a/http_requestpool_object.c b/http_requestpool_object.c index 0bb5859..06733d2 100644 --- a/http_requestpool_object.c +++ b/http_requestpool_object.c @@ -28,7 +28,7 @@ #include "php_http_exception_object.h" #include "zend_interfaces.h" -#ifdef HAVE_SPL +#if defined(HAVE_SPL) && !defined(WONKY) # include "ext/spl/spl_array.h" # include "ext/spl/spl_iterators.h" #endif @@ -109,7 +109,7 @@ static zend_object_handlers http_requestpool_object_handlers; PHP_MINIT_FUNCTION(http_requestpool_object) { HTTP_REGISTER_CLASS_EX(HttpRequestPool, http_requestpool_object, NULL, 0); -#ifdef HAVE_SPL +#if defined(HAVE_SPL) && !defined(WONKY) zend_class_implements(http_requestpool_object_ce TSRMLS_CC, 2, spl_ce_Countable, spl_ce_Iterator); #else zend_class_implements(http_requestpool_object_ce TSRMLS_CC, 1, zend_ce_iterator); diff --git a/package2.xml b/package2.xml index 9c0273d..043d398 100644 --- a/package2.xml +++ b/package2.xml @@ -39,8 +39,8 @@ BSD, revised = 5.1 with SPL is available ++ Class HttpMessage implements Serializable if PHP >= 5.1 is available ]]>