Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-2460

Replace PHONGO_ZVAL_CLASS_OR_TYPE_NAME macro with zend_zval_type_name

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • 1.21.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • PHP Drivers

      The PHONGO_ZVAL_CLASS_OR_TYPE_NAME macro in php_phongo.h can be replaced with zend_zval_type_name(). There is also a zend_zval_value_name() macro (since php/php-src@7936c80), but that is only available in PHP 8.3+.

      When replacing PHONGO_ZVAL_CLASS_OR_TYPE_NAME_P, we may need to manually dereference our pointers.

      Note that zend_zval_type_name() also applies ZVAL_DEREF to resolve zval references automatically, which is relevant to some recent issues discovered in PHPC-2457.

            Assignee:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: