@@ -804,22 +804,18 @@ PHP_FUNCTION(spl_object_id)
804
804
Z_PARAM_OBJECT (obj )
805
805
ZEND_PARSE_PARAMETERS_END_EX (RETURN_NULL ());
806
806
807
- RETURN_LONG (php_spl_object_id (obj ));
807
+ RETURN_LONG (( zend_long ) Z_OBJ_HANDLE_P (obj ));
808
808
}
809
809
/* }}} */
810
810
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
-
817
811
PHPAPI zend_string * php_spl_object_hash (zval * obj ) /* {{{*/
818
812
{
819
813
intptr_t hash_handle , hash_handlers ;
820
814
821
815
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 ;
823
819
}
824
820
825
821
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) /* {{{*/
829
825
}
830
826
/* }}} */
831
827
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
-
846
828
int spl_build_class_list_string (zval * entry , char * * list ) /* {{{ */
847
829
{
848
830
char * res ;
0 commit comments