com php-src: updated UPGRADING.INTERNALS with new data types: UPGRADING.INTERNALS
| From: | Anatol Belski | Date: | Fri, 22 Aug 2014 08:24:51 +0000 |
| Subject: | com php-src: updated UPGRADING.INTERNALS with new data types: UPGRADING.INTERNALS | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-80820@lists.php.net to get a copy of this message | ||
Commit: 612e459041999c39d6fd67af6066796e9f5434e4
Author: Anatol Belski <ab@php.net> Fri, 22 Aug 2014 10:24:51 +0200
Parents: 79f888a602db3814a6ab03183eff6375bfe9234a
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=612e459041999c39d6fd67af6066796e9f5434e4
Log:
updated UPGRADING.INTERNALS with new data types
Changed paths:
M UPGRADING.INTERNALS
Diff:
diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS
index 97b281a..36c10fb 100644
--- a/UPGRADING.INTERNALS
+++ b/UPGRADING.INTERNALS
@@ -7,6 +7,7 @@ UPGRADE NOTES - PHP X.Y
b. return_value_ptr now always available, RETVAL_ZVAL_FAST macros
c. POST data handling
d. Arginfo changes
+ e. New data types
2. Build system changes
a. Unix build system changes
@@ -18,6 +19,44 @@ UPGRADE NOTES - PHP X.Y
========================
a. zend_set_memory_limit() now takes the TSRMLS_CC macro as its last argument
+ e. New data types
+
+ String
+
+ Besides the old way of accepting the strings with 's', the new 'S' ZPP
spec
+ was introduced. It expects an argument of the type zend_string *. String lengths
+ in it do no more depend on the firm 'int' datatype. The replacement
+ is a platform dependent size_t datatype called php_size_t.
+
+ String length is defined as zend_size_t inside Zend and aliased as php_size_t
+ anywhere else. The inclusion of php.h is necessary.
+
+ Integer types
+
+ Integers do no more depend on the firm 'long' type. Instead a platform
+ dependent integer type is used. That datatype is defined dynamically to
+ guarantee the consistent 64 bit support. The zval field representing user
+ land integer it bound to php_int_t.
+
+ Signed integer is defined as zend_int_t, unsigned integer as zend_uint_t
+ inside Zend. Both are aliased as php_int_t and php_uint_t anywhere else,
+ respectively. The inclusion of php.h is necessary.
+
+ Other datatypes
+
+ zend_off_t - portable off_t analogue
+ zend_stat_t - portable 'struct stat' analogue
+
+ These datatypes are declared to be portable across platforms. Thus, direct
+ usage of the functions like fseek, stat, etc. as well as direct usage of
+ off_t and struct stat is strongly not recommended. Instead the portable
+ macros should be used.
+
+ zend_fseek - portable fseek equivalent
+ zend_ftell - portable ftell equivalent
+ zend_lseek - portable lseek equivalent
+ zend_fstat - portable fstat equivalent
+ zend_stat - portable stat equivalent
========================