rfc:string-size_t:progress
                This is an old revision of the document!
Quick start
The feature branch is http://git.php.net/?p=php-src.git;a=shortlog;h=refs/heads/str_size_and_int64
Currently int64 support is disabled by default, size_t support is enabled by default
- to build with size_t and int64 support use --enable-zint64 , size_t is enabled by default
 - to build without size_t and int64 support, use --enable-zstrlen , int64 is disabled by default
 
Relevant headers
- Zend/zend_types.h
 - Zend/zend_int.h
 - Zend/zend_stream.h
 - main/php_stream.h
 
New datatypes/functions
- zend_str_size has to be used for all the string sizes
 - zend_int_t, zend_uint_t are to be used instead of long and ulong
 - zend_off_t should be used instead of off_t
 - zend_stat_t, php_int_t should be used instead of “struct stat”
 - zend_fstat(), zend_stat_fn() macros are suitable to handle the *_stat_t types
 
BE AWARE OF WHAT size_t IS, READ SOME DOC BEFORE STARTING TO AVOID TRIVIAL MISTAKES
New macros
- Z_STRSIZE is the replacement for Z_STRLEN
 - ZEND_INT_MAX is the replacement for LONG_MAX, as well ZEND_UINT_MAX, ZEND_SIZE_MAX for the corresponding old macros
 
Accepting values from userland with zend_parse_parameters()
- “S” to accept string argument, the length has to be declared as zend_str_size, to replace the string length related variables with size_t, the appropriate macros from Zend/zend_types.h should be used (zend_str_size_int, zend_str_size_long, etc.)
 - “P” is the replacement for “p”
 - “i” to accept integer argument, the internal var has to be declared as php_int_t (inside PHP) or zend_int_t (inside Zend)
 - “I” to accept integer argument with range check, the internal var has to be declared as php_int_t (inside PHP) or zend_int_t (inside Zen
 
Progress
Initial work is done by ircmaxell, with that it compiles on linux and windows.
| Area | Assigned | Status size_t | Status int64 | 
|---|---|---|---|
| Zend | weltling | done | in progress | 
| TSRM | weltling | done | in progress | 
| main | weltling | done | in progress | 
| sapi/aolserver | not started | not started | |
| sapi/apache | not started | not started | |
| sapi/apache2filter | not started | not started | |
| sapi/apache2handler | not started | not started | |
| sapi/apache_hooks | not started | not started | |
| sapi/caudium | not started | not started | |
| sapi/cgi | not started | not started | |
| sapi/cli | done | in progress | |
| sapi/continuity | not started | not started | |
| sapi/embed | not started | not started | |
| sapi/fpm | not started | not started | |
| sapi/isapi | not started | not started | |
| sapi/litespeed | not started | not started | |
| sapi/milter | not started | not started | |
| sapi/nsapi | not started | not started | |
| sapi/phttpd | not started | not started | |
| sapi/pi3web | not started | not started | |
| sapi/roxen | not started | not started | |
| sapi/tests | not started | not started | |
| sapi/thttpd | not started | not started | |
| sapi/tux | not started | not started | |
| sapi/webjames | not started | not started | |
| not started | not started | ||
| ext/ | |||
| bz2 | not started | not started | |
| calendar | not started | not started | |
| com_dotnet | not started | not started | |
| ctype | not started | not started | |
| curl | not started | not started | |
| date | done | almost done | |
| dba | not started | not started | |
| dom | not started | not started | |
| enchant | not started | not started | |
| ereg | not started | not started | |
| exif | done | not started | |
| fileinfo | not started | not started | |
| filter | not started | not started | |
| ftp | not started | not started | |
| gd | not started | not started | |
| gettext | not started | not started | |
| gmp | not started | not started | |
| hash | not started | not started | |
| iconv | weltling | done | not started | 
| imap | not started | not started | |
| interbase | not started | not started | |
| intl | done, req review | not started | |
| json | not started | not started | |
| ldap | not started | not started | |
| libxml | weltling | in progress | not started | 
| mbstring | done | not started | |
| mcrypt | not started | not started | |
| mssql | not started | not started | |
| mysql | not started | not started | |
| mysqli | not started | not started | |
| mysqlnd | not started | not started | |
| oci8 | not started | not started | |
| odbc | not started | not started | |
| opcache | not started | not started | |
| openssl | not started | not started | |
| pcntl | not started | not started | |
| pcre | done | in progress | |
| pdo | not started | not started | |
| pdo_dblib | not started | not started | |
| pdo_mysql | not started | not started | |
| pdo_oci | not started | not started | |
| pdo_odbc | not started | not started | |
| pdo_pgsql | not started | not started | |
| pdo_sqlite | not started | not started | |
| pgsql | not started | not started | |
| phar | not started | not started | |
| posix | done | not started | |
| pspell | not started | not started | |
| readline | not started | not started | |
| recode | not started | not started | |
| reflection | not started | not started | |
| session | not started | not started | |
| shmop | not started | not started | |
| simpexml | weltling | in progress | not started | 
| skeleton | not started | not started | |
| snmp | not started | not started | |
| soap | not started | not started | |
| sockets | not started | not started | |
| spl | not started | almost done | |
| sqlite3 | not started | not started | |
| standard | done | in progress | |
| ssyabse_ct | not started | not started | |
| sysvmsg | not started | not started | |
| sysvsem | not started | not started | |
| sysvshm | not started | not started | |
| tidy | not started | not started | |
| tokenizer | not started | not started | |
| wddx | not started | not started | |
| xml | not started | not started | |
| xmlreader | not started | not started | |
| xmlrpc | not started | not started | |
| xmlwriter | not started | not started | |
| xsl | not started | not started | |
| zip | not started | not started | |
| zlib | done | not started | 
| Zend open questions | status | 
|---|---|
| Array indexing | in progress | 
| ext/standard open questions | status | 
|---|---|
| Mersenne Twister | not started | 
rfc/string-size_t/progress.1384365701.txt.gz · Last modified:  (external edit)