@@ -189,19 +189,10 @@ static zend_object *Transliterator_clone_obj( zend_object *object )
189
189
/* {{{ get_property_ptr_ptr handler */
190
190
static zval * Transliterator_get_property_ptr_ptr ( zend_object * object , zend_string * name , int type , void * * cache_slot )
191
191
{
192
- zval * retval ;
193
-
194
- if (zend_binary_strcmp ( "id" , sizeof ( "id" ) - 1 ,
195
- ZSTR_VAL ( name ), ZSTR_LEN ( name ) ) == 0 )
196
- {
197
- retval = NULL ; /* fallback to read_property */
192
+ if (zend_string_equals_literal (name , "id" )) {
193
+ return NULL ; /* fallback to read_property */
198
194
}
199
- else
200
- {
201
- retval = zend_std_get_property_ptr_ptr ( object , name , type , cache_slot );
202
- }
203
-
204
- return retval ;
195
+ return zend_std_get_property_ptr_ptr ( object , name , type , cache_slot );
205
196
}
206
197
/* }}} */
207
198
@@ -210,15 +201,10 @@ static zval *Transliterator_read_property( zend_object *object, zend_string *nam
210
201
{
211
202
zval * retval ;
212
203
213
- if ( ( type != BP_VAR_R && type != BP_VAR_IS ) &&
214
- ( zend_binary_strcmp ( "id" , sizeof ( "id" ) - 1 ,
215
- ZSTR_VAL ( name ), ZSTR_LEN ( name ) ) == 0 ) )
216
- {
204
+ if ((type != BP_VAR_R && type != BP_VAR_IS ) && zend_string_equals_literal (name , "id" )) {
217
205
zend_throw_error (NULL , "Transliterator::$id is read-only" );
218
206
retval = & EG ( uninitialized_zval );
219
- }
220
- else
221
- {
207
+ } else {
222
208
retval = zend_std_read_property ( object , name , type , cache_slot , rv );
223
209
}
224
210
@@ -238,14 +224,9 @@ static zval *Transliterator_write_property( zend_object *object, zend_string *na
238
224
} else {
239
225
scope = zend_get_executed_scope ();
240
226
}
241
- if ( ( scope != Transliterator_ce_ptr ) &&
242
- ( zend_binary_strcmp ( "id" , sizeof ( "id" ) - 1 ,
243
- ZSTR_VAL ( name ), ZSTR_LEN ( name ) ) == 0 ) )
244
- {
227
+ if ((scope != Transliterator_ce_ptr ) && zend_string_equals_literal (name , "id" )) {
245
228
zend_throw_error (NULL , "Transliterator::$id is read-only" );
246
- }
247
- else
248
- {
229
+ } else {
249
230
value = zend_std_write_property ( object , name , value , cache_slot );
250
231
}
251
232
0 commit comments