diff --git a/ext/intl/breakiterator/breakiterator_class.cpp b/ext/intl/breakiterator/breakiterator_class.cpp index fe6eb2749ce6..35c5b6956b4a 100644 --- a/ext/intl/breakiterator/breakiterator_class.cpp +++ b/ext/intl/breakiterator/breakiterator_class.cpp @@ -43,6 +43,16 @@ zend_class_entry *CodePointBreakIterator_ce_ptr; zend_object_handlers BreakIterator_handlers; /* }}} */ +static void breakiterator_object_construct(zval *object, + BreakIterator *biter) +{ + BreakIterator_object *bio; + + BREAKITER_METHOD_FETCH_OBJECT_NO_CHECK; //populate to from object + ZEND_ASSERT(bio->biter == NULL); + bio->biter = biter; +} + U_CFUNC void breakiterator_object_create(zval *object, BreakIterator *biter, int brand_new) { @@ -63,16 +73,6 @@ U_CFUNC void breakiterator_object_create(zval *object, breakiterator_object_construct(object, biter); } -U_CFUNC void breakiterator_object_construct(zval *object, - BreakIterator *biter) -{ - BreakIterator_object *bio; - - BREAKITER_METHOD_FETCH_OBJECT_NO_CHECK; //populate to from object - ZEND_ASSERT(bio->biter == NULL); - bio->biter = biter; -} - /* {{{ compare handler for BreakIterator */ static int BreakIterator_compare_objects(zval *object1, zval *object2) diff --git a/ext/intl/breakiterator/breakiterator_class.h b/ext/intl/breakiterator/breakiterator_class.h index 38e83da64dae..f4258cbae5b1 100644 --- a/ext/intl/breakiterator/breakiterator_class.h +++ b/ext/intl/breakiterator/breakiterator_class.h @@ -64,8 +64,6 @@ typedef struct { void breakiterator_object_create(zval *object, BreakIterator *break_iter, int brand_new); -void breakiterator_object_construct(zval *object, BreakIterator *break_iter); - void breakiterator_register_BreakIterator_class(void); extern zend_class_entry *BreakIterator_ce_ptr, diff --git a/ext/intl/formatter/formatter_class.cpp b/ext/intl/formatter/formatter_class.cpp index bcdfbee63559..2f3a4bb27ee4 100644 --- a/ext/intl/formatter/formatter_class.cpp +++ b/ext/intl/formatter/formatter_class.cpp @@ -35,7 +35,7 @@ static zend_object_handlers NumberFormatter_handlers; */ /* {{{ NumberFormatter_objects_free */ -U_CFUNC void NumberFormatter_object_free( zend_object *object ) +static void NumberFormatter_object_free( zend_object *object ) { NumberFormatter_object* nfo = php_intl_number_format_fetch_object(object); @@ -46,7 +46,7 @@ U_CFUNC void NumberFormatter_object_free( zend_object *object ) /* }}} */ /* {{{ NumberFormatter_object_create */ -U_CFUNC zend_object *NumberFormatter_object_create(zend_class_entry *ce) +static zend_object *NumberFormatter_object_create(zend_class_entry *ce) { NumberFormatter_object* intern; @@ -61,7 +61,7 @@ U_CFUNC zend_object *NumberFormatter_object_create(zend_class_entry *ce) /* }}} */ /* {{{ NumberFormatter_object_clone */ -U_CFUNC zend_object *NumberFormatter_object_clone(zend_object *object) +static zend_object *NumberFormatter_object_clone(zend_object *object) { const NumberFormatter_object *nfo = php_intl_number_format_fetch_object(object); zend_object *new_obj = NumberFormatter_ce_ptr->create_object(object->ce); diff --git a/ext/intl/msgformat/msgformat_class.cpp b/ext/intl/msgformat/msgformat_class.cpp index 52f6c79df8cd..79398fb76e1d 100644 --- a/ext/intl/msgformat/msgformat_class.cpp +++ b/ext/intl/msgformat/msgformat_class.cpp @@ -31,7 +31,7 @@ static zend_object_handlers MessageFormatter_handlers; */ /* {{{ MessageFormatter_objects_free */ -U_CFUNC void MessageFormatter_object_free( zend_object *object ) +static void MessageFormatter_object_free( zend_object *object ) { MessageFormatter_object* mfo = php_intl_messageformatter_fetch_object(object); @@ -42,7 +42,7 @@ U_CFUNC void MessageFormatter_object_free( zend_object *object ) /* }}} */ /* {{{ MessageFormatter_object_create */ -U_CFUNC zend_object *MessageFormatter_object_create(zend_class_entry *ce) +static zend_object *MessageFormatter_object_create(zend_class_entry *ce) { MessageFormatter_object* intern; @@ -56,7 +56,7 @@ U_CFUNC zend_object *MessageFormatter_object_create(zend_class_entry *ce) /* }}} */ /* {{{ MessageFormatter_object_clone */ -U_CFUNC zend_object *MessageFormatter_object_clone(zend_object *object) +static zend_object *MessageFormatter_object_clone(zend_object *object) { const MessageFormatter_object *mfo = php_intl_messageformatter_fetch_object(object); zend_object *new_obj = MessageFormatter_ce_ptr->create_object(object->ce); diff --git a/ext/intl/resourcebundle/resourcebundle_class.cpp b/ext/intl/resourcebundle/resourcebundle_class.cpp index e5a0fe1eefc7..a7ca5eceeaa4 100644 --- a/ext/intl/resourcebundle/resourcebundle_class.cpp +++ b/ext/intl/resourcebundle/resourcebundle_class.cpp @@ -239,7 +239,7 @@ static zval *resource_bundle_array_fetch( /* }}} */ /* {{{ resourcebundle_array_get */ -U_CFUNC zval *resourcebundle_array_get(zend_object *object, zval *offset, int type, zval *rv) +static zval *resourcebundle_array_get(zend_object *object, zval *offset, int type, zval *rv) { if (offset == NULL) { zend_throw_error(NULL, "Cannot apply [] to ResourceBundle object"); diff --git a/ext/intl/spoofchecker/spoofchecker_class.cpp b/ext/intl/spoofchecker/spoofchecker_class.cpp index 8cd9c35cfd2f..fcadb2f44808 100644 --- a/ext/intl/spoofchecker/spoofchecker_class.cpp +++ b/ext/intl/spoofchecker/spoofchecker_class.cpp @@ -28,8 +28,25 @@ static zend_object_handlers Spoofchecker_handlers; * Auxiliary functions needed by objects of 'Spoofchecker' class */ -/* {{{ Spoofchecker_objects_free */ -U_CFUNC void Spoofchecker_objects_free(zend_object *object) +/* Clean up mem allocted by internals of Spoofchecker_object */ +static void spoofchecker_object_destroy(Spoofchecker_object* co) +{ + if (!co) { + return; + } + + if (co->uspoof) { + uspoof_close(co->uspoof); + co->uspoof = NULL; + } + + intl_icu_compat_uspoof_close_check_result(co->uspoofres); + co->uspoofres = NULL; + + intl_error_reset(SPOOFCHECKER_ERROR_P(co)); +} + +static void Spoofchecker_objects_free(zend_object *object) { Spoofchecker_object* co = php_intl_spoofchecker_fetch_object(object); @@ -37,10 +54,8 @@ U_CFUNC void Spoofchecker_objects_free(zend_object *object) spoofchecker_object_destroy(co); } -/* }}} */ -/* {{{ Spoofchecker_object_create */ -U_CFUNC zend_object *Spoofchecker_object_create(zend_class_entry *ce) +static zend_object *Spoofchecker_object_create(zend_class_entry *ce) { Spoofchecker_object* intern; @@ -103,24 +118,3 @@ U_CFUNC void spoofchecker_register_Spoofchecker_class(void) Spoofchecker_handlers.free_obj = Spoofchecker_objects_free; } /* }}} */ - -/* {{{ void spoofchecker_object_destroy( Spoofchecker_object* co ) - * Clean up mem allocted by internals of Spoofchecker_object - */ -U_CFUNC void spoofchecker_object_destroy(Spoofchecker_object* co) -{ - if (!co) { - return; - } - - if (co->uspoof) { - uspoof_close(co->uspoof); - co->uspoof = NULL; - } - - intl_icu_compat_uspoof_close_check_result(co->uspoofres); - co->uspoofres = NULL; - - intl_error_reset(SPOOFCHECKER_ERROR_P(co)); -} -/* }}} */ diff --git a/ext/intl/spoofchecker/spoofchecker_class.h b/ext/intl/spoofchecker/spoofchecker_class.h index 347b78e3ffd4..dc9aa43db8a6 100644 --- a/ext/intl/spoofchecker/spoofchecker_class.h +++ b/ext/intl/spoofchecker/spoofchecker_class.h @@ -54,8 +54,6 @@ typedef struct { extern "C" { #endif void spoofchecker_register_Spoofchecker_class(void); - -void spoofchecker_object_destroy(Spoofchecker_object* co); #ifdef __cplusplus } #endif