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

Consult SIZEOF_ZEND_LONG instead of SIZEOF_LONG

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.8.0-beta2, 1.8.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      SIZEOF_ZEND_LONG more accurately indicates the size of PHP's integer values, while SIZEOF_LONG likely points to the platform itself (may not necessarily match). Preferring SIZEOF_ZEND_LONG may avoid some issues on Windows, as found while working on AppVeyor testing in PHPC-1131.

      This is also the real value of PHP_INT_SIZE, which we frequently consult in tests.

      This constant dates back to 28b7a03 and is available in all versions of PHP 7.

            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:
              Resolved: