rfc:range_checks_for_64_bit

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
rfc:range_checks_for_64_bit [2015/08/24 15:50] abrfc:range_checks_for_64_bit [2015/08/24 16:00] ab
Line 35: Line 35:
 #endif #endif
  
-#if SIZEOF_UINT == SIZEOF_ZEND_LONG +#if SIZEOF_INT == SIZEOF_ZEND_LONG 
-# define ZEND_LONG_INT_OVFL(zl) (0)+# define ZEND_LONG_UINT_OVFL(zl) (0)
 #else #else
 # define ZEND_LONG_UINT_OVFL(zlong) ((zlong) < 0 || (zlong) > (zend_long)UINT_MAX) # define ZEND_LONG_UINT_OVFL(zlong) ((zlong) < 0 || (zlong) > (zend_long)UINT_MAX)
Line 42: Line 42:
  
 #define ZEND_SIZE_T_INT_OVFL(size) ((size) > (size_t)INT_MAX) #define ZEND_SIZE_T_INT_OVFL(size) ((size) > (size_t)INT_MAX)
 +#define ZEND_SIZE_T_UINT_OVFL(size) ((size) > (size_t)UINT_MAX)
  
 </code> </code>
Line 54: Line 55:
 </code> </code>
  
-All the macros should be put into a dedicated header, so any extensions can be put there.+All the macros should be put into a dedicated header, so any extensions and improvements can follow up in the scope.
  
 ==== Proposed ZPP changes ==== ==== Proposed ZPP changes ====
rfc/range_checks_for_64_bit.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1