mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-10 10:40:50 +00:00
Compare commits
42
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9fc46d3a46 | ||
|
|
ec94654316 | ||
|
|
03e748888b | ||
|
|
3dca869c7b | ||
|
|
480a2ea1b7 | ||
|
|
bf80795cad | ||
|
|
881e6b69c4 | ||
|
|
888e41a834 | ||
|
|
02e8c41b24 | ||
|
|
bd3b413dc9 | ||
|
|
83a354b69a | ||
|
|
3de6716235 | ||
|
|
288d437b3e | ||
|
|
40cd0d8909 | ||
|
|
ac6d2d4fe9 | ||
|
|
ebc2ff7c07 | ||
|
|
a8b9717374 | ||
|
|
de138d3468 | ||
|
|
a5ce3491ef | ||
|
|
d07f47f59e | ||
|
|
c3670534df | ||
|
|
b583e753b5 | ||
|
|
f81e218f15 | ||
|
|
71fa3102fc | ||
|
|
ded8918b9e | ||
|
|
a574e24080 | ||
|
|
d812632083 | ||
|
|
ad39ef1462 | ||
|
|
c0446845b9 | ||
|
|
326dcb9e79 | ||
|
|
26a0663044 | ||
|
|
9b4e521b9c | ||
|
|
449ddbccb1 | ||
|
|
fa077c7be9 | ||
|
|
786eacfd45 | ||
|
|
46cdd040e2 | ||
|
|
6f164ad7dc | ||
|
|
58f0cbd534 | ||
|
|
594b7989cc | ||
|
|
44294ada47 | ||
|
|
c277e3f98d | ||
|
|
cd14d04924 |
No files matched your search
+7
-40
@@ -64,11 +64,11 @@ Exceptions:
|
||||
Naming Conventions
|
||||
------------------
|
||||
|
||||
[1] Function names for user-level functions should be enclosed with in
|
||||
[1] Function names for user functions should be enclosed with in
|
||||
the PHP_FUNCTION() macro. They should be in lowercase, with words
|
||||
underscore delimited, with care taken to minimize the letter count.
|
||||
Abbreviations should not be used when they greatly decrease the
|
||||
readability of the function name itself.
|
||||
If they are part of a "parent set" of functions, that parent should
|
||||
be included in the user function name.
|
||||
|
||||
Good:
|
||||
'mcrypt_enc_self_test'
|
||||
@@ -83,35 +83,17 @@ Naming Conventions
|
||||
Bad:
|
||||
'hw_GetObjectByQueryCollObj'
|
||||
'pg_setclientencoding'
|
||||
'jf_n_s_i'
|
||||
|
||||
|
||||
[2] If they are part of a "parent set" of functions, that parent should
|
||||
be included in the user function name, and should be clearly related
|
||||
to the parent program or function family. This should be in the form
|
||||
of parent_*.
|
||||
|
||||
A family of 'foo' functions, for example:
|
||||
Good:
|
||||
'foo_select_bar'
|
||||
'foo_insert_baz'
|
||||
'foo_delete_baz'
|
||||
|
||||
Bad:
|
||||
'fooselect_bar'
|
||||
'fooinsertbaz'
|
||||
'delete_foo_baz'
|
||||
|
||||
[3] Function names used by user functions should be prefixed
|
||||
[2] Function names used by user functions should be prefixed
|
||||
with "_php_", and followed by a word or an underscore-delimited list of
|
||||
words, in lowercase letters, that describes the function. If applicable,
|
||||
they should be declared 'static'.
|
||||
|
||||
[4] Variable names must be meaningful. One letter variable names must be
|
||||
[3] Variable names must be meaningful. One letter variable names must be
|
||||
avoided, except for places where the variable has no real meaning or
|
||||
a trivial meaning (e.g. for (i=0; i<100; i++) ...).
|
||||
|
||||
[5] Variable names should be in lowercase; Use underscores to seperate
|
||||
[4] Variable names should be in lowercase; Use underscores to seperate
|
||||
between words.
|
||||
|
||||
|
||||
@@ -185,23 +167,8 @@ messing up the function summary.
|
||||
Optional arguments are written like this:
|
||||
|
||||
/* {{{ proto object imap_header(int stream_id, int msg_no [, int from_length [, int subject_length [, string default_host]]])
|
||||
Returns a header object with the defined parameters. */
|
||||
|
||||
And yes, please keep the prototype on a single line, even if that line
|
||||
is massive.
|
||||
|
||||
New and Experimental Functions
|
||||
-----------------------------------
|
||||
To reduce the problems normally associated with the first public
|
||||
implementation of a new set of functions, it has been suggested
|
||||
that the first implementation include a file labeled 'EXPERIMENTAL'
|
||||
in the function directory, and that the functions follow the
|
||||
standard prefixing conventions during their initial implementation.
|
||||
|
||||
The file labelled 'EXPERIMENTAL' should include the following
|
||||
information:
|
||||
Any authoring infomration (known bugs, future directions of the module).
|
||||
Ongoing status notes which may not be appropriate for CVS comments.
|
||||
And yes, please keep everything on a single line, even if that line is massive.
|
||||
|
||||
Aliases & Legacy Documentation
|
||||
-----------------------------------
|
||||
|
||||
+9
-71
@@ -109,7 +109,7 @@ STATUS: Experimental
|
||||
SINCE: 4.0.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: interbase
|
||||
PRIMARY MAINTAINER: Jouni Ahto <jouni.ahto@exdec.fi>
|
||||
PRIMARY MAINTAINER: Jouni Ahto <jah@mork.net>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -128,7 +128,7 @@ MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pgsql
|
||||
PRIMARY MAINTAINER: Jouni Ahto <jouni.ahto@exdec.fi>
|
||||
PRIMARY MAINTAINER: Jouni Ahto <jah@mork.net>
|
||||
MAINTENANCE: Odd fixes
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -171,12 +171,6 @@ EXTENSION: bcmath
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: bz2
|
||||
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.3
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: calendar
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
@@ -190,15 +184,10 @@ PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: crack
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.5
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: curl
|
||||
EXTENSION: CURL
|
||||
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: cybercash
|
||||
@@ -239,11 +228,6 @@ EXTENSION: gettext
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: gmp
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
SINCE: 4.0.4
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: icap
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Obsolete
|
||||
@@ -278,18 +262,10 @@ PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: muscat
|
||||
PRIMARY MAINTAINER: Sam Liddicott <sam@ananova.com>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 4.0.5
|
||||
COMMENT: Not tested against windows, only core API completed, rest under development
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: openssl
|
||||
PRIMARY MAINTAINER: Stig Venaas <venaas@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.4
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pcre
|
||||
PRIMARY MAINTAINER: Andrei Zmievski <andrei@ispi.net>
|
||||
@@ -312,23 +288,12 @@ PRIMARY MAINTAINER: Kristian K
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: printer
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.4
|
||||
COMMENT: Only for Win32
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pspell
|
||||
PRIMARY MAINTAINER: Vlad Krupin <phpdevel@echospace.com>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
SINCE: 4.0.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: qtdom
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.4
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: readline
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
@@ -338,12 +303,6 @@ PRIMARY MAINTAINER: Kristian K
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: sablot
|
||||
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.3
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: satellite
|
||||
PRIMARY MAINTAINER: David Eriksson <eriksson@php.net>
|
||||
MAINTENANCE: Odd Fixes
|
||||
@@ -355,12 +314,6 @@ PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: shmop
|
||||
PRIMARY MAINTAINER: Unknown
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.3
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: snmp
|
||||
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
|
||||
MAINTENANCE: Odd Fixes
|
||||
@@ -368,15 +321,14 @@ STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: sockets
|
||||
PRIMARY MAINTAINER: Chris Vandomelen <chrisv@b0rked.dhs.org>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
SINCE: 4.0.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: swf
|
||||
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Unknown
|
||||
COMMENT: Only for Unix (won't change)
|
||||
STATUS: Unix (won't change)
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: sysvsem
|
||||
MAINTENANCE: Unknown
|
||||
@@ -386,11 +338,6 @@ EXTENSION: sysvshm
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: vpopmail
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.5
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: wddx
|
||||
PRIMARY MAINTAINER: Andrei Zmievski <andrei@ispi.net>
|
||||
MAINTENANCE: Maintained
|
||||
@@ -399,7 +346,7 @@ STATUS: Working
|
||||
EXTENSION: xml
|
||||
PRIMARY MAINTAINER: Thies C. Arntzen <thies@thieso.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: yaz
|
||||
PRIMARY MAINTAINER: Adam Dickmeiss <adam@indexdata.dk>
|
||||
@@ -407,19 +354,10 @@ MAINTENANCE: Maintained
|
||||
STATUS: Unknown
|
||||
SINCE: 4.0.1
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: yp
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: zlib
|
||||
PRIMARY MAINTAINER: Stefan Roehrich <sr@linux.de>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: zziplib
|
||||
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.5
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
# iptc?
|
||||
@@ -390,7 +390,7 @@ USING PHP 3 AND PHP 4 AS CONCURRENT APACHE MODULES
|
||||
- Solaris 2.5 or better
|
||||
- FreeBSD (3.2, 4.0 tested)
|
||||
- IRIX64 6.5
|
||||
|
||||
|
||||
To enable it, configure PHP 3 and PHP 4 to use APXS (--with-apxs) and the
|
||||
necessary link extensions (--enable-versioning). Otherwise, all standard
|
||||
installations instructions apply. For example:
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ LTLIBRARY_LIBADD = $(LTLIBRARY_DEPENDENCIES) $(EXTRA_LIBS)
|
||||
|
||||
PROGRAM_NAME = php
|
||||
PROGRAM_SOURCES = stub.c
|
||||
PROGRAM_LDADD = libphp4.la $(EXT_PROGRAM_LDADD)
|
||||
PROGRAM_LDADD = libphp4.la
|
||||
PROGRAM_LDFLAGS = -export-dynamic
|
||||
PROGRAM_DEPENDENCIES = $(PROGRAM_LDADD)
|
||||
|
||||
|
||||
@@ -1,143 +1,9 @@
|
||||
PHP 4.0 NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
|
||||
?? ??? 200?, Version 4.0.5
|
||||
- IMPORTANT: removed /F modifier handling from preg_replace(). Instead
|
||||
one should use new preg_replace_callback() function. (Andrei)
|
||||
- Added array_reduce(), which allows iterative reduction of an array
|
||||
to a single value via a callback function. (Andrei)
|
||||
- The imageloadfont function of the gd extension should be not platform
|
||||
dependent after this fix. (alex@zend.com)
|
||||
- Fixed a compatibility problem in some file functions (fgets, fputs, fread,
|
||||
fwrite). The ANSI standard says that if a file is opened in read/write
|
||||
mode, fseek() should be called before switching from reading to writing
|
||||
and vice versa. (alex@zend.com)
|
||||
- Fixed argument checking for call_user_func* functions and allowed
|
||||
specifying array($obj, 'method') syntax for call_user_func_array. (Andrei)
|
||||
- Fixed parent::method() to also work with runtime bindings (Zeev, Zend Engine)
|
||||
- Implemented high-performance zlib-based output compression - see
|
||||
zlib.output_compression INI directive (Zeev)
|
||||
- Improved ob_gzhandler() to support chunked output buffering - it's recommended
|
||||
to use it with 4KB chunks (Zeev)
|
||||
- Fixed chunked output buffering (Zeev)
|
||||
- Forced call_user_method() and call_user_method_array() to take the
|
||||
object argument by reference. (Andrei)
|
||||
- Fixed binding of ROWIDs in OCI8. (Thies)
|
||||
- Added PEAR/Cache as a generic Caching System. (Sebastian, PEAR/Cache)
|
||||
- IMAP quota support (imap_set_quota, imap_get_quota) enabled/added via
|
||||
c-client2000 (kalowsky)
|
||||
- Upgraded PCRE to version 3.4. (Andrei)
|
||||
- Added array_search which works similar to in_array but returns
|
||||
the key instead of a boolean. (jason@php.net)
|
||||
- Fixed pgsql transaction support (Stig, PEAR/DB)
|
||||
- Added new object VARIANT() to encapsulate values for use with
|
||||
the COM and DOTNET module. Therefore it is now possible to pass
|
||||
values by reference, convert php values to extended variant types (currency,
|
||||
date, idispatch, iunknown, ...) and define the codepage that should
|
||||
be used for unicode - conversion.
|
||||
- Improved overall speed of IRCG, added URL handling to message scanner (Sascha)
|
||||
- Fixed some modules to allow using output-buffering. (Thies)
|
||||
- Added the chroot() function (Derick)
|
||||
- PostgreSQL now does a rollback at the end of a request on every
|
||||
persistent connection. This is done by doing an "empty" transaction
|
||||
on the connection. This was advised by someone from the PostgreSQL
|
||||
core-team. (Thies)
|
||||
- Fixed PostgeSQL pg_connect() bug. We would sometimes close the default
|
||||
link by accident. (Patch by: aja@nlgroup.ca)
|
||||
- Improved OCI8 dead-session detection. (Patch by: George Schlossnagle)
|
||||
- Fixed get_meta_tags() multiline bug #4556 (Sean)
|
||||
- Prefer random() over *rand48() (JimJag)
|
||||
- Sped up WDDX serialization 2x. (Andrei)
|
||||
- Added a new parameter to mail() which appends aditional command line
|
||||
parameters to the mail program. (Derick)
|
||||
- Added Udm_Clear_Search_Limits mnoGoSearch extension function. (gluke)
|
||||
- Fixed mnogosearch protos. Fixed mnogosearch functions return values.
|
||||
A bug with capital letters break search has been fixed. (gluke)
|
||||
- Static methods can now be called via call_user_method_* functions, e.g.
|
||||
call_user_method('method', 'class'), and also array('class', 'method')
|
||||
constructs (for array_walk(), for example). (Andrei, Zend Engine)
|
||||
- microtime under windows now returns accurate values (James)
|
||||
- Added PREG_SPLIT_DELIM_CAPTURE flag to preg_split() that allows for Perl-like
|
||||
functionality of capturing parenthesized delimiter expression. (Andrei)
|
||||
- Fixed strip_tags() to not strip a lone > character. (Rasmus)
|
||||
- When using the ob_gzhandler() PHP now automagically also sets the
|
||||
Content-Lengh correctly which enables browsers to use the HTTP
|
||||
Keep-Alive feature. (Thies)
|
||||
- Improved handling of preg_replace() /F modifier so that it's possible to
|
||||
specify array($obj, 'method') construct as a replacement function. (Andrei)
|
||||
- Added mysql_get_client_info(), mysql_get_server_info(),
|
||||
mysql_get_proto_info(), and mysql_get_host_info() functions. (Sean)
|
||||
- Major change of the php pdf api. It could break some functions though
|
||||
backwards compatibility was tried to maintain. Adding some still
|
||||
missing functions as well. (Uwe)
|
||||
- Added mnoGoSearch extension - http://search.mnogo.ru (Sergey K)
|
||||
- Allow url encoding in DB usernames and passwords (Stig, PEAR)
|
||||
- Added raiseError and setErrorHandling methods to PEAR class (Stig, PEAR)
|
||||
- Added support for converting images from JPG/PNG on the fly with the GD
|
||||
extension, which is usefull for creating dynamic WAP-sites (Derick)
|
||||
- Updated ext/mysql/libmysql to version 3.23.32; bug fixes (tim@mysql.com)
|
||||
- Fixed possible crash in all (non-pcre) regex functions. (Thies)
|
||||
- Improved str_replace() to accept an array for any parameter - similar
|
||||
to preg_replace(). (Andrei)
|
||||
- Fixed extract() to properly prefix numeric keys when EXTR_PREFIX_ALL is
|
||||
used. (Andrei)
|
||||
- Added EXTR_PREFIX_INVALID flag to extract() to automatically prefix
|
||||
string keys that do not constitute valid variable names. (Andrei)
|
||||
- BeOS patch from svanegmond@bang.dhs.org modified somewhat by Rasmus
|
||||
- Fixed the Apache module to overwrite PATH_TRANSLATED with SCRIPT_FILENAME,
|
||||
only if PATH_TRANSLATED is not previously set (Zeev)
|
||||
- Fixed crash bug in highlight_string() (Rasmus)
|
||||
- Added URL support for getimagesize() function (Jani)
|
||||
- Added xslt_set_scheme_handler() function (carmelo@akooe.com)
|
||||
- Added the pg_lolseek and pg_lotell functions (Derick)
|
||||
- Fixed wrong breaking with the wordwrap function (Derick)
|
||||
- Fixed 'O' and 'r' flags of date() to have correct sign for timezone
|
||||
offset. (Andrei)
|
||||
- Changed 'Z' flag to date() to always return timezone offset with
|
||||
negative sign if it's west of UTC. (Andrei)
|
||||
- Added the HTML_Processor class which provides common functions for processing HTML.
|
||||
(Sterling)
|
||||
- Added localeconv() and strcoll() functions for localization. (Sean)
|
||||
- Added the xslt_set_base function. (Sterling)
|
||||
- Support Zeus 3.3.8
|
||||
- Added odbc_error() and odbc_errormsg() functions (Stig)
|
||||
- vpopmail extension updated to working alfa. give it a try but keep in
|
||||
mind that it is not ready for production environments (Boian Bonev)
|
||||
- New extension for vpopmail - http://www.inter7.com/vpopmail (David Croft)
|
||||
- Added sybase_get_last_message() to the Sybase CT module (Jan Fedak)
|
||||
- Made ldap_list(), ldap_read() and ldap_search() do parallel search when
|
||||
first parameter is an array of link identifiers (Stig Venaas)
|
||||
- Made fopen() of HTTP URL follow redirects, $http_response_header will
|
||||
contain all headers with empty string as delimiter (Stig Venaas)
|
||||
- Added Console_Getopt class for parsing command-line args. (Andrei, PEAR)
|
||||
- Added an experimental version of the ZZipLib extension which provides the
|
||||
ability to read zip files. (Sterling)
|
||||
- Allow access to uploaded files in safe_mode. Beware that you can only
|
||||
read the file. If you copy it to new location the copy will not have the
|
||||
right UID and you script won't be able to access that copy. (Thies)
|
||||
- Changed extract() to check that prefixed name is a valid one. (Andrei)
|
||||
- Changed extract() to return the number of variables extracted. (Andrei)
|
||||
- Added ldap_rename() function (Stig Venaas)
|
||||
- Made ldap_set_option() support controls (Stig Venaas)
|
||||
- Changed ldap_search() and added functions ldap_parse_result(),
|
||||
ldap_first_reference(), ldap_next_reference() and ldap_parse_reference()
|
||||
to cope with LDAPv3 stuff like referrals and references. (Stig Venaas)
|
||||
- Fixed date('r') overflow
|
||||
- Made the php.ini path reported in phpinfo() always point to the absolute
|
||||
path that was opened (Zeev)
|
||||
- Made the INI mechanism thread safe (Zeev, Zend engine)
|
||||
- Changed setlocale() to use LC_* constants. (Jani)
|
||||
- ctype functions now follow the extension naming conventions (Hartmut)
|
||||
- Added iconv() function (using libc or libiconv) (Stig)
|
||||
- Added ODBC_TYPE constant (Stig)
|
||||
- Added the call_user_method_array function which allows you to call a method
|
||||
with an arbitrary number of parameters. (Sterling)
|
||||
- ext/odbc: IBM DB2 patch by Walter Franzini <walter@sys-net.it>
|
||||
- Added extension for the cracklib library. (Alexander Feldman)
|
||||
|
||||
19 Dec. 2000, Version 4.0.4
|
||||
- Allow assigning a newly created object by reference. This is needed only if
|
||||
your constructor makes other data structures reference the $this object (for
|
||||
?? Dec 2000, Version 4.0.4
|
||||
- Allow assigning a newly created object by reference. This is needed only if
|
||||
your constructor makes other data structures reference the $this object (for
|
||||
example, $GLOBALS["foobar"] =& $this;)
|
||||
The new syntax is $obj =& new MyClass(); (Andi, Zend Engine)
|
||||
- Allow for three expression types to be sent to functions which are requesting
|
||||
@@ -155,7 +21,7 @@ PHP 4.0 NEWS
|
||||
- Made ldap_get_entries() return an array even if there are no entries
|
||||
in search result. (Jani)
|
||||
- Fixed bad mod_perl interaction which caused segfaults when using LFS (Sascha)
|
||||
- const CONSTNAME now gets recognized. Before the patch only @const CONSTNAME
|
||||
- const CONSTNAME now gets recognized. Before the patch only @const CONSTNAME
|
||||
description was recognized.
|
||||
- Added the is_null() function that will return true if a variable is of
|
||||
type null. (Sterling)
|
||||
@@ -177,7 +43,6 @@ PHP 4.0 NEWS
|
||||
at run-time to provide the replacement string. It is passed an array of
|
||||
matched pattern and subpatterns. (Andrei)
|
||||
- Put an end to BUG#4615 (kalowsky & Eric Veldhuyzen)
|
||||
- Added the IRCG extension (Sascha)
|
||||
- Fixed realpath() in Virtual Directory mode (Daniel)
|
||||
- Integrated the Phil Nelson's bc math library routines into PHP, now that
|
||||
the license allows it (Phil Nelson <phil@cs.wwu.edu>)
|
||||
@@ -215,7 +80,6 @@ PHP 4.0 NEWS
|
||||
the full path (Jani)
|
||||
- Added ImageCreateFromString() which creates an image stream out of
|
||||
e.g. a MySQL blob. (Mathieu)
|
||||
- Fixed a crash bug in imagewbmp() (Jani)
|
||||
- Changed the sablot configuration file so that if you use any version of
|
||||
Sablotron below 0.44 you must use Sablotron's built-in Expat libraries.
|
||||
(Sterling)
|
||||
|
||||
+5
-16
@@ -1,17 +1,6 @@
|
||||
How to install PHP with the BCMath arbitrary precision math library?
|
||||
--------------------------------------------------------------------
|
||||
As of PHP 4.0.4, the BC math library routines are bundled in the
|
||||
standard PHP distribution. There is no need to install any additional
|
||||
files.
|
||||
|
||||
Due to license restrictions, the BC math library can no longer be distributed
|
||||
along with PHP. The BC math library is distributed under the restrictive
|
||||
GNU Public License, and PHP is no longer distributed under that license, but
|
||||
under a less restrictive license, the PHP License.
|
||||
|
||||
If you want to enable BC math support (recommended), all you have to do is
|
||||
simply download http://www.php.net/extra/number4.tar.gz, and untar it on the
|
||||
top level php4 directory.
|
||||
|
||||
A typical way of doing this would be (assuming that you have lynx):
|
||||
cd ~/php4
|
||||
lynx -dump -source http://www.php.net/extra/number4.tar.gz | gzip -d | tar xvf -
|
||||
|
||||
The PHP Group
|
||||
Thanks goes to Phil Nelson, for releasing the BC math library routines
|
||||
under the LGPL.
|
||||
+1
-2
@@ -64,8 +64,7 @@ NEWS file. Everything else goes into the ChangeLog.
|
||||
It is important to note that if your comment or news logline spans multiple
|
||||
lines, you have to put # or @ at the beginning of _every_ such line. Every
|
||||
entry in NEWS has to have a name after it, so if you did it with someone's
|
||||
help, put both your names there. Your name WILL NOT be automatically put
|
||||
at the end of the NEWS entry - so, please provide it yourself.
|
||||
help, put both your names there.
|
||||
|
||||
Example. Say you modified two files, datetime.c and string.c. In datetime.c
|
||||
you added a new format option for date() function, and in string.c you fixed
|
||||
|
||||
+125
-98
@@ -1,126 +1,153 @@
|
||||
Using PHP4 with the Zeus Web Server
|
||||
-----------------------------------
|
||||
|
||||
Zeus fully supports running PHP in combination with our
|
||||
webserver. There are three different interfaces that can be used to
|
||||
enable PHP:
|
||||
Zeus fully supports running PHP in combination with our webserver. A
|
||||
significant improvement in PHP 4 is that you can now run PHP as an
|
||||
ISAPI module, giving great performance benefits over traditional CGI
|
||||
code.
|
||||
|
||||
* CGI
|
||||
* ISAPI
|
||||
* FastCGI
|
||||
|
||||
Of the three, we recommend using FastCGI, which has been tested and
|
||||
benchmarked as providing the best performance and reliability.
|
||||
|
||||
Full details of how to install PHP are available from our
|
||||
website, at:
|
||||
|
||||
http://support.zeus.com/products/php.html
|
||||
|
||||
If you have any problems, please check the support site for more
|
||||
up-to-date information and advice.
|
||||
Note that you will need to be running at least version 3.3.6 of the
|
||||
webserver. If you are running an earlier version, please see our
|
||||
website (http://www.zeus.com) for upgrade instructions.
|
||||
|
||||
|
||||
Quick guide to installing FastCGI with Zeus
|
||||
-------------------------------------------
|
||||
To build the ISAPI version of PHP, start the configuration with:
|
||||
|
||||
Step 1 - obtain and install FastCGI development kit.
|
||||
./configure --with-zeus=/usr/local/zeus
|
||||
|
||||
Grab the package from:
|
||||
http://www.fastcgi.com/dist/devkit_2.2.0.tar.gz
|
||||
Obviously, replace /usr/local/zeus with the location of where you have
|
||||
installed Zeus on your machine. For PHP to build successfully, you
|
||||
need to have 3.3.6 already installed, because the code relies on the
|
||||
presence of header files provided with the latest version.
|
||||
|
||||
Extract the package and follow the instructions:
|
||||
./configure
|
||||
make
|
||||
make export
|
||||
(run the last as root)
|
||||
|
||||
This will install to /usr/local/lib/libfcgi.a
|
||||
and /usr/local/include/*fcgi*
|
||||
You may have to adjust the environment variable LDFLAGS and EXTRA_LIBS
|
||||
in order to link in extra libraries. This depends on the platform on
|
||||
which you are building and also on the compiler used (see below). A
|
||||
standard GNU/Linux install with GCC should build fine with no changes.
|
||||
|
||||
|
||||
Configuring the webserver
|
||||
-------------------------
|
||||
|
||||
Step 2 - Compile PHP as FastCGI.
|
||||
After running 'make' and 'make install', you will have a 'libphp4.so'
|
||||
file. Copy this file into a directory reserved for ISAPI
|
||||
binaries. Now, perform the following steps for each virtual server
|
||||
that you wish to run PHP on:
|
||||
|
||||
Compile as follows:
|
||||
./configure --with-fastcgi
|
||||
make
|
||||
|
||||
Note that PHP has many options to the configure script -
|
||||
e.g. --with-mysql. You will probably want to select your usual options
|
||||
before compiling; the above is just a bare minimum, for illustration.
|
||||
|
||||
After compilation finishes, you will be left with an executable
|
||||
program called 'php'. Copy this into your document root, under a
|
||||
dedicated FastCGI directory (e.g. $DOCROOT/fcgi-bin/php)
|
||||
1) On the Admin server, go to 'edit server->path mapping'
|
||||
2) Add an alias to the directory with libphp4.so in it, mapped to
|
||||
/isapi/ (or a location of your choice). Make sure you set the alias
|
||||
type to ISAPI.
|
||||
3) Click 'update'
|
||||
4) Add a handler for file extension 'php' to be run by /isapi/libphp4.so
|
||||
5) Click 'update', then go back to the previous page.
|
||||
6) Click on the 'module configuration' button, ensure that ISAPI
|
||||
support is ticked.
|
||||
7) Click on the ISAPI link. At the bottom of the page, click the
|
||||
checkbox for running ISAPI extensions 'out of process'.
|
||||
8) Click 'update'. Then restart the virtual server. Done!
|
||||
|
||||
|
||||
Step 3 - configure Zeus
|
||||
Troubleshooting
|
||||
---------------
|
||||
|
||||
Four stages:
|
||||
- enable FastCGI
|
||||
- configure FastCGI
|
||||
- setup alias for FastCGI
|
||||
- setup alias for PHP
|
||||
*) Why does the compile fail at Zend/zend-scanner-cc.cc
|
||||
or Zend/zend-parser.c ?
|
||||
|
||||
1) Using the admin server, go to the 'module configuration' page for
|
||||
your virtual server, and ensure that 'fastcgi' is enabled (select the
|
||||
tickbox to the left).
|
||||
These source files are auto-generated from the corresponding .y files.
|
||||
The default distribution of PHP contains pre-generated versions of these
|
||||
files that have caused problems for some people. The simplest solution is
|
||||
to delete the files. They will then be rebuilt correctly. You must have the
|
||||
following GNU tools to do this:
|
||||
|
||||
2) While we can run FastCGI's locally, there are known problems with
|
||||
some OS's (specifically, the communication between web server and
|
||||
FastCGI happens over a unix domain socket, and some OS's have trouble
|
||||
sustaining high connection rates over these sockets). So instead, we
|
||||
are going to set up the PHP FastCGI to run 'remotely' over localhost
|
||||
(this uses TCP sockets, which do not suffer this problem). Go to the
|
||||
'fastcgi configuration' page, and under 'add remote fastcgi':
|
||||
Add Remote FastCGI
|
||||
Docroot path /fcgi-bin/php
|
||||
Remote machine localhost:8002
|
||||
The first entry is where you saved PHP, above.
|
||||
The second entry is localhost:<any unused port>
|
||||
We will start the FastCGI listening on this port shortly.
|
||||
Click 'update' to commit these changes.
|
||||
bison 1.28 or later
|
||||
flex 2.5.4 or later
|
||||
|
||||
3) Go to the path mapping module and add an alias for FastCGI:
|
||||
Add Alias
|
||||
Docroot path /fcgi-bin
|
||||
Filesystem directory /path/to/docroot/fcgi-bin
|
||||
Alias type fastcgi
|
||||
Click 'update' to commit these changes
|
||||
*) Why does my PHP library fail to load?
|
||||
|
||||
4) Also on the path mapping module, add a handler for PHP:
|
||||
Add handler
|
||||
File extension php
|
||||
Handler /fcgi-bin/php
|
||||
Click 'update' to commit these changes
|
||||
After configuring Zeus, if you get a '502 Bad Gateway' error when
|
||||
accessing a PHP page, there are problems loading the PHP
|
||||
library. Check the error log ($ZEUSHOME/web/log/errors) for errors.
|
||||
|
||||
Finally restart your virtual server for these changes to take effect.
|
||||
Failing to load the PHP ISAPI module is likely to be due to unresolved
|
||||
symbols in the module. A way to check for this is to visit our support
|
||||
page at http://support.zeus.com/faq/entries/isapi_error.html and run
|
||||
the program there on your libphp4.so. It will list any unresolved
|
||||
symbols.
|
||||
|
||||
*) My libphp4.so has unresolved symbols. How do I fix this?
|
||||
|
||||
You must ensure that the PHP build process links in the appropriate
|
||||
libraries that contain these symbols! The libraries required will
|
||||
depend on the platform you are running PHP on.
|
||||
|
||||
You may need to set one or two environment variables before running
|
||||
the 'configure' program to set up PHP; LDFLAGS and EXTRA_LIBS. Make
|
||||
sure that you also export these variables to the build process.
|
||||
(Type 'export LDFLAGS EXTRA_LIBS' in the shell to do this.)
|
||||
|
||||
If you are using 3rd party tools and libraries which are installed
|
||||
in non-standard locations, you may need to set the environment
|
||||
variable LD_LIBRARY_PATH to point to the library's location, prior
|
||||
to running the Zeus Web Server. For example, if you have compiled
|
||||
external MySQL support, and mysql is installed in /usr/local/mysql,
|
||||
you should set LD_LIBRARY_PATH to '/usr/local/mysql/lib/mysql'
|
||||
and then 'export LD_LIBRARY_PATH'. For convenience, you should add
|
||||
this to the 'start-zeus' script provided.
|
||||
|
||||
Yet another method of ensuring the linked libraries are found is to
|
||||
set the environment variable LD_RUN_PATH before compiling PHP. This
|
||||
works in a similar way to LD_LIBRARY_PATH, but at compile-time.
|
||||
Libraries produced with this envrionment variable set will have its
|
||||
value 'burned' into the resultant binary, specifying a runtime
|
||||
search pth to locate other required libraries such as MySQL.
|
||||
|
||||
On Linux, you can also tell the dynamic linker where to find the
|
||||
libraries, by adding '/usr/local/mysql/lib/mysql' to the file
|
||||
/etc/ld.so.conf - after editting this file, run 'ldconfig' as root,
|
||||
to use the changes.
|
||||
|
||||
|
||||
Step 4 - start PHP as a FastCGI runner
|
||||
Specific examples:
|
||||
|
||||
When you start PHP, it will pre-fork a given number of child processes
|
||||
to handle incoming PHP requests. Each process will handle a given
|
||||
number of requests before exiting (and being replaced by a newly
|
||||
forked process). You can control these two parameters by setting the
|
||||
following environment variables BEFORE starting the FastCGI runner:
|
||||
Solaris + gcc:
|
||||
Ensure you run ./configure with the `--enable-libgcc' parameter. You
|
||||
may need to set LDFLAGS to '-L/usr/local/egcs/lib' (path depends on
|
||||
your gcc installation)
|
||||
|
||||
PHP_FCGI_CHILDREN - the number of child processes to pre-fork. If not
|
||||
set, defaults to 8.
|
||||
FreeBSD 4:
|
||||
Some people may find they need to run ./configure with the
|
||||
'--enable-libgcc' compile option too.
|
||||
|
||||
PHP_FCGI_MAX_REQUESTS - the number of requests each PHP child process
|
||||
handles before exiting. If not set, defaults to 500.
|
||||
|
||||
To start the FastCGI runner, execute '$ZEUSHOME/web/bin/fcgirunner
|
||||
8002 $DOCROOT/fcgi-bin/php'. Substitute the appropriate values for
|
||||
$ZEUSHOME and $DOCROOT; also substitute for 8002 the port you chose,
|
||||
above.
|
||||
Performance issues
|
||||
==================
|
||||
|
||||
To stop the runner (e.g. to experiment with the above environment
|
||||
variables) you will need to manually stop and running PHP
|
||||
processes. (Use 'ps' and 'kill'). As it is PHP which is forking lots
|
||||
of children and not the runner, Zeus unfortunately cannot keep track
|
||||
of what processes are running, sorry. A typical command line may look
|
||||
like 'ps -efl | grep $DOCROOT/fcgi-bin/php | grep -v grep | awk
|
||||
'{print $4}' | xargs kill'
|
||||
To make PHP run fast under Zeus, check the following points:
|
||||
|
||||
1) Run PHP as an ISAPI module, not a CGI - compile it with the --with-zeus=...
|
||||
flag!
|
||||
|
||||
2) Tune the ISAPI runner to your required workload. There are several
|
||||
tuneables that can be given. These are set by adding the appropriate
|
||||
lines to the $ZEUSHOME/web/global.cfg file. Changes to this file will only
|
||||
be picked up after the web server is restarted (run stop-zeus ; start-zeus)
|
||||
|
||||
tuning!modules!isapi!external!maxthreads xxx
|
||||
|
||||
- Sets the maximum number of threads that the ISAPI runner will spawn. If
|
||||
further PHP page requests arrive, they will be queued until a current
|
||||
page is finished. For busy websites, we suggest increasing this value
|
||||
(defaults to 16). Replace the 'xxx' in the above line with the required
|
||||
number of threads. Note that the threads are equally shared between
|
||||
ISAPI extensions and filters, so if you want to handle 100 concurrent
|
||||
PHP page requests, set this tuneable to 200.
|
||||
|
||||
tuning!modules!isapi!external!minthreads xxx
|
||||
|
||||
- Sets the minimum number of threads. Idle threads will be kept in a pool,
|
||||
which avoids costly thread creation/deletion.
|
||||
|
||||
|
||||
For more information and help with Zeus, please visit our website:
|
||||
http://support.zeus.com
|
||||
-186
@@ -1,186 +0,0 @@
|
||||
Advisory on the PHP Release Cycle
|
||||
|
||||
|
||||
Copyright & Liciencing
|
||||
|
||||
This Document is (c) Copyright 2000,2001 by The PHP Group
|
||||
|
||||
This Document is distributed under the terms of the GNU General
|
||||
Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
|
||||
Table of Contents
|
||||
|
||||
1. Introduction
|
||||
2. Dealing with bugs
|
||||
2.1 As a QA Team Member
|
||||
2.2 As a Developer
|
||||
3. Releaseing another RC
|
||||
4. CVS During the Release Process
|
||||
4.1 Useful CVS Commands
|
||||
5 The Final Release
|
||||
6 Summary
|
||||
|
||||
|
||||
1. Introduction
|
||||
|
||||
This cycle should take place over roughly 10 days. When it is
|
||||
decided it is time for an Release to occur Andi/Zeev (Or
|
||||
Whoever) will tarball RC1, Tag & Branch CVS (see section 4)
|
||||
and then announce the RC on PHP-QA and PHP-DEV. At this
|
||||
point the build tracker and QA Bug System come into play.
|
||||
If you successfully build PHP then report it in the build
|
||||
tracker, If you then run and complete all the tests you
|
||||
should report this too in the build tracker when
|
||||
these features become avalible.
|
||||
|
||||
2. Dealing with Bugs
|
||||
|
||||
2.1 As a QA Team member
|
||||
|
||||
If you find a bug in an RC that you think is a showstopper
|
||||
then, even if it is a known bug, you should report it in the
|
||||
QA Bug system. This marks the bug for discussion at least,
|
||||
and preferably fixing before the actual release. This system
|
||||
is separate from the main bugs system so that important bugs
|
||||
dont get lost in the midst if lots of feature/change request
|
||||
in the approach to a release. It is imperitive where
|
||||
appropraite that as a QA'er a test script, Configure options
|
||||
and PHP.ini files are provided to enable the developer to
|
||||
reproduce the bug, this is an important part of our job. If
|
||||
you have a serious bug then you should also create a test
|
||||
script to be added to the tests dir of the php source so
|
||||
that at the end of the process to enable us to make sure bug
|
||||
does not return. It is not difficult to create these test
|
||||
scripts and a readme on it can be found in
|
||||
php4/tests/README.
|
||||
|
||||
|
||||
2.2 As a Developer
|
||||
|
||||
What should happen is that when a bug is reported it
|
||||
is send to php-dev and php-qa as with other bugs. We should
|
||||
have far stricter assignment system in this bug cycle rather
|
||||
than just leaving them. Once again bugs should be able to be
|
||||
marked as To Be Fixed Before release or moved to other bug
|
||||
system. (This is currently the Release Masters responsibility)
|
||||
|
||||
Then before the actual release the qa bugs system can be
|
||||
checked and if there are outstanding To Be Fixed Before
|
||||
release bugs the Developers can see this easyly rather than
|
||||
show stoppers being dismissed and not worried about.
|
||||
|
||||
When a bug is fixed the QAer who reported the bug is emailed
|
||||
and asked to test again and see if the bug is fixed.
|
||||
|
||||
3 Releasing another RC
|
||||
|
||||
If it is felt necessary that a 2nd RC is needed then it
|
||||
should be packaged as before and announced to both lists
|
||||
again. The testing process then starts again, the RC2 is
|
||||
added to the build tracker and QA'ers are asked to build and
|
||||
retest the scripts as appropriate, espectially if you
|
||||
reported a bug, you should test thourghly for your
|
||||
bug and make sure it no longer occurs. This will normally
|
||||
add anouther 3 days to the cycle, giving QA'ers time to
|
||||
build test and report back, then for developers to
|
||||
fix any problems.
|
||||
|
||||
4 CVS during the release process
|
||||
|
||||
At the point where the first RC is create a branch is
|
||||
formed. This branch is not altered form that point onward
|
||||
other than major bug fixes. Minor non important bug
|
||||
fixes should not be applied to this branch but to the main
|
||||
tree instead. Any major bug fixes should be applied to both
|
||||
trees. The developer should test and check the RC tree then
|
||||
also test and check the MAIN tree. This is their
|
||||
responsibility to make sure (as far as possible) that the
|
||||
bug fix works on both trees.
|
||||
|
||||
4.1 Useful CVS Commands
|
||||
|
||||
To create a Branch <Should only be done by person tarballing
|
||||
the RC (The Release Master)>:
|
||||
|
||||
$ cvs tag -b php_4_0_<Version>RC<NUMBER>
|
||||
IE:
|
||||
$ cvs tag -b php_4_0_1RC1
|
||||
|
||||
This should be executed in the PHP directory of an up to
|
||||
date checkout. Remember to also tag the Zend and TSRM repositories.
|
||||
|
||||
You can retrieve a branch in one of two ways: by checking it
|
||||
out fresh from the repository, or by switching an existing
|
||||
working copy over to the branch, I would suggest you
|
||||
checkout a new copy.
|
||||
|
||||
To check out a new copy:
|
||||
$ cvs checkout -r php_4_0_<Version>RC<NUMBER> php4
|
||||
IE:
|
||||
$ cvs checkout -r php_4_0_1RC1 php4
|
||||
|
||||
|
||||
To switch a working copy (Not recomended due to possible
|
||||
commiting to wrong branch)
|
||||
$ cvs update -r php_4_0_<Version>RC<NUMBER> php4
|
||||
IE:
|
||||
$ cvs update -r php_4_0_1RC1 php4
|
||||
|
||||
This should be done in the PHP4 directory itself.
|
||||
|
||||
To revert back to normal branch you should use the
|
||||
following:
|
||||
$ cvs update -A
|
||||
|
||||
To Commit to the branch you follow exactly the same
|
||||
procedure as normal
|
||||
$ cvs commit file.c
|
||||
|
||||
MAKE SURE YOU DO NOT COMMIT TO THE WRONG BRANCH.
|
||||
|
||||
5 The Final Release
|
||||
|
||||
When it is time to make the final release the following
|
||||
proceedure should be followed. The person who is tarballing
|
||||
the final release should check the QA bugs system and make
|
||||
sure there are no showstoppers left unfixed. If there are
|
||||
then bug the person the bug is assigned to until they fix
|
||||
it. If there are no more qa bugs then they should tag the
|
||||
branch as php_4_0_<Version> and tarball as usual. An email
|
||||
should be sent to PHP-GEN, PHP_DEV and PHP-QA about the new
|
||||
release and it should be added to php.net. The windows
|
||||
binaries and servelets should be built as soon as possible
|
||||
and added too, as should the windows installer.
|
||||
|
||||
6 Summary
|
||||
|
||||
Here is a summary of what a release cycle might look like:
|
||||
|
||||
Thurs: RC is agreed on and packaged, an email is sent to
|
||||
PHP_QA and PHP-DEV, the CVS is Branched and the
|
||||
Release Cycle Begins.
|
||||
|
||||
Mon: After a weekends testing most show stoppers should
|
||||
have been found (Hopefully) and the developers get to
|
||||
work on fixing them.
|
||||
|
||||
Thurs: A second RC is released if needed with the new bug
|
||||
fixes in and the QAers test again.
|
||||
|
||||
Sun: A review is made of all outstanding bugs and any show
|
||||
stoppers should be fixed. if there are no show
|
||||
stoppers then the final release is packaged and
|
||||
released on the monday morning on php.net
|
||||
|
||||
Mon: Release is made.
|
||||
|
||||
|
||||
James
|
||||
--
|
||||
James Moore
|
||||
PHP QA Team
|
||||
jmoore@php.net
|
||||
|
||||
@@ -5,29 +5,21 @@ Zend
|
||||
----
|
||||
* allow foreach ($array as $k => &$val) syntax. right now we cannot
|
||||
traverse an array without copying each element.
|
||||
* allow foreach ($array as $k => list($a, $b)) syntax for multi
|
||||
dimensional arrays.
|
||||
* look at replacing c-lib call tolower().
|
||||
* make hash API functions work with HASH_OF() to save time.
|
||||
* native large number support (probably with GNU GMP)
|
||||
* Const'ify APIs. Right now, many functions leave parameters untouched,
|
||||
but don't declare those as const. This makes interaction with other
|
||||
interfaces difficult which pass const parameters to us.
|
||||
* add try..catch/throw exception handling
|
||||
* make UNC filenames work with V_CD layer
|
||||
|
||||
global
|
||||
------
|
||||
* when used in standalone (skell-script like) mode don't urldecode
|
||||
arguments passed to php. right now it's not possible to say
|
||||
/usr/local/bin/php somescript.php dog+cat.txt
|
||||
as "dog+cat.txt" will arrive in php as "dog cat.txt".
|
||||
* make everything on the language-level independent of your locale setings.
|
||||
* always build the standalone executable as well as the chosen SAPI
|
||||
target.
|
||||
* make sure all source files have the "right" copyright.
|
||||
* the following modules still use PHP3_TLS_*() macros (and thereby don't
|
||||
work in ZTS mode): ext/db/db.c, ext/gd/gd.c
|
||||
work in ZTS mode): ext/dav/dav.c, ext/db/db.c, ext/gd/gd.c, ext/ldap/ldap.c
|
||||
* make sure that all ZTS globals get destructed. Most ts_allocate_id()
|
||||
calls should have a dtor entry.
|
||||
* activate all extensions by default that don't rely on external
|
||||
@@ -56,16 +48,6 @@ documentation
|
||||
-------------
|
||||
* add remarks in the documentation which functions are not implemented on win32.
|
||||
* add remarks in the documentation which functions are not binary-safe.
|
||||
* improve documentation for the sablotron extension
|
||||
* update curl documentation
|
||||
* write documentation for the bzip2 extension
|
||||
* write documentation for the zziplib extension
|
||||
|
||||
ext/curl
|
||||
--------
|
||||
* Use the cURL write handler to save data for use when returning data or outputting
|
||||
data.
|
||||
* Have a warning scheme for when people use unsupported features.
|
||||
|
||||
ext/dav
|
||||
--------
|
||||
@@ -75,43 +57,32 @@ ext/oci8
|
||||
--------
|
||||
* all OCIFetch*() functions should return 0 for no more data and false on error.
|
||||
* have a flag that trims trailing spaces from CHAR fields on retrieval.
|
||||
* make allow_call_time_pass_reference=Off working.
|
||||
* for additional todo information, see oci8.c, in ext/oci8
|
||||
* make allow_call_time_pass_reference=Off working.
|
||||
|
||||
ext/pcre
|
||||
--------
|
||||
* Allow user to set PCRE_NOTEMPTY, PCRE_ANCHORED at execution time, maybe
|
||||
* add option to preg_grep() to return entries that _don't_ match
|
||||
|
||||
ext/sablot
|
||||
----------
|
||||
* Re-write the error handling and reporting interface
|
||||
* Cleanup the underlying code a bit
|
||||
* Add proper support for the message handlers
|
||||
* update the online docs from version 3.1 man page
|
||||
|
||||
ext/session
|
||||
-----------
|
||||
* implement a call to set a session read-only to overcome
|
||||
the need to serialize frame-loads.
|
||||
* maybe implement finer-grained session variables that could be
|
||||
locked individually.
|
||||
* write a network-transparent storage back-end with fallover
|
||||
facilities
|
||||
* provide a callback facility which is executed upon encountering
|
||||
an unknown classname during deserialization
|
||||
|
||||
ext/sockets
|
||||
-----------
|
||||
* Make the extension work on windows (Daniel Beulshausen)
|
||||
* Make the extension work with Solaris and the Sun GCC
|
||||
|
||||
ext/standard
|
||||
------------
|
||||
* array_mean()
|
||||
* add a version number to data serialized via serialize().
|
||||
* array_add(). (Andrei)
|
||||
* possibly modify parsing of GPC data to automatically create arrays if
|
||||
variable name is seen more than once.
|
||||
* implement regex-cache for url-functions.
|
||||
* stri_replace(). (Andrei)
|
||||
* strcase_replace(). (Andrei)
|
||||
* move socket related functions to fsock.c.
|
||||
* get_defined_funcs(), get_defined_vars().
|
||||
* NOT binary safe:
|
||||
strtok()
|
||||
basename()
|
||||
@@ -122,10 +93,6 @@ ext/standard
|
||||
* rewrite win32 SMTP code to be useable for *ix to, maybe as a (default)
|
||||
module of its own (Hartmut)
|
||||
|
||||
ext/zziplib
|
||||
------------
|
||||
* more fully support the zziplib api
|
||||
|
||||
ext/wddx
|
||||
--------
|
||||
* See if we can support the remaining datatypes:
|
||||
|
||||
+16
-63
@@ -59,9 +59,6 @@ static void (*tsrm_new_thread_end_handler)();
|
||||
|
||||
/* Debug support */
|
||||
int tsrm_error(int level, const char *format, ...);
|
||||
|
||||
/* Read a resource from a thread's resource storage */
|
||||
void *ts_resource_read( tsrm_tls_entry *thread_resources, ts_rsrc_id id );
|
||||
static int tsrm_error_level;
|
||||
static FILE *tsrm_error_file;
|
||||
#if TSRM_DEBUG
|
||||
@@ -72,19 +69,11 @@ static FILE *tsrm_error_file;
|
||||
#define TSRM_SAFE_ARRAY_OFFSET(array, offset, range) array[offset]
|
||||
#endif
|
||||
|
||||
#if defined(PTHREADS)
|
||||
/* Thread local storage */
|
||||
static pthread_key_t tls_key;
|
||||
#endif
|
||||
|
||||
|
||||
/* Startup TSRM (call once for the entire process) */
|
||||
TSRM_API int tsrm_startup(int expected_threads, int expected_resources, int debug_level, char *debug_filename)
|
||||
{
|
||||
#if defined(GNUPTH)
|
||||
pth_init();
|
||||
#elif defined(PTHREADS)
|
||||
pthread_key_create( &tls_key, 0 );
|
||||
#endif
|
||||
|
||||
tsrm_error_file = stderr;
|
||||
@@ -152,8 +141,6 @@ TSRM_API void tsrm_shutdown(void)
|
||||
}
|
||||
#if defined(GNUPTH)
|
||||
pth_kill();
|
||||
#elif defined(PTHREADS)
|
||||
pthread_key_delete( tls_key );
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -224,10 +211,7 @@ static void allocate_new_resource(tsrm_tls_entry **thread_resources_ptr, THREAD_
|
||||
(*thread_resources_ptr)->thread_id = thread_id;
|
||||
(*thread_resources_ptr)->next = NULL;
|
||||
|
||||
#if defined(PTHREADS)
|
||||
/* Set thread local storage to this new thread resources structure */
|
||||
pthread_setspecific( tls_key, (void *)*thread_resources_ptr );
|
||||
#endif
|
||||
tsrm_mutex_unlock(tsmm_mutex);
|
||||
|
||||
if (tsrm_new_thread_begin_handler) {
|
||||
tsrm_new_thread_begin_handler(thread_id);
|
||||
@@ -238,9 +222,6 @@ static void allocate_new_resource(tsrm_tls_entry **thread_resources_ptr, THREAD_
|
||||
resource_types_table[i].ctor((*thread_resources_ptr)->storage[i]);
|
||||
}
|
||||
}
|
||||
|
||||
tsrm_mutex_unlock(tsmm_mutex);
|
||||
|
||||
if (tsrm_new_thread_end_handler) {
|
||||
tsrm_new_thread_end_handler(thread_id);
|
||||
}
|
||||
@@ -253,25 +234,13 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
|
||||
THREAD_T thread_id;
|
||||
int hash_value;
|
||||
tsrm_tls_entry *thread_resources;
|
||||
void *resource;
|
||||
|
||||
if( !th_id ) {
|
||||
#if defined(PTHREADS)
|
||||
/* Fast path for looking up the resources for the current
|
||||
* thread. Its used by just about every call to
|
||||
* ts_resource_ex(). This avoids the need for a mutex lock
|
||||
* and our hashtable lookup.
|
||||
*/
|
||||
thread_resources = pthread_getspecific( tls_key );
|
||||
if( thread_resources ) {
|
||||
TSRM_ERROR(TSRM_ERROR_LEVEL_INFO, "Fetching resource id %d for current thread %d", id, (long) thread_resources->thread_id );
|
||||
return ts_resource_read( thread_resources, id );
|
||||
}
|
||||
#endif
|
||||
thread_id = tsrm_thread_id();
|
||||
} else {
|
||||
if (th_id) {
|
||||
thread_id = *th_id;
|
||||
}
|
||||
|
||||
} else {
|
||||
thread_id = tsrm_thread_id();
|
||||
}
|
||||
TSRM_ERROR(TSRM_ERROR_LEVEL_INFO, "Fetching resource id %d for thread %ld", id, (long) thread_id);
|
||||
tsrm_mutex_lock(tsmm_mutex);
|
||||
|
||||
@@ -280,7 +249,8 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
|
||||
|
||||
if (!thread_resources) {
|
||||
allocate_new_resource(&tsrm_tls_table[hash_value], thread_id);
|
||||
return ts_resource_ex(id, &thread_id);
|
||||
return ts_resource(id);
|
||||
/* thread_resources = tsrm_tls_table[hash_value]; */
|
||||
} else {
|
||||
do {
|
||||
if (thread_resources->thread_id == thread_id) {
|
||||
@@ -290,7 +260,7 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
|
||||
thread_resources = thread_resources->next;
|
||||
} else {
|
||||
allocate_new_resource(&thread_resources->next, thread_id);
|
||||
return ts_resource_ex(id, &thread_id);
|
||||
return ts_resource(id);
|
||||
/*
|
||||
* thread_resources = thread_resources->next;
|
||||
* break;
|
||||
@@ -298,25 +268,15 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
|
||||
}
|
||||
} while (thread_resources);
|
||||
}
|
||||
tsrm_mutex_unlock(tsmm_mutex);
|
||||
return ts_resource_read( thread_resources, id );
|
||||
}
|
||||
|
||||
|
||||
/* Read a specific resource from the thread's resources.
|
||||
* This is called outside of a mutex, so have to be aware about external
|
||||
* changes to the structure as we read it.
|
||||
*/
|
||||
void *ts_resource_read( tsrm_tls_entry *thread_resources, ts_rsrc_id id )
|
||||
{
|
||||
void *resource;
|
||||
|
||||
resource = TSRM_SAFE_ARRAY_OFFSET(thread_resources->storage, TSRM_UNSHUFFLE_RSRC_ID(id), thread_resources->count);
|
||||
|
||||
tsrm_mutex_unlock(tsmm_mutex);
|
||||
|
||||
if (resource) {
|
||||
TSRM_ERROR(TSRM_ERROR_LEVEL_INFO, "Successfully fetched resource id %d for thread id %ld - %x", id, (long) thread_resources->thread_id, (long) resource);
|
||||
TSRM_ERROR(TSRM_ERROR_LEVEL_INFO, "Successfully fetched resource id %d for thread id %ld - %x", id, (long) thread_id, (long) resource);
|
||||
} else {
|
||||
TSRM_ERROR(TSRM_ERROR_LEVEL_ERROR, "Resource id %d is out of range (%d..%d)", id, TSRM_SHUFFLE_RSRC_ID(0), TSRM_SHUFFLE_RSRC_ID(thread_resources->count-1));
|
||||
abort();
|
||||
}
|
||||
return resource;
|
||||
}
|
||||
@@ -325,10 +285,9 @@ void *ts_resource_read( tsrm_tls_entry *thread_resources, ts_rsrc_id id )
|
||||
/* frees all resources allocated for the current thread */
|
||||
void ts_free_thread(void)
|
||||
{
|
||||
tsrm_tls_entry *thread_resources;
|
||||
int i;
|
||||
THREAD_T thread_id = tsrm_thread_id();
|
||||
int hash_value;
|
||||
tsrm_tls_entry *thread_resources;
|
||||
tsrm_tls_entry *last=NULL;
|
||||
|
||||
tsrm_mutex_lock(tsmm_mutex);
|
||||
@@ -337,26 +296,20 @@ void ts_free_thread(void)
|
||||
|
||||
while (thread_resources) {
|
||||
if (thread_resources->thread_id == thread_id) {
|
||||
tsrm_mutex_unlock(tsmm_mutex);
|
||||
int i;
|
||||
|
||||
for (i=0; i<thread_resources->count; i++) {
|
||||
if (resource_types_table[i].dtor) {
|
||||
resource_types_table[i].dtor(thread_resources->storage[i]);
|
||||
}
|
||||
}
|
||||
for (i=0; i<thread_resources->count; i++) {
|
||||
}
|
||||
free(thread_resources->storage[i]);
|
||||
}
|
||||
tsrm_mutex_lock(tsmm_mutex);
|
||||
free(thread_resources->storage);
|
||||
if (last) {
|
||||
last->next = thread_resources->next;
|
||||
} else {
|
||||
tsrm_tls_table[hash_value]=NULL;
|
||||
}
|
||||
#if defined(PTHREADS)
|
||||
pthread_setspecific( tls_key, 0 );
|
||||
#endif
|
||||
free(thread_resources);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ CFG=TSRM - Win32 Debug_TS
|
||||
!MESSAGE "TSRM - Win32 Debug_TS" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "TSRM - Win32 Release_TS" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "TSRM - Win32 Release_TS_inline" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "TSRM - Win32 Release_TSDbg" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
@@ -99,29 +98,6 @@ LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "TSRM - Win32 Release_TSDbg"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "TSRM___Win32_Release_TSDbg"
|
||||
# PROP BASE Intermediate_Dir "TSRM___Win32_Release_TSDbg"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_TSDbg"
|
||||
# PROP Intermediate_Dir "Release_TSDbg"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "ZTS" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D TSRM_DEBUG=0 /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /Zi /Od /I "." /D "NDEBUG" /D "ZTS" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D TSRM_DEBUG=0 /YX /FD /c
|
||||
# ADD BASE RSC /l 0x40d /d "NDEBUG"
|
||||
# ADD RSC /l 0x40d /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
@@ -129,7 +105,6 @@ LIB32=link.exe -lib
|
||||
# Name "TSRM - Win32 Debug_TS"
|
||||
# Name "TSRM - Win32 Release_TS"
|
||||
# Name "TSRM - Win32 Release_TS_inline"
|
||||
# Name "TSRM - Win32 Release_TSDbg"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
|
||||
@@ -275,7 +275,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
|
||||
if (path_length == 0)
|
||||
return (0);
|
||||
|
||||
#if !defined(TSRM_WIN32) && !defined(__BEOS__)
|
||||
#ifndef TSRM_WIN32
|
||||
if (IS_ABSOLUTE_PATH(path, path_length)) {
|
||||
if (realpath(path, resolved_path)) {
|
||||
path = resolved_path;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
---------------------------------------------------------------------------
|
||||
The Zend License, version 0.92
|
||||
Copyright (C) 1999-2001 Zend Technologies Ltd.
|
||||
Copyright (C) 1999-2000 Zend Technologies Ltd.
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
The Zend scripting engine library is a product of Zend Technologies Ltd.
|
||||
|
||||
+9
-5
@@ -215,7 +215,7 @@ SOURCE=.\FlexLexer.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_modules.h
|
||||
SOURCE=.\modules.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
@@ -330,7 +330,8 @@ InputDir=.
|
||||
InputPath=.\zend_ini_parser.y
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y \
|
||||
if not "X%CYGWIN%"=="X" bison --output=zend_ini_parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p ini_ zend_ini_parser.y \
|
||||
if "X%CYGWIN%"=="X" bison --output=zend_ini_parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p ini_ zend_ini_parser.y \
|
||||
|
||||
|
||||
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
@@ -356,7 +357,8 @@ InputDir=.
|
||||
InputPath=".\zend_language_parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y \
|
||||
if not "X%CYGWIN%"=="X" bison --output=zend_language_parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p zend zend_language_parser.y \
|
||||
if "X%CYGWIN%"=="X" bison --output=zend_language_parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p zend zend_language_parser.y \
|
||||
|
||||
|
||||
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
@@ -373,7 +375,8 @@ InputDir=.
|
||||
InputPath=".\zend_language_parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y \
|
||||
if not "X%CYGWIN%"=="X" bison --output=zend_language_parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p zend zend_language_parser.y \
|
||||
if "X%CYGWIN%"=="X" bison --output=zend_language_parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p zend zend_language_parser.y \
|
||||
|
||||
|
||||
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
@@ -390,7 +393,8 @@ InputDir=.
|
||||
InputPath=".\zend_language_parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y \
|
||||
if not "X%CYGWIN%"=="X" bison --output=zend_language_parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p zend zend_language_parser.y \
|
||||
if "X%CYGWIN%"=="X" bison --output=zend_language_parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p zend zend_language_parser.y \
|
||||
|
||||
|
||||
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
|
||||
+3
-3
@@ -19,7 +19,7 @@ AC_DEFUN(LIBZEND_BASIC_CHECKS,[
|
||||
AC_REQUIRE([AC_PROG_YACC])
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_PROG_CC_C_O])
|
||||
AC_REQUIRE([AC_PROG_LEX])
|
||||
AC_REQUIRE([AM_PROG_LEX])
|
||||
AC_REQUIRE([AC_HEADER_STDC])
|
||||
|
||||
LIBZEND_BISON_CHECK
|
||||
@@ -62,7 +62,7 @@ dnl Checks for library functions.
|
||||
AC_FUNC_VPRINTF
|
||||
AC_FUNC_MEMCMP
|
||||
AC_FUNC_ALLOCA
|
||||
AC_CHECK_FUNCS(memcpy strdup getpid kill strtod strtol finite fpclass)
|
||||
AC_CHECK_FUNCS(memcpy strdup getpid kill strtod strtol finite)
|
||||
AC_ZEND_BROKEN_SPRINTF
|
||||
|
||||
AC_CHECK_FUNCS(finite isfinite isinf isnan)
|
||||
@@ -169,7 +169,7 @@ fi
|
||||
|
||||
changequote({,})
|
||||
if test -n "$GCC" && test "$ZEND_INLINE_OPTIMIZATION" != "yes"; then
|
||||
INLINE_CFLAGS=`echo $ac_n "$CFLAGS $ac_c" | sed s/-O[0-9s]*//`
|
||||
INLINE_CFLAGS=`echo $ac_n "$CFLAGS $ac_c" | sed s/-O[0-9]*//`
|
||||
else
|
||||
INLINE_CFLAGS="$CFLAGS"
|
||||
fi
|
||||
|
||||
+5
-5
@@ -30,7 +30,7 @@
|
||||
".\zend_config.w32.h"\
|
||||
".\zend_execute.h"\
|
||||
".\zend_llist.h"\
|
||||
".\zend_modules.h"\
|
||||
".\modules.h"\
|
||||
".\zend_operators.h"\
|
||||
".\zend_ptr_stack.h"\
|
||||
".\zend_stack.h"\
|
||||
@@ -63,7 +63,7 @@
|
||||
".\zend_constants.h"\
|
||||
".\zend_execute.h"\
|
||||
".\zend_llist.h"\
|
||||
".\zend_modules.h"\
|
||||
".\modules.h"\
|
||||
".\zend_operators.h"\
|
||||
".\zend_ptr_stack.h"\
|
||||
".\zend_stack.h"\
|
||||
@@ -110,7 +110,7 @@
|
||||
".\zend_config.w32.h"\
|
||||
".\zend_execute.h"\
|
||||
".\zend_llist.h"\
|
||||
".\zend_modules.h"\
|
||||
".\modules.h"\
|
||||
".\zend_operators.h"\
|
||||
".\zend_ptr_stack.h"\
|
||||
".\zend_stack.h"\
|
||||
@@ -168,7 +168,7 @@
|
||||
".\zend_constants.h"\
|
||||
".\zend_execute.h"\
|
||||
".\zend_llist.h"\
|
||||
".\zend_modules.h"\
|
||||
".\modules.h"\
|
||||
".\zend_ptr_stack.h"\
|
||||
".\zend_stack.h"\
|
||||
".\zend_variables.h"\
|
||||
@@ -200,7 +200,7 @@
|
||||
".\zend_constants.h"\
|
||||
".\zend_execute.h"\
|
||||
".\zend_llist.h"\
|
||||
".\zend_modules.h"\
|
||||
".\modules.h"\
|
||||
".\zend_operators.h"\
|
||||
".\zend_ptr_stack.h"\
|
||||
".\zend_stack.h"\
|
||||
|
||||
+15
-90
@@ -4,7 +4,7 @@
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
CFG=ZendTS - Win32 Release_TSDbg
|
||||
CFG=ZendTS - Win32 Release_TS_inline
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
@@ -13,14 +13,13 @@ CFG=ZendTS - Win32 Release_TSDbg
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "ZendTS.mak" CFG="ZendTS - Win32 Release_TSDbg"
|
||||
!MESSAGE NMAKE /f "ZendTS.mak" CFG="ZendTS - Win32 Release_TS_inline"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "ZendTS - Win32 Release_TS" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "ZendTS - Win32 Debug_TS" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "ZendTS - Win32 Release_TS_inline" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "ZendTS - Win32 Release_TSDbg" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
@@ -96,29 +95,6 @@ LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Output_Dir "ZendTS___Win32_Release_TSDbg"
|
||||
# PROP BASE Intermediate_Dir "ZendTS___Win32_Release_TSDbg"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Output_Dir "Release_TSDbg"
|
||||
# PROP Intermediate_Dir "Release_TSDbg"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
|
||||
# SUBTRACT BASE CPP /YX
|
||||
# ADD CPP /nologo /MD /W3 /GX /Zi /Od /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x40d /d "NDebug_TS"
|
||||
# ADD RSC /l 0x40d /d "NDebug_TS"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
@@ -126,7 +102,6 @@ LIB32=link.exe -lib
|
||||
# Name "ZendTS - Win32 Release_TS"
|
||||
# Name "ZendTS - Win32 Debug_TS"
|
||||
# Name "ZendTS - Win32 Release_TS_inline"
|
||||
# Name "ZendTS - Win32 Release_TSDbg"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
@@ -244,7 +219,7 @@ SOURCE=.\FlexLexer.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_modules.h
|
||||
SOURCE=.\modules.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
@@ -332,10 +307,6 @@ SOURCE=.\zend_ini_scanner.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_istdiostream.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_parser.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -381,7 +352,8 @@ InputDir=.
|
||||
InputPath=.\zend_ini_parser.y
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y \
|
||||
if not "X%CYGWIN%"=="X" bison --output=zend_ini_parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p ini_ zend_ini_parser.y \
|
||||
if "X%CYGWIN%"=="X" bison --output=zend_ini_parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p ini_ zend_ini_parser.y \
|
||||
|
||||
|
||||
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
@@ -398,7 +370,8 @@ InputDir=.
|
||||
InputPath=.\zend_ini_parser.y
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y \
|
||||
if not "X%CYGWIN%"=="X" bison --output=zend_ini_parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p ini_ zend_ini_parser.y \
|
||||
if "X%CYGWIN%"=="X" bison --output=zend_ini_parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p ini_ zend_ini_parser.y \
|
||||
|
||||
|
||||
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
@@ -415,7 +388,8 @@ InputDir=.
|
||||
InputPath=.\zend_ini_parser.y
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y \
|
||||
if not "X%CYGWIN%"=="X" bison --output=zend_ini_parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p ini_ zend_ini_parser.y \
|
||||
if "X%CYGWIN%"=="X" bison --output=zend_ini_parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p ini_ zend_ini_parser.y \
|
||||
|
||||
|
||||
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
@@ -425,22 +399,6 @@ BuildCmds= \
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=.\zend_ini_parser.y
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y
|
||||
|
||||
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend_ini_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
@@ -455,7 +413,8 @@ InputDir=.
|
||||
InputPath=".\zend_language_parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y \
|
||||
if not "X%CYGWIN%"=="X" bison --output=zend_language_parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p zend zend_language_parser.y \
|
||||
if "X%CYGWIN%"=="X" bison --output=zend_language_parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p zend zend_language_parser.y \
|
||||
|
||||
|
||||
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
@@ -472,7 +431,8 @@ InputDir=.
|
||||
InputPath=".\zend_language_parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y \
|
||||
if not "X%CYGWIN%"=="X" bison --output=zend_language_parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p zend zend_language_parser.y \
|
||||
if "X%CYGWIN%"=="X" bison --output=zend_language_parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p zend zend_language_parser.y \
|
||||
|
||||
|
||||
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
@@ -489,7 +449,8 @@ InputDir=.
|
||||
InputPath=".\zend_language_parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y \
|
||||
if not "X%CYGWIN%"=="X" bison --output=zend_language_parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p zend zend_language_parser.y \
|
||||
if "X%CYGWIN%"=="X" bison --output=zend_language_parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p zend zend_language_parser.y \
|
||||
|
||||
|
||||
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
@@ -499,22 +460,6 @@ BuildCmds= \
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend_language_parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y
|
||||
|
||||
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
@@ -556,16 +501,6 @@ InputPath=.\zend_ini_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=.\zend_ini_scanner.l
|
||||
|
||||
"zend_ini_scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -+ -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.cpp zend_ini_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
@@ -603,16 +538,6 @@ InputPath=".\zend_language_scanner.l"
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend_language_scanner.l"
|
||||
|
||||
"zend_language_scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -+ -B -i -Sflex.skl -Pzend -ozend_language_scanner.cpp zend_language_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
|
||||
@@ -19,10 +19,6 @@
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_IEEEFP_H
|
||||
# include <ieeefp.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#else
|
||||
@@ -41,8 +37,6 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
#define zend_isnan(a) isnan(a)
|
||||
#elif defined(NAN)
|
||||
#define zend_isnan(a) (((a)==NAN)?1:0)
|
||||
#elif defined(HAVE_FPCLASS)
|
||||
#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
|
||||
#else
|
||||
#define zend_isnan(a) 0
|
||||
#endif
|
||||
@@ -52,8 +46,6 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
#elif defined(INFINITY)
|
||||
/* Might not work, but is required by ISO C99 */
|
||||
#define zend_isinf(a) (((a)==INFINITY)?1:0)
|
||||
#elif defined(HAVE_FPCLASS)
|
||||
#define zend_isinf(a) ((fpclass(a) == FP_PINF) || (fpclass(a) == FP_NINF))
|
||||
#else
|
||||
#define zend_isinf(a) 0
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
/* A Lexical scanner generated by flex */
|
||||
/* A lexical scanner generated by flex */
|
||||
|
||||
/* Scanner skeleton version:
|
||||
* $Header$
|
||||
|
||||
+26
-45
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -20,12 +20,11 @@
|
||||
|
||||
#include "zend.h"
|
||||
#include "zend_extensions.h"
|
||||
#include "zend_modules.h"
|
||||
#include "modules.h"
|
||||
#include "zend_constants.h"
|
||||
#include "zend_list.h"
|
||||
#include "zend_API.h"
|
||||
#include "zend_builtin_functions.h"
|
||||
#include "zend_ini.h"
|
||||
|
||||
#ifdef ZTS
|
||||
# define GLOBAL_FUNCTION_TABLE global_function_table
|
||||
@@ -52,7 +51,7 @@ ZEND_API void (*zend_ticks_function)(int ticks);
|
||||
ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
|
||||
|
||||
static void (*zend_message_dispatcher_p)(long message, void *data);
|
||||
static int (*zend_get_configuration_directive_p)(char *name, uint name_length, zval *contents);
|
||||
static int (*zend_get_ini_entry_p)(char *name, uint name_length, zval *contents);
|
||||
|
||||
|
||||
#ifdef ZTS
|
||||
@@ -71,7 +70,7 @@ ZEND_API zval zval_used_for_init; /* True global variable */
|
||||
/* version information */
|
||||
static char *zend_version_info;
|
||||
static uint zend_version_info_length;
|
||||
#define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998-2001 Zend Technologies\n"
|
||||
#define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998-2000 Zend Technologies\n"
|
||||
|
||||
|
||||
#define PRINT_ZVAL_INDENT 4
|
||||
@@ -80,8 +79,7 @@ static void print_hash(HashTable *ht, int indent)
|
||||
{
|
||||
zval **tmp;
|
||||
char *string_key;
|
||||
HashPosition iterator;
|
||||
unsigned long num_key, str_len;
|
||||
unsigned long num_key;
|
||||
int i;
|
||||
|
||||
for (i=0; i<indent; i++) {
|
||||
@@ -89,15 +87,16 @@ static void print_hash(HashTable *ht, int indent)
|
||||
}
|
||||
ZEND_PUTS("(\n");
|
||||
indent += PRINT_ZVAL_INDENT;
|
||||
zend_hash_internal_pointer_reset_ex(ht, &iterator);
|
||||
while (zend_hash_get_current_data_ex(ht, (void **) &tmp, &iterator) == SUCCESS) {
|
||||
zend_hash_internal_pointer_reset(ht);
|
||||
while (zend_hash_get_current_data(ht, (void **) &tmp) == SUCCESS) {
|
||||
for (i=0; i<indent; i++) {
|
||||
ZEND_PUTS(" ");
|
||||
}
|
||||
ZEND_PUTS("[");
|
||||
switch (zend_hash_get_current_key_ex(ht, &string_key, &str_len, &num_key, 0, &iterator)) {
|
||||
switch (zend_hash_get_current_key(ht, &string_key, &num_key)) {
|
||||
case HASH_KEY_IS_STRING:
|
||||
ZEND_PUTS(string_key);
|
||||
efree(string_key);
|
||||
break;
|
||||
case HASH_KEY_IS_LONG:
|
||||
zend_printf("%ld",num_key);
|
||||
@@ -106,7 +105,7 @@ static void print_hash(HashTable *ht, int indent)
|
||||
ZEND_PUTS("] => ");
|
||||
zend_print_zval_r(*tmp, indent+PRINT_ZVAL_INDENT);
|
||||
ZEND_PUTS("\n");
|
||||
zend_hash_move_forward_ex(ht, &iterator);
|
||||
zend_hash_move_forward(ht);
|
||||
}
|
||||
indent -= PRINT_ZVAL_INDENT;
|
||||
for (i=0; i<indent; i++) {
|
||||
@@ -301,7 +300,6 @@ static void executor_globals_ctor(zend_executor_globals *executor_globals)
|
||||
}
|
||||
zend_init_rsrc_plist(ELS_C);
|
||||
EG(lambda_count)=0;
|
||||
EG(user_error_handler) = NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -309,7 +307,6 @@ static void executor_globals_dtor(zend_executor_globals *executor_globals)
|
||||
{
|
||||
zend_shutdown_constants(ELS_C);
|
||||
zend_destroy_rsrc_plist(ELS_C);
|
||||
zend_ini_shutdown(ELS_C);
|
||||
}
|
||||
|
||||
|
||||
@@ -325,17 +322,6 @@ static void alloc_globals_ctor(zend_alloc_globals *alloc_globals)
|
||||
#include <floatingpoint.h>
|
||||
#endif
|
||||
|
||||
#ifdef ZTS
|
||||
static void zend_new_thread_end_handler(THREAD_T thread_id)
|
||||
{
|
||||
ELS_FETCH();
|
||||
|
||||
zend_copy_ini_directives(ELS_C);
|
||||
zend_ini_refresh_caches(ZEND_INI_STAGE_STARTUP ELS_CC);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
int zend_startup(zend_utility_functions *utility_functions, char **extensions, int start_builtin_functions)
|
||||
{
|
||||
#ifdef ZTS
|
||||
@@ -348,8 +334,18 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions, i
|
||||
#endif
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
/* FreeBSD floating point precision fix */
|
||||
fpsetmask(0);
|
||||
{
|
||||
/* FreeBSD floating point precision fix */
|
||||
#ifdef HAVE_FP_EXCEPT
|
||||
fp_except
|
||||
#else
|
||||
fp_except_t
|
||||
#endif
|
||||
mask;
|
||||
|
||||
mask = fpgetmask();
|
||||
fpsetmask(mask & ~FP_X_IMP);
|
||||
}
|
||||
#endif
|
||||
|
||||
zend_startup_extensions_mechanism();
|
||||
@@ -365,7 +361,7 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions, i
|
||||
zend_message_dispatcher_p = utility_functions->message_handler;
|
||||
zend_block_interruptions = utility_functions->block_interruptions;
|
||||
zend_unblock_interruptions = utility_functions->unblock_interruptions;
|
||||
zend_get_configuration_directive_p = utility_functions->get_configuration_directive;
|
||||
zend_get_ini_entry_p = utility_functions->get_ini_entry;
|
||||
zend_ticks_function = utility_functions->ticks_function;
|
||||
|
||||
zend_compile_file = compile_file;
|
||||
@@ -402,7 +398,6 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions, i
|
||||
#else
|
||||
zend_startup_constants();
|
||||
zend_set_default_compile_time_values(CLS_C);
|
||||
EG(user_error_handler) = NULL;
|
||||
#endif
|
||||
zend_register_standard_constants(ELS_C);
|
||||
|
||||
@@ -414,12 +409,6 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions, i
|
||||
zend_startup_builtin_functions();
|
||||
}
|
||||
|
||||
zend_ini_startup(ELS_C);
|
||||
|
||||
#ifdef ZTS
|
||||
tsrm_set_new_thread_end_handler(zend_new_thread_end_handler);
|
||||
#endif
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@@ -538,9 +527,6 @@ void zend_deactivate(CLS_D ELS_DC)
|
||||
if (setjmp(EG(bailout))==0) {
|
||||
shutdown_compiler(CLS_C);
|
||||
}
|
||||
if (setjmp(EG(bailout))==0) {
|
||||
zend_ini_deactivate(ELS_C);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -554,10 +540,10 @@ ZEND_API void zend_message_dispatcher(long message, void *data)
|
||||
END_EXTERN_C()
|
||||
|
||||
|
||||
ZEND_API int zend_get_configuration_directive(char *name, uint name_length, zval *contents)
|
||||
ZEND_API int zend_get_ini_entry(char *name, uint name_length, zval *contents)
|
||||
{
|
||||
if (zend_get_configuration_directive_p) {
|
||||
return zend_get_configuration_directive_p(name, name_length, contents);
|
||||
if (zend_get_ini_entry_p) {
|
||||
return zend_get_ini_entry_p(name, name_length, contents);
|
||||
} else {
|
||||
return FAILURE;
|
||||
}
|
||||
@@ -782,8 +768,3 @@ ZEND_API char *zend_make_compiled_string_description(char *name)
|
||||
return compiled_string_description;
|
||||
}
|
||||
|
||||
|
||||
void free_estring(char **str_p)
|
||||
{
|
||||
efree(*str_p);
|
||||
}
|
||||
+5
-9
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -21,7 +21,7 @@
|
||||
#ifndef ZEND_H
|
||||
#define ZEND_H
|
||||
|
||||
#define ZEND_VERSION "1.0.5"
|
||||
#define ZEND_VERSION "1.0.3"
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define BEGIN_EXTERN_C() extern "C" {
|
||||
@@ -39,10 +39,8 @@
|
||||
|
||||
#ifdef ZEND_WIN32
|
||||
# include "zend_config.w32.h"
|
||||
# define ZEND_PATHS_SEPARATOR ';'
|
||||
#else
|
||||
# include "zend_config.h"
|
||||
# define ZEND_PATHS_SEPARATOR ':'
|
||||
#endif
|
||||
|
||||
/* all HAVE_XXX test have to be after the include of zend_config above */
|
||||
@@ -234,7 +232,7 @@ typedef struct _zend_utility_functions {
|
||||
void (*message_handler)(long message, void *data);
|
||||
void (*block_interruptions)(void);
|
||||
void (*unblock_interruptions)(void);
|
||||
int (*get_configuration_directive)(char *name, uint name_length, zval *contents);
|
||||
int (*get_ini_entry)(char *name, uint name_length, zval *contents);
|
||||
void (*ticks_function)(int ticks);
|
||||
} zend_utility_functions;
|
||||
|
||||
@@ -309,8 +307,6 @@ ZEND_API void zend_output_debug_string(zend_bool trigger_break, char *format, ..
|
||||
|
||||
ZEND_API extern char *empty_string;
|
||||
|
||||
ZEND_API void free_estring(char **str_p);
|
||||
|
||||
#define STR_FREE(ptr) if (ptr && ptr!=empty_string) { efree(ptr); }
|
||||
#define STR_FREE_REL(ptr) if (ptr && ptr!=empty_string) { efree_rel(ptr); }
|
||||
|
||||
@@ -358,7 +354,7 @@ BEGIN_EXTERN_C()
|
||||
ZEND_API void zend_message_dispatcher(long message, void *data);
|
||||
END_EXTERN_C()
|
||||
|
||||
ZEND_API int zend_get_configuration_directive(char *name, uint name_length, zval *contents);
|
||||
ZEND_API int zend_get_ini_entry(char *name, uint name_length, zval *contents);
|
||||
|
||||
|
||||
/* Messages for applications of Zend */
|
||||
@@ -440,7 +436,7 @@ ZEND_API int zend_get_configuration_directive(char *name, uint name_length, zval
|
||||
(*ppzv_dest)->refcount = refcount; \
|
||||
}
|
||||
|
||||
#define ZEND_MAX_RESERVED_RESOURCES 4
|
||||
#define ZEND_MAX_RESERVED_RESOURCES 2
|
||||
|
||||
#ifdef ZEND_WIN32
|
||||
/* Only use this macro if you know for sure that all of the switches values
|
||||
|
||||
+280
-302
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "zend.h"
|
||||
#include "zend_execute.h"
|
||||
#include "zend_API.h"
|
||||
#include "zend_modules.h"
|
||||
#include "modules.h"
|
||||
#include "zend_constants.h"
|
||||
|
||||
#ifdef HAVE_STDARG_H
|
||||
@@ -227,82 +227,95 @@ ZEND_API inline int add_assoc_function(zval *arg, char *key,void (*function_ptr)
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_assoc_long_ex(zval *arg, char *key, uint key_len, long n)
|
||||
ZEND_API inline int add_assoc_long(zval *arg, char *key, long n)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_LONG(tmp, n);
|
||||
|
||||
return zend_hash_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_LONG;
|
||||
tmp->value.lval = n;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
ZEND_API inline int add_assoc_null_ex(zval *arg, char *key, uint key_len)
|
||||
|
||||
ZEND_API inline int add_assoc_unset(zval *arg, char *key)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_NULL(tmp);
|
||||
|
||||
return zend_hash_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_NULL;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
ZEND_API inline int add_assoc_bool_ex(zval *arg, char *key, uint key_len, int b)
|
||||
ZEND_API inline int add_assoc_bool(zval *arg, char *key, int b)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_BOOL(tmp, b);
|
||||
|
||||
return zend_hash_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_BOOL;
|
||||
tmp->value.lval = b;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
ZEND_API inline int add_assoc_resource_ex(zval *arg, char *key, uint key_len, int r)
|
||||
|
||||
ZEND_API inline int add_assoc_resource(zval *arg, char *key, int r)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_RESOURCE(tmp, r);
|
||||
|
||||
return zend_hash_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_RESOURCE;
|
||||
tmp->value.lval = r;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_assoc_double_ex(zval *arg, char *key, uint key_len, double d)
|
||||
ZEND_API inline int add_assoc_double(zval *arg, char *key, double d)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_DOUBLE(tmp, d);
|
||||
|
||||
return zend_hash_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_DOUBLE;
|
||||
tmp->value.dval = d;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_assoc_string_ex(zval *arg, char *key, uint key_len, char *str, int duplicate)
|
||||
ZEND_API inline int add_assoc_string(zval *arg, char *key, char *str, int duplicate)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_STRING(tmp, str, duplicate);
|
||||
|
||||
return zend_hash_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_STRING;
|
||||
tmp->value.str.len = strlen(str);
|
||||
if (duplicate) {
|
||||
tmp->value.str.val = estrndup(str,tmp->value.str.len);
|
||||
} else {
|
||||
tmp->value.str.val = str;
|
||||
}
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_assoc_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, int duplicate)
|
||||
ZEND_API inline int add_assoc_stringl(zval *arg, char *key, char *str, uint length, int duplicate)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_STRINGL(tmp, str, length, duplicate);
|
||||
|
||||
return zend_hash_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
ZEND_API inline int add_assoc_zval_ex(zval *arg, char *key, uint key_len, zval *value)
|
||||
{
|
||||
return zend_hash_update(Z_ARRVAL_P(arg), key, key_len, (void *) &value, sizeof(zval *), NULL);
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_STRING;
|
||||
tmp->value.str.len = length;
|
||||
if (duplicate) {
|
||||
tmp->value.str.val = estrndup(str,tmp->value.str.len);
|
||||
} else {
|
||||
tmp->value.str.val = str;
|
||||
}
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -310,136 +323,151 @@ ZEND_API inline int add_index_long(zval *arg, uint index, long n)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_LONG(tmp, n);
|
||||
|
||||
return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *),NULL);
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_LONG;
|
||||
tmp->value.lval = n;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_index_null(zval *arg, uint index)
|
||||
ZEND_API inline int add_index_unset(zval *arg, uint index)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_NULL(tmp);
|
||||
|
||||
return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL);
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_NULL;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_index_bool(zval *arg, uint index, int b)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_BOOL(tmp, b);
|
||||
|
||||
return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *),NULL);
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_BOOL;
|
||||
tmp->value.lval = b;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_index_resource(zval *arg, uint index, int r)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_RESOURCE(tmp, r);
|
||||
|
||||
return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *),NULL);
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_RESOURCE;
|
||||
tmp->value.lval = r;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_index_double(zval *arg, uint index, double d)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_DOUBLE(tmp, d);
|
||||
|
||||
return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *),NULL);
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_DOUBLE;
|
||||
tmp->value.dval = d;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_index_string(zval *arg, uint index, char *str, int duplicate)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_STRING(tmp, str, duplicate);
|
||||
|
||||
return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL);
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_STRING;
|
||||
tmp->value.str.len = strlen(str);
|
||||
if (duplicate) {
|
||||
tmp->value.str.val = estrndup(str,tmp->value.str.len);
|
||||
} else {
|
||||
tmp->value.str.val = str;
|
||||
}
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_index_stringl(zval *arg, uint index, char *str, uint length, int duplicate)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_STRINGL(tmp, str, length, duplicate);
|
||||
|
||||
return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_index_zval(zval *arg, uint index, zval *value)
|
||||
{
|
||||
return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &value, sizeof(zval *), NULL);
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_STRING;
|
||||
tmp->value.str.len = length;
|
||||
if (duplicate) {
|
||||
tmp->value.str.val = estrndup(str,tmp->value.str.len);
|
||||
} else {
|
||||
tmp->value.str.val = str;
|
||||
}
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_next_index_long(zval *arg, long n)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_LONG(tmp, n);
|
||||
|
||||
return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL);
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_LONG;
|
||||
tmp->value.lval = n;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_next_index_null(zval *arg)
|
||||
ZEND_API inline int add_next_index_unset(zval *arg)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_NULL(tmp);
|
||||
|
||||
return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL);
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_NULL;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_next_index_bool(zval *arg, int b)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_BOOL(tmp, b);
|
||||
|
||||
return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL);
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_BOOL;
|
||||
tmp->value.lval = b;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_next_index_resource(zval *arg, int r)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_RESOURCE(tmp, r);
|
||||
|
||||
return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL);
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_RESOURCE;
|
||||
tmp->value.lval = r;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_next_index_double(zval *arg, double d)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_DOUBLE(tmp, d);
|
||||
|
||||
return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL);
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_DOUBLE;
|
||||
tmp->value.dval = d;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -447,10 +475,16 @@ ZEND_API inline int add_next_index_string(zval *arg, char *str, int duplicate)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_STRING(tmp, str, duplicate);
|
||||
|
||||
return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *),NULL);
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_STRING;
|
||||
tmp->value.str.len = strlen(str);
|
||||
if (duplicate) {
|
||||
tmp->value.str.val = estrndup(str,tmp->value.str.len);
|
||||
} else {
|
||||
tmp->value.str.val = str;
|
||||
}
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *),NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -458,162 +492,201 @@ ZEND_API inline int add_next_index_stringl(zval *arg, char *str, uint length, in
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_STRINGL(tmp, str, length, duplicate);
|
||||
|
||||
return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *),NULL);
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_STRING;
|
||||
tmp->value.str.len = length;
|
||||
if (duplicate) {
|
||||
tmp->value.str.val = estrndup(str,tmp->value.str.len);
|
||||
} else {
|
||||
tmp->value.str.val = str;
|
||||
}
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *),NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_next_index_zval(zval *arg, zval *value)
|
||||
{
|
||||
return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &value, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_get_assoc_string_ex(zval *arg, char *key, uint key_len, char *str, void **dest, int duplicate)
|
||||
ZEND_API inline int add_get_assoc_string(zval *arg, char *key, char *str, void **dest, int duplicate)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_STRING(tmp, str, duplicate);
|
||||
|
||||
return zend_hash_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), dest);
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_STRING;
|
||||
tmp->value.str.len = strlen(str);
|
||||
if (duplicate) {
|
||||
tmp->value.str.val = estrndup(str,tmp->value.str.len);
|
||||
} else {
|
||||
tmp->value.str.val = str;
|
||||
}
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), dest);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_get_assoc_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, void **dest, int duplicate)
|
||||
ZEND_API inline int add_get_assoc_stringl(zval *arg, char *key, char *str, uint length, void **dest, int duplicate)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_STRINGL(tmp, str, length, duplicate);
|
||||
|
||||
return zend_hash_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), dest);
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_STRING;
|
||||
tmp->value.str.len = length;
|
||||
if (duplicate) {
|
||||
tmp->value.str.val = estrndup(str,tmp->value.str.len);
|
||||
} else {
|
||||
tmp->value.str.val = str;
|
||||
}
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), dest);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_get_index_long(zval *arg, uint index, long l, void **dest)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_LONG(tmp, l);
|
||||
|
||||
return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), dest);
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_LONG;
|
||||
tmp->value.lval = l;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),dest);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_get_index_double(zval *arg, uint index, double d, void **dest)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_DOUBLE(tmp, d);
|
||||
|
||||
return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), dest);
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_DOUBLE;
|
||||
tmp->value.dval= d;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),dest);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_get_index_string(zval *arg, uint index, char *str, void **dest, int duplicate)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_STRING(tmp, str, duplicate);
|
||||
|
||||
return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *),dest);
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_STRING;
|
||||
tmp->value.str.len = strlen(str);
|
||||
if (duplicate) {
|
||||
tmp->value.str.val = estrndup(str,tmp->value.str.len);
|
||||
} else {
|
||||
tmp->value.str.val = str;
|
||||
}
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),dest);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_get_index_stringl(zval *arg, uint index, char *str, uint length, void **dest, int duplicate)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_STRINGL(tmp, str, length, duplicate);
|
||||
|
||||
return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), dest);
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_STRING;
|
||||
tmp->value.str.len = length;
|
||||
if (duplicate) {
|
||||
tmp->value.str.val = estrndup(str,tmp->value.str.len);
|
||||
} else {
|
||||
tmp->value.str.val = str;
|
||||
}
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),dest);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_property_long_ex(zval *arg, char *key, uint key_len, long n)
|
||||
ZEND_API inline int add_property_long(zval *arg, char *key, long n)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_LONG(tmp, n);
|
||||
|
||||
return zend_hash_update(Z_OBJPROP_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_LONG;
|
||||
tmp->value.lval = n;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
ZEND_API inline int add_property_bool_ex(zval *arg, char *key, uint key_len, int b)
|
||||
ZEND_API inline int add_property_bool(zval *arg, char *key, int b)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_BOOL(tmp, b);
|
||||
|
||||
return zend_hash_update(Z_OBJPROP_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_BOOL;
|
||||
tmp->value.lval = b;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
ZEND_API inline int add_property_null_ex(zval *arg, char *key, uint key_len)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_NULL(tmp);
|
||||
|
||||
return zend_hash_update(Z_OBJPROP_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
ZEND_API inline int add_property_resource_ex(zval *arg, char *key, uint key_len, long n)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_RESOURCE(tmp, n);
|
||||
|
||||
return zend_hash_update(Z_OBJPROP_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_property_double_ex(zval *arg, char *key, uint key_len, double d)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_DOUBLE(tmp, d);
|
||||
|
||||
return zend_hash_update(Z_OBJPROP_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_property_string_ex(zval *arg, char *key, uint key_len, char *str, int duplicate)
|
||||
ZEND_API inline int add_property_unset(zval *arg, char *key)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_STRING(tmp, str, duplicate);
|
||||
|
||||
return zend_hash_update(Z_OBJPROP_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_NULL;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
ZEND_API inline int add_property_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, int duplicate)
|
||||
ZEND_API inline int add_property_resource(zval *arg, char *key, long n)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_STRINGL(tmp, str, length, duplicate);
|
||||
|
||||
return zend_hash_update(Z_OBJPROP_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_RESOURCE;
|
||||
tmp->value.lval = n;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
ZEND_API inline int add_property_zval_ex(zval *arg, char *key, uint key_len, zval *value)
|
||||
|
||||
ZEND_API inline int add_property_double(zval *arg, char *key, double d)
|
||||
{
|
||||
return zend_hash_update(Z_OBJPROP_P(arg), key, key_len, (void *) &value, sizeof(zval *), NULL);
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_DOUBLE;
|
||||
tmp->value.dval = d;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_property_string(zval *arg, char *key, char *str, int duplicate)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_STRING;
|
||||
tmp->value.str.len = strlen(str);
|
||||
if (duplicate) {
|
||||
tmp->value.str.val = estrndup(str,tmp->value.str.len);
|
||||
} else {
|
||||
tmp->value.str.val = str;
|
||||
}
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_property_stringl(zval *arg, char *key, char *str, uint length, int duplicate)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_STRING;
|
||||
tmp->value.str.len = length;
|
||||
if (duplicate) {
|
||||
tmp->value.str.val = estrndup(str,tmp->value.str.len);
|
||||
} else {
|
||||
tmp->value.str.val = str;
|
||||
}
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int zend_startup_module(zend_module_entry *module)
|
||||
{
|
||||
if (module) {
|
||||
@@ -909,98 +982,3 @@ ZEND_API int zend_disable_function(char *function_name, uint function_name_lengt
|
||||
disabled_function[0].fname = function_name;
|
||||
return zend_register_functions(disabled_function, CG(function_table), MODULE_PERSISTENT);
|
||||
}
|
||||
|
||||
zend_bool zend_is_callable(zval *callable, zend_bool syntax_only, char **callable_name)
|
||||
{
|
||||
char *lcname;
|
||||
int retval = 0;
|
||||
ELS_FETCH();
|
||||
|
||||
switch (Z_TYPE_P(callable)) {
|
||||
case IS_STRING:
|
||||
if (syntax_only)
|
||||
return 1;
|
||||
|
||||
lcname = estrndup(Z_STRVAL_P(callable), Z_STRLEN_P(callable));
|
||||
zend_str_tolower(lcname, Z_STRLEN_P(callable));
|
||||
if (zend_hash_exists(EG(function_table), lcname, Z_STRLEN_P(callable)+1))
|
||||
retval = 1;
|
||||
efree(lcname);
|
||||
if (!retval && callable_name)
|
||||
*callable_name = estrndup(Z_STRVAL_P(callable), Z_STRLEN_P(callable));
|
||||
break;
|
||||
|
||||
case IS_ARRAY:
|
||||
{
|
||||
zval **method;
|
||||
zval **obj;
|
||||
zend_class_entry *ce;
|
||||
char callable_name_len;
|
||||
|
||||
if (zend_hash_index_find(Z_ARRVAL_P(callable), 0, (void **) &obj) == SUCCESS &&
|
||||
zend_hash_index_find(Z_ARRVAL_P(callable), 1, (void **) &method) == SUCCESS &&
|
||||
(Z_TYPE_PP(obj) == IS_OBJECT || Z_TYPE_PP(obj) == IS_STRING) &&
|
||||
Z_TYPE_PP(method) == IS_STRING) {
|
||||
|
||||
if (syntax_only)
|
||||
return 1;
|
||||
|
||||
if (Z_TYPE_PP(obj) == IS_STRING) {
|
||||
int found;
|
||||
|
||||
lcname = estrndup(Z_STRVAL_PP(obj), Z_STRLEN_PP(obj));
|
||||
zend_str_tolower(lcname, Z_STRLEN_PP(obj));
|
||||
found = zend_hash_find(EG(class_table), lcname, Z_STRLEN_PP(obj) + 1, (void**)&ce);
|
||||
efree(lcname);
|
||||
if (found == FAILURE) {
|
||||
if (callable_name) {
|
||||
char *ptr;
|
||||
|
||||
callable_name_len = Z_STRLEN_PP(obj) + Z_STRLEN_PP(method) + sizeof("::");
|
||||
ptr = *callable_name = emalloc(callable_name_len);
|
||||
memcpy(ptr, Z_STRVAL_PP(obj), Z_STRLEN_PP(obj));
|
||||
ptr += Z_STRLEN_PP(obj);
|
||||
memcpy(ptr, "::", sizeof("::") - 1);
|
||||
ptr += sizeof("::") - 1;
|
||||
memcpy(ptr, Z_STRVAL_PP(method), Z_STRLEN_PP(method) + 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
ce = Z_OBJCE_PP(obj);
|
||||
}
|
||||
lcname = estrndup(Z_STRVAL_PP(method), Z_STRLEN_PP(method));
|
||||
zend_str_tolower(lcname, Z_STRLEN_PP(method));
|
||||
if (zend_hash_exists(&ce->function_table, lcname, Z_STRLEN_PP(method)+1))
|
||||
retval = 1;
|
||||
if (!retval && callable_name) {
|
||||
char *ptr;
|
||||
|
||||
callable_name_len = ce->name_length + Z_STRLEN_PP(method) + sizeof("::");
|
||||
ptr = *callable_name = emalloc(callable_name_len);
|
||||
memcpy(ptr, ce->name, ce->name_length);
|
||||
ptr += ce->name_length;
|
||||
memcpy(ptr, "::", sizeof("::") - 1);
|
||||
ptr += sizeof("::") - 1;
|
||||
memcpy(ptr, Z_STRVAL_PP(method), Z_STRLEN_PP(method) + 1);
|
||||
}
|
||||
efree(lcname);
|
||||
} else if (callable_name)
|
||||
*callable_name = estrndup("Array", sizeof("Array")-1);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
if (callable_name) {
|
||||
zval expr_copy;
|
||||
int use_copy;
|
||||
|
||||
zend_make_printable_zval(callable, &expr_copy, &use_copy);
|
||||
*callable_name = estrndup(Z_STRVAL(expr_copy), Z_STRLEN(expr_copy));
|
||||
zval_dtor(&expr_copy);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
+22
-55
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -21,7 +21,7 @@
|
||||
#ifndef ZEND_API_H
|
||||
#define ZEND_API_H
|
||||
|
||||
#include "zend_modules.h"
|
||||
#include "modules.h"
|
||||
#include "zend_list.h"
|
||||
#include "zend_fast_cache.h"
|
||||
#include "zend_operators.h"
|
||||
@@ -120,7 +120,6 @@ ZEND_API zend_module_entry *zend_get_module(int module_number);
|
||||
ZEND_API int zend_disable_function(char *function_name, uint function_name_length);
|
||||
|
||||
ZEND_API void wrong_param_count(void);
|
||||
ZEND_API zend_bool zend_is_callable(zval *callable, zend_bool syntax_only, char **callable_name);
|
||||
|
||||
#define getThis() (this_ptr)
|
||||
|
||||
@@ -147,79 +146,47 @@ ZEND_API int _object_init_ex(zval *arg, zend_class_entry *ce ZEND_FILE_LINE_DC);
|
||||
/* no longer supported */
|
||||
ZEND_API int add_assoc_function(zval *arg, char *key,void (*function_ptr)(INTERNAL_FUNCTION_PARAMETERS));
|
||||
|
||||
ZEND_API int add_assoc_long_ex(zval *arg, char *key, uint key_len, long n);
|
||||
ZEND_API int add_assoc_null_ex(zval *arg, char *key, uint key_len);
|
||||
ZEND_API int add_assoc_bool_ex(zval *arg, char *key, uint key_len, int b);
|
||||
ZEND_API int add_assoc_resource_ex(zval *arg, char *key, uint key_len, int r);
|
||||
ZEND_API int add_assoc_double_ex(zval *arg, char *key, uint key_len, double d);
|
||||
ZEND_API int add_assoc_string_ex(zval *arg, char *key, uint key_len, char *str, int duplicate);
|
||||
ZEND_API int add_assoc_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, int duplicate);
|
||||
ZEND_API int add_assoc_zval_ex(zval *arg, char *key, uint key_len, zval *value);
|
||||
|
||||
#define add_assoc_long(__arg, __key, __n) add_assoc_long_ex(__arg, __key, strlen(__key)+1, __n)
|
||||
#define add_assoc_null(__arg, __key) add_assoc_null_ex(__arg, __key, strlen(__key) + 1)
|
||||
#define add_assoc_bool(__arg, __key, __b) add_assoc_bool_ex(__arg, __key, strlen(__key)+1, __b)
|
||||
#define add_assoc_resource(__arg, __key, __r) add_assoc_resource_ex(__arg, __key, strlen(__key)+1, __r)
|
||||
#define add_assoc_double(__arg, __key, __d) add_assoc_double_ex(__arg, __key, strlen(__key)+1, __d)
|
||||
#define add_assoc_string(__arg, __key, __str, __duplicate) add_assoc_string_ex(__arg, __key, strlen(__key)+1, __str, __duplicate)
|
||||
#define add_assoc_stringl(__arg, __key, __str, __length, __duplicate) add_assoc_stringl_ex(__arg, __key, strlen(__key)+1, __str, __length, __duplicate)
|
||||
#define add_assoc_zval(__arg, __key, __value) add_assoc_zval_ex(__arg, __key, strlen(__key)+1, __value)
|
||||
|
||||
/* unset() functions are only suported for legacy modules and null() functions should be used */
|
||||
#define add_assoc_unset(__arg, __key) add_assoc_null_ex(__arg, __key, strlen(__key) + 1)
|
||||
#define add_index_unset(__arg, __key) add_index_null(__arg, __key)
|
||||
#define add_next_index_unset(__arg) add_next_index_null(__arg)
|
||||
#define add_property_unset(__arg, __key) add_property_null(__arg, __key)
|
||||
ZEND_API int add_assoc_long(zval *arg, char *key, long n);
|
||||
ZEND_API int add_assoc_unset(zval *arg, char *key);
|
||||
ZEND_API int add_assoc_bool(zval *arg, char *key, int b);
|
||||
ZEND_API int add_assoc_resource(zval *arg, char *key, int r);
|
||||
ZEND_API int add_assoc_double(zval *arg, char *key, double d);
|
||||
ZEND_API int add_assoc_string(zval *arg, char *key, char *str, int duplicate);
|
||||
ZEND_API int add_assoc_stringl(zval *arg, char *key, char *str, uint length, int duplicate);
|
||||
|
||||
ZEND_API int add_index_long(zval *arg, uint idx, long n);
|
||||
ZEND_API int add_index_null(zval *arg, uint idx);
|
||||
ZEND_API int add_index_unset(zval *arg, uint idx);
|
||||
ZEND_API int add_index_bool(zval *arg, uint idx, int b);
|
||||
ZEND_API int add_index_resource(zval *arg, uint idx, int r);
|
||||
ZEND_API int add_index_double(zval *arg, uint idx, double d);
|
||||
ZEND_API int add_index_string(zval *arg, uint idx, char *str, int duplicate);
|
||||
ZEND_API int add_index_stringl(zval *arg, uint idx, char *str, uint length, int duplicate);
|
||||
ZEND_API int add_index_zval(zval *arg, uint index, zval *value);
|
||||
|
||||
ZEND_API int add_next_index_long(zval *arg, long n);
|
||||
ZEND_API int add_next_index_null(zval *arg);
|
||||
ZEND_API int add_next_index_unset(zval *arg);
|
||||
ZEND_API int add_next_index_bool(zval *arg, int b);
|
||||
ZEND_API int add_next_index_resource(zval *arg, int r);
|
||||
ZEND_API int add_next_index_double(zval *arg, double d);
|
||||
ZEND_API int add_next_index_string(zval *arg, char *str, int duplicate);
|
||||
ZEND_API int add_next_index_stringl(zval *arg, char *str, uint length, int duplicate);
|
||||
ZEND_API int add_next_index_zval(zval *arg, zval *value);
|
||||
|
||||
ZEND_API int add_get_assoc_string_ex(zval *arg, char *key, uint key_len, char *str, void **dest, int duplicate);
|
||||
ZEND_API int add_get_assoc_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, void **dest, int duplicate);
|
||||
|
||||
#define add_get_assoc_string(__arg, __key, __str, __dest, __duplicate) add_get_assoc_string_ex(__arg, __key, strlen(__key)+1, __str, __dest, __duplicate)
|
||||
#define add_get_assoc_stringl(__arg, __key, __str, __length, __dest, __duplicate) add_get_assoc_stringl_ex(__arg, __key, strlen(__key)+1, __str, __length, __dest, __duplicate)
|
||||
|
||||
ZEND_API int add_get_index_long(zval *arg, uint idx, long l, void **dest);
|
||||
ZEND_API int add_get_index_double(zval *arg, uint idx, double d, void **dest);
|
||||
ZEND_API int add_get_assoc_string(zval *arg, char *key, char *str, void **dest, int duplicate);
|
||||
ZEND_API int add_get_assoc_stringl(zval *arg, char *key, char *str, uint length, void **dest, int duplicate);
|
||||
ZEND_API int add_get_index_string(zval *arg, uint idx, char *str, void **dest, int duplicate);
|
||||
ZEND_API int add_get_index_stringl(zval *arg, uint idx, char *str, uint length, void **dest, int duplicate);
|
||||
|
||||
ZEND_API int add_property_long_ex(zval *arg, char *key, uint key_len, long l);
|
||||
ZEND_API int add_property_null_ex(zval *arg, char *key, uint key_len);
|
||||
ZEND_API int add_property_bool_ex(zval *arg, char *key, uint key_len, int b);
|
||||
ZEND_API int add_property_resource_ex(zval *arg, char *key, uint key_len, long r);
|
||||
ZEND_API int add_property_double_ex(zval *arg, char *key, uint key_len, double d);
|
||||
ZEND_API int add_property_string_ex(zval *arg, char *key, uint key_len, char *str, int duplicate);
|
||||
ZEND_API int add_property_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, int duplicate);
|
||||
ZEND_API int add_property_zval_ex(zval *arg, char *key, uint key_len, zval *value);
|
||||
ZEND_API int call_user_function(HashTable *function_table, zval *object, zval *function_name, zval *retval_ptr, int param_count, zval *params[]);
|
||||
ZEND_API int call_user_function_ex(HashTable *function_table, zval *object, zval *function_name, zval **retval_ptr_ptr, int param_count, zval **params[], int no_separation, HashTable *symbol_table);
|
||||
|
||||
#define add_property_long(__arg, __key, __n) add_property_long_ex(__arg, __key, strlen(__key)+1, __n)
|
||||
#define add_property_null(__arg, __key) add_property_null_ex(__arg, __key, strlen(__key) + 1)
|
||||
#define add_property_bool(__arg, __key, __b) add_property_bool_ex(__arg, __key, strlen(__key)+1, __b)
|
||||
#define add_property_resource(__arg, __key, __r) add_property_resource_ex(__arg, __key, strlen(__key)+1, __r)
|
||||
#define add_property_double(__arg, __key, __d) add_property_double_ex(__arg, __key, strlen(__key)+1, __d)
|
||||
#define add_property_string(__arg, __key, __str, __duplicate) add_property_string_ex(__arg, __key, strlen(__key)+1, __str, __duplicate)
|
||||
#define add_property_stringl(__arg, __key, __str, __length, __duplicate) add_property_stringl_ex(__arg, __key, strlen(__key)+1, __str, __length, __duplicate)
|
||||
#define add_property_zval(__arg, __key, __value) add_property_zval_ex(__arg, __key, strlen(__key)+1, __value)
|
||||
|
||||
ZEND_API int call_user_function(HashTable *function_table, zval **object_pp, zval *function_name, zval *retval_ptr, int param_count, zval *params[]);
|
||||
ZEND_API int call_user_function_ex(HashTable *function_table, zval **object_pp, zval *function_name, zval **retval_ptr_ptr, int param_count, zval **params[], int no_separation, HashTable *symbol_table);
|
||||
ZEND_API int add_property_long(zval *arg, char *key, long l);
|
||||
ZEND_API int add_property_unset(zval *arg, char *key);
|
||||
ZEND_API int add_property_bool(zval *arg, char *key, int b);
|
||||
ZEND_API int add_property_resource(zval *arg, char *key, long r);
|
||||
ZEND_API int add_property_double(zval *arg, char *key, double d);
|
||||
ZEND_API int add_property_string(zval *arg, char *key, char *str, int duplicate);
|
||||
ZEND_API int add_property_stringl(zval *arg, char *key, char *str, uint length, int duplicate);
|
||||
|
||||
ZEND_API int zend_set_hash_symbol(zval *symbol, char *name, int name_length,
|
||||
int is_ref, int num_symbol_tables, ...);
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -502,7 +502,7 @@ ZEND_API void shutdown_memory_manager(int silent, int clean_cache)
|
||||
/* we're shutting down completely, don't even touch the INI subsystem */
|
||||
break;
|
||||
}
|
||||
if (zend_get_configuration_directive("display_memory_cache_stats", sizeof("display_memory_cache_stats"), &display_memory_cache_stats)==FAILURE) {
|
||||
if (zend_get_ini_entry("display_memory_cache_stats", sizeof("display_memory_cache_stats"), &display_memory_cache_stats)==FAILURE) {
|
||||
break;
|
||||
}
|
||||
if (!atoi(display_memory_cache_stats.value.str.val)) {
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -64,10 +64,10 @@ static ZEND_FUNCTION(get_resource_type);
|
||||
static ZEND_FUNCTION(zend_test_func);
|
||||
#endif
|
||||
|
||||
ZEND_API unsigned char first_arg_force_ref[] = { 1, BYREF_FORCE };
|
||||
ZEND_API unsigned char first_arg_allow_ref[] = { 1, BYREF_ALLOW };
|
||||
ZEND_API unsigned char second_arg_force_ref[] = { 2, BYREF_NONE, BYREF_FORCE };
|
||||
ZEND_API unsigned char second_arg_allow_ref[] = { 2, BYREF_NONE, BYREF_ALLOW };
|
||||
unsigned char first_arg_force_ref[] = { 1, BYREF_FORCE };
|
||||
unsigned char first_arg_allow_ref[] = { 1, BYREF_ALLOW };
|
||||
unsigned char second_arg_force_ref[] = { 2, BYREF_NONE, BYREF_FORCE };
|
||||
unsigned char second_arg_allow_ref[] = { 2, BYREF_NONE, BYREF_ALLOW };
|
||||
|
||||
static zend_function_entry builtin_functions[] = {
|
||||
ZEND_FE(zend_version, NULL)
|
||||
@@ -332,7 +332,7 @@ ZEND_FUNCTION(each)
|
||||
entry->refcount++;
|
||||
|
||||
/* add the key elements */
|
||||
switch (zend_hash_get_current_key(target_hash, &string_key, &num_key, 1)) {
|
||||
switch (zend_hash_get_current_key(target_hash, &string_key, &num_key)) {
|
||||
case HASH_KEY_IS_STRING:
|
||||
add_get_index_string(return_value,0,string_key,(void **) &inserted_pointer,0);
|
||||
break;
|
||||
@@ -589,7 +589,7 @@ ZEND_FUNCTION(get_class_methods)
|
||||
efree(lcname);
|
||||
array_init(return_value);
|
||||
zend_hash_internal_pointer_reset(&ce->function_table);
|
||||
while ((key_type = zend_hash_get_current_key(&ce->function_table, &string_key, &num_key, 1)) != HASH_KEY_NON_EXISTANT) {
|
||||
while ((key_type = zend_hash_get_current_key(&ce->function_table, &string_key, &num_key)) != HASH_KEY_NON_EXISTANT) {
|
||||
if (key_type == HASH_KEY_IS_STRING) {
|
||||
MAKE_STD_ZVAL(method_name);
|
||||
ZVAL_STRING(method_name, string_key, 0);
|
||||
@@ -731,7 +731,7 @@ ZEND_FUNCTION(get_included_files)
|
||||
|
||||
array_init(return_value);
|
||||
zend_hash_internal_pointer_reset(&EG(included_files));
|
||||
while(zend_hash_get_current_key(&EG(included_files), &entry, NULL, 1) == HASH_KEY_IS_STRING) {
|
||||
while(zend_hash_get_current_key(&EG(included_files), &entry,NULL) == HASH_KEY_IS_STRING) {
|
||||
add_next_index_string(return_value,entry,0);
|
||||
zend_hash_move_forward(&EG(included_files));
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+13
-15
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -34,6 +34,11 @@ ZEND_API zend_compiler_globals compiler_globals;
|
||||
ZEND_API zend_executor_globals executor_globals;
|
||||
#endif
|
||||
|
||||
static void free_filename(void *p)
|
||||
{
|
||||
efree(*((char **) p));
|
||||
}
|
||||
|
||||
|
||||
static void build_runtime_defined_function_key(zval *result, zval *name, zend_op *opline CLS_DC)
|
||||
{
|
||||
@@ -75,7 +80,7 @@ void init_compiler(CLS_D ELS_DC)
|
||||
CG(active_class_entry) = NULL;
|
||||
zend_llist_init(&CG(list_llist), sizeof(list_llist_element), NULL, 0);
|
||||
zend_llist_init(&CG(dimension_llist), sizeof(int), NULL, 0);
|
||||
zend_hash_init(&CG(filenames_table), 5, NULL, (dtor_func_t) free_estring, 0);
|
||||
zend_hash_init(&CG(filenames_table), 5, NULL, (dtor_func_t) free_filename, 0);
|
||||
CG(handle_op_arrays) = 1;
|
||||
CG(in_compilation) = 0;
|
||||
zend_init_rsrc_list(ELS_C);
|
||||
@@ -571,7 +576,7 @@ static zend_bool is_method_call(CLS_D)
|
||||
}
|
||||
cur_opline = (zend_op *)cur->data;
|
||||
if (cur_opline->opcode == ZEND_FETCH_OBJ_W) {
|
||||
return 1;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -694,9 +699,7 @@ void zend_do_free(znode *op1 CLS_DC)
|
||||
opline--;
|
||||
}
|
||||
}
|
||||
} else if (op1->op_type == IS_CONST) {
|
||||
zval_dtor(&op1->u.constant);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -871,9 +874,10 @@ void zend_do_begin_class_member_function_call(znode *class_name, znode *function
|
||||
opline->opcode = ZEND_INIT_FCALL_BY_NAME;
|
||||
zend_str_tolower(class_name->u.constant.value.str.val, class_name->u.constant.value.str.len);
|
||||
if ((class_name->u.constant.value.str.len == sizeof("parent")-1)
|
||||
&& !memcmp(class_name->u.constant.value.str.val, "parent", sizeof("parent")-1)
|
||||
&& CG(active_class_entry)
|
||||
&& CG(active_class_entry)->parent) {
|
||||
&& !memcmp(class_name->u.constant.value.str.val, "parent", sizeof("parent")-1)) {
|
||||
if (!CG(active_class_entry) || !CG(active_class_entry)->parent) {
|
||||
zend_error(E_COMPILE_ERROR, "No parent class available in this context");
|
||||
}
|
||||
efree(class_name->u.constant.value.str.val);
|
||||
class_name->u.constant.value.str.len = CG(active_class_entry)->parent->name_length;
|
||||
class_name->u.constant.value.str.val = estrndup(CG(active_class_entry)->parent->name, class_name->u.constant.value.str.len);
|
||||
@@ -1102,12 +1106,6 @@ void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce)
|
||||
zend_hash_merge(&ce->default_properties, &parent_ce->default_properties, (void (*)(void *)) zval_add_ref, (void *) &tmp, sizeof(zval *), 0);
|
||||
zend_hash_merge(&ce->function_table, &parent_ce->function_table, (void (*)(void *)) function_add_ref, &tmp_zend_function, sizeof(zend_function), 0);
|
||||
ce->parent = parent_ce;
|
||||
if (!ce->handle_property_get)
|
||||
ce->handle_property_get = parent_ce->handle_property_get;
|
||||
if (!ce->handle_property_set)
|
||||
ce->handle_property_set = parent_ce->handle_property_set;
|
||||
if (!ce->handle_function_call)
|
||||
ce->handle_function_call = parent_ce->handle_function_call;
|
||||
do_inherit_parent_constructor(ce);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -28,7 +28,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <iostream.h>
|
||||
#include <istream.h>
|
||||
#endif
|
||||
|
||||
#include "zend_llist.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+102
-78
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -98,7 +98,6 @@ static inline zval *_get_zval_ptr(znode *node, temp_variable *Ts, int *should_fr
|
||||
zval *str = T->EA.data.str_offset.str;
|
||||
|
||||
if (T->EA.data.str_offset.str->type != IS_STRING
|
||||
|| (T->EA.data.str_offset.offset<0)
|
||||
|| (T->EA.data.str_offset.str->value.str.len <= T->EA.data.str_offset.offset)) {
|
||||
T->tmp_var.value.str.val = empty_string;
|
||||
T->tmp_var.value.str.len = 0;
|
||||
@@ -174,7 +173,8 @@ static inline zval **_get_zval_ptr_ptr(znode *node, temp_variable *Ts ELS_DC)
|
||||
|
||||
static inline zval **zend_fetch_property_address_inner(HashTable *ht, znode *op2, temp_variable *Ts, int type ELS_DC)
|
||||
{
|
||||
zval *prop_ptr = get_zval_ptr(op2, Ts, &EG(free_op2), BP_VAR_R);
|
||||
int free_op2;
|
||||
zval *prop_ptr = get_zval_ptr(op2, Ts, &free_op2, BP_VAR_R);
|
||||
zval **retval;
|
||||
zval tmp;
|
||||
|
||||
@@ -219,7 +219,7 @@ static inline zval **zend_fetch_property_address_inner(HashTable *ht, znode *op2
|
||||
if (prop_ptr == &tmp) {
|
||||
zval_dtor(prop_ptr);
|
||||
}
|
||||
FREE_OP(op2, EG(free_op2));
|
||||
FREE_OP(op2, free_op2);
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -264,7 +264,6 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2
|
||||
temp_variable *T = &Ts[op1->u.var];
|
||||
|
||||
if (T->EA.data.str_offset.str->type == IS_STRING
|
||||
&& (T->EA.data.str_offset.offset >= 0)
|
||||
&& (T->EA.data.str_offset.offset < T->EA.data.str_offset.str->value.str.len)) {
|
||||
zval tmp;
|
||||
zval *final_value = value;
|
||||
@@ -346,7 +345,7 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2
|
||||
if (variable_ptr==value) {
|
||||
variable_ptr->refcount++;
|
||||
} else if (PZVAL_IS_REF(value)) {
|
||||
zval tmp;
|
||||
zval tmp = *value;
|
||||
|
||||
tmp = *value;
|
||||
zval_copy_ctor(&tmp);
|
||||
@@ -503,7 +502,8 @@ static void zend_fetch_var_address(znode *result, znode *op1, znode *op2, temp_v
|
||||
|
||||
static inline zval **zend_fetch_dimension_address_inner(HashTable *ht, znode *op2, temp_variable *Ts, int type ELS_DC)
|
||||
{
|
||||
zval *dim = get_zval_ptr(op2, Ts, &EG(free_op2), BP_VAR_R);
|
||||
int free_op2;
|
||||
zval *dim = get_zval_ptr(op2, Ts, &free_op2, BP_VAR_R);
|
||||
zval **retval;
|
||||
char *offset_key;
|
||||
int offset_key_length;
|
||||
@@ -581,58 +581,52 @@ fetch_string_dim:
|
||||
}
|
||||
break;
|
||||
}
|
||||
FREE_OP(op2, EG(free_op2));
|
||||
FREE_OP(op2, free_op2);
|
||||
return retval;
|
||||
}
|
||||
|
||||
static void fetch_overloaded_element(znode *result, znode *op1, znode *op2, temp_variable *Ts, int type, zval ***retval, int overloaded_element_type ELS_DC)
|
||||
{
|
||||
zend_overloaded_element overloaded_element;
|
||||
|
||||
if (Ts[op1->u.var].EA.type == IS_STRING_OFFSET) {
|
||||
zval_ptr_dtor(&Ts[op1->u.var].EA.data.str_offset.str);
|
||||
switch (type) {
|
||||
case BP_VAR_R:
|
||||
case BP_VAR_IS:
|
||||
*retval = &EG(uninitialized_zval_ptr);
|
||||
break;
|
||||
case BP_VAR_W:
|
||||
case BP_VAR_RW:
|
||||
*retval = &EG(error_zval_ptr);
|
||||
break;
|
||||
EMPTY_SWITCH_DEFAULT_CASE()
|
||||
}
|
||||
SELECTIVE_PZVAL_LOCK(**retval, result);
|
||||
return;
|
||||
}
|
||||
|
||||
overloaded_element.element = *get_zval_ptr(op2, Ts, &EG(free_op2), type);
|
||||
overloaded_element.type = overloaded_element_type;
|
||||
if (!EG(free_op2)) {
|
||||
zval_copy_ctor(&overloaded_element.element);
|
||||
}
|
||||
|
||||
Ts[result->u.var].EA = Ts[op1->u.var].EA;
|
||||
zend_llist_add_element(Ts[result->u.var].EA.data.overloaded_element.elements_list, &overloaded_element);
|
||||
|
||||
Ts[result->u.var].EA.type = IS_OVERLOADED_OBJECT;
|
||||
*retval = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
static void zend_fetch_dimension_address(znode *result, znode *op1, znode *op2, temp_variable *Ts, int type ELS_DC)
|
||||
{
|
||||
int free_op2;
|
||||
zval **container_ptr = get_zval_ptr_ptr(op1, Ts, type);
|
||||
zval *container;
|
||||
zval ***retval = &Ts[result->u.var].var.ptr_ptr;
|
||||
|
||||
|
||||
if (container_ptr == NULL) {
|
||||
fetch_overloaded_element(result, op1, op2, Ts, type, retval, OE_IS_ARRAY ELS_CC);
|
||||
zend_overloaded_element overloaded_element;
|
||||
|
||||
if (Ts[op1->u.var].EA.type == IS_STRING_OFFSET) {
|
||||
switch (type) {
|
||||
case BP_VAR_R:
|
||||
case BP_VAR_IS:
|
||||
*retval = &EG(uninitialized_zval_ptr);
|
||||
break;
|
||||
case BP_VAR_W:
|
||||
case BP_VAR_RW:
|
||||
*retval = &EG(error_zval_ptr);
|
||||
break;
|
||||
EMPTY_SWITCH_DEFAULT_CASE()
|
||||
}
|
||||
SELECTIVE_PZVAL_LOCK(**retval, result);
|
||||
return;
|
||||
}
|
||||
|
||||
/* prepare the new element */
|
||||
overloaded_element.element = *get_zval_ptr(op2, Ts, &free_op2, type);
|
||||
overloaded_element.type = OE_IS_ARRAY;
|
||||
if (!free_op2) {
|
||||
zval_copy_ctor(&overloaded_element.element);
|
||||
}
|
||||
|
||||
Ts[result->u.var].EA = Ts[op1->u.var].EA;
|
||||
zend_llist_add_element(Ts[result->u.var].EA.data.overloaded_element.elements_list, &overloaded_element);
|
||||
|
||||
Ts[result->u.var].EA.type = IS_OVERLOADED_OBJECT;
|
||||
*retval = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
container = *container_ptr;
|
||||
|
||||
if (container == EG(error_zval_ptr)) {
|
||||
@@ -674,10 +668,10 @@ static void zend_fetch_dimension_address(znode *result, znode *op1, znode *op2,
|
||||
break;
|
||||
case IS_NULL:
|
||||
/* for read-mode only */
|
||||
get_zval_ptr(op2, Ts, &EG(free_op2), BP_VAR_R);
|
||||
get_zval_ptr(op2, Ts, &free_op2, BP_VAR_R);
|
||||
*retval = &EG(uninitialized_zval_ptr);
|
||||
SELECTIVE_PZVAL_LOCK(**retval, result);
|
||||
FREE_OP(op2, EG(free_op2));
|
||||
FREE_OP(op2, free_op2);
|
||||
if (type==BP_VAR_W || type==BP_VAR_RW) {
|
||||
zend_error(E_WARNING, "Cannot use a NULL value as an array");
|
||||
}
|
||||
@@ -690,7 +684,7 @@ static void zend_fetch_dimension_address(znode *result, znode *op1, znode *op2,
|
||||
zend_error(E_ERROR, "[] operator not supported for strings");
|
||||
}
|
||||
|
||||
offset = get_zval_ptr(op2, Ts, &EG(free_op2), BP_VAR_R);
|
||||
offset = get_zval_ptr(op2, Ts, &free_op2, BP_VAR_R);
|
||||
|
||||
if (offset->type != IS_LONG) {
|
||||
tmp = *offset;
|
||||
@@ -706,7 +700,7 @@ static void zend_fetch_dimension_address(znode *result, znode *op1, znode *op2,
|
||||
PZVAL_LOCK(container);
|
||||
Ts[result->u.var].EA.data.str_offset.offset = offset->value.lval;
|
||||
Ts[result->u.var].EA.type = IS_STRING_OFFSET;
|
||||
FREE_OP(op2, EG(free_op2));
|
||||
FREE_OP(op2, free_op2);
|
||||
*retval = NULL;
|
||||
return;
|
||||
}
|
||||
@@ -714,13 +708,13 @@ static void zend_fetch_dimension_address(znode *result, znode *op1, znode *op2,
|
||||
default: {
|
||||
zval *offset;
|
||||
|
||||
offset = get_zval_ptr(op2, Ts, &EG(free_op2), BP_VAR_R);
|
||||
offset = get_zval_ptr(op2, Ts, &free_op2, BP_VAR_R);
|
||||
if (type==BP_VAR_R || type==BP_VAR_IS) {
|
||||
*retval = &EG(uninitialized_zval_ptr);
|
||||
} else {
|
||||
*retval = &EG(error_zval_ptr);
|
||||
}
|
||||
FREE_OP(op2, EG(free_op2));
|
||||
FREE_OP(op2, free_op2);
|
||||
SELECTIVE_PZVAL_LOCK(**retval, result);
|
||||
if (type==BP_VAR_W || type==BP_VAR_RW) {
|
||||
zend_error(E_WARNING, "Cannot use a scalar value as an array");
|
||||
@@ -749,13 +743,43 @@ static void zend_fetch_dimension_address_from_tmp_var(znode *result, znode *op1,
|
||||
|
||||
static void zend_fetch_property_address(znode *result, znode *op1, znode *op2, temp_variable *Ts, int type ELS_DC)
|
||||
{
|
||||
int free_op2;
|
||||
zval **container_ptr = get_zval_ptr_ptr(op1, Ts, type);
|
||||
zval *container;
|
||||
zval ***retval = &Ts[result->u.var].var.ptr_ptr;
|
||||
|
||||
|
||||
if (container_ptr == NULL) {
|
||||
fetch_overloaded_element(result, op1, op2, Ts, type, retval, OE_IS_OBJECT ELS_CC);
|
||||
zend_overloaded_element overloaded_element;
|
||||
|
||||
if (Ts[op1->u.var].EA.type == IS_STRING_OFFSET) {
|
||||
zval_ptr_dtor(&Ts[op1->u.var].EA.data.str_offset.str);
|
||||
switch (type) {
|
||||
case BP_VAR_R:
|
||||
case BP_VAR_IS:
|
||||
*retval = &EG(uninitialized_zval_ptr);
|
||||
break;
|
||||
case BP_VAR_W:
|
||||
case BP_VAR_RW:
|
||||
*retval = &EG(error_zval_ptr);
|
||||
break;
|
||||
EMPTY_SWITCH_DEFAULT_CASE()
|
||||
}
|
||||
SELECTIVE_PZVAL_LOCK(**retval, result);
|
||||
return;
|
||||
}
|
||||
|
||||
overloaded_element.element = *get_zval_ptr(op2, Ts, &free_op2, type);
|
||||
overloaded_element.type = OE_IS_OBJECT;
|
||||
if (!free_op2) {
|
||||
zval_copy_ctor(&overloaded_element.element);
|
||||
}
|
||||
|
||||
Ts[result->u.var].EA = Ts[op1->u.var].EA;
|
||||
zend_llist_add_element(Ts[result->u.var].EA.data.overloaded_element.elements_list, &overloaded_element);
|
||||
|
||||
Ts[result->u.var].EA.type = IS_OVERLOADED_OBJECT;
|
||||
*retval = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -774,9 +798,9 @@ static void zend_fetch_property_address(znode *result, znode *op1, znode *op2, t
|
||||
Ts[result->u.var].EA.data.overloaded_element.type = type;
|
||||
Ts[result->u.var].EA.data.overloaded_element.elements_list = (zend_llist *) emalloc(sizeof(zend_llist));
|
||||
zend_llist_init(Ts[result->u.var].EA.data.overloaded_element.elements_list, sizeof(zend_overloaded_element), NULL, 0);
|
||||
overloaded_element.element = *get_zval_ptr(op2, Ts, &EG(free_op2), type);
|
||||
overloaded_element.element = *get_zval_ptr(op2, Ts, &free_op2, type);
|
||||
overloaded_element.type = OE_IS_OBJECT;
|
||||
if (!EG(free_op2)) {
|
||||
if (!free_op2) {
|
||||
zval_copy_ctor(&overloaded_element.element);
|
||||
}
|
||||
zend_llist_add_element(Ts[result->u.var].EA.data.overloaded_element.elements_list, &overloaded_element);
|
||||
@@ -804,8 +828,8 @@ static void zend_fetch_property_address(znode *result, znode *op1, znode *op2, t
|
||||
if (container->type != IS_OBJECT) {
|
||||
zval *offset;
|
||||
|
||||
offset = get_zval_ptr(op2, Ts, &EG(free_op2), BP_VAR_R);
|
||||
FREE_OP(op2, EG(free_op2));
|
||||
offset = get_zval_ptr(op2, Ts, &free_op2, BP_VAR_R);
|
||||
FREE_OP(op2, free_op2);
|
||||
if (type==BP_VAR_R || type==BP_VAR_IS) {
|
||||
*retval = &EG(uninitialized_zval_ptr);
|
||||
} else {
|
||||
@@ -1298,32 +1322,38 @@ binary_assign_op_addr: {
|
||||
zend_op *original_opline = opline;
|
||||
int retval = zend_is_true(get_zval_ptr(&original_opline->op1, Ts, &EG(free_op1), BP_VAR_R));
|
||||
|
||||
FREE_OP(&original_opline->op1, EG(free_op1));
|
||||
Ts[original_opline->result.u.var].tmp_var.value.lval = retval;
|
||||
Ts[original_opline->result.u.var].tmp_var.type = IS_LONG;
|
||||
if (!retval) {
|
||||
#if DEBUG_ZEND>=2
|
||||
printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
|
||||
#endif
|
||||
opline = &op_array->opcodes[opline->op2.u.opline_num];
|
||||
FREE_OP(&original_opline->op1, EG(free_op1));
|
||||
Ts[original_opline->result.u.var].tmp_var.value.lval = retval;
|
||||
Ts[original_opline->result.u.var].tmp_var.type = IS_LONG;
|
||||
continue;
|
||||
}
|
||||
FREE_OP(&original_opline->op1, EG(free_op1));
|
||||
Ts[original_opline->result.u.var].tmp_var.value.lval = retval;
|
||||
Ts[original_opline->result.u.var].tmp_var.type = IS_LONG;
|
||||
}
|
||||
NEXT_OPCODE();
|
||||
case ZEND_JMPNZ_EX: {
|
||||
zend_op *original_opline = opline;
|
||||
int retval = zend_is_true(get_zval_ptr(&original_opline->op1, Ts, &EG(free_op1), BP_VAR_R));
|
||||
|
||||
FREE_OP(&original_opline->op1, EG(free_op1));
|
||||
Ts[original_opline->result.u.var].tmp_var.value.lval = retval;
|
||||
Ts[original_opline->result.u.var].tmp_var.type = IS_LONG;
|
||||
if (retval) {
|
||||
#if DEBUG_ZEND>=2
|
||||
printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
|
||||
#endif
|
||||
opline = &op_array->opcodes[opline->op2.u.opline_num];
|
||||
FREE_OP(&original_opline->op1, EG(free_op1));
|
||||
Ts[original_opline->result.u.var].tmp_var.value.lval = retval;
|
||||
Ts[original_opline->result.u.var].tmp_var.type = IS_LONG;
|
||||
continue;
|
||||
}
|
||||
FREE_OP(&original_opline->op1, EG(free_op1));
|
||||
Ts[original_opline->result.u.var].tmp_var.value.lval = retval;
|
||||
Ts[original_opline->result.u.var].tmp_var.type = IS_LONG;
|
||||
}
|
||||
NEXT_OPCODE();
|
||||
case ZEND_FREE:
|
||||
@@ -1384,7 +1414,7 @@ binary_assign_op_addr: {
|
||||
if (opline->op1.op_type == IS_VAR) {
|
||||
SELECTIVE_PZVAL_LOCK(*Ts[opline->op1.u.var].var.ptr_ptr, &opline->op1);
|
||||
}
|
||||
if (opline->op2.op_type == IS_VAR) {
|
||||
if (opline->op2.op_type==IS_VAR) {
|
||||
PZVAL_LOCK(*Ts[opline->op2.u.var].var.ptr_ptr);
|
||||
}
|
||||
}
|
||||
@@ -1401,6 +1431,10 @@ binary_assign_op_addr: {
|
||||
zend_class_entry *ce;
|
||||
zval **object_ptr_ptr;
|
||||
|
||||
if (zend_hash_find(EG(class_table), opline->op1.u.constant.value.str.val, opline->op1.u.constant.value.str.len+1, (void **) &ce)==FAILURE) {
|
||||
zend_error(E_ERROR, "Undefined class name '%s'", opline->op1.u.constant.value.str.val);
|
||||
}
|
||||
active_function_table = &ce->function_table;
|
||||
if (zend_hash_find(EG(active_symbol_table), "this", sizeof("this"), (void **) &object_ptr_ptr)==FAILURE) {
|
||||
object.ptr=NULL;
|
||||
} else {
|
||||
@@ -1409,15 +1443,6 @@ binary_assign_op_addr: {
|
||||
object.ptr = *object_ptr_ptr;
|
||||
object.ptr->refcount++; /* For this pointer */
|
||||
}
|
||||
if (zend_hash_find(EG(class_table), opline->op1.u.constant.value.str.val, opline->op1.u.constant.value.str.len+1, (void **) &ce)==FAILURE) { /* class doesn't exist */
|
||||
/* test for parent:: special case - if it doesn't exist - error out */
|
||||
if (opline->op1.u.constant.value.str.len!=(sizeof("parent")-1)
|
||||
|| memcmp(opline->op1.u.constant.value.str.val, "parent", sizeof("parent")-1)!=0
|
||||
|| !(ce = object.ptr->value.obj.ce->parent)) {
|
||||
zend_error(E_ERROR, "Undefined class name '%s'", opline->op1.u.constant.value.str.val);
|
||||
}
|
||||
}
|
||||
active_function_table = &ce->function_table;
|
||||
} else { /* used for member function calls */
|
||||
object.ptr = _get_object_zval_ptr(&opline->op1, Ts, &EG(free_op1) ELS_CC);
|
||||
|
||||
@@ -1559,10 +1584,9 @@ do_fcall_common:
|
||||
zval_ptr_dtor(&Ts[opline->result.u.var].var.ptr);
|
||||
}
|
||||
}
|
||||
object.ptr = zend_ptr_stack_pop(&EG(arg_types_stack));
|
||||
if (opline->opcode == ZEND_DO_FCALL_BY_NAME) {
|
||||
zend_ptr_stack_n_pop(&EG(arg_types_stack), 2, &object.ptr, &fbc);
|
||||
} else {
|
||||
object.ptr = zend_ptr_stack_pop(&EG(arg_types_stack));
|
||||
fbc = zend_ptr_stack_pop(&EG(arg_types_stack));
|
||||
}
|
||||
function_state.function = (zend_function *) op_array;
|
||||
EG(function_state_ptr) = &function_state;
|
||||
@@ -1796,7 +1820,7 @@ send_by_ref:
|
||||
FREE_OP(&opline->op2, EG(free_op2));
|
||||
continue;
|
||||
}
|
||||
/* Never reaches this point */
|
||||
NEXT_OPCODE();
|
||||
case ZEND_CASE: {
|
||||
int switch_expr_is_overloaded=0;
|
||||
|
||||
@@ -1982,7 +2006,7 @@ send_by_ref:
|
||||
switch (opline->op2.u.constant.value.lval) {
|
||||
case ZEND_INCLUDE_ONCE:
|
||||
case ZEND_REQUIRE_ONCE: {
|
||||
char *opened_path=NULL;
|
||||
char *opened_path;
|
||||
int dummy = 1;
|
||||
zend_file_handle file_handle;
|
||||
|
||||
@@ -2197,7 +2221,7 @@ send_by_ref:
|
||||
|
||||
ALLOC_ZVAL(key);
|
||||
INIT_PZVAL(key);
|
||||
switch (zend_hash_get_current_key(fe_ht, &str_key, &int_key, 1)) {
|
||||
switch (zend_hash_get_current_key(fe_ht, &str_key, &int_key)) {
|
||||
case HASH_KEY_IS_STRING:
|
||||
key->value.str.val = str_key;
|
||||
key->value.str.len = strlen(str_key);
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+16
-45
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -312,7 +312,7 @@ ZEND_API int zval_update_constant(zval **pp, void *arg)
|
||||
}
|
||||
|
||||
|
||||
int call_user_function(HashTable *function_table, zval **object_pp, zval *function_name, zval *retval_ptr, int param_count, zval *params[])
|
||||
int call_user_function(HashTable *function_table, zval *object, zval *function_name, zval *retval_ptr, int param_count, zval *params[])
|
||||
{
|
||||
zval ***params_array = (zval ***) emalloc(sizeof(zval **)*param_count);
|
||||
int i;
|
||||
@@ -322,7 +322,7 @@ int call_user_function(HashTable *function_table, zval **object_pp, zval *functi
|
||||
for (i=0; i<param_count; i++) {
|
||||
params_array[i] = ¶ms[i];
|
||||
}
|
||||
ex_retval = call_user_function_ex(function_table, object_pp, function_name, &local_retval_ptr, param_count, params_array, 1, NULL);
|
||||
ex_retval = call_user_function_ex(function_table, object, function_name, &local_retval_ptr, param_count, params_array, 1, NULL);
|
||||
if (local_retval_ptr) {
|
||||
COPY_PZVAL_TO_ZVAL(*retval_ptr, local_retval_ptr);
|
||||
} else {
|
||||
@@ -333,7 +333,7 @@ int call_user_function(HashTable *function_table, zval **object_pp, zval *functi
|
||||
}
|
||||
|
||||
|
||||
int call_user_function_ex(HashTable *function_table, zval **object_pp, zval *function_name, zval **retval_ptr_ptr, int param_count, zval **params[], int no_separation, HashTable *symbol_table)
|
||||
int call_user_function_ex(HashTable *function_table, zval *object, zval *function_name, zval **retval_ptr_ptr, int param_count, zval **params[], int no_separation, HashTable *symbol_table)
|
||||
{
|
||||
int i;
|
||||
zval **original_return_value;
|
||||
@@ -342,9 +342,6 @@ int call_user_function_ex(HashTable *function_table, zval **object_pp, zval *fun
|
||||
zend_function_state *original_function_state_ptr;
|
||||
zend_op_array *original_op_array;
|
||||
zend_op **original_opline_ptr;
|
||||
int orig_free_op1, orig_free_op2;
|
||||
int (*orig_unary_op)(zval *result, zval *op1);
|
||||
int (*orig_binary_op)(zval *result, zval *op1, zval *op2);
|
||||
ELS_FETCH();
|
||||
|
||||
*retval_ptr_ptr = NULL;
|
||||
@@ -360,32 +357,15 @@ int call_user_function_ex(HashTable *function_table, zval **object_pp, zval *fun
|
||||
}
|
||||
function_name = *tmp_real_function_name;
|
||||
SEPARATE_ZVAL_IF_NOT_REF(tmp_object_ptr);
|
||||
object_pp = tmp_object_ptr;
|
||||
(*object_pp)->is_ref = 1;
|
||||
object = *tmp_object_ptr;
|
||||
object->is_ref = 1;
|
||||
}
|
||||
|
||||
if (object_pp && !*object_pp) {
|
||||
object_pp = NULL;
|
||||
}
|
||||
if (object_pp) {
|
||||
if (Z_TYPE_PP(object_pp) == IS_OBJECT) {
|
||||
function_table = &(*object_pp)->value.obj.ce->function_table;
|
||||
} else if (Z_TYPE_PP(object_pp) == IS_STRING) {
|
||||
zend_class_entry *ce;
|
||||
char *lc_class;
|
||||
int found;
|
||||
|
||||
lc_class = estrndup(Z_STRVAL_PP(object_pp), Z_STRLEN_PP(object_pp));
|
||||
zend_str_tolower(lc_class, Z_STRLEN_PP(object_pp));
|
||||
found = zend_hash_find(EG(class_table), lc_class, Z_STRLEN_PP(object_pp) + 1, (void **) &ce);
|
||||
efree(lc_class);
|
||||
if (found == FAILURE)
|
||||
return FAILURE;
|
||||
|
||||
function_table = &ce->function_table;
|
||||
object_pp = NULL;
|
||||
} else
|
||||
if (object) {
|
||||
if (object->type != IS_OBJECT) {
|
||||
return FAILURE;
|
||||
}
|
||||
function_table = &object->value.obj.ce->function_table;
|
||||
}
|
||||
|
||||
if (function_name->type!=IS_STRING) {
|
||||
@@ -434,8 +414,6 @@ int call_user_function_ex(HashTable *function_table, zval **object_pp, zval *fun
|
||||
|
||||
zend_ptr_stack_n_push(&EG(argument_stack), 2, (void *) (long) param_count, NULL);
|
||||
|
||||
EG(function_state_ptr) = &function_state;
|
||||
|
||||
if (function_state.function->type == ZEND_USER_FUNCTION) {
|
||||
calling_symbol_table = EG(active_symbol_table);
|
||||
if (symbol_table) {
|
||||
@@ -444,23 +422,20 @@ int call_user_function_ex(HashTable *function_table, zval **object_pp, zval *fun
|
||||
ALLOC_HASHTABLE(EG(active_symbol_table));
|
||||
zend_hash_init(EG(active_symbol_table), 0, NULL, ZVAL_PTR_DTOR, 0);
|
||||
}
|
||||
if (object_pp) {
|
||||
if (object) {
|
||||
zval *dummy, **this_ptr;
|
||||
|
||||
|
||||
ALLOC_ZVAL(dummy);
|
||||
INIT_ZVAL(*dummy);
|
||||
INIT_ZVAL(*dummy);
|
||||
|
||||
zend_hash_update(EG(active_symbol_table), "this", sizeof("this"), &dummy, sizeof(zval *), (void **) &this_ptr);
|
||||
zend_assign_to_variable_reference(NULL, this_ptr, object_pp, NULL ELS_CC);
|
||||
zend_assign_to_variable_reference(NULL, this_ptr, &object, NULL ELS_CC);
|
||||
}
|
||||
original_return_value = EG(return_value_ptr_ptr);
|
||||
original_op_array = EG(active_op_array);
|
||||
EG(return_value_ptr_ptr) = retval_ptr_ptr;
|
||||
EG(active_op_array) = (zend_op_array *) function_state.function;
|
||||
original_opline_ptr = EG(opline_ptr);
|
||||
orig_free_op1 = EG(free_op1);
|
||||
orig_free_op2 = EG(free_op2);
|
||||
orig_unary_op = EG(unary_op);
|
||||
orig_binary_op = EG(binary_op);
|
||||
zend_execute(EG(active_op_array) ELS_CC);
|
||||
if (!symbol_table) {
|
||||
zend_hash_destroy(EG(active_symbol_table));
|
||||
@@ -470,13 +445,9 @@ int call_user_function_ex(HashTable *function_table, zval **object_pp, zval *fun
|
||||
EG(active_op_array) = original_op_array;
|
||||
EG(return_value_ptr_ptr)=original_return_value;
|
||||
EG(opline_ptr) = original_opline_ptr;
|
||||
EG(free_op1) = orig_free_op1;
|
||||
EG(free_op2) = orig_free_op2;
|
||||
EG(unary_op) = orig_unary_op;
|
||||
EG(binary_op) = orig_binary_op;
|
||||
} else {
|
||||
ALLOC_INIT_ZVAL(*retval_ptr_ptr);
|
||||
((zend_internal_function *) function_state.function)->handler(param_count, *retval_ptr_ptr, (object_pp?*object_pp:NULL), 1 ELS_CC);
|
||||
((zend_internal_function *) function_state.function)->handler(param_count, *retval_ptr_ptr, object, 1 ELS_CC);
|
||||
INIT_PZVAL(*retval_ptr_ptr);
|
||||
}
|
||||
zend_ptr_stack_clear_multiple(ELS_C);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -107,6 +107,7 @@ int zend_register_extension(zend_extension *new_extension, DL_HANDLE handle)
|
||||
|
||||
zend_llist_add_element(&zend_extensions, &extension);
|
||||
|
||||
zend_append_version_info(&extension);
|
||||
/*fprintf(stderr, "Loaded %s, version %s\n", extension.name, extension.version);*/
|
||||
#endif
|
||||
|
||||
@@ -130,7 +131,6 @@ static int zend_extension_startup(zend_extension *extension)
|
||||
if (extension->startup(extension)!=SUCCESS) {
|
||||
return 1;
|
||||
}
|
||||
zend_append_version_info(extension);
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "zend_compile.h"
|
||||
|
||||
#define ZEND_EXTENSION_API_NO 20001224
|
||||
#define ZEND_EXTENSION_API_NO 20001120
|
||||
|
||||
typedef struct _zend_extension_version_info {
|
||||
int zend_extension_api_no;
|
||||
@@ -38,8 +38,8 @@ typedef struct _zend_extension zend_extension;
|
||||
/* Typedef's for zend_extension function pointers */
|
||||
typedef int (*startup_func_t)(zend_extension *extension);
|
||||
typedef void (*shutdown_func_t)(zend_extension *extension);
|
||||
typedef void (*activate_func_t)(void);
|
||||
typedef void (*deactivate_func_t)(void);
|
||||
typedef void (*activate_func_t)();
|
||||
typedef void (*deactivate_func_t)();
|
||||
|
||||
typedef void (*message_handler_func_t)(int message, void *arg);
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-3
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -191,8 +191,6 @@ struct _zend_executor_globals {
|
||||
|
||||
int lambda_count;
|
||||
|
||||
HashTable ini_directives;
|
||||
|
||||
void *reserved[ZEND_MAX_RESERVED_RESOURCES];
|
||||
#if SUPPORT_INTERACTIVE
|
||||
int interactive;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+4
-7
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -1019,7 +1019,7 @@ ZEND_API int zend_hash_move_backwards_ex(HashTable *ht, HashPosition *pos)
|
||||
|
||||
|
||||
/* This function should be made binary safe */
|
||||
ZEND_API int zend_hash_get_current_key_ex(HashTable *ht, char **str_index, ulong *str_length, ulong *num_index, zend_bool duplicate, HashPosition *pos)
|
||||
ZEND_API int zend_hash_get_current_key_ex(HashTable *ht, char **str_index, ulong *str_length, ulong *num_index, HashPosition *pos)
|
||||
{
|
||||
Bucket *p;
|
||||
|
||||
@@ -1029,11 +1029,8 @@ ZEND_API int zend_hash_get_current_key_ex(HashTable *ht, char **str_index, ulong
|
||||
|
||||
if (p) {
|
||||
if (p->nKeyLength) {
|
||||
if (duplicate) {
|
||||
*str_index = estrndup(p->arKey, p->nKeyLength);
|
||||
} else {
|
||||
*str_index = p->arKey;
|
||||
}
|
||||
*str_index = (char *) pemalloc(p->nKeyLength, ht->persistent);
|
||||
memcpy(*str_index, p->arKey, p->nKeyLength);
|
||||
if (str_length) {
|
||||
*str_length = p->nKeyLength;
|
||||
}
|
||||
|
||||
+4
-4
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -146,7 +146,7 @@ ZEND_API ulong zend_hash_next_free_element(HashTable *ht);
|
||||
/* traversing */
|
||||
ZEND_API int zend_hash_move_forward_ex(HashTable *ht, HashPosition *pos);
|
||||
ZEND_API int zend_hash_move_backwards_ex(HashTable *ht, HashPosition *pos);
|
||||
ZEND_API int zend_hash_get_current_key_ex(HashTable *ht, char **str_index, ulong *str_length, ulong *num_index, zend_bool duplicate, HashPosition *pos);
|
||||
ZEND_API int zend_hash_get_current_key_ex(HashTable *ht, char **str_index, ulong *str_length, ulong *num_index, HashPosition *pos);
|
||||
ZEND_API int zend_hash_get_current_key_type_ex(HashTable *ht, HashPosition *pos);
|
||||
ZEND_API int zend_hash_get_current_data_ex(HashTable *ht, void **pData, HashPosition *pos);
|
||||
ZEND_API void zend_hash_internal_pointer_reset_ex(HashTable *ht, HashPosition *pos);
|
||||
@@ -156,8 +156,8 @@ ZEND_API void zend_hash_internal_pointer_end_ex(HashTable *ht, HashPosition *pos
|
||||
zend_hash_move_forward_ex(ht, NULL)
|
||||
#define zend_hash_move_backwards(ht) \
|
||||
zend_hash_move_backwards_ex(ht, NULL)
|
||||
#define zend_hash_get_current_key(ht, str_index, num_index, duplicate) \
|
||||
zend_hash_get_current_key_ex(ht, str_index, NULL, num_index, duplicate, NULL)
|
||||
#define zend_hash_get_current_key(ht, str_index, num_index) \
|
||||
zend_hash_get_current_key_ex(ht, str_index, NULL, num_index, NULL)
|
||||
#define zend_hash_get_current_key_type(ht) \
|
||||
zend_hash_get_current_key_type_ex(ht, NULL)
|
||||
#define zend_hash_get_current_data(ht, pData) \
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -149,7 +149,6 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
|
||||
case T_OPEN_TAG_WITH_ECHO:
|
||||
case T_CLOSE_TAG:
|
||||
case T_WHITESPACE:
|
||||
case T_COMMENT:
|
||||
break;
|
||||
default:
|
||||
efree(token.value.str.val);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+32
-46
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "zend_alloc.h"
|
||||
#include "zend_operators.h"
|
||||
|
||||
static HashTable *registered_zend_ini_directives;
|
||||
static HashTable known_directives;
|
||||
|
||||
|
||||
/*
|
||||
@@ -60,39 +60,25 @@ static int zend_restore_ini_entry_cb(zend_ini_entry *ini_entry, int stage)
|
||||
/*
|
||||
* Startup / shutdown
|
||||
*/
|
||||
ZEND_API int zend_ini_startup(ELS_D)
|
||||
int zend_ini_mstartup()
|
||||
{
|
||||
registered_zend_ini_directives = &EG(ini_directives);
|
||||
if (zend_hash_init_ex(registered_zend_ini_directives, 100, NULL, NULL, 1, 0)==FAILURE) {
|
||||
if (zend_hash_init_ex(&known_directives, 100, NULL, NULL, 1, 0)==FAILURE) {
|
||||
return FAILURE;
|
||||
}
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int zend_ini_shutdown(ELS_D)
|
||||
int zend_ini_mshutdown()
|
||||
{
|
||||
zend_hash_destroy(&EG(ini_directives));
|
||||
zend_hash_destroy(&known_directives);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int zend_ini_deactivate(ELS_D)
|
||||
int zend_ini_rshutdown()
|
||||
{
|
||||
zend_hash_apply_with_argument(&EG(ini_directives), (int (*)(void *, void *)) zend_restore_ini_entry_cb, (void *) ZEND_INI_STAGE_DEACTIVATE);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int zend_copy_ini_directives(ELS_D)
|
||||
{
|
||||
zend_ini_entry ini_entry;
|
||||
|
||||
if (zend_hash_init_ex(&EG(ini_directives), registered_zend_ini_directives->nNumOfElements, NULL, NULL, 1, 0)==FAILURE) {
|
||||
return FAILURE;
|
||||
}
|
||||
zend_hash_copy(&EG(ini_directives), registered_zend_ini_directives, NULL, &ini_entry, sizeof(zend_ini_entry));
|
||||
zend_ini_refresh_caches(ZEND_INI_STAGE_STARTUP ELS_CC);
|
||||
zend_hash_apply_with_argument(&known_directives, (int (*)(void *, void *)) zend_restore_ini_entry_cb, (void *) ZEND_INI_STAGE_DEACTIVATE);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@@ -117,9 +103,9 @@ static int ini_key_compare(const void *a, const void *b)
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zend_ini_sort_entries(ELS_D)
|
||||
void zend_ini_sort_entries(void)
|
||||
{
|
||||
zend_hash_sort(&EG(ini_directives), qsort, ini_key_compare, 0);
|
||||
zend_hash_sort(&known_directives, qsort, ini_key_compare, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -130,19 +116,19 @@ ZEND_API int zend_register_ini_entries(zend_ini_entry *ini_entry, int module_num
|
||||
{
|
||||
zend_ini_entry *p = ini_entry;
|
||||
zend_ini_entry *hashed_ini_entry;
|
||||
zval default_value;
|
||||
zval *default_value;
|
||||
|
||||
while (p->name) {
|
||||
p->module_number = module_number;
|
||||
if (zend_hash_add(registered_zend_ini_directives, p->name, p->name_length, p, sizeof(zend_ini_entry), (void **) &hashed_ini_entry)==FAILURE) {
|
||||
if (zend_hash_add(&known_directives, p->name, p->name_length, p, sizeof(zend_ini_entry), (void **) &hashed_ini_entry)==FAILURE) {
|
||||
zend_unregister_ini_entries(module_number);
|
||||
return FAILURE;
|
||||
}
|
||||
if ((zend_get_configuration_directive(p->name, p->name_length, &default_value))==SUCCESS) {
|
||||
if ((default_value=cfg_get_entry(p->name, p->name_length))) {
|
||||
if (!hashed_ini_entry->on_modify
|
||||
|| hashed_ini_entry->on_modify(hashed_ini_entry, default_value.value.str.val, default_value.value.str.len, hashed_ini_entry->mh_arg1, hashed_ini_entry->mh_arg2, hashed_ini_entry->mh_arg3, ZEND_INI_STAGE_STARTUP)==SUCCESS) {
|
||||
hashed_ini_entry->value = default_value.value.str.val;
|
||||
hashed_ini_entry->value_length = default_value.value.str.len;
|
||||
|| hashed_ini_entry->on_modify(hashed_ini_entry, default_value->value.str.val, default_value->value.str.len, hashed_ini_entry->mh_arg1, hashed_ini_entry->mh_arg2, hashed_ini_entry->mh_arg3, ZEND_INI_STAGE_STARTUP)==SUCCESS) {
|
||||
hashed_ini_entry->value = default_value->value.str.val;
|
||||
hashed_ini_entry->value_length = default_value->value.str.len;
|
||||
}
|
||||
} else {
|
||||
if (hashed_ini_entry->on_modify) {
|
||||
@@ -157,7 +143,7 @@ ZEND_API int zend_register_ini_entries(zend_ini_entry *ini_entry, int module_num
|
||||
|
||||
ZEND_API void zend_unregister_ini_entries(int module_number)
|
||||
{
|
||||
zend_hash_apply_with_argument(registered_zend_ini_directives, (int (*)(void *, void *)) zend_remove_ini_entries, (void *) &module_number);
|
||||
zend_hash_apply_with_argument(&known_directives, (int (*)(void *, void *)) zend_remove_ini_entries, (void *) &module_number);
|
||||
}
|
||||
|
||||
|
||||
@@ -170,9 +156,9 @@ static int zend_ini_refresh_cache(zend_ini_entry *p, int stage)
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zend_ini_refresh_caches(int stage ELS_DC)
|
||||
ZEND_API void zend_ini_refresh_caches(int stage)
|
||||
{
|
||||
zend_hash_apply_with_argument(&EG(ini_directives), (int (*)(void *, void *)) zend_ini_refresh_cache, (void *)(long) stage);
|
||||
zend_hash_apply_with_argument(&known_directives, (int (*)(void *, void *)) zend_ini_refresh_cache, (void *)(long) stage);
|
||||
}
|
||||
|
||||
|
||||
@@ -180,9 +166,8 @@ ZEND_API int zend_alter_ini_entry(char *name, uint name_length, char *new_value,
|
||||
{
|
||||
zend_ini_entry *ini_entry;
|
||||
char *duplicate;
|
||||
ELS_FETCH();
|
||||
|
||||
if (zend_hash_find(&EG(ini_directives), name, name_length, (void **) &ini_entry)==FAILURE) {
|
||||
if (zend_hash_find(&known_directives, name, name_length, (void **) &ini_entry)==FAILURE) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
@@ -214,9 +199,8 @@ ZEND_API int zend_alter_ini_entry(char *name, uint name_length, char *new_value,
|
||||
ZEND_API int zend_restore_ini_entry(char *name, uint name_length, int stage)
|
||||
{
|
||||
zend_ini_entry *ini_entry;
|
||||
ELS_FETCH();
|
||||
|
||||
if (zend_hash_find(&EG(ini_directives), name, name_length, (void **) &ini_entry)==FAILURE) {
|
||||
if (zend_hash_find(&known_directives, name, name_length, (void **) &ini_entry)==FAILURE) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
@@ -229,7 +213,7 @@ ZEND_API int zend_ini_register_displayer(char *name, uint name_length, void (*di
|
||||
{
|
||||
zend_ini_entry *ini_entry;
|
||||
|
||||
if (zend_hash_find(registered_zend_ini_directives, name, name_length, (void **) &ini_entry)==FAILURE) {
|
||||
if (zend_hash_find(&known_directives, name, name_length, (void **) &ini_entry)==FAILURE) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
@@ -246,9 +230,8 @@ ZEND_API int zend_ini_register_displayer(char *name, uint name_length, void (*di
|
||||
ZEND_API long zend_ini_long(char *name, uint name_length, int orig)
|
||||
{
|
||||
zend_ini_entry *ini_entry;
|
||||
ELS_FETCH();
|
||||
|
||||
if (zend_hash_find(&EG(ini_directives), name, name_length, (void **) &ini_entry)==SUCCESS) {
|
||||
if (zend_hash_find(&known_directives, name, name_length, (void **) &ini_entry)==SUCCESS) {
|
||||
if (orig && ini_entry->modified) {
|
||||
return (ini_entry->orig_value ? strtol(ini_entry->orig_value, NULL, 0) : 0);
|
||||
} else if (ini_entry->value) {
|
||||
@@ -263,9 +246,8 @@ ZEND_API long zend_ini_long(char *name, uint name_length, int orig)
|
||||
ZEND_API double zend_ini_double(char *name, uint name_length, int orig)
|
||||
{
|
||||
zend_ini_entry *ini_entry;
|
||||
ELS_FETCH();
|
||||
|
||||
if (zend_hash_find(&EG(ini_directives), name, name_length, (void **) &ini_entry)==SUCCESS) {
|
||||
if (zend_hash_find(&known_directives, name, name_length, (void **) &ini_entry)==SUCCESS) {
|
||||
if (orig && ini_entry->modified) {
|
||||
return (double) (ini_entry->orig_value ? strtod(ini_entry->orig_value, NULL) : 0.0);
|
||||
} else if (ini_entry->value) {
|
||||
@@ -280,9 +262,8 @@ ZEND_API double zend_ini_double(char *name, uint name_length, int orig)
|
||||
ZEND_API char *zend_ini_string(char *name, uint name_length, int orig)
|
||||
{
|
||||
zend_ini_entry *ini_entry;
|
||||
ELS_FETCH();
|
||||
|
||||
if (zend_hash_find(&EG(ini_directives), name, name_length, (void **) &ini_entry)==SUCCESS) {
|
||||
if (zend_hash_find(&known_directives, name, name_length, (void **) &ini_entry)==SUCCESS) {
|
||||
if (orig && ini_entry->modified) {
|
||||
return ini_entry->orig_value;
|
||||
} else {
|
||||
@@ -297,9 +278,8 @@ ZEND_API char *zend_ini_string(char *name, uint name_length, int orig)
|
||||
zend_ini_entry *get_ini_entry(char *name, uint name_length)
|
||||
{
|
||||
zend_ini_entry *ini_entry;
|
||||
ELS_FETCH();
|
||||
|
||||
if (zend_hash_find(&EG(ini_directives), name, name_length, (void **) &ini_entry)==SUCCESS) {
|
||||
if (zend_hash_find(&known_directives, name, name_length, (void **) &ini_entry)==SUCCESS) {
|
||||
return ini_entry;
|
||||
} else {
|
||||
return NULL;
|
||||
@@ -395,6 +375,12 @@ ZEND_INI_DISP(display_link_numbers)
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zend_ini_apply_with_argument(apply_func_arg_t apply_func, void *arg)
|
||||
{
|
||||
zend_hash_apply_with_argument(&known_directives, apply_func, arg);
|
||||
}
|
||||
|
||||
|
||||
/* Standard message handlers */
|
||||
|
||||
ZEND_API ZEND_INI_MH(OnUpdateBool)
|
||||
|
||||
+11
-38
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -26,36 +26,6 @@
|
||||
|
||||
#define ZEND_INI_ALL (ZEND_INI_USER|ZEND_INI_PERDIR|ZEND_INI_SYSTEM)
|
||||
|
||||
#ifndef XtOffsetOf
|
||||
# if defined(CRAY) || (defined(__arm) && !defined(LINUX))
|
||||
# ifdef __STDC__
|
||||
# define XtOffset(p_type,field) _Offsetof(p_type,field)
|
||||
# else
|
||||
# ifdef CRAY2
|
||||
# define XtOffset(p_type,field) \
|
||||
(sizeof(int)*((unsigned int)&(((p_type)NULL)->field)))
|
||||
|
||||
# else /* !CRAY2 */
|
||||
|
||||
# define XtOffset(p_type,field) ((unsigned int)&(((p_type)NULL)->field))
|
||||
|
||||
# endif /* !CRAY2 */
|
||||
# endif /* __STDC__ */
|
||||
# else /* ! (CRAY || __arm) */
|
||||
|
||||
# define XtOffset(p_type,field) \
|
||||
((long) (((char *) (&(((p_type)NULL)->field))) - ((char *) NULL)))
|
||||
|
||||
# endif /* !CRAY */
|
||||
|
||||
# ifdef offsetof
|
||||
# define XtOffsetOf(s_type,field) offsetof(s_type,field)
|
||||
# else
|
||||
# define XtOffsetOf(s_type,field) XtOffset(s_type*,field)
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
typedef struct _zend_ini_entry zend_ini_entry;
|
||||
|
||||
#define ZEND_INI_MH(name) int name(zend_ini_entry *entry, char *new_value, uint new_value_length, void *mh_arg1, void *mh_arg2, void *mh_arg3, int stage)
|
||||
@@ -82,17 +52,15 @@ struct _zend_ini_entry {
|
||||
};
|
||||
|
||||
|
||||
ZEND_API int zend_ini_startup(ELS_D);
|
||||
ZEND_API int zend_ini_shutdown(ELS_D);
|
||||
ZEND_API int zend_ini_deactivate(ELS_D);
|
||||
int zend_ini_mstartup(void);
|
||||
int zend_ini_mshutdown(void);
|
||||
int zend_ini_rshutdown(void);
|
||||
|
||||
ZEND_API int zend_copy_ini_directives(ELS_D);
|
||||
|
||||
ZEND_API void zend_ini_sort_entries(ELS_D);
|
||||
void zend_ini_sort_entries(void);
|
||||
|
||||
ZEND_API int zend_register_ini_entries(zend_ini_entry *ini_entry, int module_number);
|
||||
ZEND_API void zend_unregister_ini_entries(int module_number);
|
||||
ZEND_API void zend_ini_refresh_caches(int stage ELS_DC);
|
||||
ZEND_API void zend_ini_refresh_caches(int stage);
|
||||
ZEND_API int zend_alter_ini_entry(char *name, uint name_length, char *new_value, uint new_value_length, int modify_type, int stage);
|
||||
ZEND_API int zend_restore_ini_entry(char *name, uint name_length, int stage);
|
||||
ZEND_API void display_ini_entries(zend_module_entry *module);
|
||||
@@ -104,6 +72,8 @@ zend_ini_entry *get_ini_entry(char *name, uint name_length);
|
||||
|
||||
ZEND_API int zend_ini_register_displayer(char *name, uint name_length, void (*displayer)(zend_ini_entry *ini_entry, int type));
|
||||
|
||||
ZEND_API void zend_ini_apply_with_argument(apply_func_arg_t apply_func, void *arg);
|
||||
|
||||
ZEND_API ZEND_INI_DISP(zend_ini_boolean_displayer_cb);
|
||||
ZEND_API ZEND_INI_DISP(zend_ini_color_displayer_cb);
|
||||
ZEND_API ZEND_INI_DISP(display_link_numbers);
|
||||
@@ -169,6 +139,9 @@ ZEND_API ZEND_INI_DISP(display_link_numbers);
|
||||
#define REGISTER_INI_DISPLAYER(name, displayer) zend_ini_register_displayer((name), sizeof(name), displayer)
|
||||
#define REGISTER_INI_BOOLEAN(name) REGISTER_INI_DISPLAYER(name, zend_ini_boolean_displayer_cb)
|
||||
|
||||
zval *cfg_get_entry(char *name, uint name_length);
|
||||
|
||||
|
||||
/* Standard message handlers */
|
||||
ZEND_API ZEND_INI_MH(OnUpdateBool);
|
||||
ZEND_API ZEND_INI_MH(OnUpdateInt);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -14,8 +14,8 @@ public:
|
||||
#endif /* ZTS && __cplusplus */
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
int zend_ini_scanner_get_lineno(void);
|
||||
char *zend_ini_scanner_get_filename(void);
|
||||
int zend_ini_scanner_get_lineno();
|
||||
char *zend_ini_scanner_get_filename();
|
||||
int zend_ini_open_file_for_scanning(zend_file_handle *fh);
|
||||
void zend_ini_close_file(zend_file_handle *fh);
|
||||
int ini_lex(zval *ini_lval);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -45,9 +45,6 @@
|
||||
#define YY_DECL int ini_lex(zval *ini_lval)
|
||||
#endif
|
||||
|
||||
#include "zend_istdiostream.h"
|
||||
|
||||
|
||||
#ifndef ZTS
|
||||
static char *ini_filename;
|
||||
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
#ifndef _ZEND_STDIOSTREAM
|
||||
#define _ZEND_STDIOSTREAM
|
||||
|
||||
#if defined(ZTS) && !defined(HAVE_CLASS_ISTDIOSTREAM)
|
||||
class istdiostream : public istream
|
||||
{
|
||||
private:
|
||||
stdiobuf _file;
|
||||
public:
|
||||
istdiostream (FILE* __f) : istream(), _file(__f) { init(&_file); }
|
||||
stdiobuf* rdbuf()/* const */ { return &_file; }
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -3,7 +3,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -29,7 +29,6 @@
|
||||
%x ST_LOOKING_FOR_PROPERTY
|
||||
%x ST_LOOKING_FOR_VARNAME
|
||||
%x ST_COMMENT
|
||||
%x ST_ONE_LINE_COMMENT
|
||||
%option stack
|
||||
|
||||
%{
|
||||
@@ -87,7 +86,16 @@
|
||||
# define MY_INPUT input
|
||||
#endif
|
||||
|
||||
#include "zend_istdiostream.h"
|
||||
#if defined(ZTS) && !defined(HAVE_CLASS_ISTDIOSTREAM)
|
||||
class istdiostream : public istream
|
||||
{
|
||||
private:
|
||||
stdiobuf _file;
|
||||
public:
|
||||
istdiostream (FILE* __f) : istream(), _file(__f) { init(&_file); }
|
||||
stdiobuf* rdbuf()/* const */ { return &_file; }
|
||||
};
|
||||
#endif
|
||||
|
||||
#define YY_FATAL_ERROR zend_fatal_scanner_error
|
||||
|
||||
@@ -110,7 +118,7 @@ do { \
|
||||
}
|
||||
|
||||
|
||||
#define ZEND_IS_OCT(c) ((c)>='0' && (c)<='7')
|
||||
#define ZEND_IS_OCT(c) ((c)>='0' && (c)<'8')
|
||||
#define ZEND_IS_HEX(c) (((c)>='0' && (c)<='9') || ((c)>='a' && (c)<='f') || ((c)>='A' && (c)<='F'))
|
||||
|
||||
|
||||
@@ -243,18 +251,23 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
|
||||
switch (file_handle->type) {
|
||||
case ZEND_HANDLE_FILENAME:
|
||||
file_handle->handle.fp = zend_fopen(file_handle->filename, &file_handle->opened_path);
|
||||
file_path = file_handle->opened_path;
|
||||
break;
|
||||
case ZEND_HANDLE_FD:
|
||||
/* file_handle->opened_path = NULL; */
|
||||
file_handle->handle.fp = fdopen(file_handle->handle.fd, "r");
|
||||
break;
|
||||
case ZEND_HANDLE_FP:
|
||||
/* file_handle->opened_path = NULL; */
|
||||
file_handle->handle.fp = file_handle->handle.fp;
|
||||
break;
|
||||
}
|
||||
if (!file_handle->handle.fp) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
if (!file_path) {
|
||||
file_path = file_handle->filename;
|
||||
}
|
||||
file_handle->type = ZEND_HANDLE_FP;
|
||||
if (file_handle->handle.fp != stdin) {
|
||||
zend_llist_add_element(&CG(open_files), file_handle);
|
||||
@@ -266,6 +279,7 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
|
||||
#else
|
||||
switch (file_handle->type) {
|
||||
case ZEND_HANDLE_FD:
|
||||
/* file_handle->opened_path = NULL; */
|
||||
file_handle->handle.is = new ifstream(file_handle->handle.fd);
|
||||
file_handle->type = ZEND_HANDLE_FSTREAM;
|
||||
break;
|
||||
@@ -280,6 +294,7 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
|
||||
break;
|
||||
}
|
||||
case ZEND_HANDLE_FP:
|
||||
/* file_handle->opened_path = NULL; */
|
||||
if (file_handle->handle.fp==stdin) {
|
||||
file_handle->handle.is = &cin;
|
||||
} else {
|
||||
@@ -292,6 +307,8 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
|
||||
break;
|
||||
}
|
||||
|
||||
file_path = file_handle->filename;
|
||||
|
||||
if (file_handle->handle.is->fail()) {
|
||||
delete file_handle->handle.is;
|
||||
return FAILURE;
|
||||
@@ -303,13 +320,6 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
|
||||
CG(ZFL) = new ZendFlexLexer;
|
||||
CG(ZFL)->switch_streams(file_handle->handle.is, &cout);
|
||||
#endif
|
||||
|
||||
if(file_handle->opened_path) {
|
||||
file_path = file_handle->opened_path;
|
||||
} else {
|
||||
file_path = file_handle->filename;
|
||||
}
|
||||
|
||||
zend_set_compiled_filename(file_path);
|
||||
CG(zend_lineno) = 1;
|
||||
return SUCCESS;
|
||||
@@ -352,6 +362,7 @@ ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type CLS
|
||||
CG(active_op_array) = op_array;
|
||||
compiler_result = zendparse(CLS_C);
|
||||
zend_do_return(&retval_znode, 0 CLS_CC);
|
||||
restore_lexical_state(&original_lex_state CLS_CC);
|
||||
CG(in_compilation) = original_in_compilation;
|
||||
if (compiler_result==1) { /* parser error */
|
||||
CG(unclean_shutdown) = 1;
|
||||
@@ -369,9 +380,6 @@ ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type CLS
|
||||
retval = NULL;
|
||||
}
|
||||
}
|
||||
if (compilation_successful) {
|
||||
restore_lexical_state(&original_lex_state CLS_CC);
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -475,6 +483,7 @@ zend_op_array *compile_string(zval *source_string, char *filename CLS_DC)
|
||||
CG(ZFL)->BeginState(ST_IN_SCRIPTING);
|
||||
#endif
|
||||
compiler_result = zendparse(CLS_C);
|
||||
restore_lexical_state(&original_lex_state CLS_CC);
|
||||
|
||||
if (compiler_result==1) {
|
||||
CG(active_op_array) = original_active_op_array;
|
||||
@@ -486,7 +495,6 @@ zend_op_array *compile_string(zval *source_string, char *filename CLS_DC)
|
||||
pass_two(op_array);
|
||||
retval = op_array;
|
||||
}
|
||||
restore_lexical_state(&original_lex_state CLS_CC);
|
||||
}
|
||||
#ifdef ZTS
|
||||
delete input_stream;
|
||||
@@ -743,6 +751,7 @@ ANY_CHAR (.|[\n])
|
||||
}
|
||||
|
||||
<ST_LOOKING_FOR_PROPERTY>{ANY_CHAR} {
|
||||
/*unput(yytext[0]);*/
|
||||
yyless(0);
|
||||
yy_pop_state();
|
||||
}
|
||||
@@ -895,6 +904,7 @@ ANY_CHAR (.|[\n])
|
||||
return T_CONCAT_EQUAL;
|
||||
}
|
||||
|
||||
|
||||
<ST_IN_SCRIPTING>"%=" {
|
||||
return T_MOD_EQUAL;
|
||||
}
|
||||
@@ -984,6 +994,7 @@ ANY_CHAR (.|[\n])
|
||||
|
||||
|
||||
<ST_LOOKING_FOR_VARNAME>{ANY_CHAR} {
|
||||
/*unput(yytext[0]);*/
|
||||
yyless(0);
|
||||
yy_pop_state();
|
||||
yy_push_state(ST_IN_SCRIPTING);
|
||||
@@ -1049,7 +1060,7 @@ ANY_CHAR (.|[\n])
|
||||
filename = "";
|
||||
}
|
||||
zendlval->value.str.len = strlen(filename);
|
||||
zendlval->value.str.val = estrndup(filename, zendlval->value.str.len);
|
||||
zendlval->value.str.val = estrndup(filename,zendlval->value.str.len);
|
||||
zendlval->type = IS_STRING;
|
||||
return T_FILE;
|
||||
}
|
||||
@@ -1059,7 +1070,7 @@ ANY_CHAR (.|[\n])
|
||||
zendlval->value.str.val = (char *) estrndup(yytext, yyleng);
|
||||
zendlval->value.str.len = yyleng;
|
||||
zendlval->type = IS_STRING;
|
||||
HANDLE_NEWLINES(yytext, yyleng);
|
||||
HANDLE_NEWLINES(yytext,yyleng);
|
||||
return T_INLINE_HTML;
|
||||
}
|
||||
|
||||
@@ -1123,7 +1134,7 @@ ANY_CHAR (.|[\n])
|
||||
}
|
||||
|
||||
|
||||
<INITIAL>"<?php_track_vars?>"("\n"|"\r\n")? {
|
||||
<INITIAL>"<?php_track_vars?>"([\n]|"\r\n")? {
|
||||
zend_error(E_WARNING, "<?php_track_vars?> is no longer supported - please use the track_vars INI directive instead");
|
||||
HANDLE_NEWLINE(yytext[yyleng-1]);
|
||||
zendlval->value.str.val = (char *) estrndup(yytext, yyleng);
|
||||
@@ -1165,41 +1176,11 @@ ANY_CHAR (.|[\n])
|
||||
}
|
||||
|
||||
|
||||
<ST_IN_SCRIPTING>"#"|"//" {
|
||||
BEGIN(ST_ONE_LINE_COMMENT);
|
||||
yymore();
|
||||
}
|
||||
|
||||
<ST_ONE_LINE_COMMENT>"?"|"%"|">" {
|
||||
yymore();
|
||||
}
|
||||
|
||||
<ST_ONE_LINE_COMMENT>[^\n\r?%>]+ {
|
||||
yymore();
|
||||
}
|
||||
|
||||
<ST_ONE_LINE_COMMENT>"\n"|"\r\n" {
|
||||
zendlval->value.str.val = yytext; /* no copying - intentional */
|
||||
zendlval->value.str.len = yyleng;
|
||||
zendlval->type = IS_STRING;
|
||||
BEGIN(ST_IN_SCRIPTING);
|
||||
CG(zend_lineno)++;
|
||||
<ST_IN_SCRIPTING>([#]|"//")([^\n\r?]|"?"[^>\n\r])*("?\n"|"?\r\n")? { /* eat one line comments */
|
||||
HANDLE_NEWLINE(yytext[yyleng-1]);
|
||||
return T_COMMENT;
|
||||
}
|
||||
|
||||
<ST_ONE_LINE_COMMENT>"?>"|"%>" {
|
||||
if(CG(asp_tags) || yytext[yyleng-2] != '%') { /* asp comment? */
|
||||
zendlval->value.str.val = yytext; /* no copying - intentional */
|
||||
zendlval->value.str.len = yyleng;
|
||||
zendlval->type = IS_STRING;
|
||||
yyless(yyleng-2);
|
||||
BEGIN(ST_IN_SCRIPTING);
|
||||
return T_COMMENT;
|
||||
} else {
|
||||
yymore();
|
||||
}
|
||||
}
|
||||
|
||||
<ST_IN_SCRIPTING>"/*" {
|
||||
CG(comment_start_line) = CG(zend_lineno);
|
||||
BEGIN(ST_COMMENT);
|
||||
@@ -1221,7 +1202,7 @@ ANY_CHAR (.|[\n])
|
||||
yymore();
|
||||
}
|
||||
|
||||
<ST_IN_SCRIPTING>("?>"|"</script"{WHITESPACE}*">")("\n"|"\r\n")? {
|
||||
<ST_IN_SCRIPTING>("?>"|"</script"{WHITESPACE}*">")([\n]|"\r\n")? {
|
||||
zendlval->value.str.val = yytext; /* no copying - intentional */
|
||||
zendlval->value.str.len = yyleng;
|
||||
zendlval->type = IS_STRING;
|
||||
@@ -1231,17 +1212,17 @@ ANY_CHAR (.|[\n])
|
||||
}
|
||||
|
||||
|
||||
<ST_IN_SCRIPTING>"%>"("\n"|"\r\n")? {
|
||||
<ST_IN_SCRIPTING>"%>"([\n]|"\r\n")? {
|
||||
zendlval->value.str.len = yyleng;
|
||||
zendlval->type = IS_STRING;
|
||||
HANDLE_NEWLINES(yytext,yyleng);
|
||||
if (CG(asp_tags)) {
|
||||
BEGIN(INITIAL);
|
||||
zendlval->value.str.len = yyleng;
|
||||
zendlval->type = IS_STRING;
|
||||
zendlval->value.str.val = yytext; /* no copying - intentional */
|
||||
HANDLE_NEWLINES(yytext,yyleng);
|
||||
return T_CLOSE_TAG; /* implicit ';' at php-end tag */
|
||||
} else {
|
||||
yyless(1);
|
||||
return yytext[0];
|
||||
zendlval->value.str.val = (char *) estrndup(yytext, yyleng);
|
||||
return T_INLINE_HTML;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1476,6 +1457,9 @@ ANY_CHAR (.|[\n])
|
||||
zendlval->value.lval = (long) yytext[0];
|
||||
if (yyleng == 2) {
|
||||
yyless(1);
|
||||
/*unput(yytext[1]);
|
||||
yytext[1] = 0;
|
||||
yyleng--;*/
|
||||
}
|
||||
return T_CHARACTER;
|
||||
}
|
||||
@@ -1489,6 +1473,7 @@ ANY_CHAR (.|[\n])
|
||||
<ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC>"{$" {
|
||||
zendlval->value.lval = (long) yytext[0];
|
||||
yy_push_state(ST_IN_SCRIPTING);
|
||||
/*unput('$');*/
|
||||
yyless(1);
|
||||
return T_CURLY_OPEN;
|
||||
}
|
||||
|
||||
+5
-15
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -272,18 +272,8 @@ void plist_entry_destructor(void *ptr)
|
||||
zend_rsrc_list_dtors_entry *ld;
|
||||
|
||||
if (zend_hash_index_find(&list_destructors, le->type,(void **) &ld)==SUCCESS) {
|
||||
switch (ld->type) {
|
||||
case ZEND_RESOURCE_LIST_TYPE_STD:
|
||||
if (ld->plist_dtor) {
|
||||
(ld->plist_dtor)(le->ptr);
|
||||
}
|
||||
break;
|
||||
case ZEND_RESOURCE_LIST_TYPE_EX:
|
||||
if (ld->plist_dtor_ex) {
|
||||
ld->plist_dtor_ex(le);
|
||||
}
|
||||
break;
|
||||
EMPTY_SWITCH_DEFAULT_CASE()
|
||||
if (ld->plist_dtor) {
|
||||
(ld->plist_dtor)(le->ptr);
|
||||
}
|
||||
} else {
|
||||
zend_error(E_WARNING,"Unknown persistent list entry type in module shutdown (%d)",le->type);
|
||||
@@ -392,13 +382,13 @@ ZEND_API int zend_register_list_destructors_ex(rsrc_dtor_func_t ld, rsrc_dtor_fu
|
||||
}
|
||||
|
||||
|
||||
int zend_init_rsrc_list_dtors(void)
|
||||
int zend_init_rsrc_list_dtors()
|
||||
{
|
||||
return zend_hash_init(&list_destructors, 50, NULL, NULL, 1);
|
||||
}
|
||||
|
||||
|
||||
void zend_destroy_rsrc_list_dtors(void)
|
||||
void zend_destroy_rsrc_list_dtors()
|
||||
{
|
||||
zend_hash_destroy(&list_destructors);
|
||||
}
|
||||
|
||||
+3
-4
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -71,8 +71,8 @@ int zend_init_rsrc_list(ELS_D);
|
||||
int zend_init_rsrc_plist(ELS_D);
|
||||
void zend_destroy_rsrc_list(ELS_D);
|
||||
void zend_destroy_rsrc_plist(ELS_D);
|
||||
int zend_init_rsrc_list_dtors(void);
|
||||
void zend_destroy_rsrc_list_dtors(void);
|
||||
int zend_init_rsrc_list_dtors();
|
||||
void zend_destroy_rsrc_list_dtors();
|
||||
|
||||
ZEND_API int zend_list_insert(void *ptr, int type);
|
||||
ZEND_API int zend_plist_insert(void *ptr, int type);
|
||||
@@ -84,7 +84,6 @@ ZEND_API void *zend_list_find(int id, int *type);
|
||||
ZEND_API void *zend_plist_find(int id, int *type);
|
||||
|
||||
ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type);
|
||||
ZEND_API int zend_register_false_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type);
|
||||
ZEND_API void *zend_fetch_resource(zval **passed_id, int default_id, char *resource_type_name, int *found_resource_type, int num_resource_types, ...);
|
||||
|
||||
ZEND_API char *zend_rsrc_list_get_rsrc_type(int resource);
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+8
-8
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -21,8 +21,6 @@
|
||||
#ifndef MODULES_H
|
||||
#define MODULES_H
|
||||
|
||||
#include "zend.h"
|
||||
|
||||
#define INIT_FUNC_ARGS int type, int module_number ELS_DC
|
||||
#define INIT_FUNC_ARGS_PASSTHRU type, module_number ELS_CC
|
||||
#define SHUTDOWN_FUNC_ARGS int type, int module_number
|
||||
@@ -32,12 +30,14 @@
|
||||
#define GINIT_FUNC_ARGS void
|
||||
#define GINIT_FUNC_ARGS_PASSTHRU
|
||||
|
||||
ZEND_API extern unsigned char first_arg_force_ref[];
|
||||
ZEND_API extern unsigned char first_arg_allow_ref[];
|
||||
ZEND_API extern unsigned char second_arg_force_ref[];
|
||||
ZEND_API extern unsigned char second_arg_allow_ref[];
|
||||
extern unsigned char first_arg_force_ref[];
|
||||
extern unsigned char first_arg_allow_ref[];
|
||||
extern unsigned char second_arg_force_ref[];
|
||||
extern unsigned char second_arg_allow_ref[];
|
||||
|
||||
#define ZEND_MODULE_API_NO 20001222
|
||||
#include "zend.h"
|
||||
|
||||
#define ZEND_MODULE_API_NO 20000809
|
||||
#ifdef ZTS
|
||||
#define USING_ZTS 1
|
||||
#else
|
||||
|
||||
+5
-4
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -251,9 +251,7 @@ static void zend_update_extended_info(zend_op_array *op_array CLS_DC)
|
||||
opline++;
|
||||
continue;
|
||||
}
|
||||
if (opline+1<end) {
|
||||
opline->lineno = (opline+1)->lineno;
|
||||
}
|
||||
opline->lineno = (opline+1)->lineno;
|
||||
} else {
|
||||
opline->opcode = ZEND_NOP;
|
||||
}
|
||||
@@ -264,6 +262,9 @@ static void zend_update_extended_info(zend_op_array *op_array CLS_DC)
|
||||
opline->opcode = ZEND_EXT_STMT;
|
||||
SET_UNUSED(opline->op1);
|
||||
SET_UNUSED(opline->op2);
|
||||
if (op_array->last>0) {
|
||||
opline->lineno= op_array->opcodes[op_array->last-2].lineno;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+43
-4
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -426,13 +426,11 @@ ZEND_API void _convert_to_string(zval *op ZEND_FILE_LINE_DC)
|
||||
zval_dtor(op);
|
||||
op->value.str.val = estrndup_rel("Array",sizeof("Array")-1);
|
||||
op->value.str.len = sizeof("Array")-1;
|
||||
zend_error(E_NOTICE, "Array to string conversion");
|
||||
break;
|
||||
case IS_OBJECT:
|
||||
zval_dtor(op);
|
||||
op->value.str.val = estrndup_rel("Object",sizeof("Object")-1);
|
||||
op->value.str.len = sizeof("Object")-1;
|
||||
zend_error(E_NOTICE, "Object to string conversion");
|
||||
break;
|
||||
default:
|
||||
zval_dtor(op);
|
||||
@@ -743,6 +741,47 @@ ZEND_API int mod_function(zval *result, zval *op1, zval *op2)
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int boolean_or_function(zval *result, zval *op1, zval *op2)
|
||||
{
|
||||
zval op1_copy, op2_copy;
|
||||
|
||||
result->type = IS_BOOL;
|
||||
|
||||
zendi_convert_to_boolean(op1, op1_copy, result);
|
||||
if (op1->value.lval) {
|
||||
result->value.lval = 1;
|
||||
return SUCCESS;
|
||||
}
|
||||
zendi_convert_to_boolean(op2, op2_copy, result);
|
||||
if (op2->value.lval) {
|
||||
result->value.lval = 1;
|
||||
return SUCCESS;
|
||||
}
|
||||
result->value.lval = 0;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int boolean_and_function(zval *result, zval *op1, zval *op2)
|
||||
{
|
||||
zval op1_copy, op2_copy;
|
||||
|
||||
result->type = IS_BOOL;
|
||||
|
||||
zendi_convert_to_boolean(op1, op1_copy, result);
|
||||
if (!op1->value.lval) {
|
||||
result->value.lval = 0;
|
||||
return SUCCESS;
|
||||
}
|
||||
zendi_convert_to_boolean(op2, op2_copy, result);
|
||||
if (!op2->value.lval) {
|
||||
result->value.lval = 0;
|
||||
return SUCCESS;
|
||||
}
|
||||
result->value.lval = 1;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int boolean_xor_function(zval *result, zval *op1, zval *op2)
|
||||
{
|
||||
@@ -1098,7 +1137,7 @@ ZEND_API int compare_function(zval *result, zval *op1, zval *op2)
|
||||
|
||||
if (op1->type == IS_LONG && op2->type == IS_LONG) {
|
||||
result->type = IS_LONG;
|
||||
result->value.lval = op1->value.lval>op2->value.lval?1:(op1->value.lval<op2->value.lval?-1:0);
|
||||
result->value.lval = ZEND_NORMALIZE_BOOL(op1->value.lval-op2->value.lval);
|
||||
return SUCCESS;
|
||||
}
|
||||
if ((op1->type == IS_DOUBLE || op1->type == IS_LONG)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -41,7 +41,9 @@ ZEND_API int sub_function(zval *result, zval *op1, zval *op2);
|
||||
ZEND_API int mul_function(zval *result, zval *op1, zval *op2);
|
||||
ZEND_API int div_function(zval *result, zval *op1, zval *op2);
|
||||
ZEND_API int mod_function(zval *result, zval *op1, zval *op2);
|
||||
ZEND_API int boolean_or_function(zval *result, zval *op1, zval *op2);
|
||||
ZEND_API int boolean_xor_function(zval *result, zval *op1, zval *op2);
|
||||
ZEND_API int boolean_and_function(zval *result, zval *op1, zval *op2);
|
||||
ZEND_API int boolean_not_function(zval *result, zval *op1);
|
||||
ZEND_API int bitwise_not_function(zval *result, zval *op1);
|
||||
ZEND_API int bitwise_or_function(zval *result, zval *op1, zval *op2);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+11
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -90,6 +90,16 @@ ZEND_API void _zval_dtor(zval *zvalue ZEND_FILE_LINE_DC)
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zval_del_ref(zval **p)
|
||||
{
|
||||
(*p)->refcount--;
|
||||
if ((*p)->refcount==0) {
|
||||
zval_dtor(*p);
|
||||
FREE_ZVAL(*p);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zval_add_ref(zval **p)
|
||||
{
|
||||
(*p)->refcount++;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -49,6 +49,7 @@ END_EXTERN_C()
|
||||
|
||||
|
||||
ZEND_API void zval_add_ref(zval **p);
|
||||
ZEND_API void zval_del_ref(zval **p);
|
||||
|
||||
#define ZVAL_DESTRUCTOR (void (*)(void *)) zval_dtor_wrapper
|
||||
#define ZVAL_PTR_DTOR (void (*)(void *)) zval_ptr_dtor_wrapper
|
||||
|
||||
+2
-53
@@ -4,53 +4,6 @@ dnl This file contains local autoconf functions.
|
||||
|
||||
sinclude(dynlib.m4)
|
||||
|
||||
AC_DEFUN(PHP_SETUP_OPENSSL,[
|
||||
if test "$PHP_OPENSSL" = "no"; then
|
||||
PHP_OPENSSL="/usr/local/ssl /usr/local /usr /usr/local/openssl"
|
||||
fi
|
||||
|
||||
for i in $PHP_OPENSSL; do
|
||||
if test -r $i/include/openssl/evp.h; then
|
||||
OPENSSL_DIR=$i
|
||||
OPENSSL_INC=$i/include
|
||||
fi
|
||||
done
|
||||
|
||||
if test -z "$OPENSSL_DIR"; then
|
||||
AC_MSG_ERROR(Cannot find OpenSSL's <evp.h>)
|
||||
fi
|
||||
|
||||
old_CPPFLAGS=$CPPFLAGS
|
||||
CPPFLAGS="-I$OPENSSL_INC"
|
||||
AC_MSG_CHECKING(for OpenSSL version)
|
||||
AC_EGREP_CPP(yes,[
|
||||
#include <openssl/opensslv.h>
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x0090500fL
|
||||
yes
|
||||
#endif
|
||||
],[
|
||||
AC_MSG_RESULT(>= 0.9.5)
|
||||
],[
|
||||
AC_MSG_ERROR(OpenSSL version 0.9.5 or greater required.)
|
||||
])
|
||||
CPPFLAGS=$old_CPPFLAGS
|
||||
|
||||
AC_ADD_LIBPATH($OPENSSL_DIR/lib)
|
||||
|
||||
AC_CHECK_LIB(crypto, CRYPTO_free, [
|
||||
AC_ADD_LIBRARY(crypto)
|
||||
],[
|
||||
AC_MSG_ERROR(libcrypto not found!)
|
||||
])
|
||||
|
||||
AC_CHECK_LIB(ssl, SSL_CTX_set_ssl_version, [
|
||||
AC_ADD_LIBRARY(ssl)
|
||||
],[
|
||||
AC_MSG_ERROR(libssl not found!)
|
||||
])
|
||||
AC_ADD_INCLUDE($OPENSSL_INC)
|
||||
])
|
||||
|
||||
dnl PHP_EVAL_LIBLINE(LINE, SHARED-LIBADD)
|
||||
dnl
|
||||
dnl Use this macro, if you need to add libraries and or library search
|
||||
@@ -223,7 +176,7 @@ case "[$]$1" in
|
||||
shared,*)
|
||||
ext_output="yes, shared"
|
||||
ext_shared=yes
|
||||
$1=`echo "[$]$1"|sed 's/^shared,//'`
|
||||
$1=`echo $ac_n "[$]$1$ac_c"|sed s/^shared,//`
|
||||
;;
|
||||
shared)
|
||||
ext_output="yes, shared"
|
||||
@@ -331,10 +284,6 @@ fi
|
||||
|
||||
AC_DEFUN(PHP_SUBST,[
|
||||
PHP_VAR_SUBST="$PHP_VAR_SUBST $1"
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_SUBST_OLD,[
|
||||
PHP_SUBST($1)
|
||||
AC_SUBST($1)
|
||||
])
|
||||
|
||||
@@ -387,7 +336,7 @@ AC_DEFUN(PHP_CONFIGURE_PART,[
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_PROG_SENDMAIL,[
|
||||
AC_PATH_PROG(PROG_SENDMAIL, sendmail,[], $PATH:/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib)
|
||||
AC_PATH_PROG(PROG_SENDMAIL, sendmail, /usr/lib/sendmail, $PATH:/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib)
|
||||
if test -n "$PROG_SENDMAIL"; then
|
||||
AC_DEFINE(HAVE_SENDMAIL,1,[whether you have sendmail])
|
||||
fi
|
||||
|
||||
+4
-5
@@ -54,24 +54,23 @@ $(makefile_in_files): $(makefile_am_files) aclocal.m4 configure.in $(config_m4_f
|
||||
fi; \
|
||||
done
|
||||
@test -f want_dependencies || flag=-i; \
|
||||
automake -a $$flag $(AMFLAGS) $(makefile_files) 2>&1 | $(SUPPRESS_WARNINGS)
|
||||
automake -a $$flag $(AMFLAGS) $(makefile_files) \
|
||||
|| true >&2
|
||||
@for i in $(LT_TARGETS); do mv $$i.bak $$i; done
|
||||
|
||||
aclocal.m4: configure.in acinclude.m4 dynlib.m4
|
||||
aclocal
|
||||
|
||||
SUPPRESS_WARNINGS = (egrep -v '(warning: AC_TRY_RUN called without default to allow cross compiling|AC_PROG_CXXCPP was called before AC_PROG_CXX|.*AM_PROG_LEX.*)'||true)
|
||||
|
||||
$(config_h_in): configure acconfig.h
|
||||
# explicitly remove target since autoheader does not seem to work
|
||||
# correctly otherwise (timestamps are not updated)
|
||||
@echo rebuilding $@
|
||||
@rm -f $@
|
||||
@autoheader 2>&1 | $(SUPPRESS_WARNINGS)
|
||||
@autoheader 2>&1 | (grep -v 'warning: AC_TRY_RUN called without default to allow cross compiling'||true)
|
||||
|
||||
$(TOUCH_FILES):
|
||||
touch $(TOUCH_FILES)
|
||||
|
||||
configure: aclocal.m4 configure.in $(config_m4_files)
|
||||
@echo rebuilding $@
|
||||
@autoconf 2>&1 | $(SUPPRESS_WARNINGS)
|
||||
@autoconf 2>&1 | (grep -v 'warning: AC_TRY_RUN called without default to allow cross compiling'||true)
|
||||
@@ -1,6 +0,0 @@
|
||||
/phpext_/ {
|
||||
if (old_filename != FILENAME) {
|
||||
printf "#include \"" FILENAME "\"\\\\n"
|
||||
old_filename = FILENAME
|
||||
}
|
||||
}
|
||||
+1
-5
@@ -54,11 +54,7 @@ distclean: distclean-recursive clean-x
|
||||
php_config.h stamp-h Makefile build-defs.h php4.spec libphp4.module
|
||||
|
||||
test: $(top_builddir)/php
|
||||
@if test "$(TESTS)" = ""; then \
|
||||
TOP_BUILDDIR=$(top_builddir) TOP_SRCDIR=$(top_srcdir) $(top_builddir)/php -d "include_path=.:$(top_srcdir)/pear:$(top_builddir)/pear:$(PEAR_INSTALLDIR)" -q $(top_srcdir)/run-tests.php $(srcdir); \
|
||||
else \
|
||||
TOP_BUILDDIR=$(top_builddir) TOP_SRCDIR=$(top_srcdir) $(top_builddir)/php -d include_path=".:$(top_srcdir)/pear:$(top_builddir)/pear:$(PEAR_INSTALLDIR)" -q $(top_srcdir)/run-tests.php $(TESTS); \
|
||||
fi
|
||||
@$(top_builddir)/php -q $(top_srcdir)/run-tests.php `pwd`
|
||||
|
||||
include $(builddir)/.deps
|
||||
|
||||
|
||||
@@ -55,12 +55,6 @@ distclean: distclean-recursive clean-x
|
||||
rm -f config.cache config.log config.status config_vars.mk libtool \
|
||||
php_config.h stamp-h Makefile build-defs.h php4.spec libphp4.module
|
||||
|
||||
cvsclean:
|
||||
@for i in `find . -name .cvsignore`; do \
|
||||
(cd `dirname $$i` 2>/dev/null && rm -rf `cat .cvsignore` *.o *.a || true); \
|
||||
done
|
||||
@rm -f $(SUBDIRS) 2>/dev/null || true
|
||||
|
||||
install-modules:
|
||||
@test -d modules && \
|
||||
$(mkinstalldirs) $(moduledir) && \
|
||||
|
||||
+66
-49
@@ -51,7 +51,7 @@ dnl ## All of these are normally in the extension directories.
|
||||
dnl ## Diversion 5 is the last one. Here we generate files and clean up.
|
||||
|
||||
dnl ## This is where the version number is changed from now on!
|
||||
AM_INIT_AUTOMAKE(php, 4.0.5RC3, nodefine)
|
||||
AM_INIT_AUTOMAKE(php, 4.0.4RC5, nodefine)
|
||||
|
||||
PHP_VERSION=$VERSION
|
||||
echo "/* automatically generated by configure */" > php_version.h.new
|
||||
@@ -106,8 +106,6 @@ case "$host_alias" in
|
||||
CPPFLAGS="$CPPFLAGS -traditional-cpp";;
|
||||
*bsdi*)
|
||||
BSD_MAKEFILE=yes;;
|
||||
*beos*)
|
||||
LIBS="$LIBS -lbe -lroot"
|
||||
esac
|
||||
|
||||
AM_PROG_CC_STDC
|
||||
@@ -116,10 +114,7 @@ AC_PROG_RANLIB
|
||||
AC_PROG_CC_C_O
|
||||
AC_PROG_LN_S
|
||||
|
||||
AC_PROG_LEX
|
||||
if test -n "$LEX"; then
|
||||
AC_DECL_YYTEXT
|
||||
fi
|
||||
AM_PROG_LEX
|
||||
|
||||
dnl ## Make flex scanners use const if they can, even if __STDC__ is not
|
||||
dnl ## true, for compilers like Sun's that only set __STDC__ true in
|
||||
@@ -251,9 +246,9 @@ AC_CHECK_LIB(m, sin)
|
||||
|
||||
AC_CHECK_LIB(bind, inet_aton, [
|
||||
AC_ADD_LIBRARY(bind)
|
||||
AC_DEFINE(HAVE_LIBBIND,1,[Whether you have bind]) ], [
|
||||
AC_CHECK_LIB(resolv, inet_aton)
|
||||
])
|
||||
AC_DEFINE(HAVE_LIBBIND,1,[Whether you have bind]) ], [])
|
||||
|
||||
AC_CHECK_LIB(resolv, inet_aton)
|
||||
|
||||
dnl The res_search may be in libsocket as well, and if it is
|
||||
dnl make sure to check for dn_skipname in libresolv, or if res_search
|
||||
@@ -286,22 +281,18 @@ dnl QNX requires unix.h to allow functions in libunix to work properly
|
||||
AC_CHECK_HEADERS(
|
||||
alloca.h \
|
||||
arpa/inet.h \
|
||||
arpa/nameser.h \
|
||||
crypt.h \
|
||||
fcntl.h \
|
||||
grp.h \
|
||||
ieeefp.h \
|
||||
limits.h \
|
||||
locale.h \
|
||||
netinet/in.h \
|
||||
pwd.h \
|
||||
resolv.h \
|
||||
signal.h \
|
||||
stdarg.h \
|
||||
stdlib.h \
|
||||
string.h \
|
||||
syslog.h \
|
||||
sysexits.h \
|
||||
sys/file.h \
|
||||
sys/mman.h \
|
||||
sys/resource.h \
|
||||
@@ -309,7 +300,6 @@ sys/select.h \
|
||||
sys/socket.h \
|
||||
sys/statfs.h \
|
||||
sys/statvfs.h \
|
||||
sys/sysexits.h \
|
||||
sys/time.h \
|
||||
sys/types.h \
|
||||
sys/varargs.h \
|
||||
@@ -361,17 +351,13 @@ dnl Checks for library functions.
|
||||
AC_FUNC_VPRINTF
|
||||
AC_CHECK_FUNCS(
|
||||
asctime_r \
|
||||
chroot \
|
||||
crypt \
|
||||
ctime_r \
|
||||
cuserid \
|
||||
flock \
|
||||
gai_strerror \
|
||||
gcvt \
|
||||
getlogin \
|
||||
gethostbyaddr \
|
||||
getprotobyname \
|
||||
getprotobynumber \
|
||||
getrusage \
|
||||
gettimeofday \
|
||||
gmtime_r \
|
||||
@@ -389,10 +375,8 @@ putenv \
|
||||
random \
|
||||
rand_r \
|
||||
regcomp \
|
||||
res_search \
|
||||
setitimer \
|
||||
setlocale \
|
||||
localeconv \
|
||||
setsockopt \
|
||||
setvbuf \
|
||||
shutdown \
|
||||
@@ -404,7 +388,6 @@ statfs \
|
||||
statvfs \
|
||||
std_syslog \
|
||||
strcasecmp \
|
||||
strcoll \
|
||||
strdup \
|
||||
strerror \
|
||||
strftime \
|
||||
@@ -523,11 +506,48 @@ AC_ARG_WITH(exec-dir,
|
||||
])
|
||||
|
||||
PHP_ARG_WITH(openssl,for OpenSSL support,
|
||||
[ --with-openssl[=DIR] Include OpenSSL support (requires OpenSSL >= 0.9.5) ])
|
||||
[ --with-openssl[=DIR] Include OpenSSL support (requires OpenSSL >= 0.9.6) ])
|
||||
if test "$PHP_OPENSSL" = "yes"; then
|
||||
PHP_OPENSSL="/usr/local/ssl /usr/local /usr /usr/local/openssl"
|
||||
fi
|
||||
|
||||
AC_DEFUN(PHP_SETUP_OPENSSL,[
|
||||
if test "$PHP_OPENSSL" = "no"; then
|
||||
PHP_OPENSSL="/usr/local/ssl /usr/local /usr /usr/local/openssl"
|
||||
fi
|
||||
|
||||
for i in $PHP_OPENSSL; do
|
||||
if test -r $i/include/openssl/evp.h; then
|
||||
OPENSSL_DIR=$i
|
||||
OPENSSL_INC=$i/include
|
||||
fi
|
||||
done
|
||||
|
||||
if test -z "$OPENSSL_DIR"; then
|
||||
AC_MSG_ERROR(Cannot find OpenSSL's <evp.h>)
|
||||
fi
|
||||
|
||||
old_CPPFLAGS=$CPPFLAGS
|
||||
CPPFLAGS="-I$OPENSSL_INC"
|
||||
AC_MSG_CHECKING(for OpenSSL version)
|
||||
AC_EGREP_CPP(yes,[
|
||||
#include <openssl/opensslv.h>
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x0090600fL
|
||||
yes
|
||||
#endif
|
||||
],[
|
||||
AC_MSG_RESULT(>= 0.9.6)
|
||||
],[
|
||||
AC_MSG_ERROR(OpenSSL version 0.9.6 or greater required.)
|
||||
])
|
||||
CPPFLAGS=$old_CPPFLAGS
|
||||
|
||||
AC_ADD_LIBPATH($OPENSSL_DIR/lib)
|
||||
AC_ADD_LIBRARY(ssl)
|
||||
AC_ADD_LIBRARY(crypto)
|
||||
AC_ADD_INCLUDE($OPENSSL_INC)
|
||||
])
|
||||
|
||||
if test "$PHP_OPENSSL" != "no"; then
|
||||
PHP_SETUP_OPENSSL
|
||||
fi
|
||||
@@ -596,6 +616,11 @@ if test "$PHP_PEAR" = "yes"; then
|
||||
PEAR_DIR=pear
|
||||
fi
|
||||
|
||||
PHP_OUTPUT(pear/pear)
|
||||
PHP_OUTPUT(pear/phpize)
|
||||
PHP_OUTPUT(pear/php-config)
|
||||
PHP_OUTPUT(pear/PEAR.php)
|
||||
|
||||
|
||||
divert(5)
|
||||
|
||||
@@ -645,11 +670,6 @@ if test "$PHP_SAPI" = "cgi"; then
|
||||
PHP_PROGRAM=php
|
||||
fi
|
||||
|
||||
if test "$PHP_SAPI" = "fastcgi"; then
|
||||
PHP_PROGRAM=php
|
||||
fi
|
||||
|
||||
|
||||
PHP_REGEX
|
||||
|
||||
PHP_CONFIGURE_PART(Configuring Zend)
|
||||
@@ -685,6 +705,7 @@ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LDFLAGS"
|
||||
EXTRA_LIBS="$EXTRA_LIBS $LIBS"
|
||||
LDFLAGS=""
|
||||
LIBS=""
|
||||
PHP_OUTPUT(TSRM/Makefile)
|
||||
|
||||
|
||||
phplibdir="`pwd`/modules"
|
||||
@@ -708,7 +729,7 @@ else
|
||||
PART2=non-zts
|
||||
fi
|
||||
|
||||
ZEND_MODULE_API_NO=`egrep '#define ZEND_MODULE_API_NO ' $srcdir/Zend/zend_modules.h|sed 's/#define ZEND_MODULE_API_NO //'`
|
||||
ZEND_MODULE_API_NO=`egrep '#define ZEND_MODULE_API_NO ' $srcdir/Zend/modules.h|sed 's/#define ZEND_MODULE_API_NO //'`
|
||||
|
||||
EXTENSION_DIR="$prefix/lib/php/extensions/$PART1-$PART2-$ZEND_MODULE_API_NO"
|
||||
|
||||
@@ -729,8 +750,8 @@ AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS",[uname output])
|
||||
|
||||
|
||||
|
||||
PHP_SUBST_OLD(abs_builddir)
|
||||
PHP_SUBST_OLD(abs_srcdir)
|
||||
PHP_SUBST(abs_builddir)
|
||||
PHP_SUBST(abs_srcdir)
|
||||
PHP_SUBST(bindir)
|
||||
PHP_SUBST(exec_prefix)
|
||||
PHP_SUBST(includedir)
|
||||
@@ -738,37 +759,36 @@ PHP_SUBST(libdir)
|
||||
PHP_SUBST(phplibdir)
|
||||
PHP_SUBST(phptempdir)
|
||||
PHP_SUBST(prefix)
|
||||
PHP_SUBST(localstatedir)
|
||||
|
||||
PHP_SUBST(AWK)
|
||||
PHP_SUBST(CC)
|
||||
PHP_SUBST(CFLAGS)
|
||||
PHP_SUBST_OLD(CONFIGURE_COMMAND)
|
||||
PHP_SUBST(CONFIGURE_COMMAND)
|
||||
PHP_SUBST(CPP)
|
||||
PHP_SUBST(CPPFLAGS)
|
||||
PHP_SUBST(CXX)
|
||||
PHP_SUBST(CXXFLAGS)
|
||||
PHP_SUBST(CXX_PHP_COMPILE)
|
||||
PHP_SUBST_OLD(DEBUG_CFLAGS)
|
||||
PHP_SUBST(DEBUG_CFLAGS)
|
||||
PHP_SUBST(DEFS)
|
||||
PHP_SUBST_OLD(EXTENSION_DIR)
|
||||
PHP_SUBST(EXTENSION_DIR)
|
||||
PHP_SUBST(EXTRA_LDFLAGS)
|
||||
PHP_SUBST_OLD(EXTRA_LIBS)
|
||||
PHP_SUBST(EXTRA_LIBS)
|
||||
PHP_SUBST(INCLUDES)
|
||||
PHP_SUBST_OLD(INCLUDE_PATH)
|
||||
PHP_SUBST_OLD(INSTALL_IT)
|
||||
PHP_SUBST(INCLUDE_PATH)
|
||||
PHP_SUBST(INSTALL_IT)
|
||||
PHP_SUBST(LEX)
|
||||
PHP_SUBST(LEX_OUTPUT_ROOT)
|
||||
PHP_SUBST(LFLAGS)
|
||||
PHP_SUBST(LIBTOOL)
|
||||
PHP_SUBST(LN_S)
|
||||
PHP_SUBST_OLD(NATIVE_RPATHS)
|
||||
PHP_SUBST(NATIVE_RPATHS)
|
||||
PHP_SUBST(PEAR_DIR)
|
||||
PHP_SUBST_OLD(PEAR_INSTALLDIR)
|
||||
PHP_SUBST(PEAR_INSTALLDIR)
|
||||
PHP_SUBST(PHP_BUILD_DATE)
|
||||
PHP_SUBST(PHP_COMPILE)
|
||||
PHP_SUBST_OLD(PHP_LDFLAGS)
|
||||
PHP_SUBST_OLD(PHP_LIBS)
|
||||
PHP_SUBST(PHP_LDFLAGS)
|
||||
PHP_SUBST(PHP_LIBS)
|
||||
PHP_SUBST(PHP_PROGRAM)
|
||||
PHP_SUBST(PHP_RPATHS)
|
||||
PHP_SUBST(PHP_SAPI)
|
||||
@@ -779,7 +799,7 @@ PHP_SUBST(SHARED_LIBTOOL)
|
||||
PHP_SUBST(TSRM_DIR)
|
||||
PHP_SUBST(TSRM_LIB)
|
||||
PHP_SUBST(WARNING_LEVEL)
|
||||
PHP_SUBST_OLD(YACC)
|
||||
PHP_SUBST(YACC)
|
||||
|
||||
PHP_CONFIGURE_PART(Configuring libtool)
|
||||
|
||||
@@ -841,10 +861,7 @@ PHP_CONFIGURE_PART(Generating files)
|
||||
|
||||
PHP_GEN_CONFIG_VARS
|
||||
|
||||
$php_shtool mkdir -p pear/scripts
|
||||
ALL_OUTPUT_FILES="php4.spec Zend/Makefile main/build-defs.h \
|
||||
pear/scripts/pear pear/scripts/phpize pear/scripts/php-config pear/PEAR.php \
|
||||
TSRM/Makefile $PHP_OUTPUT_FILES"
|
||||
ALL_OUTPUT_FILES="php4.spec Zend/Makefile main/build-defs.h $PHP_OUTPUT_FILES"
|
||||
|
||||
AC_OUTPUT($ALL_OUTPUT_FILES, [], [
|
||||
|
||||
@@ -883,9 +900,9 @@ if test -n "\$REDO_ALL"; then
|
||||
# Hacking while airborne considered harmful.
|
||||
#
|
||||
echo "creating main/internal_functions.c"
|
||||
extensions="$EXT_STATIC"
|
||||
extensions=\`grep '^s.@EXT_STATIC@' \$0|sed -e 's/^.*@% *//' -e 's/%.*$//'\`
|
||||
dnl mv -f main/internal_functions.c main/internal_functions.c.old 2>/dev/null
|
||||
sh $srcdir/build/genif.sh $srcdir/main/internal_functions.c.in $srcdir "$EXTRA_MODULE_PTRS" $AWK \$extensions > main/internal_functions.c
|
||||
sh $srcdir/genif.sh $srcdir/main/internal_functions.c.in $srcdir "$EXTRA_MODULE_PTRS" \$extensions > main/internal_functions.c
|
||||
dnl if cmp main/internal_functions.c.old main/internal_functions.c > /dev/null 2>&1; then
|
||||
dnl echo "main/internal_functions.c is unchanged"
|
||||
dnl mv main/internal_functions.c.old main/internal_functions.c
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# +----------------------------------------------------------------------+
|
||||
# | PHP version 4.0 |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Copyright (c) 1997-2001 The PHP Group |
|
||||
# | Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | This source file is subject to version 2.02 of the PHP license, |
|
||||
# | that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP version 4.0 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2001 The PHP Group |
|
||||
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.02 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP version 4.0 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2001 The PHP Group |
|
||||
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.02 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP version 4.0 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2001 The PHP Group |
|
||||
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.02 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP version 4.0 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2001 The PHP Group |
|
||||
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.02 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP version 4.0 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2001 The PHP Group |
|
||||
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.02 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP version 4.0 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2001 The PHP Group |
|
||||
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.02 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP version 4.0 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2001 The PHP Group |
|
||||
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.02 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP version 4.0 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2001 The PHP Group |
|
||||
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.02 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP version 4.0 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2001 The PHP Group |
|
||||
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.02 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
Win32 COM
|
||||
Zeev Suraski, Harald Radi
|
||||
Zeev Suraski
|
||||
@@ -1,426 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP version 4.0 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2001 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.02 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.php.net/license/2_02.txt. |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Author: Harald Radi <h.radi@nme.at> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* This module maps the VARIANT datastructure into PHP so that it can be used to
|
||||
* pass values to COM and DOTNET Objects by reference and not only by value.
|
||||
*
|
||||
* harald
|
||||
*/
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
|
||||
#include "php.h"
|
||||
#include "php_ini.h"
|
||||
#include "php_typedef_VARIANT.h"
|
||||
#include "conversion.h"
|
||||
#include "ext/standard/info.h"
|
||||
|
||||
#include <unknwn.h>
|
||||
|
||||
void php_VARIANT_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_property_reference *property_reference);
|
||||
pval php_VARIANT_get_property_handler(zend_property_reference *property_reference);
|
||||
static int do_VARIANT_propset(VARIANT *var_arg, pval *arg_property, pval *value);
|
||||
void php_register_VARIANT_class();
|
||||
static void php_variant_destructor(zend_rsrc_list_entry *rsrc);
|
||||
void php_register_VARIANT_class();
|
||||
|
||||
static int le_variant;
|
||||
static int codepage;
|
||||
|
||||
static zend_class_entry VARIANT_class_entry;
|
||||
|
||||
function_entry VARIANT_functions[] = {
|
||||
{NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
|
||||
static PHP_MINFO_FUNCTION(VARIANT)
|
||||
{
|
||||
php_info_print_table_start();
|
||||
php_info_print_table_row(2, "VARIANT support", "enabled");
|
||||
php_info_print_table_end();
|
||||
}
|
||||
|
||||
|
||||
zend_module_entry VARIANT_module_entry = {
|
||||
"variant", VARIANT_functions, PHP_MINIT(VARIANT), PHP_MSHUTDOWN(VARIANT), NULL, NULL, PHP_MINFO(VARIANT), STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
|
||||
PHP_MINIT_FUNCTION(VARIANT)
|
||||
{
|
||||
le_variant = zend_register_list_destructors_ex(php_variant_destructor, NULL, "VARIANT", module_number);
|
||||
|
||||
/* variant datatypes */
|
||||
REGISTER_LONG_CONSTANT("VT_NULL", VT_NULL, 0);
|
||||
REGISTER_LONG_CONSTANT("VT_EMPTY", VT_EMPTY, 0);
|
||||
REGISTER_LONG_CONSTANT("VT_UI1", VT_UI1, 0);
|
||||
REGISTER_LONG_CONSTANT("VT_I2", VT_I2, 0);
|
||||
REGISTER_LONG_CONSTANT("VT_I4", VT_I4, 0);
|
||||
REGISTER_LONG_CONSTANT("VT_R4", VT_R4, 0);
|
||||
REGISTER_LONG_CONSTANT("VT_R8", VT_R8, 0);
|
||||
REGISTER_LONG_CONSTANT("VT_BOOL", VT_BOOL, 0);
|
||||
REGISTER_LONG_CONSTANT("VT_ERROR", VT_ERROR, 0);
|
||||
REGISTER_LONG_CONSTANT("VT_CY", VT_CY, 0);
|
||||
REGISTER_LONG_CONSTANT("VT_DATE", VT_CY, 0);
|
||||
REGISTER_LONG_CONSTANT("VT_BSTR", VT_BSTR, 0);
|
||||
REGISTER_LONG_CONSTANT("VT_DECIMAL", VT_DECIMAL, 0);
|
||||
REGISTER_LONG_CONSTANT("VT_UNKNOWN", VT_UNKNOWN, 0);
|
||||
REGISTER_LONG_CONSTANT("VT_DISPATCH", VT_DISPATCH, 0);
|
||||
REGISTER_LONG_CONSTANT("VT_VARIANT", VT_VARIANT, 0);
|
||||
REGISTER_LONG_CONSTANT("VT_I1", VT_I1, 0);
|
||||
REGISTER_LONG_CONSTANT("VT_UI2", VT_UI2, 0);
|
||||
REGISTER_LONG_CONSTANT("VT_UI4", VT_UI4, 0);
|
||||
REGISTER_LONG_CONSTANT("VT_INT", VT_INT, 0);
|
||||
REGISTER_LONG_CONSTANT("VT_UINT", VT_UINT, 0);
|
||||
REGISTER_LONG_CONSTANT("VT_ARRAY", VT_ARRAY, 0);
|
||||
REGISTER_LONG_CONSTANT("VT_BYREF", VT_BYREF, 0);
|
||||
|
||||
/* codepages */
|
||||
REGISTER_LONG_CONSTANT("CP_ACP", CP_ACP, 0);
|
||||
REGISTER_LONG_CONSTANT("CP_MACCP", CP_MACCP, 0);
|
||||
REGISTER_LONG_CONSTANT("CP_OEMCP", CP_OEMCP, 0);
|
||||
REGISTER_LONG_CONSTANT("CP_SYMBOL", CP_SYMBOL, 0);
|
||||
REGISTER_LONG_CONSTANT("CP_THREAD_ACP", CP_THREAD_ACP, 0);
|
||||
REGISTER_LONG_CONSTANT("CP_UTF7", CP_UTF7, 0);
|
||||
REGISTER_LONG_CONSTANT("CP_UTF8", CP_UTF8, 0);
|
||||
|
||||
php_register_VARIANT_class();
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
PHP_MSHUTDOWN_FUNCTION(VARIANT)
|
||||
{
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
void php_VARIANT_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_property_reference *property_reference)
|
||||
{
|
||||
pval *object = property_reference->object;
|
||||
zend_overloaded_element *function_name = (zend_overloaded_element *) property_reference->elements_list->tail->data;
|
||||
VARIANT *pVar;
|
||||
|
||||
if ((zend_llist_count(property_reference->elements_list)==1) && !strcmp(function_name->element.value.str.val, "variant"))
|
||||
{
|
||||
/* constructor */
|
||||
pval *object_handle, *data, *type, *code_page;
|
||||
|
||||
pVar = emalloc(sizeof(VARIANT));
|
||||
VariantInit(pVar);
|
||||
|
||||
switch (ZEND_NUM_ARGS())
|
||||
{
|
||||
case 0:
|
||||
/* nothing to do */
|
||||
break;
|
||||
case 1:
|
||||
getParameters(ht, 1, &data);
|
||||
php_pval_to_variant(data, pVar, codepage);
|
||||
codepage = CP_ACP;
|
||||
break;
|
||||
case 2:
|
||||
getParameters(ht, 2, &data, &type);
|
||||
php_pval_to_variant_ex(data, pVar, type, codepage);
|
||||
codepage = CP_ACP;
|
||||
break;
|
||||
case 3:
|
||||
getParameters(ht, 3, &data, &type, &code_page);
|
||||
php_pval_to_variant_ex(data, pVar, type, codepage);
|
||||
convert_to_long(code_page);
|
||||
codepage = code_page->value.lval;
|
||||
break;
|
||||
default:
|
||||
WRONG_PARAM_COUNT;
|
||||
break;
|
||||
}
|
||||
|
||||
return_value->type = IS_LONG;
|
||||
return_value->value.lval = zend_list_insert(pVar, le_variant);
|
||||
|
||||
if (!zend_is_true(return_value)) {
|
||||
var_reset(object);
|
||||
return;
|
||||
}
|
||||
|
||||
ALLOC_ZVAL(object_handle);
|
||||
*object_handle = *return_value;
|
||||
pval_copy_constructor(object_handle);
|
||||
INIT_PZVAL(object_handle);
|
||||
zend_hash_index_update(object->value.obj.properties, 0, &object_handle, sizeof(pval *), NULL);
|
||||
pval_destructor(&function_name->element);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
pval php_VARIANT_get_property_handler(zend_property_reference *property_reference)
|
||||
{
|
||||
zend_overloaded_element *overloaded_property;
|
||||
int type;
|
||||
|
||||
pval result, **var_handle, *object = property_reference->object;
|
||||
VARIANT *var_arg;
|
||||
|
||||
/* fetch the VARIANT structure */
|
||||
zend_hash_index_find(object->value.obj.properties, 0, (void **) &var_handle);
|
||||
var_arg = zend_list_find((*var_handle)->value.lval, &type);
|
||||
|
||||
if (!var_arg || (type != le_variant)) {
|
||||
var_reset(&result);
|
||||
} else {
|
||||
overloaded_property = (zend_overloaded_element *) property_reference->elements_list->head->data;
|
||||
switch (overloaded_property->type) {
|
||||
case OE_IS_ARRAY:
|
||||
var_reset(&result);
|
||||
break;
|
||||
|
||||
case OE_IS_OBJECT:
|
||||
if(!strcmp(overloaded_property->element.value.str.val, "value")) {
|
||||
php_variant_to_pval(var_arg, &result, 0, codepage);
|
||||
} else if(!strcmp(overloaded_property->element.value.str.val, "type")) {
|
||||
result.value.lval = var_arg->vt;
|
||||
result.type = IS_LONG;
|
||||
} else {
|
||||
var_reset(&result);
|
||||
php_error(E_WARNING, "Unknown member.");
|
||||
}
|
||||
break;
|
||||
case OE_IS_METHOD:
|
||||
var_reset(&result);
|
||||
php_error(E_WARNING, "Unknown method.");
|
||||
break;
|
||||
|
||||
pval_destructor(&overloaded_property->element);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
int php_VARIANT_set_property_handler(zend_property_reference *property_reference, pval *value)
|
||||
{
|
||||
zend_overloaded_element *overloaded_property;
|
||||
int type;
|
||||
|
||||
pval **var_handle, *object = property_reference->object;
|
||||
VARIANT *var_arg;
|
||||
|
||||
/* fetch the VARIANT structure */
|
||||
zend_hash_index_find(object->value.obj.properties, 0, (void **) &var_handle);
|
||||
var_arg = zend_list_find((*var_handle)->value.lval, &type);
|
||||
|
||||
if (!var_arg || (type != le_variant))
|
||||
return FAILURE;
|
||||
|
||||
overloaded_property = (zend_overloaded_element *) property_reference->elements_list->head->data;
|
||||
do_VARIANT_propset(var_arg, &overloaded_property->element, value);
|
||||
pval_destructor(&overloaded_property->element);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
static int do_VARIANT_propset(VARIANT *var_arg, pval *arg_property, pval *value)
|
||||
{
|
||||
pval type;
|
||||
|
||||
type.type = IS_STRING;
|
||||
|
||||
if(!strcmp(arg_property->value.str.val, "bVal"))
|
||||
{
|
||||
type.value.lval = VT_UI1;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "iVal"))
|
||||
{
|
||||
type.value.lval = VT_I2;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "lVal"))
|
||||
{
|
||||
type.value.lval = VT_I4;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "fltVal"))
|
||||
{
|
||||
type.value.lval = VT_R4;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "dblVal"))
|
||||
{
|
||||
type.value.lval = VT_R8;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "boolVal"))
|
||||
{
|
||||
type.value.lval = VT_BOOL;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "scode"))
|
||||
{
|
||||
type.value.lval = VT_ERROR;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "cyVal"))
|
||||
{
|
||||
type.value.lval = VT_CY;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "date"))
|
||||
{
|
||||
type.value.lval = VT_DATE;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "bstrVal"))
|
||||
{
|
||||
type.value.lval = VT_BSTR;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "pdecVal"))
|
||||
{
|
||||
type.value.lval = VT_DECIMAL|VT_BYREF;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "punkVal"))
|
||||
{
|
||||
type.value.lval = VT_UNKNOWN;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "pdispVal"))
|
||||
{
|
||||
type.value.lval = VT_DISPATCH;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "parray"))
|
||||
{
|
||||
type.value.lval = VT_ARRAY;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "pbVal"))
|
||||
{
|
||||
type.value.lval = VT_UI1|VT_BYREF;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "piVal"))
|
||||
{
|
||||
type.value.lval = VT_I2|VT_BYREF;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "plVal"))
|
||||
{
|
||||
type.value.lval = VT_I4|VT_BYREF;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "pfltVal"))
|
||||
{
|
||||
type.value.lval = VT_R4|VT_BYREF;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "pdblVal"))
|
||||
{
|
||||
type.value.lval = VT_R8|VT_BYREF;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "pboolVal"))
|
||||
{
|
||||
type.value.lval = VT_BOOL|VT_BYREF;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "pscode"))
|
||||
{
|
||||
type.value.lval = VT_ERROR|VT_BYREF;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "pcyVal"))
|
||||
{
|
||||
type.value.lval = VT_CY|VT_BYREF;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "pdate"))
|
||||
{
|
||||
type.value.lval = VT_DATE|VT_BYREF;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "pbstrVal"))
|
||||
{
|
||||
type.value.lval = VT_BSTR|VT_BYREF;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "ppunkVal"))
|
||||
{
|
||||
type.value.lval = VT_UNKNOWN|VT_BYREF;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "ppdispVal"))
|
||||
{
|
||||
type.value.lval = VT_DISPATCH|VT_BYREF;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "pparray"))
|
||||
{
|
||||
type.value.lval = VT_ARRAY|VT_BYREF;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "pvarVal"))
|
||||
{
|
||||
type.value.lval = VT_VARIANT|VT_BYREF;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "byref"))
|
||||
{
|
||||
type.value.lval = VT_BYREF;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "cVal"))
|
||||
{
|
||||
type.value.lval = VT_I1;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "uiVal"))
|
||||
{
|
||||
type.value.lval = VT_UI2;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "ulVal"))
|
||||
{
|
||||
type.value.lval = VT_UI4;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "intVal"))
|
||||
{
|
||||
type.value.lval = VT_INT;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "uintVal"))
|
||||
{
|
||||
type.value.lval = VT_UINT|VT_BYREF;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "pcVal"))
|
||||
{
|
||||
type.value.lval = VT_I1|VT_BYREF;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "puiVal"))
|
||||
{
|
||||
type.value.lval = VT_UI2|VT_BYREF;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "pulVal"))
|
||||
{
|
||||
type.value.lval = VT_UI4|VT_BYREF;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "pintVal"))
|
||||
{
|
||||
type.value.lval = VT_INT|VT_BYREF;
|
||||
}
|
||||
else if(!strcmp(arg_property->value.str.val, "puintVal"))
|
||||
{
|
||||
type.value.lval = VT_UINT|VT_BYREF;
|
||||
}
|
||||
else
|
||||
{
|
||||
php_error(E_WARNING, "Unknown member.");
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
php_pval_to_variant_ex(value, var_arg, &type, codepage);
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
static void php_variant_destructor(zend_rsrc_list_entry *rsrc)
|
||||
{
|
||||
efree(rsrc);
|
||||
}
|
||||
|
||||
void php_register_VARIANT_class()
|
||||
{
|
||||
INIT_OVERLOADED_CLASS_ENTRY(VARIANT_class_entry, "VARIANT", NULL,
|
||||
php_VARIANT_call_function_handler,
|
||||
php_VARIANT_get_property_handler,
|
||||
php_VARIANT_set_property_handler);
|
||||
|
||||
zend_register_internal_class(&VARIANT_class_entry);
|
||||
}
|
||||
|
||||
#endif /* PHP_WIN32 */
|
||||
@@ -1,624 +0,0 @@
|
||||
#ifdef PHP_WIN32
|
||||
|
||||
#include "php.h"
|
||||
#include "php_COM.h"
|
||||
#include "unknwn.h"
|
||||
|
||||
// prototypes
|
||||
|
||||
PHPAPI void php_pval_to_variant(pval *pval_arg, VARIANT *var_arg, int codepage);
|
||||
PHPAPI void php_pval_to_variant_ex(pval *pval_arg, VARIANT *var_arg, pval *pval_type, int codepage);
|
||||
PHPAPI void php_variant_to_pval(VARIANT *var_arg, pval *pval_arg, int persistent, int codepage);
|
||||
PHPAPI OLECHAR *php_char_to_OLECHAR(char *C_str, uint strlen, int codepage);
|
||||
PHPAPI char *php_OLECHAR_to_char(OLECHAR *unicode_str, uint *out_length, int persistent, int codepage);
|
||||
|
||||
// implementations
|
||||
|
||||
PHPAPI void php_pval_to_variant(pval *pval_arg, VARIANT *var_arg, int codepage)
|
||||
{
|
||||
OLECHAR *unicode_str;
|
||||
|
||||
switch (pval_arg->type)
|
||||
{
|
||||
case IS_NULL:
|
||||
var_arg->vt = VT_EMPTY;
|
||||
break;
|
||||
|
||||
case IS_BOOL:
|
||||
var_arg->vt = VT_BOOL;
|
||||
var_arg->boolVal = (short)pval_arg->value.lval;
|
||||
break;
|
||||
|
||||
case IS_OBJECT:
|
||||
if(!strcmp(pval_arg->value.obj.ce->name, "VARIANT"))
|
||||
{
|
||||
int type;
|
||||
pval **var_handle;
|
||||
|
||||
/* fetch the VARIANT structure */
|
||||
zend_hash_index_find(pval_arg->value.obj.properties, 0, (void **) &var_handle);
|
||||
var_arg->pvarVal = (VARIANT FAR*) zend_list_find((*var_handle)->value.lval, &type);
|
||||
var_arg->vt = VT_VARIANT|VT_BYREF;
|
||||
}
|
||||
else if(!strcmp(pval_arg->value.obj.ce->name, "COM"))
|
||||
{
|
||||
pval **idispatch_handle;
|
||||
IDispatch *i_dispatch;
|
||||
int type;
|
||||
|
||||
/* fetch the IDispatch interface */
|
||||
zend_hash_index_find(pval_arg->value.obj.properties, 0, (void **) &idispatch_handle);
|
||||
i_dispatch = (IDispatch *)zend_list_find((*idispatch_handle)->value.lval, &type);
|
||||
if (!i_dispatch || (type != php_COM_get_le_idispatch()))
|
||||
var_arg->vt = VT_EMPTY;
|
||||
else
|
||||
{
|
||||
var_arg->vt = VT_DISPATCH;
|
||||
var_arg->pdispVal = i_dispatch;
|
||||
}
|
||||
}
|
||||
else
|
||||
var_arg->vt = VT_DISPATCH;
|
||||
break;
|
||||
|
||||
case IS_RESOURCE:
|
||||
case IS_CONSTANT:
|
||||
case IS_CONSTANT_ARRAY:
|
||||
case IS_ARRAY:
|
||||
var_arg->vt = VT_EMPTY;
|
||||
break;
|
||||
|
||||
case IS_LONG:
|
||||
var_arg->vt = VT_I4; /* assuming 32-bit platform */
|
||||
var_arg->lVal = pval_arg->value.lval;
|
||||
break;
|
||||
|
||||
case IS_DOUBLE:
|
||||
var_arg->vt = VT_R8; /* assuming 64-bit double precision */
|
||||
var_arg->dblVal = pval_arg->value.dval;
|
||||
break;
|
||||
|
||||
case IS_STRING:
|
||||
var_arg->vt = VT_BSTR;
|
||||
unicode_str = php_char_to_OLECHAR(pval_arg->value.str.val, pval_arg->value.str.len, codepage);
|
||||
var_arg->bstrVal = SysAllocString(unicode_str);
|
||||
efree(unicode_str);
|
||||
}
|
||||
}
|
||||
|
||||
PHPAPI void php_pval_to_variant_ex(pval *pval_arg, VARIANT *var_arg, pval *pval_type, int codepage)
|
||||
{
|
||||
OLECHAR *unicode_str;
|
||||
|
||||
var_arg->vt = (short) pval_type->value.lval;
|
||||
|
||||
switch(var_arg->vt)
|
||||
{
|
||||
case VT_UI1:
|
||||
convert_to_long_ex(&pval_arg);
|
||||
var_arg->bVal = (unsigned char)pval_arg->value.lval;
|
||||
break;
|
||||
|
||||
case VT_I2:
|
||||
convert_to_long_ex(&pval_arg);
|
||||
var_arg->iVal = (short)pval_arg->value.lval;
|
||||
break;
|
||||
|
||||
case VT_I4:
|
||||
convert_to_long_ex(&pval_arg);
|
||||
var_arg->lVal = pval_arg->value.lval;
|
||||
break;
|
||||
|
||||
case VT_R4:
|
||||
convert_to_double_ex(&pval_arg);
|
||||
var_arg->fltVal = (float)pval_arg->value.dval;
|
||||
break;
|
||||
|
||||
case VT_R8:
|
||||
convert_to_double_ex(&pval_arg);
|
||||
var_arg->dblVal = pval_arg->value.dval;
|
||||
break;
|
||||
|
||||
case VT_BOOL:
|
||||
convert_to_boolean_ex(&pval_arg);
|
||||
var_arg->boolVal = (short)pval_arg->value.lval;
|
||||
break;
|
||||
|
||||
case VT_ERROR:
|
||||
convert_to_long_ex(&pval_arg);
|
||||
var_arg->scode = pval_arg->value.lval;
|
||||
break;
|
||||
|
||||
case VT_CY:
|
||||
convert_to_double_ex(&pval_arg);
|
||||
VarCyFromR8(pval_arg->value.dval, &(var_arg->cyVal));
|
||||
break;
|
||||
|
||||
case VT_DATE:
|
||||
{
|
||||
SYSTEMTIME wintime;
|
||||
struct tm *phptime;
|
||||
|
||||
phptime = gmtime(&(pval_arg->value.lval));
|
||||
|
||||
wintime.wYear = phptime->tm_year + 1900;
|
||||
wintime.wMonth = phptime->tm_mon + 1;
|
||||
wintime.wDay = phptime->tm_mday;
|
||||
wintime.wHour = phptime->tm_hour;
|
||||
wintime.wMinute = phptime->tm_min;
|
||||
wintime.wSecond = phptime->tm_sec;
|
||||
|
||||
SystemTimeToVariantTime(&wintime, &(var_arg->date));
|
||||
}
|
||||
|
||||
case VT_BSTR:
|
||||
convert_to_string_ex(&pval_arg);
|
||||
unicode_str = php_char_to_OLECHAR(pval_arg->value.str.val, pval_arg->value.str.len, codepage);
|
||||
var_arg->bstrVal = SysAllocString(unicode_str);
|
||||
efree(unicode_str);
|
||||
break;
|
||||
|
||||
case VT_DECIMAL:
|
||||
convert_to_string_ex(&pval_arg);
|
||||
unicode_str = php_char_to_OLECHAR(pval_arg->value.str.val, pval_arg->value.str.len, codepage);
|
||||
VarDecFromStr(unicode_str, LOCALE_SYSTEM_DEFAULT, 0, &(var_arg->decVal));
|
||||
break;
|
||||
|
||||
case VT_DECIMAL|VT_BYREF:
|
||||
convert_to_string_ex(&pval_arg);
|
||||
unicode_str = php_char_to_OLECHAR(pval_arg->value.str.val, pval_arg->value.str.len, codepage);
|
||||
VarDecFromStr(unicode_str, LOCALE_SYSTEM_DEFAULT, 0, var_arg->pdecVal);
|
||||
break;
|
||||
|
||||
case VT_UNKNOWN:
|
||||
php_pval_to_variant(pval_arg, var_arg, codepage);
|
||||
if(var_arg->vt != VT_DISPATCH)
|
||||
var_arg->vt = VT_EMPTY;
|
||||
else
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
hr = var_arg->pdispVal->lpVtbl->QueryInterface(var_arg->pdispVal, &IID_IUnknown, &(var_arg->punkVal));
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
php_error(E_WARNING,"can't query IUnknown");
|
||||
var_arg->vt = VT_EMPTY;
|
||||
}
|
||||
else
|
||||
var_arg->vt = VT_UNKNOWN;
|
||||
}
|
||||
break;
|
||||
|
||||
case VT_DISPATCH:
|
||||
php_pval_to_variant(pval_arg, var_arg, codepage);
|
||||
if(var_arg->vt != VT_DISPATCH)
|
||||
var_arg->vt = VT_EMPTY;
|
||||
break;
|
||||
|
||||
case VT_UI1|VT_BYREF:
|
||||
convert_to_long(pval_arg);
|
||||
var_arg->pbVal = (unsigned char FAR*) &(pval_arg->value.lval);
|
||||
break;
|
||||
|
||||
case VT_I2|VT_BYREF:
|
||||
convert_to_long(pval_arg);
|
||||
var_arg->piVal = (short FAR*) &(pval_arg->value.lval);
|
||||
break;
|
||||
|
||||
case VT_I4|VT_BYREF:
|
||||
convert_to_long(pval_arg);
|
||||
var_arg->plVal = (long FAR*) &(pval_arg->value.lval);
|
||||
break;
|
||||
|
||||
case VT_R4|VT_BYREF:
|
||||
convert_to_double(pval_arg);
|
||||
var_arg->pfltVal = (float FAR*) &(pval_arg->value.lval);
|
||||
break;
|
||||
|
||||
case VT_R8|VT_BYREF:
|
||||
convert_to_double(pval_arg);
|
||||
var_arg->pdblVal = (double FAR*) &(pval_arg->value.lval);
|
||||
break;
|
||||
|
||||
case VT_BOOL|VT_BYREF:
|
||||
convert_to_boolean(pval_arg);
|
||||
var_arg->pboolVal = (short FAR*) &(pval_arg->value.lval);
|
||||
break;
|
||||
|
||||
case VT_ERROR|VT_BYREF:
|
||||
convert_to_long(pval_arg);
|
||||
var_arg->pscode = (long FAR*) &(pval_arg->value.lval);
|
||||
break;
|
||||
|
||||
case VT_CY|VT_BYREF:
|
||||
convert_to_double_ex(&pval_arg);
|
||||
VarCyFromR8(pval_arg->value.dval, var_arg->pcyVal);
|
||||
break;
|
||||
|
||||
case VT_DATE|VT_BYREF:
|
||||
{
|
||||
SYSTEMTIME wintime;
|
||||
struct tm *phptime;
|
||||
|
||||
phptime = gmtime(&(pval_arg->value.lval));
|
||||
|
||||
wintime.wYear = phptime->tm_year + 1900;
|
||||
wintime.wMonth = phptime->tm_mon + 1;
|
||||
wintime.wDay = phptime->tm_mday;
|
||||
wintime.wHour = phptime->tm_hour;
|
||||
wintime.wMinute = phptime->tm_min;
|
||||
wintime.wSecond = phptime->tm_sec;
|
||||
|
||||
SystemTimeToVariantTime(&wintime, var_arg->pdate);
|
||||
}
|
||||
|
||||
case VT_BSTR|VT_BYREF:
|
||||
convert_to_string(pval_arg);
|
||||
var_arg->pbstrVal = (BSTR FAR*) emalloc(sizeof(BSTR FAR*));
|
||||
unicode_str = php_char_to_OLECHAR(pval_arg->value.str.val, pval_arg->value.str.len, codepage);
|
||||
*(var_arg->pbstrVal) = SysAllocString(unicode_str);
|
||||
efree(unicode_str);
|
||||
break;
|
||||
|
||||
case VT_UNKNOWN|VT_BYREF:
|
||||
php_pval_to_variant(pval_arg, var_arg, codepage);
|
||||
if(var_arg->vt != VT_DISPATCH)
|
||||
var_arg->vt = VT_EMPTY;
|
||||
else
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
hr = var_arg->pdispVal->lpVtbl->QueryInterface(var_arg->pdispVal, &IID_IUnknown, &(var_arg->punkVal));
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
php_error(E_WARNING,"can't query IUnknown");
|
||||
var_arg->vt = VT_EMPTY;
|
||||
}
|
||||
else
|
||||
var_arg->vt = VT_UNKNOWN|VT_BYREF;
|
||||
}
|
||||
break;
|
||||
|
||||
case VT_DISPATCH|VT_BYREF:
|
||||
php_pval_to_variant(pval_arg, var_arg, codepage);
|
||||
if(var_arg->vt != VT_DISPATCH)
|
||||
var_arg->vt = VT_EMPTY;
|
||||
else
|
||||
var_arg->vt |= VT_BYREF;
|
||||
break;
|
||||
|
||||
case VT_VARIANT|VT_BYREF:
|
||||
php_pval_to_variant(pval_arg, var_arg, codepage);
|
||||
if(var_arg->vt != (VT_VARIANT | VT_BYREF))
|
||||
var_arg->vt = VT_EMPTY;
|
||||
break;
|
||||
|
||||
case VT_I1:
|
||||
convert_to_long_ex(&pval_arg);
|
||||
var_arg->cVal = (char)pval_arg->value.lval;
|
||||
break;
|
||||
|
||||
case VT_UI2:
|
||||
convert_to_long_ex(&pval_arg);
|
||||
var_arg->uiVal = (unsigned short)pval_arg->value.lval;
|
||||
break;
|
||||
|
||||
case VT_UI4:
|
||||
convert_to_long_ex(&pval_arg);
|
||||
var_arg->ulVal = (unsigned long)pval_arg->value.lval;
|
||||
break;
|
||||
|
||||
case VT_INT:
|
||||
convert_to_long_ex(&pval_arg);
|
||||
var_arg->intVal = (int)pval_arg->value.lval;
|
||||
break;
|
||||
|
||||
case VT_UINT:
|
||||
convert_to_long_ex(&pval_arg);
|
||||
var_arg->uintVal = (unsigned int)pval_arg->value.lval;
|
||||
break;
|
||||
|
||||
case VT_I1|VT_BYREF:
|
||||
convert_to_long(pval_arg);
|
||||
var_arg->pcVal = (char FAR*) &pval_arg->value.lval;
|
||||
break;
|
||||
|
||||
case VT_UI2|VT_BYREF:
|
||||
convert_to_long(pval_arg);
|
||||
var_arg->puiVal = (unsigned short FAR*) &pval_arg->value.lval;
|
||||
break;
|
||||
|
||||
case VT_UI4|VT_BYREF:
|
||||
convert_to_long(pval_arg);
|
||||
var_arg->pulVal = (unsigned long FAR*) &pval_arg->value.lval;
|
||||
break;
|
||||
|
||||
case VT_INT|VT_BYREF:
|
||||
convert_to_long(pval_arg);
|
||||
var_arg->pintVal = (int FAR*) &pval_arg->value.lval;
|
||||
break;
|
||||
|
||||
case VT_UINT|VT_BYREF:
|
||||
convert_to_long(pval_arg);
|
||||
var_arg->puintVal = (unsigned int FAR*) &pval_arg->value.lval;
|
||||
break;
|
||||
|
||||
default:
|
||||
php_error(E_WARNING, "Type not supportet or not yet implemented.");
|
||||
}
|
||||
}
|
||||
|
||||
PHPAPI void php_variant_to_pval(VARIANT *var_arg, pval *pval_arg, int persistent, int codepage)
|
||||
{
|
||||
|
||||
switch(var_arg->vt & ~VT_BYREF)
|
||||
{
|
||||
case VT_EMPTY:
|
||||
var_uninit(pval_arg);
|
||||
break;
|
||||
|
||||
case VT_UI1:
|
||||
if(var_arg->vt & VT_BYREF)
|
||||
pval_arg->value.lval = (long)*(var_arg->pbVal);
|
||||
else
|
||||
pval_arg->value.lval = (long) var_arg->bVal;
|
||||
|
||||
pval_arg->type = IS_LONG;
|
||||
break;
|
||||
|
||||
case VT_I2:
|
||||
if(var_arg->vt & VT_BYREF)
|
||||
pval_arg->value.lval = (long )*(var_arg->piVal);
|
||||
else
|
||||
pval_arg->value.lval = (long) var_arg->iVal;
|
||||
|
||||
pval_arg->type = IS_LONG;
|
||||
break;
|
||||
|
||||
case VT_I4:
|
||||
if(var_arg->vt & VT_BYREF)
|
||||
pval_arg->value.lval = *(var_arg->plVal);
|
||||
else
|
||||
pval_arg->value.lval = var_arg->lVal;
|
||||
|
||||
pval_arg->type = IS_LONG;
|
||||
break;
|
||||
|
||||
case VT_R4:
|
||||
if(var_arg->vt & VT_BYREF)
|
||||
pval_arg->value.dval = (double)*(var_arg->pfltVal);
|
||||
else
|
||||
pval_arg->value.dval = (double) var_arg->fltVal;
|
||||
|
||||
pval_arg->type = IS_DOUBLE;
|
||||
break;
|
||||
|
||||
case VT_R8:
|
||||
if(var_arg->vt & VT_BYREF)
|
||||
pval_arg->value.dval = *(var_arg->pdblVal);
|
||||
else
|
||||
pval_arg->value.dval = var_arg->dblVal;
|
||||
|
||||
pval_arg->type = IS_DOUBLE;
|
||||
break;
|
||||
|
||||
case VT_DECIMAL:
|
||||
{
|
||||
OLECHAR *unicode_str;
|
||||
switch(VarBstrFromDec(&var_arg->decVal, LOCALE_SYSTEM_DEFAULT, 0, &unicode_str))
|
||||
{
|
||||
case S_OK:
|
||||
pval_arg->value.str.val = php_OLECHAR_to_char(unicode_str, &pval_arg->value.str.len, persistent, codepage);
|
||||
pval_arg->type = IS_STRING;
|
||||
break;
|
||||
|
||||
default:
|
||||
php_error(E_WARNING, "Error converting DECIMAL value to PHP floating point");
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case VT_CY:
|
||||
if(var_arg->vt & VT_BYREF)
|
||||
VarR8FromCy(var_arg->cyVal, &(pval_arg->value.dval));
|
||||
else
|
||||
VarR8FromCy(*(var_arg->pcyVal), &(pval_arg->value.dval));
|
||||
|
||||
pval_arg->type = IS_DOUBLE;
|
||||
break;
|
||||
|
||||
case VT_BOOL:
|
||||
if (var_arg->vt & VT_BYREF)
|
||||
if (*(var_arg->pboolVal) & 0xFFFF)
|
||||
pval_arg->value.lval = 1;
|
||||
else
|
||||
pval_arg->value.lval = 0;
|
||||
else
|
||||
if (var_arg->boolVal & 0xFFFF)
|
||||
pval_arg->value.lval = 1;
|
||||
else
|
||||
pval_arg->value.lval = 0;
|
||||
|
||||
pval_arg->type = IS_BOOL;
|
||||
break;
|
||||
|
||||
case VT_NULL:
|
||||
case VT_VOID:
|
||||
pval_arg->type = IS_NULL;
|
||||
break;
|
||||
|
||||
case VT_VARIANT:
|
||||
php_variant_to_pval(var_arg->pvarVal, pval_arg, persistent, codepage);
|
||||
break;
|
||||
|
||||
case VT_BSTR:
|
||||
if (pval_arg->is_ref == 0 || (var_arg->vt & VT_BYREF) != VT_BYREF) {
|
||||
pval_arg->value.str.val = php_OLECHAR_to_char(var_arg->bstrVal, &pval_arg->value.str.len, persistent, codepage);
|
||||
SysFreeString(var_arg->bstrVal);
|
||||
} else {
|
||||
pval_arg->value.str.val = php_OLECHAR_to_char(*(var_arg->pbstrVal), &pval_arg->value.str.len, persistent, codepage);
|
||||
SysFreeString(*(var_arg->pbstrVal));
|
||||
efree(var_arg->pbstrVal);
|
||||
}
|
||||
|
||||
pval_arg->type = IS_STRING;
|
||||
break;
|
||||
|
||||
case VT_DATE: {
|
||||
SYSTEMTIME wintime;
|
||||
struct tm phptime;
|
||||
|
||||
VariantTimeToSystemTime(var_arg->date, &wintime);
|
||||
|
||||
phptime.tm_year = wintime.wYear - 1900;
|
||||
phptime.tm_mon = wintime.wMonth - 1;
|
||||
phptime.tm_mday = wintime.wDay;
|
||||
phptime.tm_hour = wintime.wHour;
|
||||
phptime.tm_min = wintime.wMinute;
|
||||
phptime.tm_sec = wintime.wSecond;
|
||||
phptime.tm_isdst = -1;
|
||||
|
||||
tzset();
|
||||
pval_arg->value.lval = mktime(&phptime);
|
||||
pval_arg->type = IS_LONG;
|
||||
}
|
||||
break;
|
||||
case VT_DISPATCH: {
|
||||
pval *handle;
|
||||
|
||||
pval_arg->type=IS_OBJECT;
|
||||
pval_arg->value.obj.ce = &com_class_entry;
|
||||
pval_arg->value.obj.properties = (HashTable *) emalloc(sizeof(HashTable));
|
||||
pval_arg->is_ref=1;
|
||||
pval_arg->refcount=1;
|
||||
zend_hash_init(pval_arg->value.obj.properties, 0, NULL, ZVAL_PTR_DTOR, 0);
|
||||
|
||||
ALLOC_ZVAL(handle);
|
||||
handle->type = IS_LONG;
|
||||
handle->value.lval = zend_list_insert(var_arg->pdispVal, php_COM_get_le_idispatch());
|
||||
pval_copy_constructor(handle);
|
||||
INIT_PZVAL(handle);
|
||||
zend_hash_index_update(pval_arg->value.obj.properties, 0, &handle, sizeof(pval *), NULL);
|
||||
}
|
||||
break;
|
||||
case VT_UNKNOWN:
|
||||
var_arg->pdispVal->lpVtbl->Release(var_arg->pdispVal);
|
||||
/* break missing intentionally */
|
||||
|
||||
case VT_I1:
|
||||
if(var_arg->vt & VT_BYREF)
|
||||
pval_arg->value.lval = (long)*(var_arg->pcVal);
|
||||
else
|
||||
pval_arg->value.lval = (long) var_arg->cVal;
|
||||
|
||||
pval_arg->type = IS_LONG;
|
||||
break;
|
||||
|
||||
case VT_UI2:
|
||||
if(var_arg->vt & VT_BYREF)
|
||||
pval_arg->value.lval = (long)*(var_arg->puiVal);
|
||||
else
|
||||
pval_arg->value.lval = (long) var_arg->uiVal;
|
||||
|
||||
pval_arg->type = IS_LONG;
|
||||
break;
|
||||
|
||||
case VT_UI4:
|
||||
if(var_arg->vt & VT_BYREF)
|
||||
pval_arg->value.lval = (long)*(var_arg->pulVal);
|
||||
else
|
||||
pval_arg->value.lval = (long) var_arg->ulVal;
|
||||
|
||||
pval_arg->type = IS_LONG;
|
||||
break;
|
||||
|
||||
case VT_INT:
|
||||
if(var_arg->vt & VT_BYREF)
|
||||
pval_arg->value.lval = (long)*(var_arg->pintVal);
|
||||
else
|
||||
pval_arg->value.lval = (long) var_arg->intVal;
|
||||
|
||||
pval_arg->type = IS_LONG;
|
||||
break;
|
||||
|
||||
case VT_UINT:
|
||||
if(var_arg->vt & VT_BYREF)
|
||||
pval_arg->value.lval = (long)*(var_arg->puintVal);
|
||||
else
|
||||
pval_arg->value.lval = (long) var_arg->uintVal;
|
||||
|
||||
pval_arg->type = IS_LONG;
|
||||
break;
|
||||
|
||||
default:
|
||||
php_error(E_WARNING,"Unsupported variant type: %d (0x%X)", var_arg->vt, var_arg->vt);
|
||||
var_reset(pval_arg);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
PHPAPI OLECHAR *php_char_to_OLECHAR(char *C_str, uint strlen, int codepage)
|
||||
{
|
||||
OLECHAR *unicode_str;
|
||||
|
||||
//request needed buffersize
|
||||
uint reqSize = MultiByteToWideChar(codepage, MB_PRECOMPOSED | MB_ERR_INVALID_CHARS, C_str, -1, NULL, 0);
|
||||
|
||||
if(reqSize)
|
||||
{
|
||||
unicode_str = (OLECHAR *) emalloc(sizeof(OLECHAR) * reqSize);
|
||||
|
||||
//convert string
|
||||
MultiByteToWideChar(codepage, MB_PRECOMPOSED | MB_ERR_INVALID_CHARS, C_str, -1, unicode_str, reqSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
unicode_str = (OLECHAR *) emalloc(sizeof(OLECHAR));
|
||||
*unicode_str = 0;
|
||||
|
||||
switch(GetLastError())
|
||||
{
|
||||
case ERROR_NO_UNICODE_TRANSLATION:
|
||||
php_error(E_WARNING,"No unicode translation available for the specified string");
|
||||
break;
|
||||
default:
|
||||
php_error(E_WARNING,"Error in php_char_to_OLECHAR()");
|
||||
}
|
||||
}
|
||||
|
||||
return unicode_str;
|
||||
}
|
||||
|
||||
PHPAPI char *php_OLECHAR_to_char(OLECHAR *unicode_str, uint *out_length, int persistent, int codepage)
|
||||
{
|
||||
char *C_str;
|
||||
uint length = 0;
|
||||
|
||||
//request needed buffersize
|
||||
uint reqSize = WideCharToMultiByte(codepage, WC_COMPOSITECHECK, unicode_str, -1, NULL, 0, NULL, NULL);
|
||||
|
||||
if(reqSize)
|
||||
{
|
||||
C_str = (char *) pemalloc(sizeof(char) * reqSize, persistent);
|
||||
|
||||
//convert string
|
||||
length = WideCharToMultiByte(codepage, WC_COMPOSITECHECK, unicode_str, -1, C_str, reqSize, NULL, NULL) - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
C_str = (char *) pemalloc(sizeof(char), persistent);
|
||||
*C_str = 0;
|
||||
|
||||
php_error(E_WARNING,"Error in php_OLECHAR_to_char()");
|
||||
}
|
||||
|
||||
if(out_length)
|
||||
*out_length = length;
|
||||
|
||||
return C_str;
|
||||
}
|
||||
|
||||
#endif /* PHP_WIN32 */
|
||||
@@ -1,14 +0,0 @@
|
||||
#ifndef CONVERSION_H
|
||||
#define CONVERSION_H
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
|
||||
extern void php_pval_to_variant(pval *pval_arg, VARIANT *var_arg, int codepage);
|
||||
extern void php_pval_to_variant_ex(pval *pval_arg, VARIANT *var_arg, pval *pval_type, int codepage);
|
||||
extern void php_variant_to_pval(VARIANT *var_arg, pval *pval_arg, int persistent, int codepage);
|
||||
extern OLECHAR *php_char_to_OLECHAR(char *C_str, uint strlen, int codepage);
|
||||
extern char *php_OLECHAR_to_char(OLECHAR *unicode_str, uint *out_length, int persistent, int codepage);
|
||||
|
||||
END_EXTERN_C()
|
||||
|
||||
#endif
|
||||
+8
-19
@@ -1,35 +1,24 @@
|
||||
#ifndef PHP_COM_H
|
||||
#define PHP_COM_H
|
||||
|
||||
#if PHP_WIN32
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
#if WIN32|WINNT
|
||||
|
||||
extern PHP_MINIT_FUNCTION(COM);
|
||||
extern PHP_MSHUTDOWN_FUNCTION(COM);
|
||||
PHP_FUNCTION(COM_load);
|
||||
PHP_FUNCTION(COM_invoke);
|
||||
|
||||
extern int php_COM_get_le_idispatch();
|
||||
|
||||
PHP_FUNCTION(com_propget);
|
||||
PHP_FUNCTION(com_propput);
|
||||
extern zend_module_entry COM_module_entry;
|
||||
extern zend_class_entry com_class_entry;
|
||||
|
||||
END_EXTERN_C()
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
extern pval php_COM_get_property_handler(zend_property_reference *property_reference);
|
||||
extern int php_COM_set_property_handler(zend_property_reference *property_reference, pval *value);
|
||||
extern char *php_COM_error_message(HRESULT hr);
|
||||
extern void php_COM_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_property_reference *property_reference);
|
||||
|
||||
#endif
|
||||
|
||||
#define COM_module_ptr &COM_module_entry
|
||||
|
||||
#else
|
||||
|
||||
#define COM_module_ptr NULL
|
||||
|
||||
#endif /* PHP_WIN32 */
|
||||
#endif /* Win32|WINNT */
|
||||
|
||||
#define phpext_COM_ptr COM_module_ptr
|
||||
|
||||
#endif /* PHP_COM_H */
|
||||
@@ -1,21 +0,0 @@
|
||||
#ifndef PHP_TYPEDEF_VARIANT_H
|
||||
#define PHP_TYPEDEF_VARIANT_H
|
||||
|
||||
#if PHP_WIN32
|
||||
|
||||
extern PHP_MINIT_FUNCTION(VARIANT);
|
||||
extern PHP_MSHUTDOWN_FUNCTION(VARIANT);
|
||||
|
||||
extern zend_module_entry VARIANT_module_entry;
|
||||
|
||||
#define VARIANT_module_ptr &VARIANT_module_entry
|
||||
|
||||
#else
|
||||
|
||||
#define VARIANT_module_ptr NULL
|
||||
|
||||
#endif /* PHP_WIN32 */
|
||||
|
||||
#define phpext_VARIANT_ptr VARIANT_module_ptr
|
||||
|
||||
#endif /* PHP_TYPEDEF_VARIANT_H */
|
||||
+1
-1
@@ -2226,7 +2226,7 @@ PHP_FUNCTION(cpdf_output_buffer) {
|
||||
}
|
||||
|
||||
buffer = cpdf_getBufferForPDF(pdf, &lenght);
|
||||
|
||||
php_header();
|
||||
php_write(buffer, lenght);
|
||||
|
||||
RETURN_TRUE;
|
||||
|
||||
Loaded 100 of 702 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user