summaryrefslogtreecommitdiff
path: root/ext/intl/msgformat/msgformat_class.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/intl/msgformat/msgformat_class.c')
-rwxr-xr-xext/intl/msgformat/msgformat_class.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/intl/msgformat/msgformat_class.c b/ext/intl/msgformat/msgformat_class.c
index 28906d4e4c..522d59060c 100755
--- a/ext/intl/msgformat/msgformat_class.c
+++ b/ext/intl/msgformat/msgformat_class.c
@@ -25,6 +25,7 @@
#include "msgformat_attr.h"
zend_class_entry *MessageFormatter_ce_ptr = NULL;
+static zend_object_handlers MessageFormatter_handlers;
/*
* Auxiliary functions needed by objects of 'MessageFormatter' class
@@ -66,7 +67,7 @@ zend_object_value MessageFormatter_object_create(zend_class_entry *ce TSRMLS_DC)
(zend_objects_free_object_storage_t)MessageFormatter_object_free,
NULL TSRMLS_CC );
- retval.handlers = zend_get_std_object_handlers();
+ retval.handlers = &MessageFormatter_handlers;
return retval;
}
@@ -135,6 +136,10 @@ void msgformat_register_class( TSRMLS_D )
ce.create_object = MessageFormatter_object_create;
MessageFormatter_ce_ptr = zend_register_internal_class( &ce TSRMLS_CC );
+ memcpy(&MessageFormatter_handlers, zend_get_std_object_handlers(),
+ sizeof MessageFormatter_handlers);
+ MessageFormatter_handlers.clone_obj = NULL;
+
/* Declare 'MessageFormatter' class properties. */
if( !MessageFormatter_ce_ptr )
{