@@ -329,15 +329,13 @@ typedef struct _zend_fcall_info_cache {
329
329
ZEND_API int zend_next_free_module (void );
330
330
331
331
BEGIN_EXTERN_C ()
332
- ZEND_API zend_result _zend_get_parameters_array_ex (uint32_t param_count , zval * argument_array );
332
+ ZEND_API zend_result zend_get_parameters_array_ex (uint32_t param_count , zval * argument_array );
333
333
334
334
/* internal function to efficiently copy parameters when executing __call() */
335
335
ZEND_API zend_result zend_copy_parameters_array (uint32_t param_count , zval * argument_array );
336
336
337
337
#define zend_get_parameters_array (ht , param_count , argument_array ) \
338
- _zend_get_parameters_array_ex(param_count, argument_array)
339
- #define zend_get_parameters_array_ex (param_count , argument_array ) \
340
- _zend_get_parameters_array_ex(param_count, argument_array)
338
+ zend_get_parameters_array_ex(param_count, argument_array)
341
339
#define zend_parse_parameters_none () \
342
340
(EXPECTED(ZEND_NUM_ARGS() == 0) ? SUCCESS : (zend_wrong_parameters_none_error(), FAILURE))
343
341
#define zend_parse_parameters_none_throw () \
@@ -382,8 +380,9 @@ ZEND_API void zend_class_implements(zend_class_entry *class_entry, int num_inter
382
380
383
381
ZEND_API zend_result zend_register_class_alias_ex (const char * name , size_t name_len , zend_class_entry * ce , bool persistent );
384
382
385
- #define zend_register_class_alias (name , ce ) \
386
- zend_register_class_alias_ex(name, sizeof(name)-1, ce, 1)
383
+ static zend_always_inline zend_result zend_register_class_alias (const char * name , zend_class_entry * ce ) {
384
+ return zend_register_class_alias_ex (name , strlen (name ), ce , 1 );
385
+ }
387
386
#define zend_register_ns_class_alias (ns , name , ce ) \
388
387
zend_register_class_alias_ex(ZEND_NS_NAME(ns, name), sizeof(ZEND_NS_NAME(ns, name))-1, ce, 1)
389
388
@@ -540,18 +539,42 @@ ZEND_API void add_assoc_object_ex(zval *arg, const char *key, size_t key_len, ze
540
539
ZEND_API void add_assoc_reference_ex (zval * arg , const char * key , size_t key_len , zend_reference * ref );
541
540
ZEND_API void add_assoc_zval_ex (zval * arg , const char * key , size_t key_len , zval * value );
542
541
543
- #define add_assoc_long (__arg , __key , __n ) add_assoc_long_ex(__arg, __key, strlen(__key), __n)
544
- #define add_assoc_null (__arg , __key ) add_assoc_null_ex(__arg, __key, strlen(__key))
545
- #define add_assoc_bool (__arg , __key , __b ) add_assoc_bool_ex(__arg, __key, strlen(__key), __b)
546
- #define add_assoc_resource (__arg , __key , __r ) add_assoc_resource_ex(__arg, __key, strlen(__key), __r)
547
- #define add_assoc_double (__arg , __key , __d ) add_assoc_double_ex(__arg, __key, strlen(__key), __d)
548
- #define add_assoc_str (__arg , __key , __str ) add_assoc_str_ex(__arg, __key, strlen(__key), __str)
549
- #define add_assoc_string (__arg , __key , __str ) add_assoc_string_ex(__arg, __key, strlen(__key), __str)
550
- #define add_assoc_stringl (__arg , __key , __str , __length ) add_assoc_stringl_ex(__arg, __key, strlen(__key), __str, __length)
551
- #define add_assoc_array (__arg , __key , __arr ) add_assoc_array_ex(__arg, __key, strlen(__key), __arr)
552
- #define add_assoc_object (__arg , __key , __obj ) add_assoc_object_ex(__arg, __key, strlen(__key), __obj)
553
- #define add_assoc_reference (__arg , __key , __ref ) add_assoc_object_ex(__arg, __key, strlen(__key), __ref)
554
- #define add_assoc_zval (__arg , __key , __value ) add_assoc_zval_ex(__arg, __key, strlen(__key), __value)
542
+ static zend_always_inline void add_assoc_long (zval * arg , const char * key , zend_long n ) {
543
+ add_assoc_long_ex (arg , key , strlen (key ), n );
544
+ }
545
+ static zend_always_inline void add_assoc_null (zval * arg , const char * key ) {
546
+ add_assoc_null_ex (arg , key , strlen (key ));
547
+ }
548
+ static zend_always_inline void add_assoc_bool (zval * arg , const char * key , bool b ) {
549
+ add_assoc_bool_ex (arg , key , strlen (key ), b );
550
+ }
551
+ static zend_always_inline void add_assoc_resource (zval * arg , const char * key , zend_resource * r ) {
552
+ add_assoc_resource_ex (arg , key , strlen (key ), r );
553
+ }
554
+ static zend_always_inline void add_assoc_double (zval * arg , const char * key , double d ) {
555
+ add_assoc_double_ex (arg , key , strlen (key ), d );
556
+ }
557
+ static zend_always_inline void add_assoc_str (zval * arg , const char * key , zend_string * str ) {
558
+ add_assoc_str_ex (arg , key , strlen (key ), str );
559
+ }
560
+ static zend_always_inline void add_assoc_string (zval * arg , const char * key , const char * str ) {
561
+ add_assoc_string_ex (arg , key , strlen (key ), str );
562
+ }
563
+ static zend_always_inline void add_assoc_stringl (zval * arg , const char * key , const char * str , size_t length ) {
564
+ add_assoc_stringl_ex (arg , key , strlen (key ), str , length );
565
+ }
566
+ static zend_always_inline void add_assoc_array (zval * arg , const char * key , zend_array * arr ) {
567
+ add_assoc_array_ex (arg , key , strlen (key ), arr );
568
+ }
569
+ static zend_always_inline void add_assoc_object (zval * arg , const char * key , zend_object * obj ) {
570
+ add_assoc_object_ex (arg , key , strlen (key ), obj );
571
+ }
572
+ static zend_always_inline void add_assoc_reference (zval * arg , const char * key , zend_reference * ref ) {
573
+ add_assoc_reference_ex (arg , key , strlen (key ), ref );
574
+ }
575
+ static zend_always_inline void add_assoc_zval (zval * arg , const char * key , zval * value ) {
576
+ add_assoc_zval_ex (arg , key , strlen (key ), value );
577
+ }
555
578
556
579
ZEND_API void add_index_long (zval * arg , zend_ulong index , zend_long n );
557
580
ZEND_API void add_index_null (zval * arg , zend_ulong index );
@@ -602,19 +625,42 @@ ZEND_API void add_property_object_ex(zval *arg, const char *key, size_t key_len,
602
625
ZEND_API void add_property_reference_ex (zval * arg , const char * key , size_t key_len , zend_reference * ref );
603
626
ZEND_API void add_property_zval_ex (zval * arg , const char * key , size_t key_len , zval * value );
604
627
605
- #define add_property_long (__arg , __key , __n ) add_property_long_ex(__arg, __key, strlen(__key), __n)
606
- #define add_property_null (__arg , __key ) add_property_null_ex(__arg, __key, strlen(__key))
607
- #define add_property_bool (__arg , __key , __b ) add_property_bool_ex(__arg, __key, strlen(__key), __b)
608
- #define add_property_resource (__arg , __key , __r ) add_property_resource_ex(__arg, __key, strlen(__key), __r)
609
- #define add_property_double (__arg , __key , __d ) add_property_double_ex(__arg, __key, strlen(__key), __d)
610
- #define add_property_str (__arg , __key , __str ) add_property_str_ex(__arg, __key, strlen(__key), __str)
611
- #define add_property_string (__arg , __key , __str ) add_property_string_ex(__arg, __key, strlen(__key), __str)
612
- #define add_property_stringl (__arg , __key , __str , __length ) add_property_stringl_ex(__arg, __key, strlen(__key), __str, __length)
613
- #define add_property_array (__arg , __key , __arr ) add_property_array_ex(__arg, __key, strlen(__key), __arr)
614
- #define add_property_object (__arg , __key , __obj ) add_property_object_ex(__arg, __key, strlen(__key), __obj)
615
- #define add_property_reference (__arg , __key , __ref ) add_property_reference_ex(__arg, __key, strlen(__key), __ref)
616
- #define add_property_zval (__arg , __key , __value ) add_property_zval_ex(__arg, __key, strlen(__key), __value)
617
-
628
+ static zend_always_inline void add_property_long (zval * arg , const char * key , zend_long n ) {
629
+ add_property_long_ex (arg , key , strlen (key ), n );
630
+ }
631
+ static zend_always_inline void add_property_null (zval * arg , const char * key ) {
632
+ add_property_null_ex (arg , key , strlen (key ));
633
+ }
634
+ static zend_always_inline void add_property_bool (zval * arg , const char * key , bool b ) {
635
+ add_property_bool_ex (arg , key , strlen (key ), b );
636
+ }
637
+ static zend_always_inline void add_property_resource (zval * arg , const char * key , zend_resource * r ) {
638
+ add_property_resource_ex (arg , key , strlen (key ), r );
639
+ }
640
+ static zend_always_inline void add_property_double (zval * arg , const char * key , double d ) {
641
+ add_property_double_ex (arg , key , strlen (key ), d );
642
+ }
643
+ static zend_always_inline void add_property_str (zval * arg , const char * key , zend_string * str ) {
644
+ add_property_str_ex (arg , key , strlen (key ), str );
645
+ }
646
+ static zend_always_inline void add_property_string (zval * arg , const char * key , const char * str ) {
647
+ add_property_string_ex (arg , key , strlen (key ), str );
648
+ }
649
+ static zend_always_inline void add_property_stringl (zval * arg , const char * key , const char * str , size_t length ) {
650
+ add_property_stringl_ex (arg , key , strlen (key ), str , length );
651
+ }
652
+ static zend_always_inline void add_property_array (zval * arg , const char * key , zend_array * arr ) {
653
+ add_property_array_ex (arg , key , strlen (key ), arr );
654
+ }
655
+ static zend_always_inline void add_property_object (zval * arg , const char * key , zend_object * obj ) {
656
+ add_property_object_ex (arg , key , strlen (key ), obj );
657
+ }
658
+ static zend_always_inline void add_property_reference (zval * arg , const char * key , zend_reference * ref ) {
659
+ add_property_reference_ex (arg , key , strlen (key ), ref );
660
+ }
661
+ static zend_always_inline void add_property_zval (zval * arg , const char * key , zval * value ) {
662
+ add_property_zval_ex (arg , key , strlen (key ), value );
663
+ }
618
664
619
665
ZEND_API zend_result _call_user_function_impl (zval * object , zval * function_name , zval * retval_ptr , uint32_t param_count , zval params [], HashTable * named_params );
620
666
0 commit comments