[PHP-CVS-DAILY] cvs: php-src / ChangeLog

2008-01-27 Thread changelog
changelog   Mon Jan 28 01:31:33 2008 UTC

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.2940r2=1.2941diff_format=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.2940 php-src/ChangeLog:1.2941
--- php-src/ChangeLog:1.2940Sun Jan 27 01:31:29 2008
+++ php-src/ChangeLog   Mon Jan 28 01:31:33 2008
@@ -1,3 +1,155 @@
+2008-01-27  Derick Rethans  [EMAIL PROTECTED]
+
+* ext/date/lib/parse_date.c
+  ext/date/lib/parse_date.re
+  ext/date/tests/date_create-2.phpt
+  ext/date/tests/strtotime.phpt:
+  - Fixed parsing of timestamps.
+
+2008-01-27  Hannes Magnusson  [EMAIL PROTECTED]
+
+* sapi/cli/tests/006.phpt
+  sapi/cli/tests/006.phpt:
+  Fix test
+
+* (PHP_5_2)
+  ext/spl/tests/observer_006.phpt:
+  Remove bogus test (should be in HEAD)
+
+2008-01-27  Marcus Boerger  [EMAIL PROTECTED]
+
+* ext/spl/tests/observer_006.phpt:
+  - Test went to 5.2... somehow very strange
+
+* (PHP_5_3)
+  NEWS
+  ext/spl/spl_observer.c
+  ext/spl/internal/splobjectstorage.inc
+  ext/spl/tests/observer_004.phpt
+  ext/spl/tests/observer_005.phpt
+  ext/spl/tests/observer_006.phpt:
+  MFH:
+  [DOC] Add ability to store associative infor with objects in
+  SplObjectStorage
+  - Add second parameter to SplObjectStorage::attach()
+  - Add SplObjectStorage::setInfo()
+  - Add SplObjectStorage::getInfo()
+
+* ext/spl/spl_observer.c
+  ext/spl/internal/splobjectstorage.inc
+  ext/spl/tests/observer_004.phpt
+  ext/spl/tests/observer_005.phpt
+  ext/spl/tests/observer_006.phpt
+  ext/spl/tests/observer_006.phpt
+  ext/spl/tests/observer_006.phpt:
+  - Add second parameter to SplObjectStorage::attach()
+  - Add SplObjectStorage::setInfo()
+  - Add SplObjectStorage::getInfo()
+
+2008-01-27  Derick Rethans  [EMAIL PROTECTED]
+
+* ext/date/php_date.c:
+  - Update proto.
+
+* (PHP_5_3)
+  NEWS
+  ext/date/php_date.c
+  ext/date/tests/timezones-list.phpt:
+  - MFH: Added support for selectively listing timezone identifiers through
+timezone_identifiers_list() / DateTimezone::listIdentifiers().
+
+* ext/date/tests/timezones-list.phpt
+  ext/date/tests/timezones-list.phpt:
+  
+  - Added support for selectively listing timezone identifiers through
+timezone_identifiers_list() / DateTimezone::listIdentifiers().
+
+* ext/date/php_date.c:
+  - Added support for selectively listing timezone identifiers through
+timezone_identifiers_list() / DateTimezone::listIdentifiers().
+
+2008-01-27  Nuno Lopes  [EMAIL PROTECTED]
+
+* ext/date/tests/bug43003.phpt
+  ext/date/tests/bug43003.phpt:
+  fix test
+
+2008-01-27  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* (PHP_5_3)
+  ext/shmop/shmop.c:
+  
+  WS
+
+2008-01-27  Nuno Lopes  [EMAIL PROTECTED]
+
+* ext/standard/tests/strings/moneyformat.phpt
+  ext/standard/tests/strings/moneyformat.phpt:
+  be more strict in the skipif
+
+* ext/standard/tests/strings/moneyformat.phpt
+  ext/standard/tests/strings/setlocale_basic1.phpt
+  ext/standard/tests/strings/setlocale_basic2.phpt
+  ext/standard/tests/strings/setlocale_basic3.phpt
+  ext/standard/tests/strings/setlocale_variation1.phpt
+  ext/standard/tests/strings/setlocale_variation3.phpt
+  ext/standard/tests/strings/setlocale_variation4.phpt
+  ext/standard/tests/strings/setlocale_variation5.phpt:
+  MFB: fix skipifs
+
+* (PHP_5_3)
+  ext/standard/tests/strings/moneyformat.phpt
+  ext/standard/tests/strings/setlocale_basic1.phpt
+  ext/standard/tests/strings/setlocale_basic2.phpt
+  ext/standard/tests/strings/setlocale_basic3.phpt
+  ext/standard/tests/strings/setlocale_variation1.phpt
+  ext/standard/tests/strings/setlocale_variation3.phpt
+  ext/standard/tests/strings/setlocale_variation4.phpt
+  ext/standard/tests/strings/setlocale_variation5.phpt:
+  fix a bunch of SKIPIF (check for non available locales)
+
+2008-01-27  Rob Richards  [EMAIL PROTECTED]
+
+* ext/libxml/php_libxml2.def:
+  add missing export
+
+2008-01-27  Marcus Boerger  [EMAIL PROTECTED]
+
+* (PHP_5_3)
+  ext/spl/spl_observer.c:
+  - Minor rearrange and fix potential issue with double adding
+
+* ext/spl/php_spl.c
+  ext/spl/php_spl.h
+  ext/tidy/php_tidy.h
+  ext/tidy/tidy.c:
+  - revert over constfying
+
+2008-01-27  Etienne Kneuss  [EMAIL PROTECTED]
+
+* ext/spl/internal/spldoublylinkedlist.inc:
+  Typo
+
+* (PHP_5_3)
+  ext/spl/spl_dllist.c
+  ext/spl/internal/spldoublylinkedlist.inc
+  ext/spl/internal/splqueue.inc
+  ext/spl/internal/splstack.inc
+  ext/spl/tests/dllist_003.phpt:
+  MFH: -Pointer doesn't move if we're moving forward and shifting at the 
same
+  time
+  

[PHP-CVS] cvs: php-src /ext/spl spl_dllist.c /ext/spl/internal spldoublylinkedlist.inc splqueue.inc splstack.inc /ext/spl/tests dllist_003.phpt

2008-01-27 Thread Etienne Kneuss
colder  Sun Jan 27 13:54:32 2008 UTC

  Modified files:  
/php-src/ext/splspl_dllist.c 
/php-src/ext/spl/tests  dllist_003.phpt 
/php-src/ext/spl/internal   spldoublylinkedlist.inc splqueue.inc 
splstack.inc 
  Log:
  -Pointer doesn't move if we're moving forward and shifting at the same time
  -Userland implementation
  -Doxygen doc
  http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_dllist.c?r1=1.6r2=1.7diff_format=u
Index: php-src/ext/spl/spl_dllist.c
diff -u php-src/ext/spl/spl_dllist.c:1.6 php-src/ext/spl/spl_dllist.c:1.7
--- php-src/ext/spl/spl_dllist.c:1.6Sat Jan 26 18:06:51 2008
+++ php-src/ext/spl/spl_dllist.cSun Jan 27 13:54:32 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_dllist.c,v 1.6 2008/01/26 18:06:51 colder Exp $ */
+/* $Id: spl_dllist.c,v 1.7 2008/01/27 13:54:32 colder Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include config.h
@@ -911,14 +911,14 @@
}
} else {
*traverse_pointer_ptr = old-next;
-   (*traverse_position_ptr)++;
-
if (flags  SPL_DLLIST_IT_DELETE) {
zval *prev = (zval *)spl_ptr_llist_shift(llist);
 
if (prev) {
zval_ptr_dtor((zval **)prev);
}
+   } else {
+   (*traverse_position_ptr)++;
}
}
 
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/dllist_003.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/spl/tests/dllist_003.phpt
diff -u php-src/ext/spl/tests/dllist_003.phpt:1.1 
php-src/ext/spl/tests/dllist_003.phpt:1.2
--- php-src/ext/spl/tests/dllist_003.phpt:1.1   Tue Jan 15 09:37:50 2008
+++ php-src/ext/spl/tests/dllist_003.phpt   Sun Jan 27 13:54:32 2008
@@ -39,7 +39,7 @@
 2=4
 int(3)
 0=2
-1=3
-2=4
+0=3
+0=4
 int(0)
 ===DONE===
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/internal/spldoublylinkedlist.inc?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/spl/internal/spldoublylinkedlist.inc
diff -u php-src/ext/spl/internal/spldoublylinkedlist.inc:1.1 
php-src/ext/spl/internal/spldoublylinkedlist.inc:1.2
--- php-src/ext/spl/internal/spldoublylinkedlist.inc:1.1Mon Jan 21 
21:54:00 2008
+++ php-src/ext/spl/internal/spldoublylinkedlist.incSun Jan 27 13:54:32 2008
@@ -1,5 +1,4 @@
 ?php
-
 /** @file spldoublylinkedlist.inc
  * @ingroup SPL
  * @brief class SplDoublyLinkedList
@@ -13,23 +12,29 @@
  * @brief Doubly Linked List
  * @since PHP 5.3
  *
- * The SplDoublyLinkedList class provides the main functionnalities of a
+ * The SplDoublyLinkedList class provides the main functionalities of a
  * doubly linked list (DLL).
+ * @note The following userland implementation of Iterator is a bit different
+ *from the internal one. Internally, iterators generated by nested 
+ *foreachs are independant, while they share the same traverse pointer 
+ *in userland.
  */
-class SplDoublyLinkedList implements Traversable, ArrayAccess, Countable
+class SplDoublyLinkedList implements Iterator, ArrayAccess, Countable
 {
+   protected $_llist   = array();
+   protected $_it_mode = 0;
+   protected $_it_pos  = 0;
 
/** Iterator mode
 * @see setIteratorMode
 */
-   const IT_MODE_LIFO = 0x0001;
+   const IT_MODE_LIFO = 0x0002;
 
/** Iterator mode
 * @see setIteratorMode
 */
const IT_MODE_FIFO = 0x;
 
-
/** Iterator mode
 * @see setIteratorMode
 */
@@ -38,41 +43,75 @@
/** Iterator mode
 * @see setIteratorMode
 */
-   const IT_MODE_DELETE   = 0x0002;
+   const IT_MODE_DELETE   = 0x0001;
 
/** @return the element popped from the end of the DLL.
+* @throw RuntimeException If the datastructure is empty.
 */
-   function pop() {/**/}
+   public function pop()
+   {
+   if (count($this-_llist) == 0) {
+   throw new RuntimeException(Can't pop from an empty 
datastructure);
+   }
+   return array_pop($this-_llist);
+   }
 
/** @return the element shifted from the beginning of the DLL.
+* @throw RuntimeException If the datastructure is empty.
 */
-   function shift() {/**/}
+   public function shift()
+   {
+   if (count($this-_llist) == 0) {
+   throw new RuntimeException(Can't shift from an empty 
datastructure);
+   }
+   return array_shift($this-_llist);
+   }
 
/** Pushes an element to the end of the DLL.
 * @param $data variable to add to the DLL.
 */
-   function push($data) {/**/}
+   public function 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/spl/internal spldoublylinkedlist.inc

2008-01-27 Thread Etienne Kneuss
colder  Sun Jan 27 14:08:06 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/spl/internal   spldoublylinkedlist.inc 
  Log:
  MFH: Typo
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/internal/spldoublylinkedlist.inc?r1=1.1.2.3r2=1.1.2.4diff_format=u
Index: php-src/ext/spl/internal/spldoublylinkedlist.inc
diff -u php-src/ext/spl/internal/spldoublylinkedlist.inc:1.1.2.3 
php-src/ext/spl/internal/spldoublylinkedlist.inc:1.1.2.4
--- php-src/ext/spl/internal/spldoublylinkedlist.inc:1.1.2.3Sun Jan 27 
13:59:51 2008
+++ php-src/ext/spl/internal/spldoublylinkedlist.incSun Jan 27 14:08:06 2008
@@ -16,7 +16,7 @@
  * doubly linked list (DLL).
  * @note The following userland implementation of Iterator is a bit different
  *from the internal one. Internally, iterators generated by nested 
- *foreachs are independant, while they share the same traverse pointer 
+ *foreachs are independent, while they share the same traverse pointer 
  *in userland.
  */
 class SplDoublyLinkedList implements Iterator, ArrayAccess, Countable

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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/spl spl_dllist.c /ext/spl/internal spldoublylinkedlist.inc splqueue.inc splstack.inc /ext/spl/tests dllist_003.phpt

2008-01-27 Thread Etienne Kneuss
colder  Sun Jan 27 13:59:51 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/splspl_dllist.c 
/php-src/ext/spl/tests  dllist_003.phpt 
/php-src/ext/spl/internal   spldoublylinkedlist.inc splqueue.inc 
splstack.inc 
  Log:
  MFH: -Pointer doesn't move if we're moving forward and shifting at the same 
time
  -Userland implementation
  -Doxygen doc
  http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_dllist.c?r1=1.1.2.7r2=1.1.2.8diff_format=u
Index: php-src/ext/spl/spl_dllist.c
diff -u php-src/ext/spl/spl_dllist.c:1.1.2.7 
php-src/ext/spl/spl_dllist.c:1.1.2.8
--- php-src/ext/spl/spl_dllist.c:1.1.2.7Sat Jan 26 23:04:43 2008
+++ php-src/ext/spl/spl_dllist.cSun Jan 27 13:59:51 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_dllist.c,v 1.1.2.7 2008/01/26 23:04:43 colder Exp $ */
+/* $Id: spl_dllist.c,v 1.1.2.8 2008/01/27 13:59:51 colder Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include config.h
@@ -908,7 +908,6 @@
}
} else {
*traverse_pointer_ptr = old-next;
-   (*traverse_position_ptr)++;
 
if (flags  SPL_DLLIST_IT_DELETE) {
zval *prev = (zval *)spl_ptr_llist_shift(llist);
@@ -916,6 +915,8 @@
if (prev) {
zval_ptr_dtor((zval **)prev);
}
+   } else {
+   (*traverse_position_ptr)++;
}
}
 
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/dllist_003.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/spl/tests/dllist_003.phpt
diff -u php-src/ext/spl/tests/dllist_003.phpt:1.1.2.2 
php-src/ext/spl/tests/dllist_003.phpt:1.1.2.3
--- php-src/ext/spl/tests/dllist_003.phpt:1.1.2.2   Tue Jan 15 09:38:15 2008
+++ php-src/ext/spl/tests/dllist_003.phpt   Sun Jan 27 13:59:51 2008
@@ -39,7 +39,7 @@
 2=4
 int(3)
 0=2
-1=3
-2=4
+0=3
+0=4
 int(0)
 ===DONE===
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/internal/spldoublylinkedlist.inc?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/spl/internal/spldoublylinkedlist.inc
diff -u php-src/ext/spl/internal/spldoublylinkedlist.inc:1.1.2.2 
php-src/ext/spl/internal/spldoublylinkedlist.inc:1.1.2.3
--- php-src/ext/spl/internal/spldoublylinkedlist.inc:1.1.2.2Mon Jan 21 
21:55:55 2008
+++ php-src/ext/spl/internal/spldoublylinkedlist.incSun Jan 27 13:59:51 2008
@@ -1,5 +1,4 @@
 ?php
-
 /** @file spldoublylinkedlist.inc
  * @ingroup SPL
  * @brief class SplDoublyLinkedList
@@ -13,23 +12,29 @@
  * @brief Doubly Linked List
  * @since PHP 5.3
  *
- * The SplDoublyLinkedList class provides the main functionnalities of a
+ * The SplDoublyLinkedList class provides the main functionalities of a
  * doubly linked list (DLL).
+ * @note The following userland implementation of Iterator is a bit different
+ *from the internal one. Internally, iterators generated by nested 
+ *foreachs are independant, while they share the same traverse pointer 
+ *in userland.
  */
-class SplDoublyLinkedList implements Traversable, ArrayAccess, Countable
+class SplDoublyLinkedList implements Iterator, ArrayAccess, Countable
 {
+   protected $_llist   = array();
+   protected $_it_mode = 0;
+   protected $_it_pos  = 0;
 
/** Iterator mode
 * @see setIteratorMode
 */
-   const IT_MODE_LIFO = 0x0001;
+   const IT_MODE_LIFO = 0x0002;
 
/** Iterator mode
 * @see setIteratorMode
 */
const IT_MODE_FIFO = 0x;
 
-
/** Iterator mode
 * @see setIteratorMode
 */
@@ -38,41 +43,75 @@
/** Iterator mode
 * @see setIteratorMode
 */
-   const IT_MODE_DELETE   = 0x0002;
+   const IT_MODE_DELETE   = 0x0001;
 
/** @return the element popped from the end of the DLL.
+* @throw RuntimeException If the datastructure is empty.
 */
-   function pop() {/**/}
+   public function pop()
+   {
+   if (count($this-_llist) == 0) {
+   throw new RuntimeException(Can't pop from an empty 
datastructure);
+   }
+   return array_pop($this-_llist);
+   }
 
/** @return the element shifted from the beginning of the DLL.
+* @throw RuntimeException If the datastructure is empty.
 */
-   function shift() {/**/}
+   public function shift()
+   {
+   if (count($this-_llist) == 0) {
+   throw new RuntimeException(Can't shift from an empty 
datastructure);
+   }
+   return array_shift($this-_llist);
+   }
 
/** Pushes an element to the end of the DLL.
 * @param 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/spl spl_observer.c

2008-01-27 Thread Marcus Boerger
helly   Sun Jan 27 15:23:14 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/splspl_observer.c 
  Log:
  - Minor rearrange and fix potential issue with double adding
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_observer.c?r1=1.2.2.6.2.3.2.4r2=1.2.2.6.2.3.2.5diff_format=u
Index: php-src/ext/spl/spl_observer.c
diff -u php-src/ext/spl/spl_observer.c:1.2.2.6.2.3.2.4 
php-src/ext/spl/spl_observer.c:1.2.2.6.2.3.2.5
--- php-src/ext/spl/spl_observer.c:1.2.2.6.2.3.2.4  Mon Dec 31 07:17:14 2007
+++ php-src/ext/spl/spl_observer.c  Sun Jan 27 15:23:14 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_observer.c,v 1.2.2.6.2.3.2.4 2007/12/31 07:17:14 sebastian Exp $ */
+/* $Id: spl_observer.c,v 1.2.2.6.2.3.2.5 2008/01/27 15:23:14 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include config.h
@@ -95,6 +95,11 @@
efree(object);
 } /* }}} */
 
+static void spl_object_storage_dtor(zval **element) /* {{{ */
+{
+   zval_ptr_dtor(element);
+} /* }}} */
+
 static zend_object_value spl_object_storage_new_ex(zend_class_entry 
*class_type, spl_SplObjectStorage **obj, zval *orig TSRMLS_DC) /* {{{ */
 {
zend_object_value retval;
@@ -108,7 +113,7 @@
zend_object_std_init(intern-std, class_type TSRMLS_CC);
zend_hash_copy(intern-std.properties, class_type-default_properties, 
(copy_ctor_func_t) zval_add_ref, (void *) tmp, sizeof(zval *));
 
-   zend_hash_init(intern-storage, 0, NULL, ZVAL_PTR_DTOR, 0);
+   zend_hash_init(intern-storage, 0, NULL, (void (*)(void 
*))spl_object_storage_dtor, 0);
 
retval.handle = zend_objects_store_put(intern, 
(zend_objects_store_dtor_t)zend_objects_destroy_object, 
(zend_objects_free_object_storage_t) spl_SplOjectStorage_free_storage, NULL 
TSRMLS_CC);
retval.handlers = spl_handler_SplObjectStorage;
@@ -161,8 +166,27 @@
 }
 /* }}} */
 
+int spl_object_storage_contains(spl_SplObjectStorage *intern, zval *obj 
TSRMLS_DC) /* {{{ */
+{
+#if HAVE_PACKED_OBJECT_VALUE
+   return zend_hash_exists(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);
+   return zend_hash_exists(intern-storage, (char*)zvalue, 
sizeof(zend_object_value));
+   }
+#endif
+} /* }}} */
+
 void spl_object_storage_attach(spl_SplObjectStorage *intern, zval *obj 
TSRMLS_DC) /* {{{ */
 {
+   if (spl_object_storage_contains(intern, obj TSRMLS_CC)) {
+   return; /* already contained */
+   }
+   Z_ADDREF_P(obj);
 #if HAVE_PACKED_OBJECT_VALUE
zend_hash_update(intern-storage, (char*)Z_OBJVAL_P(obj), 
sizeof(zend_object_value), obj, sizeof(zval*), NULL);  
 #else
@@ -174,10 +198,23 @@
zend_hash_update(intern-storage, (char*)zvalue, 
sizeof(zend_object_value), obj, sizeof(zval*), NULL);
}
 #endif
-
-   Z_ADDREF_P(obj);
 } /* }}} */
 
+void spl_object_storage_detach(spl_SplObjectStorage *intern, zval *obj 
TSRMLS_DC) /* {{{ */
+{
+#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
+} /* }}}*/
+
 /* {{{ proto void SplObjectStorage::attach($obj)
  Attaches an object to the storage if not yet contained */
 SPL_METHOD(SplObjectStorage, attach)
@@ -202,18 +239,7 @@
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, o, obj) == 
FAILURE) {
return;
}
-
-#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
+   spl_object_storage_detach(intern, obj TSRMLS_CC);
 
zend_hash_internal_pointer_reset_ex(intern-storage, intern-pos);
intern-index = 0;
@@ -229,18 +255,7 @@
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, o, obj) == 
FAILURE) {
return;
}
-
-#if HAVE_PACKED_OBJECT_VALUE
-   RETURN_BOOL(zend_hash_exists(intern-storage, (char*)Z_OBJVAL_P(obj), 
sizeof(zend_object_value)));
-#else
-   {
-   zend_object_value zvalue;
-   memset(zvalue, 0, 

[PHP-CVS] cvs: php-src /ext/spl php_spl.c php_spl.h /ext/tidy php_tidy.h tidy.c

2008-01-27 Thread Marcus Boerger
helly   Sun Jan 27 15:03:55 2008 UTC

  Modified files:  
/php-src/ext/splphp_spl.c php_spl.h 
/php-src/ext/tidy   php_tidy.h tidy.c 
  Log:
  - revert over constfying
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/php_spl.c?r1=1.121r2=1.122diff_format=u
Index: php-src/ext/spl/php_spl.c
diff -u php-src/ext/spl/php_spl.c:1.121 php-src/ext/spl/php_spl.c:1.122
--- php-src/ext/spl/php_spl.c:1.121 Fri Jan 25 20:30:36 2008
+++ php-src/ext/spl/php_spl.c   Sun Jan 27 15:03:55 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_spl.c,v 1.121 2008/01/25 20:30:36 nlopess Exp $ */
+/* $Id: php_spl.c,v 1.122 2008/01/27 15:03:55 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -781,7 +781,7 @@
 
 /* {{{ spl_module_entry
  */
-const zend_module_entry spl_module_entry = {
+zend_module_entry spl_module_entry = {
 #ifdef HAVE_SIMPLEXML
STANDARD_MODULE_HEADER_EX, NULL,
spl_deps,
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/php_spl.h?r1=1.25r2=1.26diff_format=u
Index: php-src/ext/spl/php_spl.h
diff -u php-src/ext/spl/php_spl.h:1.25 php-src/ext/spl/php_spl.h:1.26
--- php-src/ext/spl/php_spl.h:1.25  Fri Jan 25 20:30:36 2008
+++ php-src/ext/spl/php_spl.h   Sun Jan 27 15:03:55 2008
@@ -28,7 +28,7 @@
 #define SPL_DEBUG(x)
 #endif
 
-extern const zend_module_entry spl_module_entry;
+extern zend_module_entry spl_module_entry;
 #define phpext_spl_ptr spl_module_entry
 
 #ifdef PHP_WIN32
http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/php_tidy.h?r1=1.37r2=1.38diff_format=u
Index: php-src/ext/tidy/php_tidy.h
diff -u php-src/ext/tidy/php_tidy.h:1.37 php-src/ext/tidy/php_tidy.h:1.38
--- php-src/ext/tidy/php_tidy.h:1.37Fri Jan 25 20:30:36 2008
+++ php-src/ext/tidy/php_tidy.h Sun Jan 27 15:03:55 2008
@@ -16,12 +16,12 @@
   +--+
 */
 
-/* $Id: php_tidy.h,v 1.37 2008/01/25 20:30:36 nlopess Exp $ */
+/* $Id: php_tidy.h,v 1.38 2008/01/27 15:03:55 helly Exp $ */
 
 #ifndef PHP_TIDY_H
 #define PHP_TIDY_H
 
-extern const zend_module_entry tidy_module_entry;
+extern zend_module_entry tidy_module_entry;
 #define phpext_tidy_ptr tidy_module_entry
 
 #define TIDY_METHOD_MAP(name, func_name, arg_types) \
http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/tidy.c?r1=1.119r2=1.120diff_format=u
Index: php-src/ext/tidy/tidy.c
diff -u php-src/ext/tidy/tidy.c:1.119 php-src/ext/tidy/tidy.c:1.120
--- php-src/ext/tidy/tidy.c:1.119   Fri Jan 25 20:30:36 2008
+++ php-src/ext/tidy/tidy.c Sun Jan 27 15:03:55 2008
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: tidy.c,v 1.119 2008/01/25 20:30:36 nlopess Exp $ */
+/* $Id: tidy.c,v 1.120 2008/01/27 15:03:55 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -359,7 +359,7 @@
 static zend_object_handlers tidy_object_handlers_doc;
 static zend_object_handlers tidy_object_handlers_node;
 
-const zend_module_entry tidy_module_entry = {
+zend_module_entry tidy_module_entry = {
STANDARD_MODULE_HEADER,
tidy,
tidy_functions,
@@ -1062,7 +1062,7 @@
php_info_print_table_start();
php_info_print_table_header(2, Tidy support, enabled);
php_info_print_table_row(2, libTidy Release, (char 
*)tidyReleaseDate());
-   php_info_print_table_row(2, Extension Version, 
PHP_TIDY_MODULE_VERSION  ($Id: tidy.c,v 1.119 2008/01/25 20:30:36 nlopess Exp 
$));
+   php_info_print_table_row(2, Extension Version, 
PHP_TIDY_MODULE_VERSION  ($Id: tidy.c,v 1.120 2008/01/27 15:03:55 helly Exp 
$));
php_info_print_table_end();
 
DISPLAY_INI_ENTRIES();

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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/spl php_spl.c php_spl.h /ext/tidy php_tidy.h tidy.c

2008-01-27 Thread Marcus Boerger
helly   Sun Jan 27 15:04:41 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/splphp_spl.c php_spl.h 
/php-src/ext/tidy   php_tidy.h tidy.c 
  Log:
  - MFH revert over constfying
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/php_spl.c?r1=1.52.2.28.2.17.2.8r2=1.52.2.28.2.17.2.9diff_format=u
Index: php-src/ext/spl/php_spl.c
diff -u php-src/ext/spl/php_spl.c:1.52.2.28.2.17.2.8 
php-src/ext/spl/php_spl.c:1.52.2.28.2.17.2.9
--- php-src/ext/spl/php_spl.c:1.52.2.28.2.17.2.8Fri Jan 25 20:29:48 2008
+++ php-src/ext/spl/php_spl.c   Sun Jan 27 15:04:41 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_spl.c,v 1.52.2.28.2.17.2.8 2008/01/25 20:29:48 nlopess Exp $ */
+/* $Id: php_spl.c,v 1.52.2.28.2.17.2.9 2008/01/27 15:04:41 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -764,7 +764,7 @@
 
 /* {{{ spl_module_entry
  */
-const zend_module_entry spl_module_entry = {
+zend_module_entry spl_module_entry = {
 #ifdef HAVE_SIMPLEXML
STANDARD_MODULE_HEADER_EX, NULL,
spl_deps,
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/php_spl.h?r1=1.17.2.1.2.3.2.3r2=1.17.2.1.2.3.2.4diff_format=u
Index: php-src/ext/spl/php_spl.h
diff -u php-src/ext/spl/php_spl.h:1.17.2.1.2.3.2.3 
php-src/ext/spl/php_spl.h:1.17.2.1.2.3.2.4
--- php-src/ext/spl/php_spl.h:1.17.2.1.2.3.2.3  Fri Jan 25 20:29:48 2008
+++ php-src/ext/spl/php_spl.h   Sun Jan 27 15:04:41 2008
@@ -28,7 +28,7 @@
 #define SPL_DEBUG(x)
 #endif
 
-extern const zend_module_entry spl_module_entry;
+extern zend_module_entry spl_module_entry;
 #define phpext_spl_ptr spl_module_entry
 
 #ifdef PHP_WIN32
http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/php_tidy.h?r1=1.26.2.1.2.5.2.2r2=1.26.2.1.2.5.2.3diff_format=u
Index: php-src/ext/tidy/php_tidy.h
diff -u php-src/ext/tidy/php_tidy.h:1.26.2.1.2.5.2.2 
php-src/ext/tidy/php_tidy.h:1.26.2.1.2.5.2.3
--- php-src/ext/tidy/php_tidy.h:1.26.2.1.2.5.2.2Fri Jan 25 20:29:48 2008
+++ php-src/ext/tidy/php_tidy.h Sun Jan 27 15:04:41 2008
@@ -16,12 +16,12 @@
   +--+
 */
 
-/* $Id: php_tidy.h,v 1.26.2.1.2.5.2.2 2008/01/25 20:29:48 nlopess Exp $ */
+/* $Id: php_tidy.h,v 1.26.2.1.2.5.2.3 2008/01/27 15:04:41 helly Exp $ */
 
 #ifndef PHP_TIDY_H
 #define PHP_TIDY_H
 
-extern const zend_module_entry tidy_module_entry;
+extern zend_module_entry tidy_module_entry;
 #define phpext_tidy_ptr tidy_module_entry
 
 #define TIDY_METHOD_MAP(name, func_name, arg_types) \
http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/tidy.c?r1=1.66.2.8.2.24.2.4r2=1.66.2.8.2.24.2.5diff_format=u
Index: php-src/ext/tidy/tidy.c
diff -u php-src/ext/tidy/tidy.c:1.66.2.8.2.24.2.4 
php-src/ext/tidy/tidy.c:1.66.2.8.2.24.2.5
--- php-src/ext/tidy/tidy.c:1.66.2.8.2.24.2.4   Fri Jan 25 20:29:48 2008
+++ php-src/ext/tidy/tidy.c Sun Jan 27 15:04:41 2008
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: tidy.c,v 1.66.2.8.2.24.2.4 2008/01/25 20:29:48 nlopess Exp $ */
+/* $Id: tidy.c,v 1.66.2.8.2.24.2.5 2008/01/27 15:04:41 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -351,7 +351,7 @@
 static zend_object_handlers tidy_object_handlers_doc;
 static zend_object_handlers tidy_object_handlers_node;
 
-const zend_module_entry tidy_module_entry = {
+zend_module_entry tidy_module_entry = {
STANDARD_MODULE_HEADER,
tidy,
tidy_functions,
@@ -998,7 +998,7 @@
php_info_print_table_start();
php_info_print_table_header(2, Tidy support, enabled);
php_info_print_table_row(2, libTidy Release, (char 
*)tidyReleaseDate());
-   php_info_print_table_row(2, Extension Version, 
PHP_TIDY_MODULE_VERSION  ($Id: tidy.c,v 1.66.2.8.2.24.2.4 2008/01/25 20:29:48 
nlopess Exp $));
+   php_info_print_table_row(2, Extension Version, 
PHP_TIDY_MODULE_VERSION  ($Id: tidy.c,v 1.66.2.8.2.24.2.5 2008/01/27 15:04:41 
helly Exp $));
php_info_print_table_end();
 
DISPLAY_INI_ENTRIES();

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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/strings moneyformat.phpt setlocale_basic1.phpt setlocale_basic2.phpt setlocale_basic3.phpt setlocale_variation1.phpt setlocale_variation3.phpt setlo

2008-01-27 Thread Nuno Lopes
nlopess Sun Jan 27 16:45:43 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard/tests/strings moneyformat.phpt 
setlocale_basic1.phpt 
setlocale_basic2.phpt 
setlocale_basic3.phpt 
setlocale_variation1.phpt 
setlocale_variation3.phpt 
setlocale_variation4.phpt 
setlocale_variation5.phpt 
  Log:
  fix a bunch of SKIPIF (check for non available locales)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/moneyformat.phpt?r1=1.1.2.2r2=1.1.2.2.2.1diff_format=u
Index: php-src/ext/standard/tests/strings/moneyformat.phpt
diff -u php-src/ext/standard/tests/strings/moneyformat.phpt:1.1.2.2 
php-src/ext/standard/tests/strings/moneyformat.phpt:1.1.2.2.2.1
--- php-src/ext/standard/tests/strings/moneyformat.phpt:1.1.2.2 Wed Jun  6 
17:46:17 2007
+++ php-src/ext/standard/tests/strings/moneyformat.phpt Sun Jan 27 16:45:43 2008
@@ -5,6 +5,10 @@
if (!function_exists('money_format') || !function_exists('setlocale')) {
die(SKIP money_format - not supported\n);
}
+
+if (setlocale(LC_MONETARY, 'en_US') == false) {
+   die('skip en_US locale not available');
+}
 ?
 --FILE--
 ?php
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/setlocale_basic1.phpt?r1=1.1.4.3r2=1.1.4.4diff_format=u
Index: php-src/ext/standard/tests/strings/setlocale_basic1.phpt
diff -u php-src/ext/standard/tests/strings/setlocale_basic1.phpt:1.1.4.3 
php-src/ext/standard/tests/strings/setlocale_basic1.phpt:1.1.4.4
--- php-src/ext/standard/tests/strings/setlocale_basic1.phpt:1.1.4.3Wed Dec 
19 10:39:10 2007
+++ php-src/ext/standard/tests/strings/setlocale_basic1.phptSun Jan 27 
16:45:43 2008
@@ -5,6 +5,9 @@
 if (substr(PHP_OS, 0, 3) == 'WIN') {
 die('skip Not valid for windows');
 }
+if (setlocale(LC_ALL, en_US.utf8, en_AU.utf8, ko_KR.utf8, zh_CN.utf8, 
de_DE.utf8, es_EC.utf8, fr_FR.utf8, ja_JP.utf8, el_GR.utf8, 
nl_NL.utf8) === false) {
+die('skip available locales not usable');
+}
 ?
 --FILE--
 ?php
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/setlocale_basic2.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u
Index: php-src/ext/standard/tests/strings/setlocale_basic2.phpt
diff -u php-src/ext/standard/tests/strings/setlocale_basic2.phpt:1.1.4.2 
php-src/ext/standard/tests/strings/setlocale_basic2.phpt:1.1.4.3
--- php-src/ext/standard/tests/strings/setlocale_basic2.phpt:1.1.4.2Fri Oct 
 5 19:32:28 2007
+++ php-src/ext/standard/tests/strings/setlocale_basic2.phptSun Jan 27 
16:45:43 2008
@@ -5,6 +5,9 @@
 if (substr(PHP_OS, 0, 3) == 'WIN') {
 die('skip Not valid for windows');
 }
+if (setlocale(LC_ALL, en_US.utf8, en_AU.utf8, ko_KR.utf8, zh_CN.utf8, 
de_DE.utf8, es_EC.utf8, fr_FR.utf8, ja_JP.utf8, el_GR.utf8, 
nl_NL.utf8) === false) {
+die('skip available locales not usable');
+}
 ?
 --FILE--
 ?php
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/setlocale_basic3.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u
Index: php-src/ext/standard/tests/strings/setlocale_basic3.phpt
diff -u php-src/ext/standard/tests/strings/setlocale_basic3.phpt:1.1.4.2 
php-src/ext/standard/tests/strings/setlocale_basic3.phpt:1.1.4.3
--- php-src/ext/standard/tests/strings/setlocale_basic3.phpt:1.1.4.2Fri Oct 
 5 19:32:28 2007
+++ php-src/ext/standard/tests/strings/setlocale_basic3.phptSun Jan 27 
16:45:43 2008
@@ -5,6 +5,9 @@
 if (substr(PHP_OS, 0, 3) == 'WIN') {
 die('skip Not valid for windows');
 }
+if (setlocale(LC_ALL, en_US.utf8, Ko_KR.utf8, zh_CN.utf8) === false) {
+die('skip en_US.utf8/Ko_KR.utf8/zh_CN.utf8 locales not available');
+}
 ?
 --FILE--
 ?php
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/setlocale_variation1.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u
Index: php-src/ext/standard/tests/strings/setlocale_variation1.phpt
diff -u php-src/ext/standard/tests/strings/setlocale_variation1.phpt:1.1.4.2 
php-src/ext/standard/tests/strings/setlocale_variation1.phpt:1.1.4.3
--- php-src/ext/standard/tests/strings/setlocale_variation1.phpt:1.1.4.2
Fri Oct  5 19:32:28 2007
+++ php-src/ext/standard/tests/strings/setlocale_variation1.phptSun Jan 
27 16:45:43 2008
@@ -5,6 +5,9 @@
 if (substr(PHP_OS, 0, 3) == 'WIN') {
 die('skip Not valid for windows');
 }
+if (setlocale(LC_ALL, en_US.utf8, Ko_KR.utf8, zh_CN.utf8) === false) {
+die('skip en_US.utf8/Ko_KR.utf8/zh_CN.utf8 locales not available');
+}
 ?
 --FILE--
 ?php
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/setlocale_variation3.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u
Index: php-src/ext/standard/tests/strings/setlocale_variation3.phpt
diff -u php-src/ext/standard/tests/strings/setlocale_variation3.phpt:1.1.4.2 

[PHP-CVS] cvs: php-src /ext/standard/tests/strings moneyformat.phpt

2008-01-27 Thread Nuno Lopes
nlopess Sun Jan 27 16:54:02 2008 UTC

  Modified files:  
/php-src/ext/standard/tests/strings moneyformat.phpt 
  Log:
  be more strict in the skipif
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/moneyformat.phpt?r1=1.5r2=1.6diff_format=u
Index: php-src/ext/standard/tests/strings/moneyformat.phpt
diff -u php-src/ext/standard/tests/strings/moneyformat.phpt:1.5 
php-src/ext/standard/tests/strings/moneyformat.phpt:1.6
--- php-src/ext/standard/tests/strings/moneyformat.phpt:1.5 Sun Jan 27 
16:52:34 2008
+++ php-src/ext/standard/tests/strings/moneyformat.phpt Sun Jan 27 16:54:02 2008
@@ -6,7 +6,7 @@
die(SKIP money_format - not supported\n);
}
 
-if (setlocale(LC_MONETARY, 'en_US') == false) {
+if (setlocale(LC_MONETARY, 'en_US') === false) {
die('skip en_US locale not available');
 }
 ?

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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/strings moneyformat.phpt

2008-01-27 Thread Nuno Lopes
nlopess Sun Jan 27 16:54:22 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard/tests/strings moneyformat.phpt 
  Log:
  be more strict in the skipif
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/moneyformat.phpt?r1=1.1.2.2.2.1r2=1.1.2.2.2.2diff_format=u
Index: php-src/ext/standard/tests/strings/moneyformat.phpt
diff -u php-src/ext/standard/tests/strings/moneyformat.phpt:1.1.2.2.2.1 
php-src/ext/standard/tests/strings/moneyformat.phpt:1.1.2.2.2.2
--- php-src/ext/standard/tests/strings/moneyformat.phpt:1.1.2.2.2.1 Sun Jan 
27 16:45:43 2008
+++ php-src/ext/standard/tests/strings/moneyformat.phpt Sun Jan 27 16:54:22 2008
@@ -6,7 +6,7 @@
die(SKIP money_format - not supported\n);
}
 
-if (setlocale(LC_MONETARY, 'en_US') == false) {
+if (setlocale(LC_MONETARY, 'en_US') === false) {
die('skip en_US locale not available');
 }
 ?

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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/shmop shmop.c

2008-01-27 Thread Ilia Alshanetsky
iliaa   Sun Jan 27 17:00:37 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/shmop  shmop.c 
  Log:
  
  WS
  
http://cvs.php.net/viewvc.cgi/php-src/ext/shmop/shmop.c?r1=1.31.2.2.2.5.2.2r2=1.31.2.2.2.5.2.3diff_format=u
Index: php-src/ext/shmop/shmop.c
diff -u php-src/ext/shmop/shmop.c:1.31.2.2.2.5.2.2 
php-src/ext/shmop/shmop.c:1.31.2.2.2.5.2.3
--- php-src/ext/shmop/shmop.c:1.31.2.2.2.5.2.2  Mon Dec 31 07:17:13 2007
+++ php-src/ext/shmop/shmop.c   Sun Jan 27 17:00:37 2008
@@ -16,7 +16,7 @@
|  Ilia Alshanetsky [EMAIL PROTECTED] |
+--+
  */
-/* $Id: shmop.c,v 1.31.2.2.2.5.2.2 2007/12/31 07:17:13 sebastian Exp $ */
+/* $Id: shmop.c,v 1.31.2.2.2.5.2.3 2008/01/27 17:00:37 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -69,7 +69,7 @@
NULL,
NULL,
PHP_MINFO(shmop),
-NO_VERSION_YET,
+   NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
 };
 /* }}} */

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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date/tests bug43003.phpt

2008-01-27 Thread Nuno Lopes
nlopess Sun Jan 27 17:01:11 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/date/tests bug43003.phpt 
  Log:
  fix test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/bug43003.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/date/tests/bug43003.phpt
diff -u php-src/ext/date/tests/bug43003.phpt:1.1.2.2 
php-src/ext/date/tests/bug43003.phpt:1.1.2.3
--- php-src/ext/date/tests/bug43003.phpt:1.1.2.2Thu Jan 17 19:59:00 2008
+++ php-src/ext/date/tests/bug43003.phptSun Jan 27 17:01:11 2008
@@ -2,6 +2,8 @@
 Bug #43003 (Invalid timezone reported for DateTime objects constructed using a 
timestamp)
 --FILE--
 ?php
+date_default_timezone_set('Europe/Oslo');
+
 $oDateTest = new DateTime(@0, new DateTimeZone(date_default_timezone_get()));
 echo $oDateTest-getTimezone()-getName().:  .  $oDateTest-format(Y-m-d 
H:i:s).\n;
 

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



[PHP-CVS] cvs: php-src /ext/date/tests bug43003.phpt

2008-01-27 Thread Nuno Lopes
nlopess Sun Jan 27 17:02:01 2008 UTC

  Modified files:  
/php-src/ext/date/tests bug43003.phpt 
  Log:
  fix test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/bug43003.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/date/tests/bug43003.phpt
diff -u php-src/ext/date/tests/bug43003.phpt:1.1 
php-src/ext/date/tests/bug43003.phpt:1.2
--- php-src/ext/date/tests/bug43003.phpt:1.1Thu Jan 17 19:58:24 2008
+++ php-src/ext/date/tests/bug43003.phptSun Jan 27 17:02:01 2008
@@ -2,6 +2,8 @@
 Bug #43003 (Invalid timezone reported for DateTime objects constructed using a 
timestamp)
 --FILE--
 ?php
+date_default_timezone_set('Europe/Oslo');
+
 $oDateTest = new DateTime(@0, new DateTimeZone(date_default_timezone_get()));
 echo $oDateTest-getTimezone()-getName().:  .  $oDateTest-format(Y-m-d 
H:i:s).\n;
 

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



[PHP-CVS] cvs: php-src /ext/standard/tests/strings moneyformat.phpt setlocale_basic1.phpt setlocale_basic2.phpt setlocale_basic3.phpt setlocale_variation1.phpt setlocale_variation3.phpt setlocale_vari

2008-01-27 Thread Nuno Lopes
nlopess Sun Jan 27 16:52:34 2008 UTC

  Modified files:  
/php-src/ext/standard/tests/strings moneyformat.phpt 
setlocale_basic1.phpt 
setlocale_basic2.phpt 
setlocale_basic3.phpt 
setlocale_variation1.phpt 
setlocale_variation3.phpt 
setlocale_variation4.phpt 
setlocale_variation5.phpt 
  Log:
  MFB: fix skipifs
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/moneyformat.phpt?r1=1.4r2=1.5diff_format=u
Index: php-src/ext/standard/tests/strings/moneyformat.phpt
diff -u php-src/ext/standard/tests/strings/moneyformat.phpt:1.4 
php-src/ext/standard/tests/strings/moneyformat.phpt:1.5
--- php-src/ext/standard/tests/strings/moneyformat.phpt:1.4 Mon Oct  1 
12:01:28 2007
+++ php-src/ext/standard/tests/strings/moneyformat.phpt Sun Jan 27 16:52:34 2008
@@ -5,6 +5,10 @@
if (!function_exists('money_format') || !function_exists('setlocale')) {
die(SKIP money_format - not supported\n);
}
+
+if (setlocale(LC_MONETARY, 'en_US') == false) {
+   die('skip en_US locale not available');
+}
 ?
 --FILE--
 ?php
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/setlocale_basic1.phpt?r1=1.3r2=1.4diff_format=u
Index: php-src/ext/standard/tests/strings/setlocale_basic1.phpt
diff -u php-src/ext/standard/tests/strings/setlocale_basic1.phpt:1.3 
php-src/ext/standard/tests/strings/setlocale_basic1.phpt:1.4
--- php-src/ext/standard/tests/strings/setlocale_basic1.phpt:1.3Wed Dec 
19 10:37:42 2007
+++ php-src/ext/standard/tests/strings/setlocale_basic1.phptSun Jan 27 
16:52:34 2008
@@ -7,6 +7,9 @@
 
 if( ini_get(unicode.semantics) == 1)
   die('skip do not run when unicode on');
+
+if (setlocale(LC_ALL, en_US.utf8, en_AU.utf8, ko_KR.utf8, zh_CN.utf8, 
de_DE.utf8, es_EC.utf8, fr_FR.utf8, ja_JP.utf8, el_GR.utf8, 
nl_NL.utf8) === false)
+  die('skip available locales not usable');
 ?
 --FILE--
 ?php
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/setlocale_basic2.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/strings/setlocale_basic2.phpt
diff -u php-src/ext/standard/tests/strings/setlocale_basic2.phpt:1.2 
php-src/ext/standard/tests/strings/setlocale_basic2.phpt:1.3
--- php-src/ext/standard/tests/strings/setlocale_basic2.phpt:1.2Fri Oct 
 5 19:35:45 2007
+++ php-src/ext/standard/tests/strings/setlocale_basic2.phptSun Jan 27 
16:52:34 2008
@@ -6,6 +6,8 @@
   die('skip Not valid for windows');
 if(ini_get(unicode.semantics) == 1)
   die('skip do not run when unicode on');
+if (setlocale(LC_ALL, en_US.utf8, en_AU.utf8, ko_KR.utf8, zh_CN.utf8, 
de_DE.utf8, es_EC.utf8, fr_FR.utf8, ja_JP.utf8, el_GR.utf8, 
nl_NL.utf8) === false)
+  die('skip available locales not usable');
 ?
 --FILE--
 ?php
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/setlocale_basic3.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/strings/setlocale_basic3.phpt
diff -u php-src/ext/standard/tests/strings/setlocale_basic3.phpt:1.2 
php-src/ext/standard/tests/strings/setlocale_basic3.phpt:1.3
--- php-src/ext/standard/tests/strings/setlocale_basic3.phpt:1.2Fri Oct 
 5 19:35:45 2007
+++ php-src/ext/standard/tests/strings/setlocale_basic3.phptSun Jan 27 
16:52:34 2008
@@ -6,6 +6,8 @@
   die('skip Not valid for windows');
 if(ini_get(unicode.semantics) == 1)
   die('skip do not run when unicode on');
+if (setlocale(LC_ALL, en_US.utf8, Ko_KR.utf8, zh_CN.utf8) === false)
+  die('skip en_US.utf8/Ko_KR.utf8/zh_CN.utf8 locales not available');
 ?
 --FILE--
 ?php
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/setlocale_variation1.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/strings/setlocale_variation1.phpt
diff -u php-src/ext/standard/tests/strings/setlocale_variation1.phpt:1.2 
php-src/ext/standard/tests/strings/setlocale_variation1.phpt:1.3
--- php-src/ext/standard/tests/strings/setlocale_variation1.phpt:1.2Fri Oct 
 5 19:35:45 2007
+++ php-src/ext/standard/tests/strings/setlocale_variation1.phptSun Jan 
27 16:52:34 2008
@@ -6,6 +6,8 @@
   die('skip Not valid for windows');
 if(ini_get(unicode.semantics) == 1)
   die('skip do not run when unicode on');
+if (setlocale(LC_ALL, en_US.utf8, Ko_KR.utf8, zh_CN.utf8) === false)
+  die('skip en_US.utf8/Ko_KR.utf8/zh_CN.utf8 locales not available');
 ?
 --FILE--
 ?php
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/setlocale_variation3.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/strings/setlocale_variation3.phpt
diff -u php-src/ext/standard/tests/strings/setlocale_variation3.phpt:1.2 
php-src/ext/standard/tests/strings/setlocale_variation3.phpt:1.3
--- 

Re: [PHP-CVS] cvs: php-src /ext/spl php_spl.c php_spl.h /ext/tidy php_tidy.h tidy.c

2008-01-27 Thread Nuno Lopes
Thank you for reverting this. It seems that the Zend engine really requires 
right access to these structures. The engine needs fixing first.

Thanks,
Nuno

- Original Message - 
From: Marcus Boerger [EMAIL PROTECTED]

To: php-cvs@lists.php.net
Sent: Sunday, January 27, 2008 3:03 PM
Subject: [PHP-CVS] cvs: php-src /ext/spl php_spl.c php_spl.h /ext/tidy 
php_tidy.h tidy.c




helly Sun Jan 27 15:03:55 2008 UTC

 Modified files:
   /php-src/ext/spl php_spl.c php_spl.h
   /php-src/ext/tidy php_tidy.h tidy.c
 Log:
 - revert over constfying

http://cvs.php.net/viewvc.cgi/php-src/ext/spl/php_spl.c?r1=1.121r2=1.122diff_format=u
Index: php-src/ext/spl/php_spl.c
diff -u php-src/ext/spl/php_spl.c:1.121 php-src/ext/spl/php_spl.c:1.122
--- php-src/ext/spl/php_spl.c:1.121 Fri Jan 25 20:30:36 2008
+++ php-src/ext/spl/php_spl.c Sun Jan 27 15:03:55 2008
@@ -16,7 +16,7 @@

+--+
 */

-/* $Id: php_spl.c,v 1.121 2008/01/25 20:30:36 nlopess Exp $ */
+/* $Id: php_spl.c,v 1.122 2008/01/27 15:03:55 helly Exp $ */

#ifdef HAVE_CONFIG_H
#include config.h
@@ -781,7 +781,7 @@

/* {{{ spl_module_entry
 */
-const zend_module_entry spl_module_entry = {
+zend_module_entry spl_module_entry = {
#ifdef HAVE_SIMPLEXML
 STANDARD_MODULE_HEADER_EX, NULL,
 spl_deps,
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/php_spl.h?r1=1.25r2=1.26diff_format=u
Index: php-src/ext/spl/php_spl.h
diff -u php-src/ext/spl/php_spl.h:1.25 php-src/ext/spl/php_spl.h:1.26
--- php-src/ext/spl/php_spl.h:1.25 Fri Jan 25 20:30:36 2008
+++ php-src/ext/spl/php_spl.h Sun Jan 27 15:03:55 2008
@@ -28,7 +28,7 @@
#define SPL_DEBUG(x)
#endif

-extern const zend_module_entry spl_module_entry;
+extern zend_module_entry spl_module_entry;
#define phpext_spl_ptr spl_module_entry

#ifdef PHP_WIN32
http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/php_tidy.h?r1=1.37r2=1.38diff_format=u
Index: php-src/ext/tidy/php_tidy.h
diff -u php-src/ext/tidy/php_tidy.h:1.37 php-src/ext/tidy/php_tidy.h:1.38
--- php-src/ext/tidy/php_tidy.h:1.37 Fri Jan 25 20:30:36 2008
+++ php-src/ext/tidy/php_tidy.h Sun Jan 27 15:03:55 2008
@@ -16,12 +16,12 @@
  +--+
*/

-/* $Id: php_tidy.h,v 1.37 2008/01/25 20:30:36 nlopess Exp $ */
+/* $Id: php_tidy.h,v 1.38 2008/01/27 15:03:55 helly Exp $ */

#ifndef PHP_TIDY_H
#define PHP_TIDY_H

-extern const zend_module_entry tidy_module_entry;
+extern zend_module_entry tidy_module_entry;
#define phpext_tidy_ptr tidy_module_entry

#define TIDY_METHOD_MAP(name, func_name, arg_types) \
http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/tidy.c?r1=1.119r2=1.120diff_format=u
Index: php-src/ext/tidy/tidy.c
diff -u php-src/ext/tidy/tidy.c:1.119 php-src/ext/tidy/tidy.c:1.120
--- php-src/ext/tidy/tidy.c:1.119 Fri Jan 25 20:30:36 2008
+++ php-src/ext/tidy/tidy.c Sun Jan 27 15:03:55 2008
@@ -16,7 +16,7 @@
  +--+
*/

-/* $Id: tidy.c,v 1.119 2008/01/25 20:30:36 nlopess Exp $ */
+/* $Id: tidy.c,v 1.120 2008/01/27 15:03:55 helly Exp $ */

#ifdef HAVE_CONFIG_H
#include config.h
@@ -359,7 +359,7 @@
static zend_object_handlers tidy_object_handlers_doc;
static zend_object_handlers tidy_object_handlers_node;

-const zend_module_entry tidy_module_entry = {
+zend_module_entry tidy_module_entry = {
 STANDARD_MODULE_HEADER,
 tidy,
 tidy_functions,
@@ -1062,7 +1062,7 @@
 php_info_print_table_start();
 php_info_print_table_header(2, Tidy support, enabled);
 php_info_print_table_row(2, libTidy Release, (char 
*)tidyReleaseDate());
- php_info_print_table_row(2, Extension Version, PHP_TIDY_MODULE_VERSION 
 ($Id: tidy.c,v 1.119 2008/01/25 20:30:36 nlopess Exp $));
+ php_info_print_table_row(2, Extension Version, PHP_TIDY_MODULE_VERSION 
 ($Id: tidy.c,v 1.120 2008/01/27 15:03:55 helly Exp $));

 php_info_print_table_end();

 DISPLAY_INI_ENTRIES();

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


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



[PHP-CVS] cvs: php-src /ext/date php_date.c /ext/date/tests timezones-list.phpt

2008-01-27 Thread Derick Rethans
derick  Sun Jan 27 17:28:58 2008 UTC

  Added files: 
/php-src/ext/date/tests timezones-list.phpt 

  Modified files:  
/php-src/ext/date   php_date.c 
  Log:
  - Added support for selectively listing timezone identifiers through
timezone_identifiers_list() / DateTimezone::listIdentifiers().
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.157r2=1.158diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.157 php-src/ext/date/php_date.c:1.158
--- php-src/ext/date/php_date.c:1.157   Wed Jan 23 15:14:18 2008
+++ php-src/ext/date/php_date.c Sun Jan 27 17:28:57 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.157 2008/01/23 15:14:18 tony2001 Exp $ */
+/* $Id: php_date.c,v 1.158 2008/01/27 17:28:57 derick Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -1627,6 +1627,19 @@
 }
 /* }}} */
 
+#define PHP_DATE_TIMEZONE_GROUP_AMERICA0x0001
+#define PHP_DATE_TIMEZONE_GROUP_ANTARCTICA 0x0002
+#define PHP_DATE_TIMEZONE_GROUP_ARCTIC 0x0004
+#define PHP_DATE_TIMEZONE_GROUP_ASIA   0x0008
+#define PHP_DATE_TIMEZONE_GROUP_ATLANTIC   0x0010
+#define PHP_DATE_TIMEZONE_GROUP_AUSTRALIA  0x0020
+#define PHP_DATE_TIMEZONE_GROUP_EUROPE 0x0040
+#define PHP_DATE_TIMEZONE_GROUP_INDIAN 0x0080
+#define PHP_DATE_TIMEZONE_GROUP_PACIFIC0x0100
+#define PHP_DATE_TIMEZONE_GROUP_UTC0x0200
+#define PHP_DATE_TIMEZONE_GROUP_ALL0x03FF
+#define PHP_DATE_TIMEZONE_GROUP_ALL_W_BC   0x07FF
+
 static void date_register_classes(TSRMLS_D)
 {
zend_class_entry ce_date, ce_timezone;
@@ -1659,6 +1672,22 @@
date_ce_timezone = zend_register_internal_class_ex(ce_timezone, NULL, 
NULL TSRMLS_CC);
memcpy(date_object_handlers_timezone, zend_get_std_object_handlers(), 
sizeof(zend_object_handlers));
date_object_handlers_timezone.clone_obj = date_object_clone_timezone;
+
+#define REGISTER_TIMEZONE_CLASS_CONST_STRING(const_name, value) \
+   zend_declare_class_constant_long(date_ce_timezone, const_name, 
sizeof(const_name)-1, value TSRMLS_CC);
+
+   REGISTER_TIMEZONE_CLASS_CONST_STRING(AMERICA, 
PHP_DATE_TIMEZONE_GROUP_AMERICA);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING(ANTARCTICA,  
PHP_DATE_TIMEZONE_GROUP_ANTARCTICA);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING(ARCTIC,  
PHP_DATE_TIMEZONE_GROUP_ARCTIC);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING(ASIA,
PHP_DATE_TIMEZONE_GROUP_ASIA);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING(ATLANTIC,
PHP_DATE_TIMEZONE_GROUP_ATLANTIC);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING(AUSTRALIA,   
PHP_DATE_TIMEZONE_GROUP_AUSTRALIA);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING(EUROPE,  
PHP_DATE_TIMEZONE_GROUP_EUROPE);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING(INDIAN,  
PHP_DATE_TIMEZONE_GROUP_INDIAN);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING(PACIFIC, 
PHP_DATE_TIMEZONE_GROUP_PACIFIC);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING(UTC, 
PHP_DATE_TIMEZONE_GROUP_UTC);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING(ALL, 
PHP_DATE_TIMEZONE_GROUP_ALL);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING(ALL_WITH_BC, 
PHP_DATE_TIMEZONE_GROUP_ALL_W_BC);
 }
 
 static inline zend_object_value date_object_new_date_ex(zend_class_entry 
*class_type, php_date_obj **ptr TSRMLS_DC)
@@ -2585,6 +2614,21 @@
 }
 /* }}} */
 
+static int check_id_allowed(char *id, long what)
+{
+   if (what  PHP_DATE_TIMEZONE_GROUP_AMERICA strncasecmp(id, 
America/, 8) == 0) return 1;
+   if (what  PHP_DATE_TIMEZONE_GROUP_ANTARCTICA  strncasecmp(id, 
Antarctica/, 11) == 0) return 1;
+   if (what  PHP_DATE_TIMEZONE_GROUP_ARCTIC  strncasecmp(id, 
Arctic/,  7) == 0) return 1;
+   if (what  PHP_DATE_TIMEZONE_GROUP_ASIAstrncasecmp(id, 
Asia/,5) == 0) return 1;
+   if (what  PHP_DATE_TIMEZONE_GROUP_ATLANTICstrncasecmp(id, 
Atlantic/,9) == 0) return 1;
+   if (what  PHP_DATE_TIMEZONE_GROUP_AUSTRALIA   strncasecmp(id, 
Australia/,  10) == 0) return 1;
+   if (what  PHP_DATE_TIMEZONE_GROUP_EUROPE  strncasecmp(id, 
Europe/,  7) == 0) return 1;
+   if (what  PHP_DATE_TIMEZONE_GROUP_INDIAN  strncasecmp(id, 
Indian/,  7) == 0) return 1;
+   if (what  PHP_DATE_TIMEZONE_GROUP_PACIFIC strncasecmp(id, 
Pacific/, 8) == 0) return 1;
+   if (what  PHP_DATE_TIMEZONE_GROUP_UTC strncasecmp(id, UTC, 
 3) == 0) return 1;
+   return 0;
+}
+
 /* {{{ proto array timezone_identifiers_list()
Returns numerically index array with all timezone identifiers.
 */
@@ -2593,6 +2637,11 @@
const timelib_tzdb *tzdb;
const timelib_tzdb_index_entry *table;
int i, item_count;
+   longwhat = PHP_DATE_TIMEZONE_GROUP_ALL;
+
+   if (zend_parse_parameters(ZEND_NUM_ARGS() 

[PHP-CVS] cvs: php-src /ext/date php_date.c

2008-01-27 Thread Derick Rethans
derick  Sun Jan 27 17:44:16 2008 UTC

  Modified files:  
/php-src/ext/date   php_date.c 
  Log:
  - Update proto.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.158r2=1.159diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.158 php-src/ext/date/php_date.c:1.159
--- php-src/ext/date/php_date.c:1.158   Sun Jan 27 17:28:57 2008
+++ php-src/ext/date/php_date.c Sun Jan 27 17:44:16 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.158 2008/01/27 17:28:57 derick Exp $ */
+/* $Id: php_date.c,v 1.159 2008/01/27 17:44:16 derick Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -2629,7 +2629,7 @@
return 0;
 }
 
-/* {{{ proto array timezone_identifiers_list()
+/* {{{ proto array timezone_identifiers_list([long what])
Returns numerically index array with all timezone identifiers.
 */
 PHP_FUNCTION(timezone_identifiers_list)

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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date php_date.c

2008-01-27 Thread Derick Rethans
derick  Sun Jan 27 17:44:29 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/date   php_date.c 
  Log:
  - MFH: Update proto
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.51.2.12r2=1.43.2.45.2.51.2.13diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.51.2.12 
php-src/ext/date/php_date.c:1.43.2.45.2.51.2.13
--- php-src/ext/date/php_date.c:1.43.2.45.2.51.2.12 Sun Jan 27 17:29:14 2008
+++ php-src/ext/date/php_date.c Sun Jan 27 17:44:29 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.51.2.12 2008/01/27 17:29:14 derick Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.51.2.13 2008/01/27 17:44:29 derick Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -2467,7 +2467,7 @@
return 0;
 }
 
-/* {{{ proto array timezone_identifiers_list()
+/* {{{ proto array timezone_identifiers_list([long what])
Returns numerically index array with all timezone identifiers.
 */
 PHP_FUNCTION(timezone_identifiers_list)

-- 
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 php_spl.c php_spl.h /ext/tidy php_tidy.h tidy.c

2008-01-27 Thread Marcus Boerger
Hello Nuno,

  it writes the module number in the structure. We could have the macros
create a static non const int that receives the module number and reference
that from the struct via a pointer, which would be compatible to the struct
being static const then.

marcus

Sunday, January 27, 2008, 6:08:47 PM, you wrote:

 Thank you for reverting this. It seems that the Zend engine really requires 
 right access to these structures. The engine needs fixing first.
 Thanks,
 Nuno

 - Original Message - 
 From: Marcus Boerger [EMAIL PROTECTED]
 To: php-cvs@lists.php.net
 Sent: Sunday, January 27, 2008 3:03 PM
 Subject: [PHP-CVS] cvs: php-src /ext/spl php_spl.c php_spl.h /ext/tidy 
 php_tidy.h tidy.c


 helly Sun Jan 27 15:03:55 2008 UTC

  Modified files:
/php-src/ext/spl php_spl.c php_spl.h
/php-src/ext/tidy php_tidy.h tidy.c
  Log:
  - revert over constfying

 http://cvs.php.net/viewvc.cgi/php-src/ext/spl/php_spl.c?r1=1.121r2=1.122diff_format=u
 Index: php-src/ext/spl/php_spl.c
 diff -u php-src/ext/spl/php_spl.c:1.121 php-src/ext/spl/php_spl.c:1.122
 --- php-src/ext/spl/php_spl.c:1.121 Fri Jan 25 20:30:36 2008
 +++ php-src/ext/spl/php_spl.c Sun Jan 27 15:03:55 2008
 @@ -16,7 +16,7 @@
 
 +--+
  */

 -/* $Id: php_spl.c,v 1.121 2008/01/25 20:30:36 nlopess Exp $ */
 +/* $Id: php_spl.c,v 1.122 2008/01/27 15:03:55 helly Exp $ */

 #ifdef HAVE_CONFIG_H
 #include config.h
 @@ -781,7 +781,7 @@

 /* {{{ spl_module_entry
  */
 -const zend_module_entry spl_module_entry = {
 +zend_module_entry spl_module_entry = {
 #ifdef HAVE_SIMPLEXML
  STANDARD_MODULE_HEADER_EX, NULL,
  spl_deps,
 http://cvs.php.net/viewvc.cgi/php-src/ext/spl/php_spl.h?r1=1.25r2=1.26diff_format=u
 Index: php-src/ext/spl/php_spl.h
 diff -u php-src/ext/spl/php_spl.h:1.25 php-src/ext/spl/php_spl.h:1.26
 --- php-src/ext/spl/php_spl.h:1.25 Fri Jan 25 20:30:36 2008
 +++ php-src/ext/spl/php_spl.h Sun Jan 27 15:03:55 2008
 @@ -28,7 +28,7 @@
 #define SPL_DEBUG(x)
 #endif

 -extern const zend_module_entry spl_module_entry;
 +extern zend_module_entry spl_module_entry;
 #define phpext_spl_ptr spl_module_entry

 #ifdef PHP_WIN32
 http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/php_tidy.h?r1=1.37r2=1.38diff_format=u
 Index: php-src/ext/tidy/php_tidy.h
 diff -u php-src/ext/tidy/php_tidy.h:1.37 php-src/ext/tidy/php_tidy.h:1.38
 --- php-src/ext/tidy/php_tidy.h:1.37 Fri Jan 25 20:30:36 2008
 +++ php-src/ext/tidy/php_tidy.h Sun Jan 27 15:03:55 2008
 @@ -16,12 +16,12 @@
   +--+
 */

 -/* $Id: php_tidy.h,v 1.37 2008/01/25 20:30:36 nlopess Exp $ */
 +/* $Id: php_tidy.h,v 1.38 2008/01/27 15:03:55 helly Exp $ */

 #ifndef PHP_TIDY_H
 #define PHP_TIDY_H

 -extern const zend_module_entry tidy_module_entry;
 +extern zend_module_entry tidy_module_entry;
 #define phpext_tidy_ptr tidy_module_entry

 #define TIDY_METHOD_MAP(name, func_name, arg_types) \
 http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/tidy.c?r1=1.119r2=1.120diff_format=u
 Index: php-src/ext/tidy/tidy.c
 diff -u php-src/ext/tidy/tidy.c:1.119 php-src/ext/tidy/tidy.c:1.120
 --- php-src/ext/tidy/tidy.c:1.119 Fri Jan 25 20:30:36 2008
 +++ php-src/ext/tidy/tidy.c Sun Jan 27 15:03:55 2008
 @@ -16,7 +16,7 @@
   +--+
 */

 -/* $Id: tidy.c,v 1.119 2008/01/25 20:30:36 nlopess Exp $ */
 +/* $Id: tidy.c,v 1.120 2008/01/27 15:03:55 helly Exp $ */

 #ifdef HAVE_CONFIG_H
 #include config.h
 @@ -359,7 +359,7 @@
 static zend_object_handlers tidy_object_handlers_doc;
 static zend_object_handlers tidy_object_handlers_node;

 -const zend_module_entry tidy_module_entry = {
 +zend_module_entry tidy_module_entry = {
  STANDARD_MODULE_HEADER,
  tidy,
  tidy_functions,
 @@ -1062,7 +1062,7 @@
  php_info_print_table_start();
  php_info_print_table_header(2, Tidy support, enabled);
  php_info_print_table_row(2, libTidy Release, (char 
 *)tidyReleaseDate());
 - php_info_print_table_row(2, Extension Version, PHP_TIDY_MODULE_VERSION 
  ($Id: tidy.c,v 1.119 2008/01/25 20:30:36 nlopess Exp $));
 + php_info_print_table_row(2, Extension Version, PHP_TIDY_MODULE_VERSION 
  ($Id: tidy.c,v 1.120 2008/01/27 15:03:55 helly Exp $));
  php_info_print_table_end();

  DISPLAY_INI_ENTRIES();

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




Best regards,
 Marcus

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/spl spl_observer.c /ext/spl/internal splobjectstorage.inc /ext/spl/tests observer_004.phpt observer_005.phpt observer_006.phpt

2008-01-27 Thread Marcus Boerger
helly   Sun Jan 27 18:04:54 2008 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/spl/tests  observer_006.phpt 

  Modified files:  
/php-src/ext/splspl_observer.c 
/php-src/ext/spl/internal   splobjectstorage.inc 
/php-src/ext/spl/tests  observer_004.phpt observer_005.phpt 
  Log:
  - Add second parameter to SplObjectStorage::attach()
  - Add SplObjectStorage::setInfo()
  - Add SplObjectStorage::getInfo()
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_observer.c?r1=1.21r2=1.22diff_format=u
Index: php-src/ext/spl/spl_observer.c
diff -u php-src/ext/spl/spl_observer.c:1.21 php-src/ext/spl/spl_observer.c:1.22
--- php-src/ext/spl/spl_observer.c:1.21 Mon Dec 31 07:12:15 2007
+++ php-src/ext/spl/spl_observer.c  Sun Jan 27 18:04:54 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_observer.c,v 1.21 2007/12/31 07:12:15 sebastian Exp $ */
+/* $Id: spl_observer.c,v 1.22 2008/01/27 18:04:54 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include config.h
@@ -75,14 +75,18 @@
 PHPAPI zend_class_entry *spl_ce_SplObjectStorage;
 PHPAPI zend_object_handlers spl_handler_SplObjectStorage;
 
-typedef struct _spl_SplObjectStorage {
+typedef struct _spl_SplObjectStorage { /* {{{ */
zend_object   std;
HashTable storage;
long  index;
HashPosition  pos;
-} spl_SplObjectStorage;
+} spl_SplObjectStorage; /* }}} */
 
-/* storage is an assoc aray of [zend_object_value]=[zval*] */
+/* {{{ storage is an assoc aray of [zend_object_value]=[zval *obj, zval *inf] 
*/
+typedef struct _spl_SplObjectStorageElement {
+   zval* obj;
+   zval* inf;
+} spl_SplObjectStorageElement; /* }}} */
 
 void spl_SplOjectStorage_free_storage(void *object TSRMLS_DC) /* {{{ */
 {
@@ -95,6 +99,12 @@
efree(object);
 } /* }}} */
 
+static void spl_object_storage_dtor(spl_SplObjectStorageElement *element) /* 
{{{ */
+{
+   zval_ptr_dtor(element-obj);
+   zval_ptr_dtor(element-inf);
+} /* }}} */
+
 static zend_object_value spl_object_storage_new_ex(zend_class_entry 
*class_type, spl_SplObjectStorage **obj, zval *orig TSRMLS_DC) /* {{{ */
 {
zend_object_value retval;
@@ -108,7 +118,7 @@
zend_object_std_init(intern-std, class_type TSRMLS_CC);
zend_hash_copy(intern-std.properties, class_type-default_properties, 
(copy_ctor_func_t) zval_add_ref, (void *) tmp, sizeof(zval *));
 
-   zend_hash_init(intern-storage, 0, NULL, ZVAL_PTR_DTOR, 0);
+   zend_hash_init(intern-storage, 0, NULL, (void (*)(void 
*))spl_object_storage_dtor, 0);
 
retval.handle = zend_objects_store_put(intern, 
(zend_objects_store_dtor_t)zend_objects_destroy_object, 
(zend_objects_free_object_storage_t) spl_SplOjectStorage_free_storage, NULL 
TSRMLS_CC);
retval.handlers = spl_handler_SplObjectStorage;
@@ -119,9 +129,10 @@
 static HashTable* spl_object_storage_debug_info(zval *obj, int *is_temp 
TSRMLS_DC) /* {{{ */
 {
spl_SplObjectStorage *intern = 
(spl_SplObjectStorage*)zend_object_store_get_object(obj TSRMLS_CC);
+   spl_SplObjectStorageElement *element;
HashTable *rv, *props;
HashPosition pos;
-   zval *tmp, *storage, **entry;
+   zval *tmp, *storage;
char md5str[33];
int name_len;
zstr zname;
@@ -131,18 +142,23 @@
props = Z_OBJPROP_P(obj);
ALLOC_HASHTABLE(rv);
ZEND_INIT_SYMTABLE_EX(rv, zend_hash_num_elements(props) + 1, 0);
-   
+
zend_hash_copy(rv, props, (copy_ctor_func_t) zval_add_ref, (void *) 
tmp, sizeof(zval *));
 
MAKE_STD_ZVAL(storage);
array_init(storage);
 
zend_hash_internal_pointer_reset_ex(intern-storage, pos);
-   while (zend_hash_get_current_data_ex(intern-storage, (void **)entry, 
pos) == SUCCESS) {
-   php_spl_object_hash(*entry, md5str TSRMLS_CC);
-   zval_add_ref(entry);
-   add_assoc_zval_ex(storage, md5str, 33, *entry);
-   zend_hash_move_forward_ex(intern-storage, pos);
+   while (zend_hash_get_current_data_ex(intern-storage, (void 
**)element, pos) == SUCCESS) {
+   php_spl_object_hash(element-obj, md5str TSRMLS_CC);
+   Z_ADDREF_P(element-obj);
+   Z_ADDREF_P(element-inf);
+   MAKE_STD_ZVAL(tmp);
+   array_init(tmp);
+   add_assoc_zval_ex(tmp, obj, sizeof(obj), element-obj);
+   add_assoc_zval_ex(tmp, inf, sizeof(inf), element-inf);
+   add_assoc_zval_ex(storage, md5str, 33, tmp);
+   zend_hash_move_forward_ex(intern-storage, pos);
}
 
zname = spl_gen_private_prop_name(spl_ce_SplObjectStorage, storage, 
sizeof(storage)-1, name_len TSRMLS_CC);
@@ -161,35 +177,99 @@
 }
 /* }}} */
 
-void spl_object_storage_attach(spl_SplObjectStorage *intern, zval *obj 
TSRMLS_DC) /* {{{ */
+int 

[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/spl spl_observer.c /ext/spl/internal splobjectstorage.inc /ext/spl/tests observer_004.phpt observer_005.phpt observer_006.phpt

2008-01-27 Thread Marcus Boerger
helly   Sun Jan 27 18:07:20 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/spl/tests  observer_006.phpt 

  Modified files:  
/php-srcNEWS 
/php-src/ext/splspl_observer.c 
/php-src/ext/spl/internal   splobjectstorage.inc 
/php-src/ext/spl/tests  observer_004.phpt observer_005.phpt 
  Log:
  MFH:
  [DOC] Add ability to store associative infor with objects in SplObjectStorage
  - Add second parameter to SplObjectStorage::attach()
  - Add SplObjectStorage::setInfo()
  - Add SplObjectStorage::getInfo()
  
  http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.89r2=1.2027.2.547.2.965.2.90diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.89 
php-src/NEWS:1.2027.2.547.2.965.2.90
--- php-src/NEWS:1.2027.2.547.2.965.2.89Sun Jan 27 17:29:14 2008
+++ php-src/NEWSSun Jan 27 18:07:20 2008
@@ -19,6 +19,8 @@
   * date_timestamp_set() / DateTime::setTimestamp() to set a Unix timestamp
 without invoking the date parser. (Scott)
 
+- Added ability to store associative infor with objects in SplObjectStorage.
+  (Marcus)
 - Added ability to use Traversable objects instead of plain arrays in ext/soap.
   (Joshua Reese, Dmitry)
 - Added ?: operator. (Marcus)
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_observer.c?r1=1.2.2.6.2.3.2.5r2=1.2.2.6.2.3.2.6diff_format=u
Index: php-src/ext/spl/spl_observer.c
diff -u php-src/ext/spl/spl_observer.c:1.2.2.6.2.3.2.5 
php-src/ext/spl/spl_observer.c:1.2.2.6.2.3.2.6
--- php-src/ext/spl/spl_observer.c:1.2.2.6.2.3.2.5  Sun Jan 27 15:23:14 2008
+++ php-src/ext/spl/spl_observer.c  Sun Jan 27 18:07:20 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_observer.c,v 1.2.2.6.2.3.2.5 2008/01/27 15:23:14 helly Exp $ */
+/* $Id: spl_observer.c,v 1.2.2.6.2.3.2.6 2008/01/27 18:07:20 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include config.h
@@ -75,14 +75,18 @@
 PHPAPI zend_class_entry *spl_ce_SplObjectStorage;
 PHPAPI zend_object_handlers spl_handler_SplObjectStorage;
 
-typedef struct _spl_SplObjectStorage {
+typedef struct _spl_SplObjectStorage { /* {{{ */
zend_object   std;
HashTable storage;
long  index;
HashPosition  pos;
-} spl_SplObjectStorage;
+} spl_SplObjectStorage; /* }}} */
 
-/* storage is an assoc aray of [zend_object_value]=[zval*] */
+/* {{{ storage is an assoc aray of [zend_object_value]=[zval *obj, zval *inf] 
*/
+typedef struct _spl_SplObjectStorageElement {
+   zval* obj;
+   zval* inf;
+} spl_SplObjectStorageElement; /* }}} */
 
 void spl_SplOjectStorage_free_storage(void *object TSRMLS_DC) /* {{{ */
 {
@@ -95,9 +99,10 @@
efree(object);
 } /* }}} */
 
-static void spl_object_storage_dtor(zval **element) /* {{{ */
+static void spl_object_storage_dtor(spl_SplObjectStorageElement *element) /* 
{{{ */
 {
-   zval_ptr_dtor(element);
+   zval_ptr_dtor(element-obj);
+   zval_ptr_dtor(element-inf);
 } /* }}} */
 
 static zend_object_value spl_object_storage_new_ex(zend_class_entry 
*class_type, spl_SplObjectStorage **obj, zval *orig TSRMLS_DC) /* {{{ */
@@ -124,9 +129,10 @@
 static HashTable* spl_object_storage_debug_info(zval *obj, int *is_temp 
TSRMLS_DC) /* {{{ */
 {
spl_SplObjectStorage *intern = 
(spl_SplObjectStorage*)zend_object_store_get_object(obj TSRMLS_CC);
+   spl_SplObjectStorageElement *element;
HashTable *rv, *props;
HashPosition pos;
-   zval *tmp, *storage, **entry;
+   zval *tmp, *storage;
char md5str[33];
int name_len;
char *zname;
@@ -143,10 +149,15 @@
array_init(storage);
 
zend_hash_internal_pointer_reset_ex(intern-storage, pos);
-   while (zend_hash_get_current_data_ex(intern-storage, (void **)entry, 
pos) == SUCCESS) {
-   php_spl_object_hash(*entry, md5str TSRMLS_CC);
-   zval_add_ref(entry);
-   add_assoc_zval_ex(storage, md5str, 33, *entry);
+   while (zend_hash_get_current_data_ex(intern-storage, (void 
**)element, pos) == SUCCESS) {
+   php_spl_object_hash(element-obj, md5str TSRMLS_CC);
+   Z_ADDREF_P(element-obj);
+   Z_ADDREF_P(element-inf);
+   MAKE_STD_ZVAL(tmp);
+   array_init(tmp);
+   add_assoc_zval_ex(tmp, obj, sizeof(obj), element-obj);
+   add_assoc_zval_ex(tmp, inf, sizeof(inf), element-inf);
+   add_assoc_zval_ex(storage, md5str, 33, tmp);
zend_hash_move_forward_ex(intern-storage, pos);
}
 
@@ -181,21 +192,53 @@
 #endif
 } /* }}} */
 
-void spl_object_storage_attach(spl_SplObjectStorage *intern, zval *obj 
TSRMLS_DC) /* {{{ */
+spl_SplObjectStorageElement* spl_object_storage_get(spl_SplObjectStorage 
*intern, zval *obj TSRMLS_DC) /* {{{ */
 {
-   if (spl_object_storage_contains(intern, obj TSRMLS_CC)) {

[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/date php_date.c /ext/date/tests timezones-list.phpt

2008-01-27 Thread Derick Rethans
derick  Sun Jan 27 17:29:15 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/date/tests timezones-list.phpt 

  Modified files:  
/php-srcNEWS 
/php-src/ext/date   php_date.c 
  Log:
  - MFH: Added support for selectively listing timezone identifiers through
timezone_identifiers_list() / DateTimezone::listIdentifiers().
  
  http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.88r2=1.2027.2.547.2.965.2.89diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.88 
php-src/NEWS:1.2027.2.547.2.965.2.89
--- php-src/NEWS:1.2027.2.547.2.965.2.88Fri Jan 25 18:10:45 2008
+++ php-src/NEWSSun Jan 27 17:29:14 2008
@@ -2,7 +2,7 @@
 |||
 ?? ??? 20??, PHP 5.3.0
 - Added garbage collector. (David Wang, Dmitry).
-- Added new date/time functionality:
+- Added new date/time functionality: (Derick)
 
   * date_parse_from_format(): Parse date/time strings according to a format.
   * date_create_from_format()/DateTime::createFromFormat(): Create a date/time
@@ -14,6 +14,10 @@
- date_parse_from_format()
   * support for abbreviation and offset based timezone specifiers for
 DateTime::getOffset() and DateTime::getName().
+  * support for selectively listing timezone identifiers through
+timezone_identifiers_list() / DateTimezone::listIdentifiers().
+  * date_timestamp_set() / DateTime::setTimestamp() to set a Unix timestamp
+without invoking the date parser. (Scott)
 
 - Added ability to use Traversable objects instead of plain arrays in ext/soap.
   (Joshua Reese, Dmitry)
@@ -40,8 +44,6 @@
   (Etienne Kneuss)
 - Added compact handler for Zend MM storage. (Dmitry)
 - Added + and * specifiers to zend_parse_parameters(). (Andrei)
-- Added DateTime::setTimestamp() to set a unix timestamp without
-  invoking the date parser. (Scott)
 - Added SplDoublyLinkedList, SplStack, SplQueue classes. (Etienne)
 
 - Removed the experimental RPL (master/slave) functions from mysqli. (Andrey)
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.51.2.11r2=1.43.2.45.2.51.2.12diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.51.2.11 
php-src/ext/date/php_date.c:1.43.2.45.2.51.2.12
--- php-src/ext/date/php_date.c:1.43.2.45.2.51.2.11 Thu Jan 17 20:35:01 2008
+++ php-src/ext/date/php_date.c Sun Jan 27 17:29:14 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.51.2.11 2008/01/17 20:35:01 derick Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.51.2.12 2008/01/27 17:29:14 derick Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -1497,6 +1497,19 @@
 }
 /* }}} */
 
+#define PHP_DATE_TIMEZONE_GROUP_AMERICA0x0001
+#define PHP_DATE_TIMEZONE_GROUP_ANTARCTICA 0x0002
+#define PHP_DATE_TIMEZONE_GROUP_ARCTIC 0x0004
+#define PHP_DATE_TIMEZONE_GROUP_ASIA   0x0008
+#define PHP_DATE_TIMEZONE_GROUP_ATLANTIC   0x0010
+#define PHP_DATE_TIMEZONE_GROUP_AUSTRALIA  0x0020
+#define PHP_DATE_TIMEZONE_GROUP_EUROPE 0x0040
+#define PHP_DATE_TIMEZONE_GROUP_INDIAN 0x0080
+#define PHP_DATE_TIMEZONE_GROUP_PACIFIC0x0100
+#define PHP_DATE_TIMEZONE_GROUP_UTC0x0200
+#define PHP_DATE_TIMEZONE_GROUP_ALL0x03FF
+#define PHP_DATE_TIMEZONE_GROUP_ALL_W_BC   0x07FF
+
 static void date_register_classes(TSRMLS_D)
 {
zend_class_entry ce_date, ce_timezone;
@@ -1529,6 +1542,22 @@
date_ce_timezone = zend_register_internal_class_ex(ce_timezone, NULL, 
NULL TSRMLS_CC);
memcpy(date_object_handlers_timezone, zend_get_std_object_handlers(), 
sizeof(zend_object_handlers));
date_object_handlers_timezone.clone_obj = date_object_clone_timezone;
+
+#define REGISTER_TIMEZONE_CLASS_CONST_STRING(const_name, value) \
+   zend_declare_class_constant_long(date_ce_timezone, const_name, 
sizeof(const_name)-1, value TSRMLS_CC);
+
+   REGISTER_TIMEZONE_CLASS_CONST_STRING(AMERICA, 
PHP_DATE_TIMEZONE_GROUP_AMERICA);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING(ANTARCTICA,  
PHP_DATE_TIMEZONE_GROUP_ANTARCTICA);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING(ARCTIC,  
PHP_DATE_TIMEZONE_GROUP_ARCTIC);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING(ASIA,
PHP_DATE_TIMEZONE_GROUP_ASIA);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING(ATLANTIC,
PHP_DATE_TIMEZONE_GROUP_ATLANTIC);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING(AUSTRALIA,   
PHP_DATE_TIMEZONE_GROUP_AUSTRALIA);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING(EUROPE,  
PHP_DATE_TIMEZONE_GROUP_EUROPE);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING(INDIAN,  
PHP_DATE_TIMEZONE_GROUP_INDIAN);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING(PACIFIC, 
PHP_DATE_TIMEZONE_GROUP_PACIFIC);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING(UTC, 
PHP_DATE_TIMEZONE_GROUP_UTC);
+   

[PHP-CVS] cvs: php-src /ext/spl/tests observer_006.phpt

2008-01-27 Thread Marcus Boerger
helly   Sun Jan 27 18:19:45 2008 UTC

  Modified files:  
/php-src/ext/spl/tests  observer_006.phpt 
  Log:
  - Test went to 5.2... somehow very strange
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/observer_006.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/spl/tests/observer_006.phpt
diff -u /dev/null php-src/ext/spl/tests/observer_006.phpt:1.2
--- /dev/null   Sun Jan 27 18:19:45 2008
+++ php-src/ext/spl/tests/observer_006.phpt Sun Jan 27 18:19:45 2008
@@ -0,0 +1,543 @@
+--TEST--
+SPL: SplObjectStorage with accociatied information
+--SKIPIF--
+?php if (!extension_loaded(spl)) print skip; ?
+--FILE--
+?php
+
+class TestClass
+{
+   public $test = 25;
+   
+   public function __construct($test = 42)
+   {
+   $this-test = $test;
+   }
+}
+
+class MyStorage extends SplObjectStorage
+{
+   public $bla = 25;
+   
+   public function __construct($bla = 26)
+   {
+   $this-bla = $bla;
+   }
+}
+
+$storage = new MyStorage();
+
+foreach(array(1=foo,2=42) as $key = $value)
+{
+ $storage-attach(new TestClass($key), $value);
+}
+
+var_dump(count($storage));
+
+foreach($storage as $object)
+{
+   var_dump($object-test);
+}
+
+var_dump($storage);
+
+var_dump(serialize($storage));
+echo ===UNSERIALIZE===\n;
+
+$storage2 = unserialize(serialize($storage));
+
+var_dump(count($storage2));
+
+foreach($storage2 as $object)
+{
+   var_dump($object-test);
+}
+
+var_dump($storage2);
+$storage-attach(new TestClass(3), new stdClass);
+$storage-attach(new TestClass(4), new TestClass(5));
+echo ===UNSERIALIZE2===\n;
+var_dump(unserialize(serialize($storage)));
+$storage-rewind();
+$storage-next();
+var_dump($storage-key());
+var_dump($storage-current());
+var_dump($storage-getInfo());
+$storage-setInfo(bar);
+var_dump($storage-getInfo());
+echo ===UNSERIALIZE3===\n;
+var_dump(unserialize(serialize($storage)));
+$storage-rewind();
+$storage-next();
+$storage-next();
+var_dump($storage-key());
+var_dump($storage-current());
+$storage-attach($storage-current(), replaced);
+echo ===UNSERIALIZE4===\n;
+var_dump(unserialize(serialize($storage)));
+
+?
+===DONE===
+?php exit(0); ?
+--EXPECTF--
+int(2)
+int(1)
+int(2)
+object(MyStorage)#%d (2) {
+  [bla]=
+  int(26)
+  [storage:SplObjectStorage:private]=
+  array(2) {
+[%s]=
+array(2) {
+  [obj]=
+  object(TestClass)#%d (1) {
+[test]=
+int(1)
+  }
+  [inf]=
+  string(3) foo
+}
+[%s]=
+array(2) {
+  [obj]=
+  object(TestClass)#%d (1) {
+[test]=
+int(2)
+  }
+  [inf]=
+  int(42)
+}
+  }
+}
+string(%d) %s
+===UNSERIALIZE===
+int(2)
+int(1)
+int(2)
+object(MyStorage)#%d (2) {
+  [bla]=
+  int(26)
+  [storage:SplObjectStorage:private]=
+  array(2) {
+[%s]=
+array(2) {
+  [obj]=
+  object(TestClass)#%d (1) {
+[test]=
+int(1)
+  }
+  [inf]=
+  string(3) foo
+}
+[%s]=
+array(2) {
+  [obj]=
+  object(TestClass)#%d (1) {
+[test]=
+int(2)
+  }
+  [inf]=
+  int(42)
+}
+  }
+}
+===UNSERIALIZE2===
+object(MyStorage)#%d (2) {
+  [bla]=
+  int(26)
+  [storage:SplObjectStorage:private]=
+  array(4) {
+[%s]=
+array(2) {
+  [obj]=
+  object(TestClass)#%d (1) {
+[test]=
+int(1)
+  }
+  [inf]=
+  string(3) foo
+}
+[%s]=
+array(2) {
+  [obj]=
+  object(TestClass)#%d (1) {
+[test]=
+int(2)
+  }
+  [inf]=
+  int(42)
+}
+[%s]=
+array(2) {
+  [obj]=
+  object(TestClass)#%d (1) {
+[test]=
+int(3)
+  }
+  [inf]=
+  object(stdClass)#%d (0) {
+  }
+}
+[%s]=
+array(2) {
+  [obj]=
+  object(TestClass)#%d (1) {
+[test]=
+int(4)
+  }
+  [inf]=
+  object(TestClass)#%d (1) {
+[test]=
+int(5)
+  }
+}
+  }
+}
+int(1)
+object(TestClass)#%d (1) {
+  [test]=
+  int(2)
+}
+int(42)
+string(3) bar
+===UNSERIALIZE3===
+object(MyStorage)#%d (2) {
+  [bla]=
+  int(26)
+  [storage:SplObjectStorage:private]=
+  array(4) {
+[%s]=
+array(2) {
+  [obj]=
+  object(TestClass)#%d (1) {
+[test]=
+int(1)
+  }
+  [inf]=
+  string(3) foo
+}
+[%s]=
+array(2) {
+  [obj]=
+  object(TestClass)#%d (1) {
+[test]=
+int(2)
+  }
+  [inf]=
+  string(3) bar
+}
+[%s]=
+array(2) {
+  [obj]=
+  object(TestClass)#%d (1) {
+[test]=
+int(3)
+  }
+  [inf]=
+  object(stdClass)#%d (0) {
+  }
+}
+[%s]=
+array(2) {
+  [obj]=
+  object(TestClass)#%d (1) {
+[test]=
+int(4)
+  }
+  [inf]=
+  object(TestClass)#%d (1) {
+[test]=
+int(5)
+  }
+}
+  }
+}
+int(2)
+object(TestClass)#7 (1) {
+  [test]=
+  int(3)
+}
+===UNSERIALIZE4===

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/spl/tests observer_006.phpt

2008-01-27 Thread Hannes Magnusson
bjori   Sun Jan 27 18:20:27 2008 UTC

  Removed files:   (Branch: PHP_5_2)
/php-src/ext/spl/tests  observer_006.phpt 
  Log:
  Remove bogus test (should be in HEAD)
  
  

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



[PHP-CVS] cvs: php-src /sapi/cli/tests 006.phpt

2008-01-27 Thread Hannes Magnusson
bjori   Sun Jan 27 19:10:26 2008 UTC

  Modified files:  
/php-src/sapi/cli/tests 006.phpt 
  Log:
  Fix test
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/006.phpt?r1=1.6r2=1.7diff_format=u
Index: php-src/sapi/cli/tests/006.phpt
diff -u php-src/sapi/cli/tests/006.phpt:1.6 php-src/sapi/cli/tests/006.phpt:1.7
--- php-src/sapi/cli/tests/006.phpt:1.6 Sun Jan 13 17:23:36 2008
+++ php-src/sapi/cli/tests/006.phpt Sun Jan 27 19:10:26 2008
@@ -308,7 +308,19 @@
 
 Class [ internal:date class DateTimeZone ] {
 
-  - Constants [0] {
+  - Constants [12] {
+Constant [ integer AMERICA ] { 1 }
+Constant [ integer ANTARCTICA ] { 2 }
+Constant [ integer ARCTIC ] { 4 }
+Constant [ integer ASIA ] { 8 }
+Constant [ integer ATLANTIC ] { 16 }
+Constant [ integer AUSTRALIA ] { 32 }
+Constant [ integer EUROPE ] { 64 }
+Constant [ integer INDIAN ] { 128 }
+Constant [ integer PACIFIC ] { 256 }
+Constant [ integer UTC ] { 512 }
+Constant [ integer ALL ] { 1023 }
+Constant [ integer ALL_WITH_BC ] { 2047 }
   }
 
   - Static properties [0] {

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



[PHP-CVS] cvs: php-src(PHP_5_3) /sapi/cli/tests 006.phpt

2008-01-27 Thread Hannes Magnusson
bjori   Sun Jan 27 19:10:41 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/sapi/cli/tests 006.phpt 
  Log:
  Fix test
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/006.phpt?r1=1.1.2.9.2.2r2=1.1.2.9.2.3diff_format=u
Index: php-src/sapi/cli/tests/006.phpt
diff -u php-src/sapi/cli/tests/006.phpt:1.1.2.9.2.2 
php-src/sapi/cli/tests/006.phpt:1.1.2.9.2.3
--- php-src/sapi/cli/tests/006.phpt:1.1.2.9.2.2 Sun Jan 13 17:23:14 2008
+++ php-src/sapi/cli/tests/006.phpt Sun Jan 27 19:10:41 2008
@@ -308,7 +308,19 @@
 
 Class [ internal:date class DateTimeZone ] {
 
-  - Constants [0] {
+  - Constants [12] {
+Constant [ integer AMERICA ] { 1 }
+Constant [ integer ANTARCTICA ] { 2 }
+Constant [ integer ARCTIC ] { 4 }
+Constant [ integer ASIA ] { 8 }
+Constant [ integer ATLANTIC ] { 16 }
+Constant [ integer AUSTRALIA ] { 32 }
+Constant [ integer EUROPE ] { 64 }
+Constant [ integer INDIAN ] { 128 }
+Constant [ integer PACIFIC ] { 256 }
+Constant [ integer UTC ] { 512 }
+Constant [ integer ALL ] { 1023 }
+Constant [ integer ALL_WITH_BC ] { 2047 }
   }
 
   - Static properties [0] {

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



Re: [PHP-CVS] cvs: php-src /ext/standard basic_functions.c php_string.h string.c /ext/standard/tests/strings lcfirst.phpt

2008-01-27 Thread Hannes Magnusson
2008/1/19 David Coallier [EMAIL PROTECTED]:
 davidc  Sat Jan 19 19:23:25 2008 UTC

   Added files:
 /php-src/ext/standard/tests/strings lcfirst.phpt

   Modified files:
 /php-src/ext/standard   basic_functions.c php_string.h string.c
   Log:
   - Added lcfirst() function. The sister function of ucfirst()
   - Test #1 for lcfirst()

This test is failing with unicode_semantics=on (and has a really weird
testname).

-Hannes

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



[PHP-CVS] cvs: php-src /ext/date/lib parse_date.c parse_date.re /ext/date/tests date_create-2.phpt strtotime.phpt

2008-01-27 Thread Derick Rethans
derick  Sun Jan 27 22:16:00 2008 UTC

  Modified files:  
/php-src/ext/date/lib   parse_date.c parse_date.re 
/php-src/ext/date/tests date_create-2.phpt strtotime.phpt 
  Log:
  - Fixed parsing of timestamps.
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.c?r1=1.76r2=1.77diff_format=u
Index: php-src/ext/date/lib/parse_date.c
diff -u php-src/ext/date/lib/parse_date.c:1.76 
php-src/ext/date/lib/parse_date.c:1.77
--- php-src/ext/date/lib/parse_date.c:1.76  Thu Jan 17 20:43:58 2008
+++ php-src/ext/date/lib/parse_date.c   Sun Jan 27 22:15:59 2008
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.12.1 on Thu Jan 17 21:42:37 2008 */
+/* Generated by re2c 0.12.1 on Sun Jan 27 23:15:51 2008 */
 #line 1 ext/date/lib/parse_date.re
 /*
+--+
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: parse_date.c,v 1.76 2008/01/17 20:43:58 derick Exp $ */
+/* $Id: parse_date.c,v 1.77 2008/01/27 22:15:59 derick Exp $ */
 
 #include timelib.h
 
@@ -975,7 +975,7 @@
}
 yy3:
YYDEBUG(3, *YYCURSOR);
-#line 1501 ext/date/lib/parse_date.re
+#line 1502 ext/date/lib/parse_date.re
{
int tz_not_found;
DEBUG_OUTPUT(tzcorrection | tz);
@@ -1299,7 +1299,7 @@
if(yych = '9') goto yy1274;
 yy12:
YYDEBUG(12, *YYCURSOR);
-#line 1596 ext/date/lib/parse_date.re
+#line 1597 ext/date/lib/parse_date.re
{
add_error(s, Unexpected character);
goto std;
@@ -2310,7 +2310,7 @@
if(yych = '9') goto yy51;
 yy46:
YYDEBUG(46, *YYCURSOR);
-#line 1585 ext/date/lib/parse_date.re
+#line 1586 ext/date/lib/parse_date.re
{
goto std;
}
@@ -2323,7 +2323,7 @@
YYDEBUG(48, *YYCURSOR);
++YYCURSOR;
YYDEBUG(49, *YYCURSOR);
-#line 1590 ext/date/lib/parse_date.re
+#line 1591 ext/date/lib/parse_date.re
{
s-pos = cursor; s-line++;
goto std;
@@ -2707,7 +2707,7 @@
if(yych == 's') goto yy70;
 yy69:
YYDEBUG(69, *YYCURSOR);
-#line 1569 ext/date/lib/parse_date.re
+#line 1570 ext/date/lib/parse_date.re
{
timelib_ull i;
DEBUG_OUTPUT(relative);
@@ -3630,7 +3630,7 @@
if(yych == 's') goto yy175;
 yy174:
YYDEBUG(174, *YYCURSOR);
-#line 1474 ext/date/lib/parse_date.re
+#line 1475 ext/date/lib/parse_date.re
{
timelib_sll i;
int behavior = 0;
@@ -4821,7 +4821,7 @@
}
 yy276:
YYDEBUG(276, *YYCURSOR);
-#line 1458 ext/date/lib/parse_date.re
+#line 1459 ext/date/lib/parse_date.re
{
const timelib_relunit* relunit;
DEBUG_OUTPUT(daytext);
@@ -5313,7 +5313,7 @@
}
 yy303:
YYDEBUG(303, *YYCURSOR);
-#line 1491 ext/date/lib/parse_date.re
+#line 1492 ext/date/lib/parse_date.re
{
DEBUG_OUTPUT(monthtext);
TIMELIB_INIT;
@@ -5373,7 +5373,7 @@
}
 yy308:
YYDEBUG(308, *YYCURSOR);
-#line 1270 ext/date/lib/parse_date.re
+#line 1271 ext/date/lib/parse_date.re
{
DEBUG_OUTPUT(datetextual | datenoyear);
TIMELIB_INIT;
@@ -5658,7 +5658,7 @@
}
 yy332:
YYDEBUG(332, *YYCURSOR);
-#line 1539 ext/date/lib/parse_date.re
+#line 1540 ext/date/lib/parse_date.re
{
int tz_not_found;
DEBUG_OUTPUT(dateshortwithtimeshort | dateshortwithtimelong | 
dateshortwithtimelongtz);
@@ -6298,7 +6298,7 @@
YYDEBUG(385, *YYCURSOR);
++YYCURSOR;
YYDEBUG(386, *YYCURSOR);
-#line 1515 ext/date/lib/parse_date.re
+#line 1516 ext/date/lib/parse_date.re
{
DEBUG_OUTPUT(dateshortwithtimeshort12 | 
dateshortwithtimelong12);
TIMELIB_INIT;
@@ -6497,7 +6497,7 @@
if(yych = '9') goto yy397;
 yy402:
YYDEBUG(402, *YYCURSOR);
-#line 1244 ext/date/lib/parse_date.re
+#line 1245 ext/date/lib/parse_date.re
{
DEBUG_OUTPUT(datenoday);
TIMELIB_INIT;
@@ -7745,7 +7745,7 @@
if(yych = '9') goto yy474;
 yy473:
YYDEBUG(473, *YYCURSOR);
-#line 1384 ext/date/lib/parse_date.re
+#line 1385 ext/date/lib/parse_date.re
{
DEBUG_OUTPUT(pgtextshort);
TIMELIB_INIT;
@@ -9638,7 +9638,7 @@
}
 yy558:
YYDEBUG(558, *YYCURSOR);
-#line 1440 ext/date/lib/parse_date.re
+#line 1441 ext/date/lib/parse_date.re
{

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date/lib parse_date.c parse_date.re /ext/date/tests date_create-2.phpt strtotime.phpt

2008-01-27 Thread Derick Rethans
derick  Sun Jan 27 22:16:58 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/date/lib   parse_date.c parse_date.re 
/php-src/ext/date/tests date_create-2.phpt strtotime.phpt 
  Log:
  - MFH: Fixed parsing of timezones
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.c?r1=1.29.2.30.2.14.2.3r2=1.29.2.30.2.14.2.4diff_format=u
Index: php-src/ext/date/lib/parse_date.c
diff -u php-src/ext/date/lib/parse_date.c:1.29.2.30.2.14.2.3 
php-src/ext/date/lib/parse_date.c:1.29.2.30.2.14.2.4
--- php-src/ext/date/lib/parse_date.c:1.29.2.30.2.14.2.3Thu Jan 17 
20:44:54 2008
+++ php-src/ext/date/lib/parse_date.c   Sun Jan 27 22:16:33 2008
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.12.1 on Thu Jan 17 21:36:33 2008 */
+/* Generated by re2c 0.12.1 on Sun Jan 27 23:04:23 2008 */
 #line 1 ext/date/lib/parse_date.re
 /*
+--+
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: parse_date.c,v 1.29.2.30.2.14.2.3 2008/01/17 20:44:54 derick Exp $ */
+/* $Id: parse_date.c,v 1.29.2.30.2.14.2.4 2008/01/27 22:16:33 derick Exp $ */
 
 #include timelib.h
 
@@ -975,7 +975,7 @@
}
 yy3:
YYDEBUG(3, *YYCURSOR);
-#line 1501 ext/date/lib/parse_date.re
+#line 1502 ext/date/lib/parse_date.re
{
int tz_not_found;
DEBUG_OUTPUT(tzcorrection | tz);
@@ -1299,7 +1299,7 @@
if(yych = '9') goto yy1274;
 yy12:
YYDEBUG(12, *YYCURSOR);
-#line 1596 ext/date/lib/parse_date.re
+#line 1597 ext/date/lib/parse_date.re
{
add_error(s, Unexpected character);
goto std;
@@ -2310,7 +2310,7 @@
if(yych = '9') goto yy51;
 yy46:
YYDEBUG(46, *YYCURSOR);
-#line 1585 ext/date/lib/parse_date.re
+#line 1586 ext/date/lib/parse_date.re
{
goto std;
}
@@ -2323,7 +2323,7 @@
YYDEBUG(48, *YYCURSOR);
++YYCURSOR;
YYDEBUG(49, *YYCURSOR);
-#line 1590 ext/date/lib/parse_date.re
+#line 1591 ext/date/lib/parse_date.re
{
s-pos = cursor; s-line++;
goto std;
@@ -2707,7 +2707,7 @@
if(yych == 's') goto yy70;
 yy69:
YYDEBUG(69, *YYCURSOR);
-#line 1569 ext/date/lib/parse_date.re
+#line 1570 ext/date/lib/parse_date.re
{
timelib_ull i;
DEBUG_OUTPUT(relative);
@@ -3630,7 +3630,7 @@
if(yych == 's') goto yy175;
 yy174:
YYDEBUG(174, *YYCURSOR);
-#line 1474 ext/date/lib/parse_date.re
+#line 1475 ext/date/lib/parse_date.re
{
timelib_sll i;
int behavior = 0;
@@ -4821,7 +4821,7 @@
}
 yy276:
YYDEBUG(276, *YYCURSOR);
-#line 1458 ext/date/lib/parse_date.re
+#line 1459 ext/date/lib/parse_date.re
{
const timelib_relunit* relunit;
DEBUG_OUTPUT(daytext);
@@ -5313,7 +5313,7 @@
}
 yy303:
YYDEBUG(303, *YYCURSOR);
-#line 1491 ext/date/lib/parse_date.re
+#line 1492 ext/date/lib/parse_date.re
{
DEBUG_OUTPUT(monthtext);
TIMELIB_INIT;
@@ -5373,7 +5373,7 @@
}
 yy308:
YYDEBUG(308, *YYCURSOR);
-#line 1270 ext/date/lib/parse_date.re
+#line 1271 ext/date/lib/parse_date.re
{
DEBUG_OUTPUT(datetextual | datenoyear);
TIMELIB_INIT;
@@ -5658,7 +5658,7 @@
}
 yy332:
YYDEBUG(332, *YYCURSOR);
-#line 1539 ext/date/lib/parse_date.re
+#line 1540 ext/date/lib/parse_date.re
{
int tz_not_found;
DEBUG_OUTPUT(dateshortwithtimeshort | dateshortwithtimelong | 
dateshortwithtimelongtz);
@@ -6298,7 +6298,7 @@
YYDEBUG(385, *YYCURSOR);
++YYCURSOR;
YYDEBUG(386, *YYCURSOR);
-#line 1515 ext/date/lib/parse_date.re
+#line 1516 ext/date/lib/parse_date.re
{
DEBUG_OUTPUT(dateshortwithtimeshort12 | 
dateshortwithtimelong12);
TIMELIB_INIT;
@@ -6497,7 +6497,7 @@
if(yych = '9') goto yy397;
 yy402:
YYDEBUG(402, *YYCURSOR);
-#line 1244 ext/date/lib/parse_date.re
+#line 1245 ext/date/lib/parse_date.re
{
DEBUG_OUTPUT(datenoday);
TIMELIB_INIT;
@@ -7745,7 +7745,7 @@
if(yych = '9') goto yy474;
 yy473:
YYDEBUG(473, *YYCURSOR);
-#line 1384 ext/date/lib/parse_date.re
+#line 1385 ext/date/lib/parse_date.re
{
DEBUG_OUTPUT(pgtextshort);
TIMELIB_INIT;
@@ -9638,7 +9638,7 @@
}
 yy558:
YYDEBUG(558, 

Re: [PHP-CVS] cvs: php-src /ext/standard basic_functions.c php_string.h string.c /ext/standard/tests/strings lcfirst.phpt

2008-01-27 Thread David Coallier
On Jan 27, 2008 2:36 PM, Hannes Magnusson [EMAIL PROTECTED] wrote:
 2008/1/19 David Coallier [EMAIL PROTECTED]:
  davidc  Sat Jan 19 19:23:25 2008 UTC
 
Added files:
  /php-src/ext/standard/tests/strings lcfirst.phpt
 
Modified files:
  /php-src/ext/standard   basic_functions.c php_string.h string.c
Log:
- Added lcfirst() function. The sister function of ucfirst()
- Test #1 for lcfirst()

 This test is failing with unicode_semantics=on (and has a really weird
 testname).

Arrrgh! this switch! :))

Ok will fix and commit sorry about that.


 -Hannes




-- 
David Coallier,
Founder  Software Architect,
Agora Production (http://agoraproduction.com)
51.42.06.70.18

-- 
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 php_spl.c php_spl.h /ext/tidy php_tidy.h tidy.c

2008-01-27 Thread Nuno Lopes
I'll take a look into that to see how feasible it is and if it presents any 
useful gains.


Thanks,
Nuno


- Original Message -

Hello Nuno,

 it writes the module number in the structure. We could have the macros
create a static non const int that receives the module number and 
reference
that from the struct via a pointer, which would be compatible to the 
struct

being static const then.

marcus

Sunday, January 27, 2008, 6:08:47 PM, you wrote:

Thank you for reverting this. It seems that the Zend engine really 
requires

right access to these structures. The engine needs fixing first.
Thanks,
Nuno


- Original Message - 
From: Marcus Boerger [EMAIL PROTECTED]

To: php-cvs@lists.php.net
Sent: Sunday, January 27, 2008 3:03 PM
Subject: [PHP-CVS] cvs: php-src /ext/spl php_spl.c php_spl.h /ext/tidy
php_tidy.h tidy.c




helly Sun Jan 27 15:03:55 2008 UTC

 Modified files:
   /php-src/ext/spl php_spl.c php_spl.h
   /php-src/ext/tidy php_tidy.h tidy.c
 Log:
 - revert over constfying

http://cvs.php.net/viewvc.cgi/php-src/ext/spl/php_spl.c?r1=1.121r2=1.122diff_format=u
Index: php-src/ext/spl/php_spl.c
diff -u php-src/ext/spl/php_spl.c:1.121 php-src/ext/spl/php_spl.c:1.122
--- php-src/ext/spl/php_spl.c:1.121 Fri Jan 25 20:30:36 2008
+++ php-src/ext/spl/php_spl.c Sun Jan 27 15:03:55 2008
@@ -16,7 +16,7 @@

+--+
 */

-/* $Id: php_spl.c,v 1.121 2008/01/25 20:30:36 nlopess Exp $ */
+/* $Id: php_spl.c,v 1.122 2008/01/27 15:03:55 helly Exp $ */

#ifdef HAVE_CONFIG_H
#include config.h
@@ -781,7 +781,7 @@

/* {{{ spl_module_entry
 */
-const zend_module_entry spl_module_entry = {
+zend_module_entry spl_module_entry = {
#ifdef HAVE_SIMPLEXML
 STANDARD_MODULE_HEADER_EX, NULL,
 spl_deps,
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/php_spl.h?r1=1.25r2=1.26diff_format=u
Index: php-src/ext/spl/php_spl.h
diff -u php-src/ext/spl/php_spl.h:1.25 php-src/ext/spl/php_spl.h:1.26
--- php-src/ext/spl/php_spl.h:1.25 Fri Jan 25 20:30:36 2008
+++ php-src/ext/spl/php_spl.h Sun Jan 27 15:03:55 2008
@@ -28,7 +28,7 @@
#define SPL_DEBUG(x)
#endif

-extern const zend_module_entry spl_module_entry;
+extern zend_module_entry spl_module_entry;
#define phpext_spl_ptr spl_module_entry

#ifdef PHP_WIN32
http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/php_tidy.h?r1=1.37r2=1.38diff_format=u
Index: php-src/ext/tidy/php_tidy.h
diff -u php-src/ext/tidy/php_tidy.h:1.37 
php-src/ext/tidy/php_tidy.h:1.38

--- php-src/ext/tidy/php_tidy.h:1.37 Fri Jan 25 20:30:36 2008
+++ php-src/ext/tidy/php_tidy.h Sun Jan 27 15:03:55 2008
@@ -16,12 +16,12 @@

+--+
*/

-/* $Id: php_tidy.h,v 1.37 2008/01/25 20:30:36 nlopess Exp $ */
+/* $Id: php_tidy.h,v 1.38 2008/01/27 15:03:55 helly Exp $ */

#ifndef PHP_TIDY_H
#define PHP_TIDY_H

-extern const zend_module_entry tidy_module_entry;
+extern zend_module_entry tidy_module_entry;
#define phpext_tidy_ptr tidy_module_entry

#define TIDY_METHOD_MAP(name, func_name, arg_types) \
http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/tidy.c?r1=1.119r2=1.120diff_format=u
Index: php-src/ext/tidy/tidy.c
diff -u php-src/ext/tidy/tidy.c:1.119 php-src/ext/tidy/tidy.c:1.120
--- php-src/ext/tidy/tidy.c:1.119 Fri Jan 25 20:30:36 2008
+++ php-src/ext/tidy/tidy.c Sun Jan 27 15:03:55 2008
@@ -16,7 +16,7 @@

+--+
*/

-/* $Id: tidy.c,v 1.119 2008/01/25 20:30:36 nlopess Exp $ */
+/* $Id: tidy.c,v 1.120 2008/01/27 15:03:55 helly Exp $ */

#ifdef HAVE_CONFIG_H
#include config.h
@@ -359,7 +359,7 @@
static zend_object_handlers tidy_object_handlers_doc;
static zend_object_handlers tidy_object_handlers_node;

-const zend_module_entry tidy_module_entry = {
+zend_module_entry tidy_module_entry = {
 STANDARD_MODULE_HEADER,
 tidy,
 tidy_functions,
@@ -1062,7 +1062,7 @@
 php_info_print_table_start();
 php_info_print_table_header(2, Tidy support, enabled);
 php_info_print_table_row(2, libTidy Release, (char
*)tidyReleaseDate());
- php_info_print_table_row(2, Extension Version, 
PHP_TIDY_MODULE_VERSION

 ($Id: tidy.c,v 1.119 2008/01/25 20:30:36 nlopess Exp $));
+ php_info_print_table_row(2, Extension Version, 
PHP_TIDY_MODULE_VERSION

 ($Id: tidy.c,v 1.120 2008/01/27 15:03:55 helly Exp $));
 php_info_print_table_end();

 DISPLAY_INI_ENTRIES(); 


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