@@ -804,22 +804,18 @@ PHP_FUNCTION(spl_object_id)
804804 Z_PARAM_OBJECT (obj )
805805 ZEND_PARSE_PARAMETERS_END_EX (RETURN_NULL ());
806806
807- RETURN_LONG (php_spl_object_id (obj ));
807+ RETURN_LONG (( zend_long ) Z_OBJ_HANDLE_P (obj ));
808808}
809809/* }}} */
810810
811- static void php_spl_init_hash_mask () {
812- SPL_G (hash_mask_handle ) = (intptr_t )(php_mt_rand () >> 1 );
813- SPL_G (hash_mask_handlers ) = (intptr_t )(php_mt_rand () >> 1 );
814- SPL_G (hash_mask_init ) = 1 ;
815- }
816-
817811PHPAPI zend_string * php_spl_object_hash (zval * obj ) /* {{{*/
818812{
819813 intptr_t hash_handle , hash_handlers ;
820814
821815 if (!SPL_G (hash_mask_init )) {
822- php_spl_init_hash_mask ();
816+ SPL_G (hash_mask_handle ) = (intptr_t )(php_mt_rand () >> 1 );
817+ SPL_G (hash_mask_handlers ) = (intptr_t )(php_mt_rand () >> 1 );
818+ SPL_G (hash_mask_init ) = 1 ;
823819 }
824820
825821 hash_handle = SPL_G (hash_mask_handle )^(intptr_t )Z_OBJ_HANDLE_P (obj );
@@ -829,20 +825,6 @@ PHPAPI zend_string *php_spl_object_hash(zval *obj) /* {{{*/
829825}
830826/* }}} */
831827
832- PHPAPI zend_long php_spl_object_id (zval * obj ) /* {{{*/
833- {
834- intptr_t hash_handle ;
835-
836- if (!SPL_G (hash_mask_init )) {
837- php_spl_init_hash_mask ();
838- }
839-
840- hash_handle = SPL_G (hash_mask_handle )^(intptr_t )Z_OBJ_HANDLE_P (obj );
841-
842- return (zend_long ) hash_handle ;
843- }
844- /* }}} */
845-
846828int spl_build_class_list_string (zval * entry , char * * list ) /* {{{ */
847829{
848830 char * res ;
0 commit comments