Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions ext/intl/breakiterator/breakiterator_class.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions ext/intl/breakiterator/breakiterator_class.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions ext/intl/formatter/formatter_class.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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;

Expand All @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions ext/intl/msgformat/msgformat_class.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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;

Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion ext/intl/resourcebundle/resourcebundle_class.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
46 changes: 20 additions & 26 deletions ext/intl/spoofchecker/spoofchecker_class.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,34 @@ 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);

zend_object_std_dtor(&co->zo);

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;

Expand Down Expand Up @@ -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));
}
/* }}} */
2 changes: 0 additions & 2 deletions ext/intl/spoofchecker/spoofchecker_class.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading