@@ -144,17 +144,13 @@ static zend_object *Transliterator_clone_obj( zend_object *object )
144
144
145
145
if ( to_orig -> utrans != NULL )
146
146
{
147
- zval tempz ; /* dummy zval to pass to transliterator_object_construct */
148
-
149
147
/* guaranteed to return NULL if it fails */
150
148
UTransliterator * utrans = utrans_clone ( to_orig -> utrans , TRANSLITERATOR_ERROR_CODE_P ( to_orig ) );
151
149
152
150
if ( U_FAILURE ( TRANSLITERATOR_ERROR_CODE ( to_orig ) ) )
153
151
goto err ;
154
152
155
- ZVAL_OBJ (& tempz , ret_val );
156
- transliterator_object_construct ( & tempz , utrans ,
157
- TRANSLITERATOR_ERROR_CODE_P ( to_orig ) );
153
+ to_new -> utrans = utrans ;
158
154
159
155
if ( U_FAILURE ( TRANSLITERATOR_ERROR_CODE ( to_orig ) ) )
160
156
{
@@ -173,7 +169,6 @@ static zend_object *Transliterator_clone_obj( zend_object *object )
173
169
err_msg = intl_error_get_message ( TRANSLITERATOR_ERROR_P ( to_orig ) );
174
170
zend_throw_error ( NULL , "%s" , ZSTR_VAL (err_msg ) );
175
171
zend_string_free ( err_msg ); /* if it's changed into a warning */
176
- /* do not destroy tempz; we need to return something */
177
172
}
178
173
}
179
174
else
@@ -186,54 +181,6 @@ static zend_object *Transliterator_clone_obj( zend_object *object )
186
181
}
187
182
/* }}} */
188
183
189
- /* {{{ get_property_ptr_ptr handler */
190
- static zval * Transliterator_get_property_ptr_ptr ( zend_object * object , zend_string * name , int type , void * * cache_slot )
191
- {
192
- if (zend_string_equals_literal (name , "id" )) {
193
- return NULL ; /* fallback to read_property */
194
- }
195
- return zend_std_get_property_ptr_ptr ( object , name , type , cache_slot );
196
- }
197
- /* }}} */
198
-
199
- /* {{{ read_property handler */
200
- static zval * Transliterator_read_property ( zend_object * object , zend_string * name , int type , void * * cache_slot , zval * rv )
201
- {
202
- zval * retval ;
203
-
204
- if ((type != BP_VAR_R && type != BP_VAR_IS ) && zend_string_equals_literal (name , "id" )) {
205
- zend_throw_error (NULL , "Transliterator::$id is read-only" );
206
- retval = & EG ( uninitialized_zval );
207
- } else {
208
- retval = zend_std_read_property ( object , name , type , cache_slot , rv );
209
- }
210
-
211
- return retval ;
212
- }
213
-
214
- /* }}} */
215
-
216
- /* {{{ write_property handler */
217
- static zval * Transliterator_write_property ( zend_object * object , zend_string * name , zval * value ,
218
- void * * cache_slot )
219
- {
220
- zend_class_entry * scope ;
221
-
222
- if (EG (fake_scope )) {
223
- scope = EG (fake_scope );
224
- } else {
225
- scope = zend_get_executed_scope ();
226
- }
227
- if ((scope != Transliterator_ce_ptr ) && zend_string_equals_literal (name , "id" )) {
228
- zend_throw_error (NULL , "Transliterator::$id is read-only" );
229
- } else {
230
- value = zend_std_write_property ( object , name , value , cache_slot );
231
- }
232
-
233
- return value ;
234
- }
235
- /* }}} */
236
-
237
184
/* {{{ transliterator_register_Transliterator_class
238
185
* Initialize 'Transliterator' class
239
186
*/
@@ -246,9 +193,6 @@ void transliterator_register_Transliterator_class( void )
246
193
Transliterator_handlers .offset = XtOffsetOf (Transliterator_object , zo );
247
194
Transliterator_handlers .free_obj = Transliterator_objects_free ;
248
195
Transliterator_handlers .clone_obj = Transliterator_clone_obj ;
249
- Transliterator_handlers .get_property_ptr_ptr = Transliterator_get_property_ptr_ptr ;
250
- Transliterator_handlers .read_property = Transliterator_read_property ;
251
- Transliterator_handlers .write_property = Transliterator_write_property ;
252
196
253
197
/* constants are declared in transliterator_register_constants, called from MINIT */
254
198
0 commit comments