mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
Remove superfluous checks of register_internal_class retval
This commit is contained in:
parent
1b3111e4f2
commit
fc7cfe1c0e
@ -456,12 +456,7 @@ void calendar_register_IntlCalendar_class(void)
|
||||
INIT_CLASS_ENTRY(ce, "IntlCalendar", Calendar_class_functions);
|
||||
ce.create_object = Calendar_object_create;
|
||||
Calendar_ce_ptr = zend_register_internal_class(&ce);
|
||||
if (!Calendar_ce_ptr) {
|
||||
//can't happen now without bigger problems before
|
||||
php_error_docref0(NULL, E_ERROR,
|
||||
"IntlCalendar: class registration has failed.");
|
||||
return;
|
||||
}
|
||||
|
||||
memcpy( &Calendar_handlers, zend_get_std_object_handlers(),
|
||||
sizeof Calendar_handlers);
|
||||
Calendar_handlers.offset = XtOffsetOf(Calendar_object, zo);
|
||||
@ -525,11 +520,5 @@ void calendar_register_IntlCalendar_class(void)
|
||||
INIT_CLASS_ENTRY(ce, "IntlGregorianCalendar", GregorianCalendar_class_functions);
|
||||
GregorianCalendar_ce_ptr = zend_register_internal_class_ex(&ce,
|
||||
Calendar_ce_ptr);
|
||||
if (!GregorianCalendar_ce_ptr) {
|
||||
//can't happen know without bigger problems before
|
||||
php_error_docref0(NULL, E_ERROR,
|
||||
"IntlGregorianCalendar: class registration has failed.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
@ -202,12 +202,5 @@ void dateformat_register_IntlDateFormatter_class( void )
|
||||
IntlDateFormatter_handlers.clone_obj = IntlDateFormatter_object_clone;
|
||||
IntlDateFormatter_handlers.dtor_obj = IntlDateFormatter_object_dtor;
|
||||
IntlDateFormatter_handlers.free_obj = IntlDateFormatter_object_free;
|
||||
|
||||
/* Declare 'IntlDateFormatter' class properties. */
|
||||
if( !IntlDateFormatter_ce_ptr )
|
||||
{
|
||||
zend_error(E_ERROR, "Failed to register IntlDateFormatter class");
|
||||
return;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
@ -189,13 +189,6 @@ void formatter_register_class( void )
|
||||
NumberFormatter_handlers.offset = XtOffsetOf(NumberFormatter_object, zo);
|
||||
NumberFormatter_handlers.clone_obj = NumberFormatter_object_clone;
|
||||
NumberFormatter_handlers.free_obj = NumberFormatter_object_free;
|
||||
|
||||
/* Declare 'NumberFormatter' class properties. */
|
||||
if( !NumberFormatter_ce_ptr )
|
||||
{
|
||||
zend_error(E_ERROR, "Failed to register NumberFormatter class");
|
||||
return;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
@ -157,14 +157,6 @@ void msgformat_register_class( void )
|
||||
MessageFormatter_handlers.offset = XtOffsetOf(MessageFormatter_object, zo);
|
||||
MessageFormatter_handlers.clone_obj = MessageFormatter_object_clone;
|
||||
MessageFormatter_handlers.free_obj = MessageFormatter_object_free;
|
||||
|
||||
|
||||
/* Declare 'MessageFormatter' class properties. */
|
||||
if( !MessageFormatter_ce_ptr )
|
||||
{
|
||||
zend_error(E_ERROR, "Failed to register MessageFormatter class");
|
||||
return;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
@ -446,12 +446,6 @@ void resourcebundle_register_class( void )
|
||||
|
||||
ResourceBundle_ce_ptr = zend_register_internal_class( &ce );
|
||||
|
||||
if( !ResourceBundle_ce_ptr )
|
||||
{
|
||||
zend_error(E_ERROR, "Failed to register ResourceBundle class");
|
||||
return;
|
||||
}
|
||||
|
||||
ResourceBundle_object_handlers = std_object_handlers;
|
||||
ResourceBundle_object_handlers.offset = XtOffsetOf(ResourceBundle_object, zend);
|
||||
ResourceBundle_object_handlers.clone_obj = NULL; /* ICU ResourceBundle has no clone implementation */
|
||||
|
@ -141,13 +141,6 @@ void spoofchecker_register_Spoofchecker_class(void)
|
||||
Spoofchecker_handlers.offset = XtOffsetOf(Spoofchecker_object, zo);
|
||||
Spoofchecker_handlers.clone_obj = spoofchecker_clone_obj;
|
||||
Spoofchecker_handlers.free_obj = Spoofchecker_objects_free;
|
||||
|
||||
if (!Spoofchecker_ce_ptr) {
|
||||
zend_error(E_ERROR,
|
||||
"Spoofchecker: attempt to create properties "
|
||||
"on a non-registered class.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user