rfc:better_type_names_for_int64

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
rfc:better_type_names_for_int64 [2014/08/22 10:54] nikicrfc:better_type_names_for_int64 [2017/09/22 13:28] (current) – external edit 127.0.0.1
Line 21: Line 21:
   * There now exists a ''zend_int_t'' type (which is a 64bit-on-64bit type) and ''zend_int'' (which is a 32bit type). Apart from the ''_t'' suffix the name is the same, but the meaning is totally different.   * There now exists a ''zend_int_t'' type (which is a 64bit-on-64bit type) and ''zend_int'' (which is a 32bit type). Apart from the ''_t'' suffix the name is the same, but the meaning is totally different.
   * PHP and the Zend Engine do not use ''_t'' suffixes for types. This introduces a new type naming convention that is not used anywhere else. (Probably this is done to avoid clashing with the previous point.)   * PHP and the Zend Engine do not use ''_t'' suffixes for types. This introduces a new type naming convention that is not used anywhere else. (Probably this is done to avoid clashing with the previous point.)
-  * Using the term ''int'' for an 64bit type goes against the normal expectations of a C programmer (ILP64 systems are very rare). The meaning of the ''zend_int_t'' type is much closer to the ''long'' type.+  * Furthermore all types ending in ''_t'' are reserved by the POSIX standard. 
 +  * Using the term ''int'' for an 64bit type goes against the normal expectations of a C programmer (ILP64 systems are rare). The meaning of the ''zend_int_t'' type is much closer to the ''long'' type.
  
 Instead the following alternative naming is proposed: Instead the following alternative naming is proposed:
rfc/better_type_names_for_int64.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1