- Countable also requires PHP-5.1+
authorMichael Wallner <mike@php.net>
Mon, 7 Nov 2005 20:49:05 +0000 (20:49 +0000)
committerMichael Wallner <mike@php.net>
Mon, 7 Nov 2005 20:49:05 +0000 (20:49 +0000)
http_message_object.c
http_requestpool_object.c
package2.xml

index c9505f6cb0f5a348bbc094eec378e09ad24f85b2..e69010c9b694407602d524bf7ab39aff51af5e2c 100644 (file)
@@ -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);
index 0bb585974c64e8ba0e5f462659f49e2fa9859bb5..06733d2adbd918090ddef4f2559217608cead609 100644 (file)
@@ -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);
index 9c0273df63cf27235afe4559fabe832ec86f3caf..043d39802443a2f724cc5ce6caf8c106def09fb6 100644 (file)
@@ -39,8 +39,8 @@
  </stability>
  <license>BSD, revised</license>
  <notes><![CDATA[
-+ Classes HttpMessage and HttpRequestPool implements Countable if SPL is available
-+ Class HttpMessage implements Serializable if PHP version is greater or equal to 5.1
++ Classes HttpMessage and HttpRequestPool implement Countable if PHP >= 5.1 with SPL is available
++ Class HttpMessage implements Serializable if PHP >= 5.1 is available
 ]]></notes>
  <contents>
   <dir name="/">