[PHP-CVS] cvs: php-src /ext/spl config.m4 config.w32 php_spl.c spl_fastarray.c spl_fastarray.h spl_fixedarray.c spl_fixedarray.h /ext/spl/tests fastarray_001.phpt fastarray_002.phpt fastarray_003.php

2008-06-18 Thread Etienne Kneuss
colder  Wed Jun 18 14:54:28 2008 UTC

  Added files: 
/php-src/ext/splspl_fixedarray.c spl_fixedarray.h 
/php-src/ext/spl/tests  fixedarray_001.phpt fixedarray_002.phpt 
fixedarray_003.phpt fixedarray_004.phpt 
fixedarray_005.phpt fixedarray_006.phpt 
fixedarray_007.phpt fixedarray_008.phpt 
fixedarray_009.phpt fixedarray_010.phpt 
fixedarray_011.phpt fixedarray_012.phpt 
fixedarray_013.phpt fixedarray_014.phpt 
fixedarray_015.phpt 

  Removed files:   
/php-src/ext/splspl_fastarray.c spl_fastarray.h 
/php-src/ext/spl/tests  fastarray_001.phpt fastarray_002.phpt 
fastarray_003.phpt fastarray_004.phpt 
fastarray_005.phpt fastarray_006.phpt 
fastarray_007.phpt fastarray_008.phpt 
fastarray_009.phpt fastarray_010.phpt 
fastarray_011.phpt fastarray_012.phpt 
fastarray_013.phpt fastarray_014.phpt 
fastarray_015.phpt 

  Modified files:  
/php-src/ext/splconfig.m4 config.w32 php_spl.c 
  Log:
  Rename everything from SplFastArray to SplFixedArray
  http://cvs.php.net/viewvc.cgi/php-src/ext/spl/config.m4?r1=1.26&r2=1.27&diff_format=u
Index: php-src/ext/spl/config.m4
diff -u php-src/ext/spl/config.m4:1.26 php-src/ext/spl/config.m4:1.27
--- php-src/ext/spl/config.m4:1.26  Fri Jun  6 23:53:10 2008
+++ php-src/ext/spl/config.m4   Wed Jun 18 14:54:27 2008
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.26 2008/06/06 23:53:10 colder Exp $
+dnl $Id: config.m4,v 1.27 2008/06/18 14:54:27 colder Exp $
 dnl config.m4 for extension SPL
 
   AC_MSG_CHECKING(whether zend_object_value is packed)
@@ -25,6 +25,6 @@
   PHP_INSTALL_HEADERS([ext/spl/])
   AC_DEFINE_UNQUOTED(HAVE_PACKED_OBJECT_VALUE, $ac_result, [Whether struct 
_zend_object_value is packed])
   AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP Library) 
support]) 
-  PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c 
spl_iterators.c spl_array.c spl_directory.c spl_sxe.c spl_exceptions.c 
spl_observer.c spl_dllist.c spl_heap.c spl_fastarray.c, no)
-  PHP_INSTALL_HEADERS([ext/spl], [php_spl.h spl_array.h spl_directory.h 
spl_engine.h spl_exceptions.h spl_functions.h spl_iterators.h spl_observer.h 
spl_sxe.h spl_dllist.h spl_heap.h spl_fastarray.h])
+  PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c 
spl_iterators.c spl_array.c spl_directory.c spl_sxe.c spl_exceptions.c 
spl_observer.c spl_dllist.c spl_heap.c spl_fixedarray.c, no)
+  PHP_INSTALL_HEADERS([ext/spl], [php_spl.h spl_array.h spl_directory.h 
spl_engine.h spl_exceptions.h spl_functions.h spl_iterators.h spl_observer.h 
spl_sxe.h spl_dllist.h spl_heap.h spl_fixedarray.h])
   PHP_ADD_EXTENSION_DEP(spl, pcre, true)
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/config.w32?r1=1.11&r2=1.12&diff_format=u
Index: php-src/ext/spl/config.w32
diff -u php-src/ext/spl/config.w32:1.11 php-src/ext/spl/config.w32:1.12
--- php-src/ext/spl/config.w32:1.11 Fri Jun  6 23:53:10 2008
+++ php-src/ext/spl/config.w32  Wed Jun 18 14:54:27 2008
@@ -1,5 +1,5 @@
-// $Id: config.w32,v 1.11 2008/06/06 23:53:10 colder Exp $
+// $Id: config.w32,v 1.12 2008/06/18 14:54:27 colder Exp $
 // vim:ft=javascript
 
-EXTENSION("spl", "php_spl.c spl_functions.c spl_engine.c spl_iterators.c 
spl_array.c spl_directory.c spl_sxe.c spl_exceptions.c spl_observer.c 
spl_dllist.c spl_heap.c spl_fastarray.c", false /* never shared */);
+EXTENSION("spl", "php_spl.c spl_functions.c spl_engine.c spl_iterators.c 
spl_array.c spl_directory.c spl_sxe.c spl_exceptions.c spl_observer.c 
spl_dllist.c spl_heap.c spl_fixedarray.c", false /* never shared */);
 AC_DEFINE('HAVE_SPL', 1);
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/php_spl.c?r1=1.132&r2=1.133&diff_format=u
Index: php-src/ext/spl/php_spl.c
diff -u php-src/ext/spl/php_spl.c:1.132 php-src/ext/spl/php_spl.c:1.133
--- php-src/ext/spl/php_spl.c:1.132 Fri Jun  6 23:53:10 2008
+++ php-src/ext/spl/php_spl.c   Wed Jun 18 14:54:27 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_spl.c,v 1.132 2008/06/06 23:53:10 colder Exp $ */
+/* $Id: php_spl.c,v 1.133 2008/06/18 14:54:27 colder Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -37,7 +37,7 @@
 #include "spl_observer.h"
 #include "spl_dllist.h"
 #include "spl_heap.h"
-#include "spl_fastarray.h"
+#include "spl_fixedarray.h"
 #include "zend_exceptions.h"
 #include "zend_interfaces.h"
 #include "ext/standard/md5.h"
@@ -157,7 +157,7 @@
SPL_ADD_CLASS(SplMinHeap, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(SplMa

[PHP-CVS] cvs: php-src /ext/spl config.m4 config.w32 php_spl.c spl_dllist.c spl_engine.c spl_engine.h spl_fastarray.c spl_fastarray.h /ext/spl/tests fastarray_001.phpt fastarray_002.phpt fastarray_00

2008-06-06 Thread Etienne Kneuss
colder  Fri Jun  6 23:53:10 2008 UTC

  Added files: 
/php-src/ext/splspl_fastarray.c spl_fastarray.h 
/php-src/ext/spl/tests  fastarray_001.phpt fastarray_002.phpt 
fastarray_003.phpt 

  Modified files:  
/php-src/ext/splconfig.m4 config.w32 php_spl.c spl_engine.c 
spl_engine.h spl_dllist.c 
  Log:
  Implements C arrays wrapper
  http://cvs.php.net/viewvc.cgi/php-src/ext/spl/config.m4?r1=1.25&r2=1.26&diff_format=u
Index: php-src/ext/spl/config.m4
diff -u php-src/ext/spl/config.m4:1.25 php-src/ext/spl/config.m4:1.26
--- php-src/ext/spl/config.m4:1.25  Wed Apr  9 21:47:29 2008
+++ php-src/ext/spl/config.m4   Fri Jun  6 23:53:10 2008
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.25 2008/04/09 21:47:29 helly Exp $
+dnl $Id: config.m4,v 1.26 2008/06/06 23:53:10 colder Exp $
 dnl config.m4 for extension SPL
 
   AC_MSG_CHECKING(whether zend_object_value is packed)
@@ -25,6 +25,6 @@
   PHP_INSTALL_HEADERS([ext/spl/])
   AC_DEFINE_UNQUOTED(HAVE_PACKED_OBJECT_VALUE, $ac_result, [Whether struct 
_zend_object_value is packed])
   AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP Library) 
support]) 
-  PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c 
spl_iterators.c spl_array.c spl_directory.c spl_sxe.c spl_exceptions.c 
spl_observer.c spl_dllist.c spl_heap.c, no)
-  PHP_INSTALL_HEADERS([ext/spl], [php_spl.h spl_array.h spl_directory.h 
spl_engine.h spl_exceptions.h spl_functions.h spl_iterators.h spl_observer.h 
spl_sxe.h spl_dllist.h spl_heap.h])
+  PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c 
spl_iterators.c spl_array.c spl_directory.c spl_sxe.c spl_exceptions.c 
spl_observer.c spl_dllist.c spl_heap.c spl_fastarray.c, no)
+  PHP_INSTALL_HEADERS([ext/spl], [php_spl.h spl_array.h spl_directory.h 
spl_engine.h spl_exceptions.h spl_functions.h spl_iterators.h spl_observer.h 
spl_sxe.h spl_dllist.h spl_heap.h spl_fastarray.h])
   PHP_ADD_EXTENSION_DEP(spl, pcre, true)
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/config.w32?r1=1.10&r2=1.11&diff_format=u
Index: php-src/ext/spl/config.w32
diff -u php-src/ext/spl/config.w32:1.10 php-src/ext/spl/config.w32:1.11
--- php-src/ext/spl/config.w32:1.10 Fri May  2 14:10:05 2008
+++ php-src/ext/spl/config.w32  Fri Jun  6 23:53:10 2008
@@ -1,5 +1,5 @@
-// $Id: config.w32,v 1.10 2008/05/02 14:10:05 auroraeosrose Exp $
+// $Id: config.w32,v 1.11 2008/06/06 23:53:10 colder Exp $
 // vim:ft=javascript
 
-EXTENSION("spl", "php_spl.c spl_functions.c spl_engine.c spl_iterators.c 
spl_array.c spl_directory.c spl_sxe.c spl_exceptions.c spl_observer.c 
spl_dllist.c spl_heap.c", false /* never shared */);
+EXTENSION("spl", "php_spl.c spl_functions.c spl_engine.c spl_iterators.c 
spl_array.c spl_directory.c spl_sxe.c spl_exceptions.c spl_observer.c 
spl_dllist.c spl_heap.c spl_fastarray.c", false /* never shared */);
 AC_DEFINE('HAVE_SPL', 1);
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/php_spl.c?r1=1.131&r2=1.132&diff_format=u
Index: php-src/ext/spl/php_spl.c
diff -u php-src/ext/spl/php_spl.c:1.131 php-src/ext/spl/php_spl.c:1.132
--- php-src/ext/spl/php_spl.c:1.131 Sun May 25 12:23:22 2008
+++ php-src/ext/spl/php_spl.c   Fri Jun  6 23:53:10 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_spl.c,v 1.131 2008/05/25 12:23:22 colder Exp $ */
+/* $Id: php_spl.c,v 1.132 2008/06/06 23:53:10 colder Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -37,6 +37,7 @@
 #include "spl_observer.h"
 #include "spl_dllist.h"
 #include "spl_heap.h"
+#include "spl_fastarray.h"
 #include "zend_exceptions.h"
 #include "zend_interfaces.h"
 #include "ext/standard/md5.h"
@@ -156,6 +157,7 @@
SPL_ADD_CLASS(SplMinHeap, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(SplMaxHeap, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(SplPriorityQueue, z_list, sub, allow, ce_flags); \
+   SPL_ADD_CLASS(SplFastArray, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(BadFunctionCallException, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(BadMethodCallException, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(CachingIterator, z_list, sub, allow, ce_flags); \
@@ -800,6 +802,7 @@
PHP_MINIT(spl_sxe)(INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(spl_dllist)(INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(spl_heap)(INIT_FUNC_ARGS_PASSTHRU);
+   PHP_MINIT(spl_fastarray)(INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(spl_observer)(INIT_FUNC_ARGS_PASSTHRU);
 
return SUCCESS;
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_engine.c?r1=1.26&r2=1.27&diff_format=u
Index: php-src/ext/spl/spl_engine.c
diff -u php-src/ext/spl/spl_engine.c:1.26 php-src/ext/spl/spl_engine.c:1.27
--- php-src/ext/spl/spl_engine.c:1.26   Mon Dec 31 07:12:15 2007
+++ php-src/ext/spl/spl_engine.cFri Jun  6 23:53:10 2008
@@ -43,6 +43,29 @@
 }
 /* }}} */
 
+PHPAPI lon

[PHP-CVS] cvs: php-src /ext/spl config.m4

2008-04-09 Thread Marcus Boerger
helly   Wed Apr  9 21:47:29 2008 UTC

  Modified files:  
/php-src/ext/splconfig.m4 
  Log:
  - SPL can no longer be disabld as discussed some time ago (checked back with 
RM)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/config.m4?r1=1.24&r2=1.25&diff_format=u
Index: php-src/ext/spl/config.m4
diff -u php-src/ext/spl/config.m4:1.24 php-src/ext/spl/config.m4:1.25
--- php-src/ext/spl/config.m4:1.24  Mon Feb 25 23:36:36 2008
+++ php-src/ext/spl/config.m4   Wed Apr  9 21:47:29 2008
@@ -1,10 +1,6 @@
-dnl $Id: config.m4,v 1.24 2008/02/25 23:36:36 colder Exp $
+dnl $Id: config.m4,v 1.25 2008/04/09 21:47:29 helly Exp $
 dnl config.m4 for extension SPL
 
-PHP_ARG_ENABLE(spl, enable SPL suppport,
-[  --disable-spl   Disable Standard PHP Library], yes)
-
-if test "$PHP_SPL" != "no"; then
   AC_MSG_CHECKING(whether zend_object_value is packed)
   old_CPPFLAGS=$CPPFLAGS
   CPPFLAGS="$INCLUDES -I$abs_srcdir $CPPFLAGS"
@@ -32,4 +28,3 @@
   PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c 
spl_iterators.c spl_array.c spl_directory.c spl_sxe.c spl_exceptions.c 
spl_observer.c spl_dllist.c spl_heap.c, no)
   PHP_INSTALL_HEADERS([ext/spl], [php_spl.h spl_array.h spl_directory.h 
spl_engine.h spl_exceptions.h spl_functions.h spl_iterators.h spl_observer.h 
spl_sxe.h spl_dllist.h spl_heap.h])
   PHP_ADD_EXTENSION_DEP(spl, pcre, true)
-fi



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/spl config.m4 config.w32 php_spl.c spl_heap.c spl_heap.h /ext/spl/tests heap_001.phpt heap_002.phpt heap_003.phpt heap_004.phpt heap_005.phpt heap_006.phpt heap_007.phpt h

2008-02-25 Thread Etienne Kneuss
colder  Mon Feb 25 23:36:36 2008 UTC

  Added files: 
/php-src/ext/splspl_heap.c spl_heap.h 
/php-src/ext/spl/tests  heap_001.phpt heap_002.phpt heap_003.phpt 
heap_004.phpt heap_005.phpt heap_006.phpt 
heap_007.phpt heap_008.phpt pqueue_001.phpt 
pqueue_002.phpt pqueue_003.phpt 
pqueue_004.phpt 

  Modified files:  
/php-src/ext/splconfig.m4 config.w32 php_spl.c 
  Log:
  SplHeap, SplMinHeap, SplMaxHeap, SplPriorityQueue implementation
  http://cvs.php.net/viewvc.cgi/php-src/ext/spl/config.m4?r1=1.23&r2=1.24&diff_format=u
Index: php-src/ext/spl/config.m4
diff -u php-src/ext/spl/config.m4:1.23 php-src/ext/spl/config.m4:1.24
--- php-src/ext/spl/config.m4:1.23  Tue Jan 15 09:37:50 2008
+++ php-src/ext/spl/config.m4   Mon Feb 25 23:36:36 2008
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.23 2008/01/15 09:37:50 colder Exp $
+dnl $Id: config.m4,v 1.24 2008/02/25 23:36:36 colder Exp $
 dnl config.m4 for extension SPL
 
 PHP_ARG_ENABLE(spl, enable SPL suppport,
@@ -29,7 +29,7 @@
   PHP_INSTALL_HEADERS([ext/spl/])
   AC_DEFINE_UNQUOTED(HAVE_PACKED_OBJECT_VALUE, $ac_result, [Whether struct 
_zend_object_value is packed])
   AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP Library) 
support]) 
-  PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c 
spl_iterators.c spl_array.c spl_directory.c spl_sxe.c spl_exceptions.c 
spl_observer.c spl_dllist.c, no)
-  PHP_INSTALL_HEADERS([ext/spl], [php_spl.h spl_array.h spl_directory.h 
spl_engine.h spl_exceptions.h spl_functions.h spl_iterators.h spl_observer.h 
spl_sxe.h spl_dllist.h])
+  PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c 
spl_iterators.c spl_array.c spl_directory.c spl_sxe.c spl_exceptions.c 
spl_observer.c spl_dllist.c spl_heap.c, no)
+  PHP_INSTALL_HEADERS([ext/spl], [php_spl.h spl_array.h spl_directory.h 
spl_engine.h spl_exceptions.h spl_functions.h spl_iterators.h spl_observer.h 
spl_sxe.h spl_dllist.h spl_heap.h])
   PHP_ADD_EXTENSION_DEP(spl, pcre, true)
 fi
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/config.w32?r1=1.8&r2=1.9&diff_format=u
Index: php-src/ext/spl/config.w32
diff -u php-src/ext/spl/config.w32:1.8 php-src/ext/spl/config.w32:1.9
--- php-src/ext/spl/config.w32:1.8  Tue Jan 15 09:37:50 2008
+++ php-src/ext/spl/config.w32  Mon Feb 25 23:36:36 2008
@@ -1,4 +1,4 @@
-// $Id: config.w32,v 1.8 2008/01/15 09:37:50 colder Exp $
+// $Id: config.w32,v 1.9 2008/02/25 23:36:36 colder Exp $
 // vim:ft=javascript
 
 ARG_ENABLE("spl", "SPL (Standard PHP Library) support", "yes");
@@ -7,6 +7,6 @@
if (PHP_SPL_SHARED) {
ERROR("SPL cannot be compiled as a shared ext");
}
-   EXTENSION("spl", "php_spl.c spl_functions.c spl_engine.c 
spl_iterators.c spl_array.c spl_directory.c spl_sxe.c spl_exceptions.c 
spl_observer.c spl_dllist.c");
+   EXTENSION("spl", "php_spl.c spl_functions.c spl_engine.c 
spl_iterators.c spl_array.c spl_directory.c spl_sxe.c spl_exceptions.c 
spl_observer.c spl_dllist.c spl_heap.c");
AC_DEFINE('HAVE_SPL', 1);
 }
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/php_spl.c?r1=1.125&r2=1.126&diff_format=u
Index: php-src/ext/spl/php_spl.c
diff -u php-src/ext/spl/php_spl.c:1.125 php-src/ext/spl/php_spl.c:1.126
--- php-src/ext/spl/php_spl.c:1.125 Mon Feb  4 15:58:12 2008
+++ php-src/ext/spl/php_spl.c   Mon Feb 25 23:36:36 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_spl.c,v 1.125 2008/02/04 15:58:12 helly Exp $ */
+/* $Id: php_spl.c,v 1.126 2008/02/25 23:36:36 colder Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -36,6 +36,7 @@
 #include "spl_exceptions.h"
 #include "spl_observer.h"
 #include "spl_dllist.h"
+#include "spl_heap.h"
 #include "zend_exceptions.h"
 #include "zend_interfaces.h"
 #include "ext/standard/md5.h"
@@ -151,6 +152,10 @@
SPL_ADD_CLASS(SplDoublyLinkedList, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(SplQueue, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(SplStack, z_list, sub, allow, ce_flags); \
+   SPL_ADD_CLASS(SplHeap, z_list, sub, allow, ce_flags); \
+   SPL_ADD_CLASS(SplMinHeap, z_list, sub, allow, ce_flags); \
+   SPL_ADD_CLASS(SplMaxHeap, z_list, sub, allow, ce_flags); \
+   SPL_ADD_CLASS(SplPriorityQueue, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(BadFunctionCallException, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(BadMethodCallException, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(CachingIterator, z_list, sub, allow, ce_flags); \
@@ -768,6 +773,7 @@
PHP_MINIT(spl_directory)(INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(spl_sxe)(INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(spl_dllist)(INIT_FUNC_ARGS_PASSTHRU);
+   PHP_MINIT(spl_heap)(INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(spl_o

[PHP-CVS] cvs: php-src /ext/spl config.m4

2006-11-12 Thread Hannes Magnusson
bjori   Sun Nov 12 19:01:33 2006 UTC

  Modified files:  
/php-src/ext/splconfig.m4 
  Log:
  MFB: add missing headers
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/config.m4?r1=1.20&r2=1.21&diff_format=u
Index: php-src/ext/spl/config.m4
diff -u php-src/ext/spl/config.m4:1.20 php-src/ext/spl/config.m4:1.21
--- php-src/ext/spl/config.m4:1.20  Wed Sep 20 20:29:24 2006
+++ php-src/ext/spl/config.m4   Sun Nov 12 19:01:33 2006
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.20 2006/09/20 20:29:24 andrei Exp $
+dnl $Id: config.m4,v 1.21 2006/11/12 19:01:33 bjori Exp $
 dnl config.m4 for extension SPL
 
 PHP_ARG_ENABLE(spl, enable SPL suppport,
@@ -30,4 +30,5 @@
   AC_DEFINE_UNQUOTED(HAVE_PACKED_OBJECT_VALUE, $ac_result, [Whether struct 
_zend_object_value is packed])
   AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP Library) 
support]) 
   PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c 
spl_iterators.c spl_array.c spl_directory.c spl_sxe.c spl_exceptions.c 
spl_observer.c, no)
+  PHP_INSTALL_HEADERS([ext/spl], [php_spl.h spl_array.h spl_directory.h 
spl_engine.h spl_exceptions.h spl_functions.h spl_iterators.h spl_observer.h 
spl_sxe.h])
 fi

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/spl config.m4

2006-09-20 Thread Andrei Zmievski
andrei  Wed Sep 20 20:29:24 2006 UTC

  Modified files:  
/php-src/ext/splconfig.m4 
  Log:
  Install SPL headers.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/config.m4?r1=1.19&r2=1.20&diff_format=u
Index: php-src/ext/spl/config.m4
diff -u php-src/ext/spl/config.m4:1.19 php-src/ext/spl/config.m4:1.20
--- php-src/ext/spl/config.m4:1.19  Wed Aug 23 09:47:07 2006
+++ php-src/ext/spl/config.m4   Wed Sep 20 20:29:24 2006
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.19 2006/08/23 09:47:07 tony2001 Exp $
+dnl $Id: config.m4,v 1.20 2006/09/20 20:29:24 andrei Exp $
 dnl config.m4 for extension SPL
 
 PHP_ARG_ENABLE(spl, enable SPL suppport,
@@ -26,6 +26,7 @@
   else
 AC_MSG_RESULT(no)
   fi
+  PHP_INSTALL_HEADERS([ext/spl/])
   AC_DEFINE_UNQUOTED(HAVE_PACKED_OBJECT_VALUE, $ac_result, [Whether struct 
_zend_object_value is packed])
   AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP Library) 
support]) 
   PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c 
spl_iterators.c spl_array.c spl_directory.c spl_sxe.c spl_exceptions.c 
spl_observer.c, no)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/spl config.m4 spl_iterators.c spl_iterators.h /ext/spl/tests iterator_030.phpt iterator_031.phpt

2006-03-03 Thread Marcus Boerger
helly   Fri Mar  3 21:35:16 2006 UTC

  Added files: 
/php-src/ext/spl/tests  iterator_030.phpt iterator_031.phpt 

  Modified files:  
/php-src/ext/splconfig.m4 spl_iterators.c spl_iterators.h 
  Log:
  - Fix SEGV with AppendIterator when base class constructor was not called
  - Generic check to prevent double call to constructors of SPL iterators
  
  http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/config.m4?r1=1.17&r2=1.18&diff_format=u
Index: php-src/ext/spl/config.m4
diff -u php-src/ext/spl/config.m4:1.17 php-src/ext/spl/config.m4:1.18
--- php-src/ext/spl/config.m4:1.17  Fri Jan  6 14:03:28 2006
+++ php-src/ext/spl/config.m4   Fri Mar  3 21:35:16 2006
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.17 2006/01/06 14:03:28 sniper Exp $
+dnl $Id: config.m4,v 1.18 2006/03/03 21:35:16 helly Exp $
 dnl config.m4 for extension SPL
 
 PHP_ARG_ENABLE(spl, enable SPL suppport,
@@ -18,15 +18,17 @@
 }
   ], [
 ac_result=1
-AC_MSG_RESULT(yes)
   ],[
 ac_result=0
-AC_MSG_RESULT(no)
   ], [
 ac_result=0
-AC_MSG_RESULT(no)
   ])
   CPPFLAGS=$old_CPPFLAGS
+  if test "$ac_result"; then
+AC_MSG_RESULT(yes)
+  else
+AC_MSG_RESULT(no)
+  fi
   AC_DEFINE_UNQUOTED(HAVE_PACKED_OBJECT_VALUE, $ac_result, [Whether struct 
_zend_object_value is packed])
   AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP Library) 
support]) 
   PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c 
spl_iterators.c spl_array.c spl_directory.c spl_sxe.c spl_exceptions.c 
spl_observer.c, $ext_shared)
http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_iterators.c?r1=1.115&r2=1.116&diff_format=u
Index: php-src/ext/spl/spl_iterators.c
diff -u php-src/ext/spl/spl_iterators.c:1.115 
php-src/ext/spl/spl_iterators.c:1.116
--- php-src/ext/spl/spl_iterators.c:1.115   Tue Feb 21 20:12:42 2006
+++ php-src/ext/spl/spl_iterators.c Fri Mar  3 21:35:16 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_iterators.c,v 1.115 2006/02/21 20:12:42 dmitry Exp $ */
+/* $Id: spl_iterators.c,v 1.116 2006/03/03 21:35:16 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -823,7 +823,7 @@

success = SUCCESS;
} else {
-   php_error_docref(NULL TSRMLS_CC, E_ERROR, "Unable to call 
%s::%s()", intern->inner.ce->name, method);
+   php_error_docref(NULL TSRMLS_CC, E_ERROR, "Unable to call 
%v::%s()", intern->inner.ce->name, method);
success = FAILURE;
}
 
@@ -832,20 +832,33 @@
 }
 #endif
 
+#define SPL_CHECK_CTOR(intern, classname) \
+   if (intern->dit_type == DIT_Unknown) { \
+   zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 
TSRMLS_CC, "Classes derived from %v must call %v::__construct()", \
+   (spl_ce_##classname)->name, 
(spl_ce_##classname)->name); \
+   return; \
+   }
+
+#define APPENDIT_CHECK_CTOR(intern) SPL_CHECK_CTOR(intern, AppendIterator)
+
 static inline int spl_dual_it_fetch(spl_dual_it_object *intern, int check_more 
TSRMLS_DC);
 
-static inline spl_dual_it_object* 
spl_dual_it_construct(INTERNAL_FUNCTION_PARAMETERS, zend_class_entry *ce_inner, 
dual_it_type dit_type)
+inline spl_dual_it_object* spl_dual_it_construct(INTERNAL_FUNCTION_PARAMETERS, 
zend_class_entry *ce_base, zend_class_entry *ce_inner, dual_it_type dit_type)
 {
zval *zobject, *retval;
spl_dual_it_object   *intern;
zend_class_entry *ce = NULL;
int   inc_refcount = 1;
 
+   intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() 
TSRMLS_CC);
+   
+   if (intern->dit_type != DIT_Unknown) {
+   zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 
TSRMLS_CC, "%v::getIterator() must be called exactly once per instance", 
ce_base->name);
+   return NULL;
+   }
 
php_set_error_handling(EH_THROW, spl_ce_InvalidArgumentException 
TSRMLS_CC);
 
-   intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() 
TSRMLS_CC);
-
intern->dit_type = dit_type;
switch (dit_type) {
case DIT_LimitIterator: {
@@ -910,7 +923,7 @@
if (instanceof_function(ce, zend_ce_aggregate 
TSRMLS_CC)) {

zend_call_method_with_0_params(&zobject, ce, 
&ce->iterator_funcs.zf_new_iterator, "getiterator", &retval);
if (!retval || Z_TYPE_P(retval) != 
IS_OBJECT || !instanceof_function(Z_OBJCE_P(retval), zend_ce_traversable 
TSRMLS_CC)) {
-   
zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "%s::getIterator() 
must return an object that implememnts Traversable", ce->name);
+   
zend_throw_exception_ex(spl_ce_LogicExcepti

[PHP-CVS] cvs: php-src /ext/spl config.m4

2006-01-06 Thread Jani Taskinen
sniper  Fri Jan  6 14:03:28 2006 UTC

  Modified files:  
/php-src/ext/splconfig.m4 
  Log:
  - Fix configure on Solaris
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/config.m4?r1=1.16&r2=1.17&diff_format=u
Index: php-src/ext/spl/config.m4
diff -u php-src/ext/spl/config.m4:1.16 php-src/ext/spl/config.m4:1.17
--- php-src/ext/spl/config.m4:1.16  Sat Dec 24 13:19:49 2005
+++ php-src/ext/spl/config.m4   Fri Jan  6 14:03:28 2006
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.16 2005/12/24 13:19:49 helly Exp $
+dnl $Id: config.m4,v 1.17 2006/01/06 14:03:28 sniper Exp $
 dnl config.m4 for extension SPL
 
 PHP_ARG_ENABLE(spl, enable SPL suppport,
@@ -27,7 +27,7 @@
 AC_MSG_RESULT(no)
   ])
   CPPFLAGS=$old_CPPFLAGS
-  AC_DEFINE(HAVE_PACKED_OBJECT_VALUE, $ac_result, [Whether struct 
_zend_object_value is packed])
+  AC_DEFINE_UNQUOTED(HAVE_PACKED_OBJECT_VALUE, $ac_result, [Whether struct 
_zend_object_value is packed])
   AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP Library) 
support]) 
   PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c 
spl_iterators.c spl_array.c spl_directory.c spl_sxe.c spl_exceptions.c 
spl_observer.c, $ext_shared)
 fi

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/spl config.m4

2005-12-24 Thread Marcus Boerger
helly   Sat Dec 24 13:19:49 2005 EDT

  Modified files:  
/php-src/ext/splconfig.m4 
  Log:
  - MFB Make this work with VPATH builds too
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/config.m4?r1=1.15&r2=1.16&diff_format=u
Index: php-src/ext/spl/config.m4
diff -u php-src/ext/spl/config.m4:1.15 php-src/ext/spl/config.m4:1.16
--- php-src/ext/spl/config.m4:1.15  Tue Dec 20 21:36:47 2005
+++ php-src/ext/spl/config.m4   Sat Dec 24 13:19:49 2005
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.15 2005/12/20 21:36:47 helly Exp $
+dnl $Id: config.m4,v 1.16 2005/12/24 13:19:49 helly Exp $
 dnl config.m4 for extension SPL
 
 PHP_ARG_ENABLE(spl, enable SPL suppport,
@@ -9,6 +9,8 @@
 AC_MSG_ERROR(Cannot build SPL as a shared module)
   fi
   AC_MSG_CHECKING(whether zend_object_value is packed)
+  old_CPPFLAGS=$CPPFLAGS
+  CPPFLAGS="$INCLUDES -I$abs_srcdir $CPPFLAGS"
   AC_TRY_RUN([
 #include "Zend/zend_types.h"
 int main(int argc, char **argv) {
@@ -23,7 +25,8 @@
   ], [
 ac_result=0
 AC_MSG_RESULT(no)
-  ])   
+  ])
+  CPPFLAGS=$old_CPPFLAGS
   AC_DEFINE(HAVE_PACKED_OBJECT_VALUE, $ac_result, [Whether struct 
_zend_object_value is packed])
   AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP Library) 
support]) 
   PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c 
spl_iterators.c spl_array.c spl_directory.c spl_sxe.c spl_exceptions.c 
spl_observer.c, $ext_shared)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src /ext/spl config.m4 spl_observer.c

2005-12-22 Thread Andi Gutmans
It's hard for me to believe though that memset() plus copying some 
values is noticeably slower. For such small structures I doubt it has 
any impact on the SPL Iterator performance (you're allocating on 
stack so allocation is not an issue).
You can keep it this way, but my $.02 would be to only have the 
memset()+copy version and nuke the shortcut. It just won't make a 
difference, and from past experiences I've had, such issues come back 
and bite you later on :)


Andi

At 11:23 AM 12/22/2005, Marcus Boerger wrote:

Hello Andi,

  we would need to enforce structure packing change the type of
zend_object_handle in zend_object_value or both. But even if we
go that way we are not sure it works, so the only way that would
always work is the memset. However setting all structure bytes
to zero while on many platforms none must be ste and having to
copy the whole think just seems wrong. That means looking for
alternatives:
1) Implement a different hash/compare function
2) Do not use zend hashes but something different
None of which i want to go.

Imo the best option is to stay with current solution and still
change zend_object_handle to have the sane size that pointers
have: sizeof(zend_object_handle)==sizeof(zend_object_handlers*).
That way we would prevent the workaround of initializing a temp
copy on nearly any platform (close to 100%).

best regards
marcus

Thursday, December 22, 2005, 8:07:26 PM, you wrote:

> Are you sure you want to fix it this way? It'll make things less
> maintainable. I'm sure there's a way to make it one implementation
> that works everywhere.

> At 01:36 PM 12/20/2005, Marcus Boerger wrote:
>>helly   Tue Dec 20 21:36:48 2005 EDT
>>
>>   Modified files:
>> /php-src/ext/splconfig.m4 spl_observer.c
>>   Log:
>>   - Only apply workaround solution for 64 bit machines when necessary
>>   # Actually this can already be necessary on 32 bit machine and 
also not be

>>   # necessary on 64 bit machines. It all depends on the compiler settings.
>>
>>
>>http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/config.m4?r1=1.14&r 
2=1.15&diff_format=u

>>Index: php-src/ext/spl/config.m4
>>diff -u php-src/ext/spl/config.m4:1.14 php-src/ext/spl/config.m4:1.15
>>--- php-src/ext/spl/config.m4:1.14  Sat Oct  1 15:55:27 2005
>>+++ php-src/ext/spl/config.m4   Tue Dec 20 21:36:47 2005
>>@@ -1,4 +1,4 @@
>>-dnl $Id: config.m4,v 1.14 2005/10/01 15:55:27 helly Exp $
>>+dnl $Id: config.m4,v 1.15 2005/12/20 21:36:47 helly Exp $
>>  dnl config.m4 for extension SPL
>>
>>  PHP_ARG_ENABLE(spl, enable SPL suppport,
>>@@ -8,6 +8,23 @@
>>if test "$ext_shared" = "yes"; then
>>  AC_MSG_ERROR(Cannot build SPL as a shared module)
>>fi
>>+  AC_MSG_CHECKING(whether zend_object_value is packed)
>>+  AC_TRY_RUN([
>>+#include "Zend/zend_types.h"
>>+int main(int argc, char **argv) {
>>+   return ((sizeof(zend_object_handle) +
>>sizeof(zend_object_handlers*)) == sizeof(zend_object_value)) ? 0 : 1;
>>+}
>>+  ], [
>>+ac_result=1
>>+AC_MSG_RESULT(yes)
>>+  ],[
>>+ac_result=0
>>+AC_MSG_RESULT(no)
>>+  ], [
>>+ac_result=0
>>+AC_MSG_RESULT(no)
>>+  ])
>>+  AC_DEFINE(HAVE_PACKED_OBJECT_VALUE, $ac_result, [Whether struct
>>_zend_object_value is packed])
>>AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP
>> Library) support])
>>PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c
>> spl_iterators.c spl_array.c spl_directory.c spl_sxe.c
>> spl_exceptions.c spl_observer.c, $ext_shared)
>>  fi
>>http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_observer.c?r1=1 
.6&r2=1.7&diff_format=u

>>Index: php-src/ext/spl/spl_observer.c
>>diff -u php-src/ext/spl/spl_observer.c:1.6 
php-src/ext/spl/spl_observer.c:1.7

>>--- php-src/ext/spl/spl_observer.c:1.6  Mon Dec 19 13:53:28 2005
>>+++ php-src/ext/spl/spl_observer.c  Tue Dec 20 21:36:47 2005
>>@@ -16,7 +16,7 @@
>> 
+--+

>>   */
>>
>>-/* $Id: spl_observer.c,v 1.6 2005/12/19 13:53:28 tony2001 Exp $ */
>>+/* $Id: spl_observer.c,v 1.7 2005/12/20 21:36:47 helly Exp $ */
>>
>>  #ifdef HAVE_CONFIG_H
>>  # include "config.h"
>>@@ -129,17 +129,25 @@
>>  SPL_METHOD(SplObjectStorage, attach)
>>  {
>> zval *obj;
>>-   zend_object_value zvalue;
>>+
>> spl_SplObjectStorage *intern =
>> (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC);
>>
>> if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o",
>> &obj) == FAILURE) {
>> return;
>> }
>>-   memset(&zvalue, 0, sizeof(zend_object_value));
>>-   zvalue.handle = obj->value.obj.handle;
>>-   zvalue.handlers = obj->value.obj.handlers;
>>-
>>-   zend_hash_update(&intern->storage, (char*)&zvalue,
>>sizeof(zend_object_value), &obj, sizeof(zval*), NULL);
>>+
>>+#if HAVE_PACKED_OBJECT_VALUE
>>+   zend_hash_update(&intern->storage, (char*)&Z_OBJVAL_P(obj),
>>sizeof(zend_object_value), &obj, sizeof(zval*), NULL);
>>+#else
>>+   

Re: [PHP-CVS] cvs: php-src /ext/spl config.m4 spl_observer.c

2005-12-22 Thread Marcus Boerger
Hello Andi,

  we would need to enforce structure packing change the type of
zend_object_handle in zend_object_value or both. But even if we
go that way we are not sure it works, so the only way that would
always work is the memset. However setting all structure bytes
to zero while on many platforms none must be ste and having to
copy the whole think just seems wrong. That means looking for
alternatives:
1) Implement a different hash/compare function
2) Do not use zend hashes but something different
None of which i want to go.

Imo the best option is to stay with current solution and still
change zend_object_handle to have the sane size that pointers
have: sizeof(zend_object_handle)==sizeof(zend_object_handlers*).
That way we would prevent the workaround of initializing a temp
copy on nearly any platform (close to 100%).

best regards
marcus

Thursday, December 22, 2005, 8:07:26 PM, you wrote:

> Are you sure you want to fix it this way? It'll make things less 
> maintainable. I'm sure there's a way to make it one implementation 
> that works everywhere.

> At 01:36 PM 12/20/2005, Marcus Boerger wrote:
>>helly   Tue Dec 20 21:36:48 2005 EDT
>>
>>   Modified files:
>> /php-src/ext/splconfig.m4 spl_observer.c
>>   Log:
>>   - Only apply workaround solution for 64 bit machines when necessary
>>   # Actually this can already be necessary on 32 bit machine and also not be
>>   # necessary on 64 bit machines. It all depends on the compiler settings.
>>
>>
>>http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/config.m4?r1=1.14&r2=1.15&diff_format=u
>>Index: php-src/ext/spl/config.m4
>>diff -u php-src/ext/spl/config.m4:1.14 php-src/ext/spl/config.m4:1.15
>>--- php-src/ext/spl/config.m4:1.14  Sat Oct  1 15:55:27 2005
>>+++ php-src/ext/spl/config.m4   Tue Dec 20 21:36:47 2005
>>@@ -1,4 +1,4 @@
>>-dnl $Id: config.m4,v 1.14 2005/10/01 15:55:27 helly Exp $
>>+dnl $Id: config.m4,v 1.15 2005/12/20 21:36:47 helly Exp $
>>  dnl config.m4 for extension SPL
>>
>>  PHP_ARG_ENABLE(spl, enable SPL suppport,
>>@@ -8,6 +8,23 @@
>>if test "$ext_shared" = "yes"; then
>>  AC_MSG_ERROR(Cannot build SPL as a shared module)
>>fi
>>+  AC_MSG_CHECKING(whether zend_object_value is packed)
>>+  AC_TRY_RUN([
>>+#include "Zend/zend_types.h"
>>+int main(int argc, char **argv) {
>>+   return ((sizeof(zend_object_handle) + 
>>sizeof(zend_object_handlers*)) == sizeof(zend_object_value)) ? 0 : 1;
>>+}
>>+  ], [
>>+ac_result=1
>>+AC_MSG_RESULT(yes)
>>+  ],[
>>+ac_result=0
>>+AC_MSG_RESULT(no)
>>+  ], [
>>+ac_result=0
>>+AC_MSG_RESULT(no)
>>+  ])
>>+  AC_DEFINE(HAVE_PACKED_OBJECT_VALUE, $ac_result, [Whether struct 
>>_zend_object_value is packed])
>>AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP 
>> Library) support])
>>PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c 
>> spl_iterators.c spl_array.c spl_directory.c spl_sxe.c 
>> spl_exceptions.c spl_observer.c, $ext_shared)
>>  fi
>>http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_observer.c?r1=1.6&r2=1.7&diff_format=u
>>Index: php-src/ext/spl/spl_observer.c
>>diff -u php-src/ext/spl/spl_observer.c:1.6 php-src/ext/spl/spl_observer.c:1.7
>>--- php-src/ext/spl/spl_observer.c:1.6  Mon Dec 19 13:53:28 2005
>>+++ php-src/ext/spl/spl_observer.c  Tue Dec 20 21:36:47 2005
>>@@ -16,7 +16,7 @@
>> +--+
>>   */
>>
>>-/* $Id: spl_observer.c,v 1.6 2005/12/19 13:53:28 tony2001 Exp $ */
>>+/* $Id: spl_observer.c,v 1.7 2005/12/20 21:36:47 helly Exp $ */
>>
>>  #ifdef HAVE_CONFIG_H
>>  # include "config.h"
>>@@ -129,17 +129,25 @@
>>  SPL_METHOD(SplObjectStorage, attach)
>>  {
>> zval *obj;
>>-   zend_object_value zvalue;
>>+
>> spl_SplObjectStorage *intern = 
>> (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC);
>>
>> if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o", 
>> &obj) == FAILURE) {
>> return;
>> }
>>-   memset(&zvalue, 0, sizeof(zend_object_value));
>>-   zvalue.handle = obj->value.obj.handle;
>>-   zvalue.handlers = obj->value.obj.handlers;
>>-
>>-   zend_hash_update(&intern->storage, (char*)&zvalue, 
>>sizeof(zend_object_value), &obj, sizeof(zval*), NULL);
>>+
>>+#if HAVE_PACKED_OBJECT_VALUE
>>+   zend_hash_update(&intern->storage, (char*)&Z_OBJVAL_P(obj), 
>>sizeof(zend_object_value), &obj, sizeof(zval*), NULL);
>>+#else
>>+   {
>>+   zend_object_value zvalue;
>>+   memset(&zvalue, 0, sizeof(zend_object_value));
>>+   zvalue.handle = Z_OBJ_HANDLE_P(obj);
>>+   zvalue.handlers = Z_OBJ_HT_P(obj);
>>+   zend_hash_update(&intern->storage, (char*)&zvalue, 
>>sizeof(zend_object_value), &obj, sizeof(zval*), NULL);
>>+   }
>>+#endif
>>+
>> obj->refcount++;
>>  } /* }}} */
>>
>>@@ -148,17 +156,24 @@
>>  SPL_METHOD(SplObjectStorage, detach)
>>  {
>> zval *obj;
>>-

Re: [PHP-CVS] cvs: php-src /ext/spl config.m4 spl_observer.c

2005-12-22 Thread Andi Gutmans
Are you sure you want to fix it this way? It'll make things less 
maintainable. I'm sure there's a way to make it one implementation 
that works everywhere.


At 01:36 PM 12/20/2005, Marcus Boerger wrote:

helly   Tue Dec 20 21:36:48 2005 EDT

  Modified files:
/php-src/ext/splconfig.m4 spl_observer.c
  Log:
  - Only apply workaround solution for 64 bit machines when necessary
  # Actually this can already be necessary on 32 bit machine and also not be
  # necessary on 64 bit machines. It all depends on the compiler settings.


http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/config.m4?r1=1.14&r2=1.15&diff_format=u
Index: php-src/ext/spl/config.m4
diff -u php-src/ext/spl/config.m4:1.14 php-src/ext/spl/config.m4:1.15
--- php-src/ext/spl/config.m4:1.14  Sat Oct  1 15:55:27 2005
+++ php-src/ext/spl/config.m4   Tue Dec 20 21:36:47 2005
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.14 2005/10/01 15:55:27 helly Exp $
+dnl $Id: config.m4,v 1.15 2005/12/20 21:36:47 helly Exp $
 dnl config.m4 for extension SPL

 PHP_ARG_ENABLE(spl, enable SPL suppport,
@@ -8,6 +8,23 @@
   if test "$ext_shared" = "yes"; then
 AC_MSG_ERROR(Cannot build SPL as a shared module)
   fi
+  AC_MSG_CHECKING(whether zend_object_value is packed)
+  AC_TRY_RUN([
+#include "Zend/zend_types.h"
+int main(int argc, char **argv) {
+   return ((sizeof(zend_object_handle) + 
sizeof(zend_object_handlers*)) == sizeof(zend_object_value)) ? 0 : 1;

+}
+  ], [
+ac_result=1
+AC_MSG_RESULT(yes)
+  ],[
+ac_result=0
+AC_MSG_RESULT(no)
+  ], [
+ac_result=0
+AC_MSG_RESULT(no)
+  ])
+  AC_DEFINE(HAVE_PACKED_OBJECT_VALUE, $ac_result, [Whether struct 
_zend_object_value is packed])
   AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP 
Library) support])
   PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c 
spl_iterators.c spl_array.c spl_directory.c spl_sxe.c 
spl_exceptions.c spl_observer.c, $ext_shared)

 fi
http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_observer.c?r1=1.6&r2=1.7&diff_format=u
Index: php-src/ext/spl/spl_observer.c
diff -u php-src/ext/spl/spl_observer.c:1.6 php-src/ext/spl/spl_observer.c:1.7
--- php-src/ext/spl/spl_observer.c:1.6  Mon Dec 19 13:53:28 2005
+++ php-src/ext/spl/spl_observer.c  Tue Dec 20 21:36:47 2005
@@ -16,7 +16,7 @@
+--+
  */

-/* $Id: spl_observer.c,v 1.6 2005/12/19 13:53:28 tony2001 Exp $ */
+/* $Id: spl_observer.c,v 1.7 2005/12/20 21:36:47 helly Exp $ */

 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -129,17 +129,25 @@
 SPL_METHOD(SplObjectStorage, attach)
 {
zval *obj;
-   zend_object_value zvalue;
+
spl_SplObjectStorage *intern = 
(spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC);


if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o", 
&obj) == FAILURE) {

return;
}
-   memset(&zvalue, 0, sizeof(zend_object_value));
-   zvalue.handle = obj->value.obj.handle;
-   zvalue.handlers = obj->value.obj.handlers;
-
-   zend_hash_update(&intern->storage, (char*)&zvalue, 
sizeof(zend_object_value), &obj, sizeof(zval*), NULL);

+
+#if HAVE_PACKED_OBJECT_VALUE
+   zend_hash_update(&intern->storage, (char*)&Z_OBJVAL_P(obj), 
sizeof(zend_object_value), &obj, sizeof(zval*), NULL);

+#else
+   {
+   zend_object_value zvalue;
+   memset(&zvalue, 0, sizeof(zend_object_value));
+   zvalue.handle = Z_OBJ_HANDLE_P(obj);
+   zvalue.handlers = Z_OBJ_HT_P(obj);
+   zend_hash_update(&intern->storage, (char*)&zvalue, 
sizeof(zend_object_value), &obj, sizeof(zval*), NULL);

+   }
+#endif
+
obj->refcount++;
 } /* }}} */

@@ -148,17 +156,24 @@
 SPL_METHOD(SplObjectStorage, detach)
 {
zval *obj;
-   zend_object_value zvalue;
spl_SplObjectStorage *intern = 
(spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC);


if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o", 
&obj) == FAILURE) {

return;
}
-   memset(&zvalue, 0, sizeof(zend_object_value));
-   zvalue.handle = obj->value.obj.handle;
-   zvalue.handlers = obj->value.obj.handlers;
-
-   zend_hash_del(&intern->storage, (char*)&zvalue, 
sizeof(zend_object_value));

+
+#if HAVE_PACKED_OBJECT_VALUE
+   zend_hash_del(&intern->storage, (char*)&Z_OBJVAL_P(obj), 
sizeof(zend_object_value));

+#else
+   {
+   zend_object_value zvalue;
+   memset(&zvalue, 0, sizeof(zend_object_value));
+   zvalue.handle = Z_OBJ_HANDLE_P(obj);
+   zvalue.handlers = Z_OBJ_HT_P(obj);
+   zend_hash_del(&intern->storage, (char*)&zvalue, 
sizeof(zend_object_value));

+   }
+#endif
+
zend_hash_internal_pointer_reset_ex(&intern->storage, &intern->pos);
intern->index = 0;
 } /* }}} */
@@ -168,17 +183,23 @@
 SPL_METHOD(SplObjectStorage, contains)

[PHP-CVS] cvs: php-src /ext/spl config.m4 spl_observer.c

2005-12-20 Thread Marcus Boerger
helly   Tue Dec 20 21:36:48 2005 EDT

  Modified files:  
/php-src/ext/splconfig.m4 spl_observer.c 
  Log:
  - Only apply workaround solution for 64 bit machines when necessary
  # Actually this can already be necessary on 32 bit machine and also not be
  # necessary on 64 bit machines. It all depends on the compiler settings.
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/config.m4?r1=1.14&r2=1.15&diff_format=u
Index: php-src/ext/spl/config.m4
diff -u php-src/ext/spl/config.m4:1.14 php-src/ext/spl/config.m4:1.15
--- php-src/ext/spl/config.m4:1.14  Sat Oct  1 15:55:27 2005
+++ php-src/ext/spl/config.m4   Tue Dec 20 21:36:47 2005
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.14 2005/10/01 15:55:27 helly Exp $
+dnl $Id: config.m4,v 1.15 2005/12/20 21:36:47 helly Exp $
 dnl config.m4 for extension SPL
 
 PHP_ARG_ENABLE(spl, enable SPL suppport,
@@ -8,6 +8,23 @@
   if test "$ext_shared" = "yes"; then
 AC_MSG_ERROR(Cannot build SPL as a shared module)
   fi
+  AC_MSG_CHECKING(whether zend_object_value is packed)
+  AC_TRY_RUN([
+#include "Zend/zend_types.h"
+int main(int argc, char **argv) {
+   return ((sizeof(zend_object_handle) + sizeof(zend_object_handlers*)) == 
sizeof(zend_object_value)) ? 0 : 1;
+}
+  ], [
+ac_result=1
+AC_MSG_RESULT(yes)
+  ],[
+ac_result=0
+AC_MSG_RESULT(no)
+  ], [
+ac_result=0
+AC_MSG_RESULT(no)
+  ])   
+  AC_DEFINE(HAVE_PACKED_OBJECT_VALUE, $ac_result, [Whether struct 
_zend_object_value is packed])
   AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP Library) 
support]) 
   PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c 
spl_iterators.c spl_array.c spl_directory.c spl_sxe.c spl_exceptions.c 
spl_observer.c, $ext_shared)
 fi
http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_observer.c?r1=1.6&r2=1.7&diff_format=u
Index: php-src/ext/spl/spl_observer.c
diff -u php-src/ext/spl/spl_observer.c:1.6 php-src/ext/spl/spl_observer.c:1.7
--- php-src/ext/spl/spl_observer.c:1.6  Mon Dec 19 13:53:28 2005
+++ php-src/ext/spl/spl_observer.c  Tue Dec 20 21:36:47 2005
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_observer.c,v 1.6 2005/12/19 13:53:28 tony2001 Exp $ */
+/* $Id: spl_observer.c,v 1.7 2005/12/20 21:36:47 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -129,17 +129,25 @@
 SPL_METHOD(SplObjectStorage, attach)
 {
zval *obj;
-   zend_object_value zvalue;
+
spl_SplObjectStorage *intern = 
(spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC);
 
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o", &obj) == 
FAILURE) {
return;
}
-   memset(&zvalue, 0, sizeof(zend_object_value));
-   zvalue.handle = obj->value.obj.handle;
-   zvalue.handlers = obj->value.obj.handlers;
-   
-   zend_hash_update(&intern->storage, (char*)&zvalue, 
sizeof(zend_object_value), &obj, sizeof(zval*), NULL);
+
+#if HAVE_PACKED_OBJECT_VALUE
+   zend_hash_update(&intern->storage, (char*)&Z_OBJVAL_P(obj), 
sizeof(zend_object_value), &obj, sizeof(zval*), NULL);  
+#else
+   {
+   zend_object_value zvalue;
+   memset(&zvalue, 0, sizeof(zend_object_value));
+   zvalue.handle = Z_OBJ_HANDLE_P(obj);
+   zvalue.handlers = Z_OBJ_HT_P(obj);
+   zend_hash_update(&intern->storage, (char*)&zvalue, 
sizeof(zend_object_value), &obj, sizeof(zval*), NULL);
+   }
+#endif
+
obj->refcount++;
 } /* }}} */
 
@@ -148,17 +156,24 @@
 SPL_METHOD(SplObjectStorage, detach)
 {
zval *obj;
-   zend_object_value zvalue;
spl_SplObjectStorage *intern = 
(spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC);
 
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o", &obj) == 
FAILURE) {
return;
}
-   memset(&zvalue, 0, sizeof(zend_object_value));
-   zvalue.handle = obj->value.obj.handle;
-   zvalue.handlers = obj->value.obj.handlers;
-   
-   zend_hash_del(&intern->storage, (char*)&zvalue, 
sizeof(zend_object_value));
+
+#if HAVE_PACKED_OBJECT_VALUE
+   zend_hash_del(&intern->storage, (char*)&Z_OBJVAL_P(obj), 
sizeof(zend_object_value));
+#else
+   {
+   zend_object_value zvalue;
+   memset(&zvalue, 0, sizeof(zend_object_value));
+   zvalue.handle = Z_OBJ_HANDLE_P(obj);
+   zvalue.handlers = Z_OBJ_HT_P(obj);
+   zend_hash_del(&intern->storage, (char*)&zvalue, 
sizeof(zend_object_value));
+   }
+#endif
+
zend_hash_internal_pointer_reset_ex(&intern->storage, &intern->pos);
intern->index = 0;
 } /* }}} */
@@ -168,17 +183,23 @@
 SPL_METHOD(SplObjectStorage, contains)
 {
zval *obj;
-   zend_object_value zvalue;
spl_SplObjectStorage *intern = 
(spl_SplObjectStorage*)zend_object_store_get_object(getTh

[PHP-CVS] cvs: php-src /ext/spl config.m4 config.w32 php_spl.c spl.php spl_observer.c spl_observer.h /ext/spl/tests observer_001.phpt

2005-02-08 Thread Marcus Boerger
helly   Tue Feb  8 15:42:48 2005 EDT

  Added files: 
/php-src/ext/splspl_observer.c spl_observer.h 
/php-src/ext/spl/tests  observer_001.phpt 

  Modified files:  
/php-src/ext/splconfig.m4 config.w32 php_spl.c spl.php 
  Log:
  - Initial Observer implementation
  
  http://cvs.php.net/diff.php/php-src/ext/spl/config.m4?r1=1.12&r2=1.13&ty=u
Index: php-src/ext/spl/config.m4
diff -u php-src/ext/spl/config.m4:1.12 php-src/ext/spl/config.m4:1.13
--- php-src/ext/spl/config.m4:1.12  Mon Nov  1 10:50:25 2004
+++ php-src/ext/spl/config.m4   Tue Feb  8 15:42:47 2005
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.12 2004/11/01 15:50:25 helly Exp $
+dnl $Id: config.m4,v 1.13 2005/02/08 20:42:47 helly Exp $
 dnl config.m4 for extension SPL
 
 PHP_ARG_ENABLE(spl, enable SPL suppport,
@@ -9,6 +9,6 @@
 AC_MSG_ERROR(Cannot build SPL as a shared module)
   fi
   AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP Library) 
support]) 
-  PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c 
spl_iterators.c spl_array.c spl_directory.c spl_sxe.c spl_exceptions.c, 
$ext_shared)
+  PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c 
spl_iterators.c spl_array.c spl_directory.c spl_sxe.c spl_exceptions.c 
spl_observer.c, $ext_shared)
   PHP_ADD_EXTENSION_DEP(spl, simplexml)
 fi
http://cvs.php.net/diff.php/php-src/ext/spl/config.w32?r1=1.6&r2=1.7&ty=u
Index: php-src/ext/spl/config.w32
diff -u php-src/ext/spl/config.w32:1.6 php-src/ext/spl/config.w32:1.7
--- php-src/ext/spl/config.w32:1.6  Mon Nov  1 10:50:25 2004
+++ php-src/ext/spl/config.w32  Tue Feb  8 15:42:47 2005
@@ -1,4 +1,4 @@
-// $Id: config.w32,v 1.6 2004/11/01 15:50:25 helly Exp $
+// $Id: config.w32,v 1.7 2005/02/08 20:42:47 helly Exp $
 // vim:ft=javascript
 
 ARG_ENABLE("spl", "SPL (Standard PHP Library) support", "yes");
@@ -7,6 +7,6 @@
if (PHP_SPL_SHARED) {
ERROR("SPL cannot be compiled as a shared ext");
}
-   EXTENSION("spl", "php_spl.c spl_functions.c spl_engine.c 
spl_iterators.c spl_array.c spl_directory.c spl_sxe.c spl_exceptions.c");
+   EXTENSION("spl", "php_spl.c spl_functions.c spl_engine.c 
spl_iterators.c spl_array.c spl_directory.c spl_sxe.c spl_exceptions.c 
spl_observer.c");
AC_DEFINE('HAVE_SPL', 1);
 }
http://cvs.php.net/diff.php/php-src/ext/spl/php_spl.c?r1=1.37&r2=1.38&ty=u
Index: php-src/ext/spl/php_spl.c
diff -u php-src/ext/spl/php_spl.c:1.37 php-src/ext/spl/php_spl.c:1.38
--- php-src/ext/spl/php_spl.c:1.37  Mon Nov  1 12:39:59 2004
+++ php-src/ext/spl/php_spl.c   Tue Feb  8 15:42:47 2005
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_spl.c,v 1.37 2004/11/01 17:39:59 helly Exp $ */
+/* $Id: php_spl.c,v 1.38 2005/02/08 20:42:47 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
#include "config.h"
@@ -33,6 +33,7 @@
 #include "spl_iterators.h"
 #include "spl_sxe.h"
 #include "spl_exceptions.h"
+#include "spl_observer.h"
 
 #ifdef COMPILE_DL_SPL
 ZEND_GET_MODULE(spl)
@@ -95,6 +96,7 @@
PHP_MINIT(spl_directory)(INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(spl_sxe)(INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(spl_exceptions)(INIT_FUNC_ARGS_PASSTHRU);
+   PHP_MINIT(spl_observer)(INIT_FUNC_ARGS_PASSTHRU);
 
return SUCCESS;
 }
@@ -181,6 +183,7 @@
SPL_ADD_CLASS(LimitIterator, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(LogicException, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(NoRewindIterator, z_list, sub, allow, ce_flags); \
+   SPL_ADD_CLASS(Observer, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(OuterIterator, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(OutOfRangeException, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(OutOfBoundsException, z_list, sub, allow, ce_flags); \
@@ -193,6 +196,7 @@
SPL_ADD_CLASS(RuntimeException, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(SeekableIterator, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(SimpleXMLIterator, z_list, sub, allow, ce_flags); \
+   SPL_ADD_CLASS(Subject, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(UnderflowException, z_list, sub, allow, ce_flags); \
 
 /* {{{ spl_classes */
http://cvs.php.net/diff.php/php-src/ext/spl/spl.php?r1=1.40&r2=1.41&ty=u
Index: php-src/ext/spl/spl.php
diff -u php-src/ext/spl/spl.php:1.40 php-src/ext/spl/spl.php:1.41
--- php-src/ext/spl/spl.php:1.40Tue Feb  8 14:05:25 2005
+++ php-src/ext/spl/spl.php Tue Feb  8 15:42:47 2005
@@ -66,6 +66,9 @@
  * 
  * - class ArrayObject implements IteratorAggregate
  * - class ArrayIterator implements Iterator
+ * 
+ * As the above suggest an ArrayObject creates an ArrayIterator when it comes 
to
+ * iteration (e.g. ArrayObject instance used inside foreach). 
  *
  * 5) Counting
  *
@@ -88,9 +91,13 @@
  * - class OverflowExceptionextends RuntimeException
  * - class RangeException   ex

[PHP-CVS] cvs: php-src /ext/spl config.m4 config.w32 php_spl.c spl.php spl_exceptions.c spl_exceptions.h

2004-11-01 Thread Marcus Boerger
helly   Mon Nov  1 10:50:26 2004 EDT

  Added files: 
/php-src/ext/splspl_exceptions.c spl_exceptions.h 

  Modified files:  
/php-src/ext/splconfig.m4 config.w32 php_spl.c spl.php 
  Log:
  - Implement basic exception classes
  
  http://cvs.php.net/diff.php/php-src/ext/spl/config.m4?r1=1.11&r2=1.12&ty=u
Index: php-src/ext/spl/config.m4
diff -u php-src/ext/spl/config.m4:1.11 php-src/ext/spl/config.m4:1.12
--- php-src/ext/spl/config.m4:1.11  Sun Jul 18 08:03:51 2004
+++ php-src/ext/spl/config.m4   Mon Nov  1 10:50:25 2004
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.11 2004/07/18 12:03:51 wez Exp $
+dnl $Id: config.m4,v 1.12 2004/11/01 15:50:25 helly Exp $
 dnl config.m4 for extension SPL
 
 PHP_ARG_ENABLE(spl, enable SPL suppport,
@@ -9,6 +9,6 @@
 AC_MSG_ERROR(Cannot build SPL as a shared module)
   fi
   AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP Library) support]) 
-  PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c spl_iterators.c 
spl_array.c spl_directory.c spl_sxe.c, $ext_shared)
+  PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c spl_iterators.c 
spl_array.c spl_directory.c spl_sxe.c spl_exceptions.c, $ext_shared)
   PHP_ADD_EXTENSION_DEP(spl, simplexml)
 fi
http://cvs.php.net/diff.php/php-src/ext/spl/config.w32?r1=1.5&r2=1.6&ty=u
Index: php-src/ext/spl/config.w32
diff -u php-src/ext/spl/config.w32:1.5 php-src/ext/spl/config.w32:1.6
--- php-src/ext/spl/config.w32:1.5  Tue Jan 20 14:49:21 2004
+++ php-src/ext/spl/config.w32  Mon Nov  1 10:50:25 2004
@@ -1,4 +1,4 @@
-// $Id: config.w32,v 1.5 2004/01/20 19:49:21 helly Exp $
+// $Id: config.w32,v 1.6 2004/11/01 15:50:25 helly Exp $
 // vim:ft=javascript
 
 ARG_ENABLE("spl", "SPL (Standard PHP Library) support", "yes");
@@ -7,6 +7,6 @@
if (PHP_SPL_SHARED) {
ERROR("SPL cannot be compiled as a shared ext");
}
-   EXTENSION("spl", "php_spl.c spl_functions.c spl_engine.c spl_iterators.c 
spl_array.c spl_directory.c spl_sxe.c");
+   EXTENSION("spl", "php_spl.c spl_functions.c spl_engine.c spl_iterators.c 
spl_array.c spl_directory.c spl_sxe.c spl_exceptions.c");
AC_DEFINE('HAVE_SPL', 1);
 }
http://cvs.php.net/diff.php/php-src/ext/spl/php_spl.c?r1=1.35&r2=1.36&ty=u
Index: php-src/ext/spl/php_spl.c
diff -u php-src/ext/spl/php_spl.c:1.35 php-src/ext/spl/php_spl.c:1.36
--- php-src/ext/spl/php_spl.c:1.35  Mon Nov  1 05:45:53 2004
+++ php-src/ext/spl/php_spl.c   Mon Nov  1 10:50:25 2004
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_spl.c,v 1.35 2004/11/01 10:45:53 helly Exp $ */
+/* $Id: php_spl.c,v 1.36 2004/11/01 15:50:25 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
#include "config.h"
@@ -32,6 +32,7 @@
 #include "spl_directory.h"
 #include "spl_iterators.h"
 #include "spl_sxe.h"
+#include "spl_exceptions.h"
 
 #ifdef COMPILE_DL_SPL
 ZEND_GET_MODULE(spl)
@@ -93,6 +94,7 @@
PHP_MINIT(spl_array)(INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(spl_directory)(INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(spl_sxe)(INIT_FUNC_ARGS_PASSTHRU);
+   PHP_MINIT(spl_exceptions)(INIT_FUNC_ARGS_PASSTHRU);
 
return SUCCESS;
 }
@@ -168,19 +170,29 @@
SPL_ADD_CLASS(CachingRecursiveIterator, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(Countable, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(DirectoryIterator, z_list, sub, allow, ce_flags); \
+   SPL_ADD_CLASS(DomainException, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(EmptyIterator, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(FilterIterator, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(InfiniteIterator, z_list, sub, allow, ce_flags); \
+   SPL_ADD_CLASS(InvalidArgumentException, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(IteratorIterator, z_list, sub, allow, ce_flags); \
+   SPL_ADD_CLASS(LengthException, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(LimitIterator, z_list, sub, allow, ce_flags); \
+   SPL_ADD_CLASS(LogicException, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(NoRewindIterator, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(OuterIterator, z_list, sub, allow, ce_flags); \
+   SPL_ADD_CLASS(OutOfRangeException, z_list, sub, allow, ce_flags); \
+   SPL_ADD_CLASS(OutOfBoundsException, z_list, sub, allow, ce_flags); \
+   SPL_ADD_CLASS(OverflowException, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(ParentIterator, z_list, sub, allow, ce_flags); \
+   SPL_ADD_CLASS(RangeException, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(RecursiveDirectoryIterator, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(RecursiveIterator, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(RecursiveIteratorIterator, z_list, sub, allow, ce_flags); \
+   SPL_ADD_CLASS(RuntimeException, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(SeekableIte

[PHP-CVS] cvs: php-src /ext/spl config.m4

2004-02-09 Thread Jani Taskinen
sniper  Mon Feb  9 13:18:01 2004 EDT

  Modified files:  
/php-src/ext/splconfig.m4 
  Log:
  ws
  
http://cvs.php.net/diff.php/php-src/ext/spl/config.m4?r1=1.9&r2=1.10&ty=u
Index: php-src/ext/spl/config.m4
diff -u php-src/ext/spl/config.m4:1.9 php-src/ext/spl/config.m4:1.10
--- php-src/ext/spl/config.m4:1.9   Mon Jan 19 06:07:19 2004
+++ php-src/ext/spl/config.m4   Mon Feb  9 13:18:00 2004
@@ -1,13 +1,13 @@
-dnl $Id: config.m4,v 1.9 2004/01/19 11:07:19 chregu Exp $
+dnl $Id: config.m4,v 1.10 2004/02/09 18:18:00 sniper Exp $
 dnl config.m4 for extension SPL
 
 PHP_ARG_ENABLE(spl, enable SPL suppport,
 [  --disable-spl   Disable Standard PHP Library], yes)
 
 if test "$PHP_SPL" != "no"; then
-   if test "$ext_shared" = "yes"; then
-   AC_MSG_ERROR(Cannot build SPL as a shared module)
-   fi
-AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP Library) support]) 
-PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c spl_iterators.c 
spl_array.c spl_directory.c spl_sxe.c, $ext_shared)
+  if test "$ext_shared" = "yes"; then
+AC_MSG_ERROR(Cannot build SPL as a shared module)
+  fi
+  AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP Library) support]) 
+  PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c spl_iterators.c 
spl_array.c spl_directory.c spl_sxe.c, $ext_shared)
 fi

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/spl config.m4

2004-01-19 Thread Christian Stocker
chregu  Mon Jan 19 06:07:19 2004 EDT

  Modified files:  
/php-src/ext/splconfig.m4 
  Log:
  fix typo
  
Index: php-src/ext/spl/config.m4
diff -u php-src/ext/spl/config.m4:1.8 php-src/ext/spl/config.m4:1.9
--- php-src/ext/spl/config.m4:1.8   Mon Jan 19 03:48:30 2004
+++ php-src/ext/spl/config.m4   Mon Jan 19 06:07:19 2004
@@ -1,8 +1,8 @@
-dnl $Id: config.m4,v 1.8 2004/01/19 08:48:30 helly Exp $
+dnl $Id: config.m4,v 1.9 2004/01/19 11:07:19 chregu Exp $
 dnl config.m4 for extension SPL
 
 PHP_ARG_ENABLE(spl, enable SPL suppport,
-[  --disable-spl   Enable Standard PHP Library], yes)
+[  --disable-spl   Disable Standard PHP Library], yes)
 
 if test "$PHP_SPL" != "no"; then
if test "$ext_shared" = "yes"; then

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/spl config.m4

2004-01-19 Thread Derick Rethans
derick  Mon Jan 19 03:32:26 2004 EDT

  Modified files:  
/php-src/ext/splconfig.m4 
  Log:
  - Being picky :)
  
  
Index: php-src/ext/spl/config.m4
diff -u php-src/ext/spl/config.m4:1.6 php-src/ext/spl/config.m4:1.7
--- php-src/ext/spl/config.m4:1.6   Sun Jan 18 10:33:37 2004
+++ php-src/ext/spl/config.m4   Mon Jan 19 03:32:26 2004
@@ -1,10 +1,10 @@
-dnl $Id: config.m4,v 1.6 2004/01/18 15:33:37 helly Exp $
+dnl $Id: config.m4,v 1.7 2004/01/19 08:32:26 derick Exp $
 dnl config.m4 for extension SPL
 
 PHP_ARG_ENABLE(spl, enable SPL suppport,
 [  --disable-spl   Enable Standard PHP Library], yes)
 
 if test "$PHP_SPL" != "no"; then
-AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard Php Library) support]) 
+AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP Library) support]) 
 PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c spl_iterators.c 
spl_array.c spl_directory.c spl_sxe.c, $ext_shared)
 fi

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php