mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-25 01:45:41 +00:00
Compare commits
414
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
095b48f772 | ||
|
|
d8c1e99f02 | ||
|
|
8d0cc271bf | ||
|
|
bbde60d6d2 | ||
|
|
e2b820f0ea | ||
|
|
c970dbb647 | ||
|
|
29c32f04e3 | ||
|
|
00c6777aa1 | ||
|
|
143ae77156 | ||
|
|
87ba25b722 | ||
|
|
dc77b5700c | ||
|
|
0e5c01290d | ||
|
|
ba16543ef5 | ||
|
|
f65e4feda4 | ||
|
|
20181fde3d | ||
|
|
491ed1813e | ||
|
|
caa5dbe679 | ||
|
|
7e6d72f030 | ||
|
|
6ea962c767 | ||
|
|
c87b2d0cee | ||
|
|
c2c31547c2 | ||
|
|
21851b0001 | ||
|
|
bd96cca64f | ||
|
|
02893ad216 | ||
|
|
4f88703159 | ||
|
|
abc62474bf | ||
|
|
3a9754715a | ||
|
|
2f212ab8d5 | ||
|
|
71be1ed5f1 | ||
|
|
1c6896076f | ||
|
|
6a2d265af6 | ||
|
|
6fe9c3735a | ||
|
|
5d43cf4ec4 | ||
|
|
8b3b1eb121 | ||
|
|
836a7b1a88 | ||
|
|
c26edafb17 | ||
|
|
a9bf810ba2 | ||
|
|
a737e92b08 | ||
|
|
54ae55a949 | ||
|
|
5ab53094fa | ||
|
|
aff24aed0d | ||
|
|
b915644ec4 | ||
|
|
28c71a667a | ||
|
|
d45c4f86d3 | ||
|
|
8060534f63 | ||
|
|
80bdf7eae5 | ||
|
|
2dad2b3882 | ||
|
|
aa0a80bea8 | ||
|
|
dec171c4bf | ||
|
|
6d5779844f | ||
|
|
94ed0368b9 | ||
|
|
6c8d9c8c8e | ||
|
|
9de0be49d6 | ||
|
|
5a76218edd | ||
|
|
d84c321376 | ||
|
|
b3262ff512 | ||
|
|
a825563c0b | ||
|
|
da476e0da9 | ||
|
|
46107c39a4 | ||
|
|
a263d88c81 | ||
|
|
9158cd2494 | ||
|
|
2e98f2dd1a | ||
|
|
902b4bda6a | ||
|
|
87b52bb5cd | ||
|
|
e6199b5279 | ||
|
|
e7f995106c | ||
|
|
3bcb1f3af1 | ||
|
|
13a652c81c | ||
|
|
5ddd062e36 | ||
|
|
4bedc6bb31 | ||
|
|
70f94e52ea | ||
|
|
87c3363fa9 | ||
|
|
ca1dc06e04 | ||
|
|
b5ed0a1d3d | ||
|
|
19c8eeb4e8 | ||
|
|
293e62c99d | ||
|
|
2da7dd5982 | ||
|
|
6325b1b630 | ||
|
|
9244e0eee1 | ||
|
|
712d951ffc | ||
|
|
40773632e0 | ||
|
|
88628a2319 | ||
|
|
31120ba5f7 | ||
|
|
75276870db | ||
|
|
fc0b122460 | ||
|
|
d976c362ac | ||
|
|
6c82c26884 | ||
|
|
a0ef3e1865 | ||
|
|
4f91645642 | ||
|
|
46b2bef868 | ||
|
|
26319ee1a1 | ||
|
|
42a8242676 | ||
|
|
57ab773c70 | ||
|
|
219364ee55 | ||
|
|
8b5fc29c7a | ||
|
|
21f4b69b2b | ||
|
|
f76ce400eb | ||
|
|
16204148bb | ||
|
|
1f2d017ae1 | ||
|
|
1b10ad424a | ||
|
|
3e65f6bf57 | ||
|
|
f84d03b2bc | ||
|
|
2db28891e4 | ||
|
|
7adc26fd8b | ||
|
|
fe80df5446 | ||
|
|
8588815ef3 | ||
|
|
a70fc67b0b | ||
|
|
b5c53ae6c7 | ||
|
|
3d018fb061 | ||
|
|
3845e2c145 | ||
|
|
1930c2c33b | ||
|
|
1e2b92b517 | ||
|
|
983fa5a21e | ||
|
|
3ecbb5c314 | ||
|
|
8fa1628958 | ||
|
|
e52b580cad | ||
|
|
4b28e0a8f1 | ||
|
|
91f5ceb3be | ||
|
|
603758b484 | ||
|
|
b6b575c1d5 | ||
|
|
e2f3142c78 | ||
|
|
7623887079 | ||
|
|
1bd6ec4c91 | ||
|
|
33a6aefce8 | ||
|
|
d3f8aaecd8 | ||
|
|
049cca1711 | ||
|
|
a40df45348 | ||
|
|
8f42eaae01 | ||
|
|
ebeefd9f7d | ||
|
|
646f9a4a8b | ||
|
|
b4fa1661af | ||
|
|
ba3c63dbc9 | ||
|
|
350535d498 | ||
|
|
467caa4307 | ||
|
|
01b6956d61 | ||
|
|
61c3a669b4 | ||
|
|
befb6e9b80 | ||
|
|
35e43dabe1 | ||
|
|
b905779950 | ||
|
|
04c32887f1 | ||
|
|
e0a39d68d8 | ||
|
|
92ec8541c1 | ||
|
|
82a7ef78f3 | ||
|
|
236c42c14e | ||
|
|
b8fdc56a8b | ||
|
|
17ad61bd7f | ||
|
|
ec1507ea9d | ||
|
|
69bd1f31fd | ||
|
|
b9d4af72e9 | ||
|
|
fbbc036830 | ||
|
|
c2b0fdd647 | ||
|
|
3706b626fe | ||
|
|
edbfc48fdd | ||
|
|
59c6886c65 | ||
|
|
8091552925 | ||
|
|
1916223883 | ||
|
|
f2377c4d1f | ||
|
|
f20849d12e | ||
|
|
cfc8accd3e | ||
|
|
f6eb507b2c | ||
|
|
a75608c1de | ||
|
|
5a9875f293 | ||
|
|
546e5bbc43 | ||
|
|
90f151470c | ||
|
|
edce707f3b | ||
|
|
446f4d1bc2 | ||
|
|
d673ec0184 | ||
|
|
28d72ce2fd | ||
|
|
51ae1cc7bd | ||
|
|
12c826c2e7 | ||
|
|
c4bf45e39a | ||
|
|
2ec89aa8e1 | ||
|
|
c18badbfbf | ||
|
|
1ea22c9004 | ||
|
|
399e2ca69f | ||
|
|
cfb84391d0 | ||
|
|
bfd3c9ecfb | ||
|
|
d64a00da04 | ||
|
|
971fcd4254 | ||
|
|
f61dbf06a1 | ||
|
|
0b9d614988 | ||
|
|
6284b34e6e | ||
|
|
ad2b89c9a3 | ||
|
|
196259d334 | ||
|
|
ae40d0ef2a | ||
|
|
e532feb29c | ||
|
|
905fbfd85e | ||
|
|
ddb32b11b2 | ||
|
|
11371cd0a8 | ||
|
|
7daa1cfecc | ||
|
|
a8996a8ac6 | ||
|
|
0ad4c5037c | ||
|
|
334ddd1248 | ||
|
|
14a61929b9 | ||
|
|
08486a0ea3 | ||
|
|
83e4bb727b | ||
|
|
c401890d17 | ||
|
|
0eef82a733 | ||
|
|
0e8de752fd | ||
|
|
8c075de7c7 | ||
|
|
268d3d7ba3 | ||
|
|
bc69bdb01a | ||
|
|
7af08c0c34 | ||
|
|
cd75bd4f65 | ||
|
|
a14c66445a | ||
|
|
1e6ccabd5f | ||
|
|
d6c0fdfd2f | ||
|
|
4ebcb2ecfe | ||
|
|
ed6ebf011b | ||
|
|
d46f8078f5 | ||
|
|
a0957e24b7 | ||
|
|
b52f7a01af | ||
|
|
e563b4eafa | ||
|
|
cd732f1a3f | ||
|
|
e5cfb1d05c | ||
|
|
41b639fffe | ||
|
|
69e20cf219 | ||
|
|
79c28f7618 | ||
|
|
c176a0ae20 | ||
|
|
f28b063c28 | ||
|
|
e080db4303 | ||
|
|
5e605e6dc2 | ||
|
|
9db1075c0e | ||
|
|
1d89ed6ee3 | ||
|
|
5201e62d0d | ||
|
|
c144fdf680 | ||
|
|
a2592aa5fb | ||
|
|
1b4e0b81e3 | ||
|
|
b5aa8db6a3 | ||
|
|
8ad22e4279 | ||
|
|
ea5dc3d577 | ||
|
|
7f7f566318 | ||
|
|
2ba792cd0b | ||
|
|
c884ad017c | ||
|
|
82b4d74fd4 | ||
|
|
f51ff68dfa | ||
|
|
8989a96789 | ||
|
|
447223f48a | ||
|
|
d5fc8152f3 | ||
|
|
a41a54f7fa | ||
|
|
c5b9577df8 | ||
|
|
beb3674b7a | ||
|
|
0f2c97f627 | ||
|
|
a92af73136 | ||
|
|
ac3b484388 | ||
|
|
c3e9cd9c91 | ||
|
|
ae5301c5d5 | ||
|
|
2ba0608e48 | ||
|
|
e8f984d77a | ||
|
|
76766f2d31 | ||
|
|
d24e005477 | ||
|
|
e0fe48e8a0 | ||
|
|
2067ce4079 | ||
|
|
bdfd8c60ea | ||
|
|
81dbc2fcef | ||
|
|
690ca62dd3 | ||
|
|
0850c7a348 | ||
|
|
8f435013ff | ||
|
|
2aa678b088 | ||
|
|
ed7d1e82c6 | ||
|
|
b163696106 | ||
|
|
da2a1977b5 | ||
|
|
77804efa77 | ||
|
|
d1efeb2e58 | ||
|
|
16e2d61435 | ||
|
|
98672f41ba | ||
|
|
53bf5ccbea | ||
|
|
91f0369c80 | ||
|
|
46e9abe602 | ||
|
|
99b5263afd | ||
|
|
962b593455 | ||
|
|
d200a703e7 | ||
|
|
3bb7e73656 | ||
|
|
59d55efb17 | ||
|
|
ff716cbd3e | ||
|
|
9e5ea7d229 | ||
|
|
a27d5d842a | ||
|
|
4eccf848ec | ||
|
|
b33f7ab671 | ||
|
|
f125cb60cc | ||
|
|
42f7b8026c | ||
|
|
5aa568254a | ||
|
|
2f94546824 | ||
|
|
a4032b68c6 | ||
|
|
e4e71fd8ba | ||
|
|
476c9a3b3d | ||
|
|
81abbc66fc | ||
|
|
ca14c9b1af | ||
|
|
56b153390b | ||
|
|
9e187415f9 | ||
|
|
f063bdec06 | ||
|
|
dc701bfdab | ||
|
|
391cbac1f2 | ||
|
|
18cd69ef74 | ||
|
|
8327d4e2bd | ||
|
|
2b216967f2 | ||
|
|
d632106e6e | ||
|
|
279770743f | ||
|
|
869a90f015 | ||
|
|
ef81373201 | ||
|
|
e276023d82 | ||
|
|
4ea8f4b9f2 | ||
|
|
c055a54343 | ||
|
|
a3bd8bcd7b | ||
|
|
8f2686df35 | ||
|
|
a2c24ae90e | ||
|
|
dc66fb1f10 | ||
|
|
7fcfa8865e | ||
|
|
d9226a1dd0 | ||
|
|
1fb65c4c29 | ||
|
|
24ec6e5a5c | ||
|
|
8957eac122 | ||
|
|
907bdcbc7e | ||
|
|
a99e4b5969 | ||
|
|
d3de81fb00 | ||
|
|
3df3aedbe0 | ||
|
|
de8b457181 | ||
|
|
9219b746bb | ||
|
|
43b4b086db | ||
|
|
0e6607aa51 | ||
|
|
536e7448f6 | ||
|
|
f4f844af19 | ||
|
|
f0903895c1 | ||
|
|
8586e6505f | ||
|
|
2f7c5d30b5 | ||
|
|
6cc2073d91 | ||
|
|
6d182a8456 | ||
|
|
6910e6432a | ||
|
|
851b6d4475 | ||
|
|
0c72b185fd | ||
|
|
cfbf5b24b7 | ||
|
|
cf8a8a3189 | ||
|
|
96a8b63865 | ||
|
|
ad2651a74a | ||
|
|
23d71171cf | ||
|
|
5232a5afea | ||
|
|
6527a454c6 | ||
|
|
c9908cf81d | ||
|
|
585628ba67 | ||
|
|
47c72816d3 | ||
|
|
4fec06587b | ||
|
|
0f5e09c192 | ||
|
|
98e59d58ba | ||
|
|
350e5aa862 | ||
|
|
196506caa1 | ||
|
|
7c7c353b1e | ||
|
|
f91395898c | ||
|
|
e48d127244 | ||
|
|
313c153274 | ||
|
|
0a896dd987 | ||
|
|
73060a89ee | ||
|
|
afc5a6145c | ||
|
|
2cc63714a0 | ||
|
|
533cdf740f | ||
|
|
2b21476207 | ||
|
|
1d7a4ed492 | ||
|
|
d26ddca966 | ||
|
|
495925381e | ||
|
|
cb4612c735 | ||
|
|
ac772dcf53 | ||
|
|
e73d498947 | ||
|
|
7fefbbb177 | ||
|
|
e1519d6f17 | ||
|
|
c84c5640e7 | ||
|
|
6b3cda310a | ||
|
|
8a3975191e | ||
|
|
a312bb5ee3 | ||
|
|
ad568aab6f | ||
|
|
c8c0ddb73d | ||
|
|
1fb48b5091 | ||
|
|
216c8ffdcd | ||
|
|
15fa07f0f6 | ||
|
|
22fa023c88 | ||
|
|
9873fa5e42 | ||
|
|
37b73ad2d4 | ||
|
|
c29704e066 | ||
|
|
493b89c3b1 | ||
|
|
39a690321a | ||
|
|
50ac5db2b4 | ||
|
|
1e3854597c | ||
|
|
d0c4b3d3ec | ||
|
|
b9fc9a6ad1 | ||
|
|
af5501027f | ||
|
|
7318238236 | ||
|
|
4da11644de | ||
|
|
c756609658 | ||
|
|
eb0cb6f6ed | ||
|
|
2784cf206d | ||
|
|
eefdd0ea49 | ||
|
|
17a363a8f8 | ||
|
|
e8e4ff0aa1 | ||
|
|
0282ad792a | ||
|
|
622f7679f7 | ||
|
|
36702d5f41 | ||
|
|
bd05792560 | ||
|
|
4213153365 | ||
|
|
f0ffe7c85b | ||
|
|
3e638c84c0 | ||
|
|
ccc580f408 | ||
|
|
1f73efcaab | ||
|
|
4713ce294d | ||
|
|
1f20b7a626 | ||
|
|
d14e259823 | ||
|
|
29a09f984c | ||
|
|
628e5530b9 | ||
|
|
b175cdfd71 | ||
|
|
49fb6260b6 | ||
|
|
b8c9e83664 | ||
|
|
4ea43fe019 | ||
|
|
202d2990a9 | ||
|
|
3fc91aff97 | ||
|
|
0bdbbd379e | ||
|
|
ceb70dbc68 | ||
|
|
f05924db37 |
No files matched your search
@@ -1,5 +1,88 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
12 Aug 2004, PHP 5.0.1
|
||||
- Changed destructor mechanism so that destructors are called prior to request
|
||||
shutdown. (Marcus)
|
||||
- Rewritten UNIX and Windows install help files. (Documentation Team)
|
||||
- Updated several libraries bundled with the windows release which now
|
||||
includes libxml2-2.6.11, libxslt-1.1.7 and iconv-1.9.1. (Rob, Edin)
|
||||
- Improved and moved ActiveScript SAPI to PECL. (Wez)
|
||||
- Fixed bug #29606 (php_strip_whitespace() prints to stdout rather then
|
||||
returning the value). (Ilia)
|
||||
- Fixed bug #29577 (MYSQLI_CLIENT_FOUND_ROWS undefined) (Georg)
|
||||
- Fixed bug #29573 (Segmentation fault, when exception thrown within
|
||||
PHP function called from XSLT). (Christian)
|
||||
- Fixed bug #29522 (accessing properties without connection) (Georg)
|
||||
- Fixed bug #29505 (get_class_vars() severely broken when used with arrays).
|
||||
(Marcus)
|
||||
- Fixed bug #29490 (.Net object instantiation failed). (Michael Sisolak).
|
||||
- Fixed bug #29474 (win32: usleep() doesn't work). (Wez)
|
||||
- Fixed bug #29449 (win32: feof() hangs on empty tcp stream). (Wez)
|
||||
- Fixed bug #29437 (Possible crash inside array_walk_recursive()). (Ilia)
|
||||
- Fixed bug #29431 (crash when parsing invalid address; invalid address
|
||||
returned by stream_socket_recvfrom(), stream_socket_getname()). (Wez)
|
||||
- Fixed bug #29409 (Segfault in PHP functions called from XSLT). (Rob)
|
||||
- Fixed unloading of dynamically loaded extensions.
|
||||
(Marcus, kameshj at fastmail dot fm)
|
||||
- Fixed bug #29395 (sqlite_escape_string() returns bogus data on empty
|
||||
strings). (Ilia, Tony)
|
||||
- Fixed bug #29392 (com_dotnet crashes when echo'ing an object). (Wez)
|
||||
- Fixed bug #29368 (The destructor is called when an exception is thrown from
|
||||
the constructor). (Marcus)
|
||||
- Fixed bug #29354 (Exception constructor marked as both public and protected).
|
||||
(Marcus)
|
||||
- Fixed bug #29342 (strtotime() does not handle empty date string properly).
|
||||
(Ilia)
|
||||
- Fixed bug #29340 (win32 build produces invalid php_ifx.dll). (Edin)
|
||||
- Fixed bug #29335 (fetch functions now use MYSQLI_BOTH as default) (Georg)
|
||||
- Fixed bug #29291 (get_class_vars() return names with NULLs). (Marcus)
|
||||
- Fixed bug #29264 (gettext extension not working). (Edin)
|
||||
- Fixed bug #29258 (variant_date_from_timestamp() does not honour
|
||||
timezone). (Wez)
|
||||
- Fixed bug #29256 (error when sending large packets on a socket). (Dmitry)
|
||||
- Fixed bug #29236 (memory error when wsdl-cache is enabled). (Dmitry)
|
||||
- Fixed bug #29147 (Compile Error in mnoGoSearch functions). (Sergey, Antony)
|
||||
- Fixed bug #29132 ($_SERVER["PHP_AUTH_USER"] isn't defined). (Stefan)
|
||||
- Fixed bug #29119 (html_entity_decode() misbehaves with UTF-8). (Moriyoshi)
|
||||
- Fixed bug #29109 (SoapFault exception: [WSDL] Out of memory). (Dmitry)
|
||||
- Fixed bug #29061 (soap extension segfaults). (Dmitry)
|
||||
- Fixed bug #28985 (__getTypes() returning nothing on complex WSDL). (Dmitry)
|
||||
- Fixed bug #28969 (Wrong data encoding of special characters). (Dmitry)
|
||||
- Fixed bug #28895 (ReflectionClass::isAbstract always returns false). (Marcus)
|
||||
- Fixed bug #28829 (Thread-unsafety in bcmath elementary values). (Sara)
|
||||
- Fixed bug #28464 (catch() does not catch exceptions by interfaces). (Marcus)
|
||||
- Fixed ReflectionClass::getMethod() and ReflectionClass::getProperty() to
|
||||
raise an ReflectionException instead of returning NULL on failure.
|
||||
(Sebastian)
|
||||
- Fixed convert.* filters to consume remaining buckets_in on flush. (Sara)
|
||||
- Fixed bug in mysqli->client_version. (Georg)
|
||||
|
||||
13 Jul 2004, PHP 5.0.0
|
||||
- Updated PCRE to provide better error handling in certain cases. (Andrei)
|
||||
- Changed doc comments to require a single white space after '/**'. (Marcus)
|
||||
- Fixed bug #29019 (Database not closing). (Marcus)
|
||||
- Fixed bug #29008 (array_combine() does not handle non-numeric/string keys).
|
||||
(Ilia)
|
||||
- Fixed bug #28999 (fixed behaviour of exec() to work as it did in 4.X). (Ilia)
|
||||
- Fixed bug #28868 (Internal filter registry not thread safe). (Sara)
|
||||
- Fixed bug #28851 (call_user_func_array has typo in error message). (Marcus)
|
||||
- Fixed bug #28831 (ArrayObject::offsetGet() does the work of offsetUnset()).
|
||||
(Marcus)
|
||||
- Fixed bug #28822 (ArrayObject::offsetExists() works inverted). (Marcus)
|
||||
- Fixed bug #28789 (ReflectionProperty getValue() fails on public static
|
||||
members). (Marcus)
|
||||
- Fixed bug #28771 (Segfault when using xslt and clone). (Rob)
|
||||
- Fixed bug #28751 (SoapServer does not call _autoload()). (Dmitry)
|
||||
- Fixed bug #28739 (array_*diff() and array_*intersect() not clearing the fci
|
||||
cache before work). (Andrey)
|
||||
- Fixed bug #28721 (appendChild() and insertBefore() unset DOMText).(Rob)
|
||||
- Fixed bug #28702 (SOAP does not parse WSDL service address correctly). (Dmitry)
|
||||
- Fixed bug #28699 (Reflection api bugs). (Marcus)
|
||||
- Fixed bug #28694 (ReflectionExtension::getFunctions() crashes PHP). (Marcus)
|
||||
- Fixed bug #28512 (Allocate enough space to store MSSQL data). (Frank)
|
||||
- Fixed bug #28325 (Circular references not properly serialised). (Moriyoshi)
|
||||
- Fixed strip_tags() to correctly handle '\0' characters. (Stefan)
|
||||
|
||||
7 Jun 2004, PHP 5 Release Candidate 3
|
||||
- Moved the PDFLib extension to PECL. (Wez)
|
||||
- Added MySQL 4.1.2-alpha and 4.1.3-beta support to MySQLI extension. (Georg)
|
||||
@@ -8,6 +91,7 @@ PHP NEWS
|
||||
- Added count() support for COM arrays. (Wez)
|
||||
- Added Firebird/InterBase UDF source that allows PHP functions to be called
|
||||
from SQL (Ard)
|
||||
- Removed Firebird/Interbase function ibase_timefmt() (Ard)
|
||||
- Changed user error handler mechanism to relay to built-in error handler if it
|
||||
returns false. (Andrei)
|
||||
- Changed class type hints for function parameters to not allow the passing of
|
||||
|
||||
+10
-18
@@ -37,8 +37,11 @@ The next few rules are more of a technical nature.
|
||||
messages every day. Woe be to those who attempt to mess with it.
|
||||
|
||||
2. All news updates intended for public viewing, such as new features,
|
||||
bug fixes, improvements, etc., should go into the NEWS file. Also see
|
||||
the note below about automatically updating NEWS in your commit message.
|
||||
bug fixes, improvements, etc., should go into the NEWS file.
|
||||
|
||||
NB! Lines, starting with @ will go automagically into NEWS file, but
|
||||
this is NOT recommended, though. Please, add news entries directly to
|
||||
NEWS file and don't forget to keep them adjusted and sorted.
|
||||
|
||||
3. Do not commit multiple file and dump all messages in one commit. If you
|
||||
modified several unrelated files, commit each group separately and
|
||||
@@ -59,14 +62,10 @@ The next few rules are more of a technical nature.
|
||||
The format of the commit messages is pretty simple.
|
||||
|
||||
If a line begins with #, it is taken to be a comment and will not appear
|
||||
in the ChangeLog. If the line begins with @, it will be redirected to the
|
||||
NEWS file. Everything else goes into the ChangeLog.
|
||||
in the ChangeLog. 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.
|
||||
lines, you have to put # at the beginning of _every_ such line.
|
||||
|
||||
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
|
||||
@@ -78,17 +77,12 @@ For datetime.c:
|
||||
|
||||
(PHP date) Added new 'K' format modifier for printing out number of
|
||||
days until New Year's Eve.
|
||||
@- Added new 'K' format modifier that will output the number of days
|
||||
@ until New Year's Eve. (Bob)
|
||||
|
||||
For string.c:
|
||||
(php_trim) Fixed a memory leak resulting from improper use of zval_dtor().
|
||||
# Man, that thing was leaking all over the place!
|
||||
@- Fixed memory leak in trim(). (Bob)
|
||||
|
||||
The lines above marked with @ will go into NEWS file automagically, and the
|
||||
# lines will be omitted from the ChangeLog. Alternatively, you might want
|
||||
to modify NEWS file directly and not use the @ lines.
|
||||
The # lines will be omitted from the ChangeLog automagically.
|
||||
|
||||
If you fix some bugs, you should note the bug ID numbers in your
|
||||
commit message. Bug ID should be prefixed by "#" for easier access to
|
||||
@@ -97,12 +91,10 @@ bug report when developers are browsing CVS via. LXR or Bonsai.
|
||||
Example:
|
||||
|
||||
Fixed pgsql notice handler double free crash bug. Bug #14016
|
||||
@ Fixed pgsql notice handler double free crash bug. Bug #14016
|
||||
|
||||
If you don't see your messages in ChangeLog and NEWS right away, don't worry!
|
||||
If you don't see your messages in ChangeLog right away, don't worry!
|
||||
These files are updated once a day, so your stuff will not show up until
|
||||
somewhat later. Don't go adding stuff to NEWS by hand if you already put @
|
||||
lines in the commit message.
|
||||
somewhat later.
|
||||
|
||||
You can use LXR (http://lxr.php.net/) and Bonsai (http://bonsai.php.net/)
|
||||
to look at PHP CVS repository in various ways.
|
||||
|
||||
+1
-1
@@ -155,7 +155,7 @@ PHP_FUNCTION(my_get_raw)
|
||||
HashTable *hash_ptr;
|
||||
char *raw_var;
|
||||
|
||||
if(zend_parse_parameters(2 TSRMLS_CC, "ls|l", &arg, &var, &var_len) == FAILURE) {
|
||||
if(zend_parse_parameters(2 TSRMLS_CC, "ls", &arg, &var, &var_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+157
@@ -1,3 +1,160 @@
|
||||
2004-07-14 Stanislav Malyshev <stas@zend.com>
|
||||
|
||||
* zend_object_handlers.c:
|
||||
be consistent with write_dimension
|
||||
|
||||
* zend_object_handlers.c:
|
||||
fix #28957
|
||||
|
||||
2004-07-13 Andi Gutmans <andi@zend.com>
|
||||
|
||||
* zend.h:
|
||||
- 5.0.1-dev
|
||||
|
||||
2004-07-13 Marcus Boerger <marcus.boerger@post.rwth-aachen.de>
|
||||
|
||||
* zend_constants.c:
|
||||
Bugfix #29116 Zend constant warning uses memory after free (jdolecek at
|
||||
NetBSD dot org)
|
||||
|
||||
2004-07-13 Andi Gutmans <andi@zend.com>
|
||||
|
||||
* (php_5_0_0)
|
||||
zend.h:
|
||||
- Roll PHP 5.0.0
|
||||
|
||||
2004-07-12 Ilia Alshanetsky <ilia@prohost.org>
|
||||
|
||||
* (php_5_0_0RC4)
|
||||
zend_execute.c:
|
||||
Fixed bug #29086 & #28064 (PHP crashes on extremly long scripts).
|
||||
|
||||
2004-07-12 Andi Gutmans <andi@zend.com>
|
||||
|
||||
* (php_5_0_0RC4)
|
||||
zend.c:
|
||||
- Convert zend_class_entry -> zend_class_entry *
|
||||
|
||||
2004-07-10 Jon Parise <jon+php@csh.rit.edu>
|
||||
|
||||
* zend.c:
|
||||
DragonFly BSD is derived from FreeBSD and requires the same floating point
|
||||
precision fix.
|
||||
|
||||
2004-07-10 Andi Gutmans <andi@zend.com>
|
||||
|
||||
* zend_alloc.c
|
||||
zend_hash.c
|
||||
zend_variables.c:
|
||||
- Better stability during premature shutdown of request startup
|
||||
|
||||
2004-07-05 Andi Gutmans <andi@zend.com>
|
||||
|
||||
* zend_mm.h:
|
||||
- Disable zend_mm for 5.0.0
|
||||
|
||||
2004-07-03 Andi Gutmans <andi@zend.com>
|
||||
|
||||
* zend_alloc.c:
|
||||
- Should fix mem leak with ZEND_MM. I made this change a while ago and
|
||||
- rolled it back but I don't remember why. Please test!
|
||||
|
||||
2004-07-01 Ilia Alshanetsky <ilia@prohost.org>
|
||||
|
||||
* zend_constants.c:
|
||||
Do not use alloca() where it can be easily abused by the users.
|
||||
|
||||
|
||||
2004-06-25 Wez Furlong <wez.php@thebrainroom.net>
|
||||
|
||||
* zend_stream.c
|
||||
zend_stream.h:
|
||||
export zend stream functions for zend extensions under windows
|
||||
|
||||
2004-06-24 Sara Golemon <php@alphaweb.net>
|
||||
|
||||
* zend_execute.c:
|
||||
Ease off on severity of new error (Using Resources as array offsets)
|
||||
|
||||
2004-06-23 Sara Golemon <php@alphaweb.net>
|
||||
|
||||
* zend_execute.c:
|
||||
BugFix #28879 Inconsistent behavior between explicit and implicit array
|
||||
creation.
|
||||
|
||||
Changes:
|
||||
|
||||
Throw E_WARNING "Illegal offset type" when explicitly creating
|
||||
array elements with objects, arrays, or resorces as indexes.
|
||||
This matches implicit creation w/ obj/arr indices.
|
||||
|
||||
Throw E_WARNING "Resource ID#%ld used as offset, casting to integer (%ld)"
|
||||
when implicitly creating array with resource as index. (BC)
|
||||
|
||||
2004-06-19 Sebastian Bergmann <sb@sebastian-bergmann.de>
|
||||
|
||||
* zend_reflection_api.c:
|
||||
Reflection_* -> Reflection*. Patch by Timm Friebe.
|
||||
|
||||
2004-06-18 Sara Golemon <php@alphaweb.net>
|
||||
|
||||
* zend_execute.c:
|
||||
Another typo in converting array index doubles to long.
|
||||
|
||||
2004-06-18 George Schlossnagle <george@omniti.com>
|
||||
|
||||
* zend_builtin_functions.c:
|
||||
fix for 28213.
|
||||
|
||||
class_name and call_type should be reinitialized on every loop iter.
|
||||
|
||||
2004-06-17 Sara Golemon <php@alphaweb.net>
|
||||
|
||||
* zend_builtin_functions.c:
|
||||
String length in parse_parameters should be int
|
||||
|
||||
2004-06-15 Marcus Boerger <marcus.boerger@post.rwth-aachen.de>
|
||||
|
||||
* zend_reflection_api.c:
|
||||
|
||||
|
||||
2004-06-14 Marcus Boerger <marcus.boerger@post.rwth-aachen.de>
|
||||
|
||||
* zend_language_scanner.l:
|
||||
Need {} here
|
||||
|
||||
2004-06-10 Marcus Boerger <marcus.boerger@post.rwth-aachen.de>
|
||||
|
||||
* zend_language_scanner.l:
|
||||
- Require a single white-space char after /** to start a doc comment that
|
||||
way we prevent /*** from becoming a doc comment (as requested Derick).
|
||||
|
||||
* zend_API.h:
|
||||
Add missing declaration
|
||||
|
||||
* zend_reflection_api.c:
|
||||
Small code layout change
|
||||
|
||||
* zend_language_scanner.l:
|
||||
Do not require NEWLINE at start of doccomment
|
||||
|
||||
* zend_reflection_api.c:
|
||||
Bugfix #28699: Reflection api bugs
|
||||
|
||||
2004-06-09 Marcus Boerger <marcus.boerger@post.rwth-aachen.de>
|
||||
|
||||
* zend_reflection_api.c:
|
||||
Fix Bug #28694 ReflectionExtension::getFunctions() crashes PHP
|
||||
|
||||
2004-06-07 Andi Gutmans <andi@zend.com>
|
||||
|
||||
* zend.h:
|
||||
- Go back to -dev (Shouldn't need another RC)
|
||||
|
||||
* (php_5_0_0RC3)
|
||||
zend.h:
|
||||
- Roll RC3
|
||||
|
||||
2004-06-06 Stefan Esser <sesser@suspekt.org>
|
||||
|
||||
* zend_compile.h
|
||||
|
||||
+1
-1
@@ -545,7 +545,7 @@ Changes in the Zend Engine 2.0
|
||||
|
||||
<?php
|
||||
class Exception {
|
||||
function __construct(string $message=NULL, int $code=0) {
|
||||
function __construct(/*string*/ $message=NULL, /*int*/ $code=0) {
|
||||
if (func_num_args()) {
|
||||
$this->message = $message;
|
||||
}
|
||||
|
||||
Executable
+31
@@ -0,0 +1,31 @@
|
||||
--TEST--
|
||||
Bug #29505 (get_class_vars() severely broken when used with arrays)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class Test {
|
||||
public $empty = array();
|
||||
public $three = array(1, "b"=>"c", 3=>array());
|
||||
}
|
||||
|
||||
var_dump(get_class_vars('Test'));
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
array(2) {
|
||||
["empty"]=>
|
||||
array(0) {
|
||||
}
|
||||
["three"]=>
|
||||
array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
["b"]=>
|
||||
string(1) "c"
|
||||
[3]=>
|
||||
array(0) {
|
||||
}
|
||||
}
|
||||
}
|
||||
===DONE===
|
||||
+6
-6
@@ -429,7 +429,7 @@ static void zend_set_default_compile_time_values(TSRMLS_D)
|
||||
static void compiler_globals_ctor(zend_compiler_globals *compiler_globals TSRMLS_DC)
|
||||
{
|
||||
zend_function tmp_func;
|
||||
zend_class_entry tmp_class;
|
||||
zend_class_entry *tmp_class;
|
||||
|
||||
compiler_globals->compiled_filename = NULL;
|
||||
|
||||
@@ -439,7 +439,7 @@ static void compiler_globals_ctor(zend_compiler_globals *compiler_globals TSRMLS
|
||||
|
||||
compiler_globals->class_table = (HashTable *) malloc(sizeof(HashTable));
|
||||
zend_hash_init_ex(compiler_globals->class_table, 10, NULL, ZEND_CLASS_DTOR, 1, 0);
|
||||
zend_hash_copy(compiler_globals->class_table, global_class_table, (copy_ctor_func_t) zend_class_add_ref, &tmp_class, sizeof(zend_class_entry));
|
||||
zend_hash_copy(compiler_globals->class_table, global_class_table, (copy_ctor_func_t) zend_class_add_ref, &tmp_class, sizeof(zend_class_entry *));
|
||||
|
||||
zend_set_default_compile_time_values(TSRMLS_C);
|
||||
|
||||
@@ -512,8 +512,8 @@ static void alloc_globals_dtor(zend_alloc_globals *alloc_globals_p TSRMLS_DC)
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
/* FreeBSD floating point precision fix */
|
||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
/* FreeBSD and DragonFly floating point precision fix */
|
||||
#include <floatingpoint.h>
|
||||
#endif
|
||||
|
||||
@@ -554,8 +554,8 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions, i
|
||||
alloc_globals_ctor(&alloc_globals TSRMLS_CC);
|
||||
#endif
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
/* FreeBSD floating point precision fix */
|
||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
/* FreeBSD and DragonFly floating point precision fix */
|
||||
fpsetmask(0);
|
||||
#endif
|
||||
|
||||
|
||||
+2
-2
@@ -22,7 +22,7 @@
|
||||
#ifndef ZEND_H
|
||||
#define ZEND_H
|
||||
|
||||
#define ZEND_VERSION "2.0.0RC3"
|
||||
#define ZEND_VERSION "2.0.1"
|
||||
|
||||
#define ZEND_ENGINE_2
|
||||
|
||||
@@ -91,7 +91,7 @@ const char *zend_mh_bundle_error(void);
|
||||
|
||||
#endif /* HAVE_MACH_O_DYLD_H */
|
||||
|
||||
#if defined(HAVE_LIBDL)
|
||||
#if defined(HAVE_LIBDL) && !defined(HAVE_MACH_O_DYLD_H)
|
||||
|
||||
# ifndef RTLD_LAZY
|
||||
# define RTLD_LAZY 1 /* Solaris 1, FreeBSD's (2.1.7.1 and older) */
|
||||
|
||||
@@ -167,6 +167,7 @@ ZEND_API int zend_parse_method_parameters_ex(int flags, int num_args TSRMLS_DC,
|
||||
ZEND_API int zend_register_functions(zend_class_entry *scope, zend_function_entry *functions, HashTable *function_table, int type TSRMLS_DC);
|
||||
ZEND_API void zend_unregister_functions(zend_function_entry *functions, int count, HashTable *function_table TSRMLS_DC);
|
||||
ZEND_API int zend_register_module(zend_module_entry *module_entry);
|
||||
ZEND_API int zend_register_module_ex(zend_module_entry *module TSRMLS_DC);
|
||||
|
||||
ZEND_API zend_class_entry *zend_register_internal_class(zend_class_entry *class_entry TSRMLS_DC);
|
||||
ZEND_API zend_class_entry *zend_register_internal_class_ex(zend_class_entry *class_entry, zend_class_entry *parent_ce, char *parent_name TSRMLS_DC);
|
||||
|
||||
+6
-3
@@ -75,7 +75,7 @@ static long mem_block_end_magic = MEM_BLOCK_END_MAGIC;
|
||||
#define _CHECK_MEMORY_LIMIT(s, rs, file, lineno) { AG(allocated_memory) += rs;\
|
||||
if (AG(memory_limit)<AG(allocated_memory)) {\
|
||||
int php_mem_limit = AG(memory_limit); \
|
||||
if (AG(memory_limit)+1048576 > AG(allocated_memory) - rs) { \
|
||||
if (EG(in_execution) && AG(memory_limit)+1048576 > AG(allocated_memory) - rs) { \
|
||||
AG(memory_limit) = AG(allocated_memory) + 1048576; \
|
||||
if (file) { \
|
||||
zend_error(E_ERROR,"Allowed memory size of %d bytes exhausted at %s:%d (tried to allocate %d bytes)", php_mem_limit, file, lineno, s); \
|
||||
@@ -496,10 +496,12 @@ ZEND_API void shutdown_memory_manager(int silent, int full_shutdown TSRMLS_DC)
|
||||
#endif /* !ZEND_DISABLE_MEMORY_CACHE */
|
||||
|
||||
#if defined(ZEND_MM) && !ZEND_DEBUG
|
||||
zend_mm_shutdown(&AG(mm_heap));
|
||||
if (full_shutdown) {
|
||||
zend_mm_shutdown(&AG(mm_heap));
|
||||
return;
|
||||
}
|
||||
zend_mm_startup(&AG(mm_heap), 256*1024);
|
||||
|
||||
#elif defined(ZEND_WIN32) && !ZEND_DEBUG
|
||||
if (full_shutdown && AG(memory_heap)) {
|
||||
HeapDestroy(AG(memory_heap));
|
||||
@@ -621,10 +623,11 @@ ZEND_API void shutdown_memory_manager(int silent, int full_shutdown TSRMLS_DC)
|
||||
#endif
|
||||
|
||||
#if defined(ZEND_MM) && ZEND_DEBUG
|
||||
zend_mm_shutdown(&AG(mm_heap));
|
||||
if (full_shutdown) {
|
||||
zend_mm_shutdown(&AG(mm_heap));
|
||||
return;
|
||||
}
|
||||
zend_mm_startup(&AG(mm_heap), 256*1024);
|
||||
#elif defined(ZEND_WIN32) && ZEND_DEBUG
|
||||
if (full_shutdown && AG(memory_heap)) {
|
||||
HeapDestroy(AG(memory_heap));
|
||||
|
||||
@@ -85,6 +85,10 @@ ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure ZEND_FILE_LIN
|
||||
ZEND_API char *_estrdup(const char *s ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC;
|
||||
ZEND_API char *_estrndup(const char *s, unsigned int length ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC;
|
||||
|
||||
#define USE_ZEND_ALLOC 1
|
||||
|
||||
#if USE_ZEND_ALLOC
|
||||
|
||||
/* Standard wrapper macros */
|
||||
#define emalloc(size) _emalloc((size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
|
||||
#define safe_emalloc(nmemb, size, offset) _safe_emalloc((nmemb), (size), (offset) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
|
||||
@@ -123,6 +127,52 @@ ZEND_API char *_estrndup(const char *s, unsigned int length ZEND_FILE_LINE_DC ZE
|
||||
#define safe_estrdup(ptr) ((ptr)?(estrdup(ptr)):(empty_string))
|
||||
#define safe_estrndup(ptr, len) ((ptr)?(estrndup((ptr), (len))):(empty_string))
|
||||
|
||||
#else
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#undef _GNU_SOURCE
|
||||
|
||||
/* Standard wrapper macros */
|
||||
#define emalloc(size) malloc(size)
|
||||
#define safe_emalloc(nmemb, size, offset) malloc((nmemb) * (size) + (offset))
|
||||
#define efree(ptr) free(ptr)
|
||||
#define ecalloc(nmemb, size) calloc((nmemb), (size))
|
||||
#define erealloc(ptr, size) realloc((ptr), (size))
|
||||
#define erealloc_recoverable(ptr, size) realloc((ptr), (size))
|
||||
#define estrdup(s) strdup(s)
|
||||
#define estrndup(s, length) strndup((s), (length))
|
||||
|
||||
/* Relay wrapper macros */
|
||||
#define emalloc_rel(size) malloc(size)
|
||||
#define safe_emalloc_rel(nmemb, size, offset) malloc((nmemb) * (size) + (offset))
|
||||
#define efree_rel(ptr) free(ptr)
|
||||
#define ecalloc_rel(nmemb, size) calloc((nmemb), (size))
|
||||
#define erealloc_rel(ptr, size) realloc((ptr), (size))
|
||||
#define erealloc_recoverable_rel(ptr, size) realloc((ptr), (size))
|
||||
#define estrdup_rel(s) strdup(s)
|
||||
#define estrndup_rel(s, length) strndup((s), (length))
|
||||
|
||||
/* Selective persistent/non persistent allocation macros */
|
||||
#define pemalloc(size, persistent) malloc(size)
|
||||
#define pefree(ptr, persistent) free(ptr)
|
||||
#define pecalloc(nmemb, size, persistent) calloc((nmemb), (size))
|
||||
#define perealloc(ptr, size, persistent) realloc((ptr), (size))
|
||||
#define perealloc_recoverable(ptr, size, persistent) realloc((ptr), (size))
|
||||
#define pestrdup(s, persistent) strdup(s)
|
||||
|
||||
#define pemalloc_rel(size, persistent) malloc(size)
|
||||
#define pefree_rel(ptr, persistent) free(ptr)
|
||||
#define pecalloc_rel(nmemb, size, persistent) calloc((nmemb), (size))
|
||||
#define perealloc_rel(ptr, size, persistent) realloc((ptr), (size))
|
||||
#define perealloc_recoverable_rel(ptr, size, persistent) realloc((ptr), (size))
|
||||
#define pestrdup_rel(s, persistent) strdup(s)
|
||||
|
||||
#define safe_estrdup(ptr) ((ptr)?(strdup(ptr)):(empty_string))
|
||||
#define safe_estrndup(ptr, len) ((ptr)?(strndup((ptr), (len))):(empty_string))
|
||||
|
||||
#endif
|
||||
|
||||
ZEND_API int zend_set_memory_limit(unsigned int memory_limit);
|
||||
|
||||
ZEND_API void start_memory_manager(TSRMLS_D);
|
||||
|
||||
@@ -661,7 +661,6 @@ ZEND_FUNCTION(get_class_vars)
|
||||
{
|
||||
zval **class_name;
|
||||
zend_class_entry *ce, **pce;
|
||||
zval *tmp;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &class_name)==FAILURE) {
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
@@ -674,11 +673,41 @@ ZEND_FUNCTION(get_class_vars)
|
||||
} else {
|
||||
ce = *pce;
|
||||
array_init(return_value);
|
||||
if (!ce->constants_updated) {
|
||||
zend_hash_apply_with_argument(&ce->default_properties, (apply_func_arg_t) zval_update_constant, (void *) 1 TSRMLS_CC);
|
||||
ce->constants_updated = 1;
|
||||
|
||||
if (zend_hash_num_elements(&ce->default_properties) > 0) {
|
||||
HashPosition pos;
|
||||
zval **prop;
|
||||
|
||||
zend_hash_internal_pointer_reset_ex(&ce->default_properties, &pos);
|
||||
while (zend_hash_get_current_data_ex(&ce->default_properties, (void **) &prop, &pos) == SUCCESS) {
|
||||
char *key, *class_name, *prop_name;
|
||||
uint key_len;
|
||||
ulong num_index;
|
||||
zval *prop_copy;
|
||||
|
||||
zend_hash_get_current_key_ex(&ce->default_properties, &key, &key_len, &num_index, 0, &pos);
|
||||
zend_hash_move_forward_ex(&ce->default_properties, &pos);
|
||||
zend_unmangle_property_name(key, &class_name, &prop_name);
|
||||
if (class_name && class_name[0] != '*' && strcmp(class_name, ce->name)) {
|
||||
/* filter privates from base classes */
|
||||
continue;
|
||||
}
|
||||
|
||||
/* copy: enforce read only access */
|
||||
ALLOC_ZVAL(prop_copy);
|
||||
*prop_copy = **prop;
|
||||
zval_copy_ctor(prop_copy);
|
||||
INIT_PZVAL(prop_copy);
|
||||
|
||||
/* this is necessary to make it able to work with default array
|
||||
* properties, returned to user */
|
||||
if (Z_TYPE_P(prop_copy) == IS_CONSTANT_ARRAY || Z_TYPE_P(prop_copy) == IS_CONSTANT) {
|
||||
zval_update_constant(&prop_copy, 0 TSRMLS_CC);
|
||||
}
|
||||
|
||||
add_assoc_zval(return_value, prop_name, prop_copy);
|
||||
}
|
||||
}
|
||||
zend_hash_copy(return_value->value.ht, &ce->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
@@ -805,7 +834,7 @@ ZEND_FUNCTION(class_exists)
|
||||
{
|
||||
char *class_name, *lc_name;
|
||||
zend_class_entry **ce;
|
||||
long class_name_len;
|
||||
int class_name_len;
|
||||
zend_bool autoload = 1;
|
||||
int found;
|
||||
|
||||
@@ -1484,6 +1513,7 @@ ZEND_FUNCTION(debug_print_backtrace)
|
||||
array_init(return_value);
|
||||
|
||||
while (ptr) {
|
||||
class_name = call_type = NULL;
|
||||
if (ptr->op_array) {
|
||||
filename = ptr->op_array->filename;
|
||||
lineno = ptr->opline->lineno;
|
||||
|
||||
+25
-8
@@ -1087,16 +1087,37 @@ void zend_do_handle_exception(TSRMLS_D)
|
||||
|
||||
void zend_do_end_function_declaration(znode *function_token TSRMLS_DC)
|
||||
{
|
||||
char lcname[16];
|
||||
int name_len;
|
||||
|
||||
zend_do_extended_info(TSRMLS_C);
|
||||
zend_do_return(NULL, 0 TSRMLS_CC);
|
||||
zend_do_handle_exception(TSRMLS_C);
|
||||
|
||||
pass_two(CG(active_op_array) TSRMLS_CC);
|
||||
|
||||
if (CG(active_class_entry)
|
||||
&& !strcmp(CG(active_op_array)->function_name, ZEND_CLONE_FUNC_NAME)
|
||||
&& CG(active_op_array)->num_args != 0) {
|
||||
zend_error(E_COMPILE_ERROR, "The clone method cannot accept any arguments");
|
||||
/* we don't care if the function name is longer, in fact lowercasing only
|
||||
* the beginning of the name speeds up the check process */
|
||||
name_len = strlen(CG(active_op_array)->function_name);
|
||||
zend_str_tolower_copy(lcname, CG(active_op_array)->function_name, MIN(name_len, sizeof(lcname)-1));
|
||||
lcname[sizeof(lcname)-1] = '\0'; // zend_str_tolower_copy won't necessarily set the zero byte
|
||||
|
||||
if (CG(active_class_entry)) {
|
||||
if (name_len == sizeof(ZEND_DESTRUCTOR_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_DESTRUCTOR_FUNC_NAME, sizeof(ZEND_DESTRUCTOR_FUNC_NAME)) && CG(active_op_array)->num_args != 0) {
|
||||
zend_error(E_COMPILE_ERROR, "Destuctor %s::%s() cannot take arguments", CG(active_class_entry)->name, ZEND_DESTRUCTOR_FUNC_NAME);
|
||||
} else if (name_len == sizeof(ZEND_CLONE_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_CLONE_FUNC_NAME, sizeof(ZEND_CLONE_FUNC_NAME)) && CG(active_op_array)->num_args != 0) {
|
||||
zend_error(E_COMPILE_ERROR, "Method %s::%s() cannot accept any arguments", CG(active_class_entry)->name, ZEND_CLONE_FUNC_NAME);
|
||||
} else if (name_len == sizeof(ZEND_GET_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_GET_FUNC_NAME, sizeof(ZEND_GET_FUNC_NAME)) && CG(active_op_array)->num_args != 1) {
|
||||
zend_error(E_COMPILE_ERROR, "Method %s::%s() must take exactly 1 argument", CG(active_class_entry)->name, ZEND_GET_FUNC_NAME);
|
||||
} else if (name_len == sizeof(ZEND_SET_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_SET_FUNC_NAME, sizeof(ZEND_SET_FUNC_NAME)) && CG(active_op_array)->num_args != 2) {
|
||||
zend_error(E_COMPILE_ERROR, "Method %s::%s() must take exactly 2 arguments", CG(active_class_entry)->name, ZEND_SET_FUNC_NAME);
|
||||
} else if (name_len == sizeof(ZEND_CALL_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_CALL_FUNC_NAME, sizeof(ZEND_CALL_FUNC_NAME)) && CG(active_op_array)->num_args != 2) {
|
||||
zend_error(E_COMPILE_ERROR, "Method %s::%s() must take exactly 2 arguments", CG(active_class_entry)->name, ZEND_CALL_FUNC_NAME);
|
||||
}
|
||||
} else {
|
||||
if (name_len == sizeof(ZEND_AUTOLOAD_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_AUTOLOAD_FUNC_NAME, sizeof(ZEND_AUTOLOAD_FUNC_NAME)) && CG(active_op_array)->num_args != 1) {
|
||||
zend_error(E_COMPILE_ERROR, "%s() must take exactly 1 argument", ZEND_AUTOLOAD_FUNC_NAME);
|
||||
}
|
||||
}
|
||||
|
||||
CG(active_op_array)->line_end = zend_get_compiled_lineno(TSRMLS_C);
|
||||
@@ -1114,10 +1135,6 @@ void zend_do_receive_arg(zend_uchar op, znode *var, znode *offset, znode *initia
|
||||
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
|
||||
zend_arg_info *cur_arg_info;
|
||||
|
||||
if (CG(active_class_entry) && CG(active_class_entry)->destructor == (zend_function *) CG(active_op_array))
|
||||
{
|
||||
zend_error(E_COMPILE_ERROR, "Destuctor %s::%s() cannot take arguments", CG(active_class_entry)->name, CG(active_op_array)->function_name);
|
||||
}
|
||||
CG(active_op_array)->num_args++;
|
||||
opline->opcode = op;
|
||||
opline->result = *var;
|
||||
|
||||
@@ -840,6 +840,7 @@ END_EXTERN_C()
|
||||
#define ZEND_GET_FUNC_NAME "__get"
|
||||
#define ZEND_SET_FUNC_NAME "__set"
|
||||
#define ZEND_CALL_FUNC_NAME "__call"
|
||||
#define ZEND_AUTOLOAD_FUNC_NAME "__autoload"
|
||||
|
||||
#endif /* ZEND_COMPILE_H */
|
||||
|
||||
|
||||
+10
-13
@@ -231,10 +231,8 @@ ZEND_API int zend_get_constant(char *name, uint name_len, zval *result TSRMLS_DC
|
||||
scope = CG(active_class_entry);
|
||||
}
|
||||
|
||||
class_name = do_alloca(class_name_len+1);
|
||||
memcpy(class_name, name, class_name_len);
|
||||
class_name[class_name_len] = '\0';
|
||||
|
||||
class_name = estrndup(name, class_name_len);
|
||||
|
||||
if (class_name_len == sizeof("self")-1 && strcmp(class_name, "self") == 0) {
|
||||
if (scope) {
|
||||
ce = &scope;
|
||||
@@ -255,7 +253,7 @@ ZEND_API int zend_get_constant(char *name, uint name_len, zval *result TSRMLS_DC
|
||||
retval = 0;
|
||||
}
|
||||
}
|
||||
free_alloca(class_name);
|
||||
efree(class_name);
|
||||
|
||||
if (retval && ce) {
|
||||
if (zend_hash_find(&((*ce)->constants_table), constant_name, const_name_len+1, (void **) &ret_constant) != SUCCESS) {
|
||||
@@ -275,9 +273,8 @@ ZEND_API int zend_get_constant(char *name, uint name_len, zval *result TSRMLS_DC
|
||||
}
|
||||
|
||||
if (zend_hash_find(EG(zend_constants), name, name_len+1, (void **) &c) == FAILURE) {
|
||||
lookup_name = do_alloca(name_len+1);
|
||||
zend_str_tolower_copy(lookup_name, name, name_len);
|
||||
lookup_name[name_len] = '\0';
|
||||
lookup_name = estrndup(name, name_len);
|
||||
zend_str_tolower(lookup_name, name_len);
|
||||
|
||||
if (zend_hash_find(EG(zend_constants), lookup_name, name_len+1, (void **) &c)==SUCCESS) {
|
||||
if ((c->flags & CONST_CS) && memcmp(c->name, name, name_len)!=0) {
|
||||
@@ -286,7 +283,7 @@ ZEND_API int zend_get_constant(char *name, uint name_len, zval *result TSRMLS_DC
|
||||
} else {
|
||||
retval=0;
|
||||
}
|
||||
free_alloca(lookup_name);
|
||||
efree(lookup_name);
|
||||
}
|
||||
|
||||
if (retval) {
|
||||
@@ -312,23 +309,23 @@ ZEND_API int zend_register_constant(zend_constant *c TSRMLS_DC)
|
||||
|
||||
if (!(c->flags & CONST_CS)) {
|
||||
/* keep in mind that c->name_len already contains the '\0' */
|
||||
lowercase_name = do_alloca(c->name_len);
|
||||
zend_str_tolower_copy(lowercase_name, c->name, c->name_len - 1);
|
||||
lowercase_name = estrndup(c->name, c->name_len);
|
||||
zend_str_tolower(lowercase_name, c->name_len);
|
||||
name = lowercase_name;
|
||||
} else {
|
||||
name = c->name;
|
||||
}
|
||||
|
||||
if (zend_hash_add(EG(zend_constants), name, c->name_len, (void *) c, sizeof(zend_constant), NULL)==FAILURE) {
|
||||
zend_error(E_NOTICE,"Constant %s already defined", name);
|
||||
free(c->name);
|
||||
if (!(c->flags & CONST_PERSISTENT)) {
|
||||
zval_dtor(&c->value);
|
||||
}
|
||||
zend_error(E_NOTICE,"Constant %s already defined", name);
|
||||
ret = FAILURE;
|
||||
}
|
||||
if (lowercase_name) {
|
||||
free_alloca(lowercase_name);
|
||||
efree(lowercase_name);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ typedef struct _dynamic_array {
|
||||
} dynamic_array;
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
ZEND_API int zend_dynamic_array_init(dynamic_array *da);
|
||||
ZEND_API int zend_dynamic_array_init(dynamic_array *da, unsigned int element_size, unsigned int size);
|
||||
ZEND_API void *zend_dynamic_array_push(dynamic_array *da);
|
||||
ZEND_API void *zend_dynamic_array_pop(dynamic_array *da);
|
||||
ZEND_API void *zend_dynamic_array_get_element(dynamic_array *da, unsigned int index);
|
||||
|
||||
+25
-15
@@ -52,6 +52,7 @@ static void zend_extension_fcall_end_handler(zend_extension *extension, zend_op_
|
||||
#define EX_T(offset) (*(temp_variable *)((char *) EX(Ts) + offset))
|
||||
#define T(offset) (*(temp_variable *)((char *) Ts + offset))
|
||||
|
||||
#define TEMP_VAR_STACK_LIMIT 2000
|
||||
|
||||
/* former zend_execute_locks.h */
|
||||
static inline void zend_pzval_lock_func(zval *z)
|
||||
@@ -839,8 +840,10 @@ fetch_string_dim:
|
||||
}
|
||||
}
|
||||
break;
|
||||
case IS_DOUBLE:
|
||||
case IS_RESOURCE:
|
||||
zend_error(E_STRICT, "Resource ID#%ld used as offset, casting to integer (%ld)", dim->value.lval, dim->value.lval);
|
||||
/* Fall Through */
|
||||
case IS_DOUBLE:
|
||||
case IS_BOOL:
|
||||
case IS_LONG: {
|
||||
long index;
|
||||
@@ -1328,7 +1331,11 @@ static int zend_check_symbol(zval **pz TSRMLS_DC)
|
||||
}
|
||||
|
||||
#define RETURN_FROM_EXECUTE_LOOP(execute_data) \
|
||||
free_alloca(EX(Ts)); \
|
||||
if (EX(op_array)->T < TEMP_VAR_STACK_LIMIT) { \
|
||||
free_alloca(EX(Ts)); \
|
||||
} else { \
|
||||
efree(EX(Ts)); \
|
||||
} \
|
||||
EG(in_execution) = EX(original_in_execution); \
|
||||
EG(current_execute_data) = EX(prev_execute_data); \
|
||||
return 1; /* CHECK_ME */
|
||||
@@ -1347,7 +1354,11 @@ ZEND_API void execute(zend_op_array *op_array TSRMLS_DC)
|
||||
/* Initialize execute_data */
|
||||
EX(fbc) = NULL;
|
||||
EX(object) = NULL;
|
||||
EX(Ts) = (temp_variable *) do_alloca(sizeof(temp_variable)*op_array->T);
|
||||
if (op_array->T < TEMP_VAR_STACK_LIMIT) {
|
||||
EX(Ts) = (temp_variable *) do_alloca(sizeof(temp_variable) * op_array->T);
|
||||
} else {
|
||||
EX(Ts) = (temp_variable *) safe_emalloc(sizeof(temp_variable), op_array->T, 0);
|
||||
}
|
||||
EX(op_array) = op_array;
|
||||
EX(original_in_execution) = EG(in_execution);
|
||||
EX(prev_execute_data) = EG(current_execute_data);
|
||||
@@ -2775,6 +2786,9 @@ int zend_do_fcall_common_helper(ZEND_OPCODE_HANDLER_ARGS)
|
||||
if (EG(This)) {
|
||||
if (EG(exception) && EX(fbc) && EX(fbc)->common.fn_flags&ZEND_ACC_CTOR) {
|
||||
EG(This)->refcount--;
|
||||
if (EG(This)->refcount == 1) {
|
||||
zend_object_store_ctor_failed(EG(This) TSRMLS_CC);
|
||||
}
|
||||
zval_ptr_dtor(&EG(This));
|
||||
} else if (should_change_scope) {
|
||||
zval_ptr_dtor(&EG(This));
|
||||
@@ -2927,21 +2941,16 @@ int zend_catch_handler(ZEND_OPCODE_HANDLER_ARGS)
|
||||
}
|
||||
ce = Z_OBJCE_P(EG(exception));
|
||||
if (ce != EX_T(opline->op1.u.var).class_entry) {
|
||||
while (ce->parent) {
|
||||
if (ce->parent == EX_T(opline->op1.u.var).class_entry) {
|
||||
goto exception_should_be_taken;
|
||||
if (!instanceof_function(ce, EX_T(opline->op1.u.var).class_entry TSRMLS_CC)) {
|
||||
if (opline->op1.u.EA.type) {
|
||||
zend_throw_exception_internal(NULL TSRMLS_CC);
|
||||
NEXT_OPCODE();
|
||||
}
|
||||
ce = ce->parent;
|
||||
SET_OPCODE(&op_array->opcodes[opline->extended_value]);
|
||||
return 0; /* CHECK_ME */
|
||||
}
|
||||
if (opline->op1.u.EA.type) {
|
||||
zend_throw_exception_internal(NULL TSRMLS_CC);
|
||||
NEXT_OPCODE();
|
||||
}
|
||||
SET_OPCODE(&op_array->opcodes[opline->extended_value]);
|
||||
return 0; /* CHECK_ME */
|
||||
}
|
||||
|
||||
exception_should_be_taken:
|
||||
zend_hash_update(EG(active_symbol_table), opline->op2.u.constant.value.str.val,
|
||||
opline->op2.u.constant.value.str.len+1, &EG(exception), sizeof(zval *), (void **) NULL);
|
||||
EG(exception) = NULL;
|
||||
@@ -3402,6 +3411,7 @@ static inline int zend_init_add_array_helper(ZEND_OPCODE_HANDLER_ARGS)
|
||||
zend_hash_update(array_ptr->value.ht, "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
|
||||
break;
|
||||
default:
|
||||
zend_error(E_WARNING, "Illegal offset type");
|
||||
zval_ptr_dtor(&expr_ptr);
|
||||
/* do nothing */
|
||||
break;
|
||||
@@ -3659,7 +3669,7 @@ int zend_unset_dim_obj_handler(ZEND_OPCODE_HANDLER_ARGS)
|
||||
case IS_BOOL:
|
||||
case IS_LONG:
|
||||
if (offset->type == IS_DOUBLE) {
|
||||
index = (long) offset->value.lval;
|
||||
index = (long) offset->value.dval;
|
||||
} else {
|
||||
index = offset->value.lval;
|
||||
}
|
||||
|
||||
@@ -911,7 +911,7 @@ ZEND_API int zend_lookup_class(char *name, int name_length, zend_class_entry ***
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
ZVAL_STRINGL(&autoload_function, "__autoload", sizeof("__autoload")-1, 0);
|
||||
ZVAL_STRINGL(&autoload_function, ZEND_AUTOLOAD_FUNC_NAME, sizeof(ZEND_AUTOLOAD_FUNC_NAME)-1, 0);
|
||||
|
||||
INIT_PZVAL(class_name_ptr);
|
||||
ZVAL_STRINGL(class_name_ptr, name, name_length, 0);
|
||||
@@ -932,7 +932,7 @@ ZEND_API int zend_lookup_class(char *name, int name_length, zend_class_entry ***
|
||||
|
||||
if (EG(exception)) {
|
||||
free_alloca(lc_name);
|
||||
zend_error(E_ERROR, "__autoload(%s) threw an exception of type '%s'", name, Z_OBJCE_P(EG(exception))->name);
|
||||
zend_error(E_ERROR, "Function %s(%s) threw an exception of type '%s'", ZEND_AUTOLOAD_FUNC_NAME, name, Z_OBJCE_P(EG(exception))->name);
|
||||
return FAILURE;
|
||||
}
|
||||
EG(exception) = exception;
|
||||
|
||||
+17
-11
@@ -137,6 +137,7 @@ ZEND_API ulong zend_hash_func(char *arKey, uint nKeyLength)
|
||||
ZEND_API int _zend_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent ZEND_FILE_LINE_DC)
|
||||
{
|
||||
uint i = 3;
|
||||
Bucket **tmp;
|
||||
|
||||
SET_INCONSISTENT(HT_OK);
|
||||
|
||||
@@ -146,18 +147,8 @@ ZEND_API int _zend_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunctio
|
||||
|
||||
ht->nTableSize = 1 << i;
|
||||
ht->nTableMask = ht->nTableSize - 1;
|
||||
|
||||
/* Uses ecalloc() so that Bucket* == NULL */
|
||||
if (persistent) {
|
||||
ht->arBuckets = (Bucket **) calloc(ht->nTableSize, sizeof(Bucket *));
|
||||
if (!ht->arBuckets) {
|
||||
return FAILURE;
|
||||
}
|
||||
} else {
|
||||
ht->arBuckets = (Bucket **) ecalloc_rel(ht->nTableSize, sizeof(Bucket *));
|
||||
}
|
||||
|
||||
ht->pDestructor = pDestructor;
|
||||
ht->arBuckets = NULL;
|
||||
ht->pListHead = NULL;
|
||||
ht->pListTail = NULL;
|
||||
ht->nNumOfElements = 0;
|
||||
@@ -166,6 +157,21 @@ ZEND_API int _zend_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunctio
|
||||
ht->persistent = persistent;
|
||||
ht->nApplyCount = 0;
|
||||
ht->bApplyProtection = 1;
|
||||
|
||||
/* Uses ecalloc() so that Bucket* == NULL */
|
||||
if (persistent) {
|
||||
tmp = (Bucket **) calloc(ht->nTableSize, sizeof(Bucket *));
|
||||
if (!tmp) {
|
||||
return FAILURE;
|
||||
}
|
||||
ht->arBuckets = tmp;
|
||||
} else {
|
||||
tmp = (Bucket **) ecalloc_rel(ht->nTableSize, sizeof(Bucket *));
|
||||
if (tmp) {
|
||||
ht->arBuckets = tmp;
|
||||
}
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
+10
-4
@@ -159,6 +159,12 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
|
||||
switch (token_type) {
|
||||
case T_END_HEREDOC:
|
||||
zend_html_puts(token.value.str.val, token.value.str.len TSRMLS_CC);
|
||||
{
|
||||
char *ptr = LANG_SCNG(yy_text);
|
||||
if (ptr[LANG_SCNG(yy_leng) - 1] != ';') {
|
||||
zend_html_putc('\n');
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
zend_html_puts(LANG_SCNG(yy_text), LANG_SCNG(yy_leng) TSRMLS_CC);
|
||||
@@ -203,7 +209,7 @@ ZEND_API void zend_strip(TSRMLS_D)
|
||||
switch (token_type) {
|
||||
case T_WHITESPACE:
|
||||
if (!prev_space) {
|
||||
putchar(' ');
|
||||
zend_write(" ", sizeof(" ") - 1);
|
||||
prev_space = 1;
|
||||
}
|
||||
/* lack of break; is intentional */
|
||||
@@ -215,9 +221,9 @@ ZEND_API void zend_strip(TSRMLS_D)
|
||||
case T_END_HEREDOC: {
|
||||
char *ptr = LANG_SCNG(yy_text);
|
||||
|
||||
fwrite(ptr, LANG_SCNG(yy_leng) - 1, 1, stdout);
|
||||
zend_write(ptr, LANG_SCNG(yy_leng) - 1);
|
||||
/* The ensure that we only write one ; and that it followed by the required newline */
|
||||
putchar('\n');
|
||||
zend_write("\n", sizeof("\n") - 1);
|
||||
if (ptr[LANG_SCNG(yy_leng) - 1] == ';') {
|
||||
lex_scan(&token TSRMLS_CC);
|
||||
}
|
||||
@@ -226,7 +232,7 @@ ZEND_API void zend_strip(TSRMLS_D)
|
||||
break;
|
||||
|
||||
default:
|
||||
fwrite(LANG_SCNG(yy_text), LANG_SCNG(yy_leng), 1, stdout);
|
||||
zend_write(LANG_SCNG(yy_text), LANG_SCNG(yy_leng));
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
+16
-1
@@ -147,10 +147,25 @@ 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;
|
||||
HashTable *directives = registered_zend_ini_directives;
|
||||
|
||||
#ifdef ZTS
|
||||
/* if we are called during the request, eg: from dl(),
|
||||
* then we should not touch the global directives table,
|
||||
* and should update the per-(request|thread) version instead.
|
||||
* This solves two problems: one is that ini entries for dl()'d
|
||||
* extensions will now work, and the second is that updating the
|
||||
* global hash here from dl() is not mutex protected and can
|
||||
* lead to death.
|
||||
*/
|
||||
if (directives != EG(ini_directives)) {
|
||||
directives = EG(ini_directives);
|
||||
}
|
||||
#endif
|
||||
|
||||
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(directives, p->name, p->name_length, p, sizeof(zend_ini_entry), (void **) &hashed_ini_entry)==FAILURE) {
|
||||
zend_unregister_ini_entries(module_number TSRMLS_CC);
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
+1
-1
@@ -192,7 +192,7 @@ END_EXTERN_C()
|
||||
/* INI parsing engine */
|
||||
typedef void (*zend_ini_parser_cb_t)(zval *arg1, zval *arg2, int callback_type, void *arg);
|
||||
BEGIN_EXTERN_C()
|
||||
int zend_parse_ini_file(zend_file_handle *fh, zend_bool unbuffered_errors, zend_ini_parser_cb_t ini_parser_cb, void *arg);
|
||||
ZEND_API int zend_parse_ini_file(zend_file_handle *fh, zend_bool unbuffered_errors, zend_ini_parser_cb_t ini_parser_cb, void *arg);
|
||||
END_EXTERN_C()
|
||||
|
||||
#define ZEND_INI_PARSER_ENTRY 1
|
||||
|
||||
@@ -139,7 +139,7 @@ static void ini_error(char *str)
|
||||
}
|
||||
|
||||
|
||||
int zend_parse_ini_file(zend_file_handle *fh, zend_bool unbuffered_errors, zend_ini_parser_cb_t ini_parser_cb, void *arg)
|
||||
ZEND_API int zend_parse_ini_file(zend_file_handle *fh, zend_bool unbuffered_errors, zend_ini_parser_cb_t ini_parser_cb, void *arg)
|
||||
{
|
||||
int retval;
|
||||
zend_ini_parser_param ini_parser_param;
|
||||
|
||||
@@ -1445,7 +1445,7 @@ NEWLINE ("\r"|"\n"|"\r\n")
|
||||
}
|
||||
}
|
||||
|
||||
<ST_IN_SCRIPTING>"/**"{NEWLINE} {
|
||||
<ST_IN_SCRIPTING>"/**"{WHITESPACE} {
|
||||
CG(comment_start_line) = CG(zend_lineno);
|
||||
BEGIN(ST_DOC_COMMENT);
|
||||
yymore();
|
||||
|
||||
+2
-1
@@ -31,7 +31,8 @@
|
||||
#ifdef ZEND_WIN32
|
||||
#undef ZEND_MM
|
||||
#else
|
||||
#define ZEND_MM
|
||||
/* #define ZEND_MM */
|
||||
#undef ZEND_MM
|
||||
#endif
|
||||
|
||||
/* mm block type */
|
||||
|
||||
@@ -381,7 +381,14 @@ zval *zend_std_read_dimension(zval *object, zval *offset, int type TSRMLS_DC)
|
||||
zval *retval;
|
||||
|
||||
if (instanceof_function_ex(ce, zend_ce_arrayaccess, 1 TSRMLS_CC)) {
|
||||
if(offset == NULL) {
|
||||
/* [] construct */
|
||||
zval offset_null;
|
||||
INIT_ZVAL(offset_null);
|
||||
offset = &offset_null;
|
||||
}
|
||||
zend_call_method_with_1_params(&object, ce, NULL, "offsetget", &retval, offset);
|
||||
|
||||
if (!retval) {
|
||||
if (!EG(exception)) {
|
||||
zend_error(E_ERROR, "Undefined offset for object of type %s used as array", ce->name);
|
||||
|
||||
@@ -207,6 +207,15 @@ ZEND_API void zend_object_store_set_object(zval *zobject, void *object TSRMLS_DC
|
||||
}
|
||||
|
||||
|
||||
/* Called when the ctor was terminated by an exception */
|
||||
ZEND_API void zend_object_store_ctor_failed(zval *zobject TSRMLS_DC)
|
||||
{
|
||||
zend_object_handle handle = Z_OBJ_HANDLE_P(zobject);
|
||||
|
||||
EG(objects_store).object_buckets[handle].destructor_called = 1;
|
||||
}
|
||||
|
||||
|
||||
/* Proxy objects workings */
|
||||
typedef struct _zend_proxy_object {
|
||||
zval *object;
|
||||
|
||||
@@ -68,6 +68,7 @@ ZEND_API zend_object_value zend_objects_store_clone_obj(zval *object TSRMLS_DC);
|
||||
ZEND_API void *zend_object_store_get_object(zval *object TSRMLS_DC);
|
||||
/* See comment in zend_objects_API.c before you use this */
|
||||
ZEND_API void zend_object_store_set_object(zval *zobject, void *object TSRMLS_DC);
|
||||
ZEND_API void zend_object_store_ctor_failed(zval *zobject TSRMLS_DC);
|
||||
|
||||
ZEND_API void zend_objects_store_free_object_storage(zend_objects_store *objects TSRMLS_DC);
|
||||
|
||||
|
||||
@@ -87,6 +87,8 @@ static inline zend_bool is_numeric_string(char *str, int length, long *lval, dou
|
||||
*lval = local_lval;
|
||||
}
|
||||
return IS_LONG;
|
||||
} else if (end_ptr_long == str && *end_ptr_long != '\0') { /* ignore partial string matches */
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
end_ptr_long=NULL;
|
||||
|
||||
+135
-120
@@ -185,6 +185,7 @@ static void reflection_free_objects_storage(zend_object *object TSRMLS_DC)
|
||||
|
||||
if (intern->free_ptr && intern->ptr) {
|
||||
efree(intern->ptr);
|
||||
intern->ptr = NULL;
|
||||
}
|
||||
if (intern->obj) {
|
||||
zval_ptr_dtor(&intern->obj);
|
||||
@@ -221,6 +222,7 @@ static zend_object_value reflection_objects_new(zend_class_entry *class_type TSR
|
||||
intern->zo.in_set = 0;
|
||||
intern->ptr = NULL;
|
||||
intern->obj = NULL;
|
||||
intern->free_ptr = 0;
|
||||
|
||||
ALLOC_HASHTABLE(intern->zo.properties);
|
||||
zend_hash_init(intern->zo.properties, 0, NULL, ZVAL_PTR_DTOR, 0);
|
||||
@@ -241,6 +243,7 @@ static zval * reflection_instanciate(zend_class_entry *pce, zval *object TSRMLS_
|
||||
return object;
|
||||
}
|
||||
|
||||
static void _const_string(string *str, char *name, zval *value, char *indent TSRMLS_DC);
|
||||
static void _function_string(string *str, zend_function *fptr, char *indent TSRMLS_DC);
|
||||
static void _property_string(string *str, zend_property_info *prop, char *prop_name, char* indent TSRMLS_DC);
|
||||
static void _class_string(string *str, zend_class_entry *ce, zval *obj, char *indent TSRMLS_DC);
|
||||
@@ -322,11 +325,8 @@ static void _class_string(string *str, zend_class_entry *ce, zval *obj, char *in
|
||||
|
||||
while (zend_hash_get_current_data_ex(&ce->constants_table, (void **) &value, &pos) == SUCCESS) {
|
||||
zend_hash_get_current_key_ex(&ce->constants_table, &key, &key_len, &num_index, 0, &pos);
|
||||
|
||||
string_printf(str, "%s Constant [ %s %s ] { }\n",
|
||||
indent,
|
||||
zend_zval_type_name(*value),
|
||||
key);
|
||||
|
||||
_const_string(str, key, *value, indent TSRMLS_CC);
|
||||
zend_hash_move_forward_ex(&ce->constants_table, &pos);
|
||||
}
|
||||
}
|
||||
@@ -490,6 +490,16 @@ static void _class_string(string *str, zend_class_entry *ce, zval *obj, char *in
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ _const_string */
|
||||
static void _const_string(string *str, char *name, zval *value, char *indent TSRMLS_DC)
|
||||
{
|
||||
string_printf(str, "%s Constant [ %s %s ] { }\n",
|
||||
indent,
|
||||
zend_zval_type_name(value),
|
||||
name);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ _parameter_string */
|
||||
static void _parameter_string(string *str, struct _zend_arg_info *arg_info, int offset, char* indent TSRMLS_DC)
|
||||
{
|
||||
@@ -848,7 +858,7 @@ static void reflection_function_factory(zend_function *function, zval *object TS
|
||||
reflection_instanciate(reflection_function_ptr, object TSRMLS_CC);
|
||||
intern = (reflection_object *) zend_object_store_get_object(object TSRMLS_CC);
|
||||
intern->ptr = function;
|
||||
intern->free_ptr = function != NULL;
|
||||
intern->free_ptr = 0;
|
||||
zend_hash_update(Z_OBJPROP_P(object), "name", sizeof("name"), (void **) &name, sizeof(zval *), NULL);
|
||||
}
|
||||
/* }}} */
|
||||
@@ -1099,7 +1109,7 @@ ZEND_METHOD(reflection, getModifierNames)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public static mixed Reflection_Function::export(string name, [, bool return]) throws Reflection_Exception
|
||||
/* {{{ proto public static mixed ReflectionFunction::export(string name, [, bool return]) throws ReflectionException
|
||||
Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */
|
||||
ZEND_METHOD(reflection_function, export)
|
||||
{
|
||||
@@ -1107,7 +1117,7 @@ ZEND_METHOD(reflection_function, export)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public Reflection_Function::__construct(string name)
|
||||
/* {{{ proto public ReflectionFunction::__construct(string name)
|
||||
Constructor. Throws an Exception in case the given function does not exist */
|
||||
ZEND_METHOD(reflection_function, __construct)
|
||||
{
|
||||
@@ -1145,7 +1155,7 @@ ZEND_METHOD(reflection_function, __construct)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public string Reflection_Function::__toString()
|
||||
/* {{{ proto public string ReflectionFunction::__toString()
|
||||
Returns a string representation */
|
||||
ZEND_METHOD(reflection_function, __toString)
|
||||
{
|
||||
@@ -1161,7 +1171,7 @@ ZEND_METHOD(reflection_function, __toString)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public string Reflection_Function::getName()
|
||||
/* {{{ proto public string ReflectionFunction::getName()
|
||||
Returns this function's name */
|
||||
ZEND_METHOD(reflection, function_getName)
|
||||
{
|
||||
@@ -1170,7 +1180,7 @@ ZEND_METHOD(reflection, function_getName)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public bool Reflection_Function::isInternal()
|
||||
/* {{{ proto public bool ReflectionFunction::isInternal()
|
||||
Returns whether this is an internal function */
|
||||
ZEND_METHOD(reflection, function_isInternal)
|
||||
{
|
||||
@@ -1183,7 +1193,7 @@ ZEND_METHOD(reflection, function_isInternal)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public bool Reflection_Function::isUserDefined()
|
||||
/* {{{ proto public bool ReflectionFunction::isUserDefined()
|
||||
Returns whether this is an user-defined function */
|
||||
ZEND_METHOD(reflection_function, isUserDefined)
|
||||
{
|
||||
@@ -1196,7 +1206,7 @@ ZEND_METHOD(reflection_function, isUserDefined)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public string Reflection_Function::getFileName()
|
||||
/* {{{ proto public string ReflectionFunction::getFileName()
|
||||
Returns the filename of the file this function was declared in */
|
||||
ZEND_METHOD(reflection_function, getFileName)
|
||||
{
|
||||
@@ -1212,7 +1222,7 @@ ZEND_METHOD(reflection_function, getFileName)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public int Reflection_Function::getStartLine()
|
||||
/* {{{ proto public int ReflectionFunction::getStartLine()
|
||||
Returns the line this function's declaration starts at */
|
||||
ZEND_METHOD(reflection_function, getStartLine)
|
||||
{
|
||||
@@ -1228,7 +1238,7 @@ ZEND_METHOD(reflection_function, getStartLine)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public int Reflection_Function::getEndLine()
|
||||
/* {{{ proto public int ReflectionFunction::getEndLine()
|
||||
Returns the line this function's declaration ends at */
|
||||
ZEND_METHOD(reflection_function, getEndLine)
|
||||
{
|
||||
@@ -1244,7 +1254,7 @@ ZEND_METHOD(reflection_function, getEndLine)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public string Reflection_Function::getDocComment()
|
||||
/* {{{ proto public string ReflectionFunction::getDocComment()
|
||||
Returns the doc comment for this function */
|
||||
ZEND_METHOD(reflection_function, getDocComment)
|
||||
{
|
||||
@@ -1260,7 +1270,7 @@ ZEND_METHOD(reflection_function, getDocComment)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public array Reflection_Function::getStaticVariables()
|
||||
/* {{{ proto public array ReflectionFunction::getStaticVariables()
|
||||
Returns an associative array containing this function's static variables and their values */
|
||||
ZEND_METHOD(reflection_function, getStaticVariables)
|
||||
{
|
||||
@@ -1279,7 +1289,7 @@ ZEND_METHOD(reflection_function, getStaticVariables)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public mixed Reflection_Function::invoke(mixed* args)
|
||||
/* {{{ proto public mixed ReflectionFunction::invoke(mixed* args)
|
||||
Invokes the function */
|
||||
ZEND_METHOD(reflection_function, invoke)
|
||||
{
|
||||
@@ -1332,7 +1342,7 @@ ZEND_METHOD(reflection_function, invoke)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public bool Reflection_Function::returnsReference()
|
||||
/* {{{ proto public bool ReflectionFunction::returnsReference()
|
||||
Gets whether this function returns a reference */
|
||||
ZEND_METHOD(reflection_function, returnsReference)
|
||||
{
|
||||
@@ -1346,7 +1356,7 @@ ZEND_METHOD(reflection_function, returnsReference)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public Reflection_Parameter[] Reflection_Function::getParameters()
|
||||
/* {{{ proto public ReflectionParameter[] Reflection_Function::getParameters()
|
||||
Returns an array of parameter objects for this function */
|
||||
ZEND_METHOD(reflection_function, getParameters)
|
||||
{
|
||||
@@ -1373,7 +1383,7 @@ ZEND_METHOD(reflection_function, getParameters)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public static mixed Reflection_Parameter::export(mixed function, mixed parameter, [, bool return]) throws Reflection_Exception
|
||||
/* {{{ proto public static mixed ReflectionParameter::export(mixed function, mixed parameter, [, bool return]) throws ReflectionException
|
||||
Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */
|
||||
ZEND_METHOD(reflection_parameter, export)
|
||||
{
|
||||
@@ -1381,7 +1391,7 @@ ZEND_METHOD(reflection_parameter, export)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public Reflection_Parameter::__construct(mixed function, mixed parameter)
|
||||
/* {{{ proto public ReflectionParameter::__construct(mixed function, mixed parameter)
|
||||
Constructor. Throws an Exception in case the given method does not exist */
|
||||
ZEND_METHOD(reflection_parameter, __construct)
|
||||
{
|
||||
@@ -1506,7 +1516,7 @@ ZEND_METHOD(reflection_parameter, __construct)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public string Reflection_Parameter::__toString()
|
||||
/* {{{ proto public string ReflectionParameter::__toString()
|
||||
Returns a string representation */
|
||||
ZEND_METHOD(reflection_parameter, __toString)
|
||||
{
|
||||
@@ -1522,7 +1532,7 @@ ZEND_METHOD(reflection_parameter, __toString)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public string Reflection_Parameter::getName()
|
||||
/* {{{ proto public string ReflectionParameter::getName()
|
||||
Returns this parameters's name */
|
||||
ZEND_METHOD(reflection_parameter, getName)
|
||||
{
|
||||
@@ -1531,7 +1541,7 @@ ZEND_METHOD(reflection_parameter, getName)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public Reflection_Class Reflection_Parameter::getClass()
|
||||
/* {{{ proto public ReflectionClass ReflectionParameter::getClass()
|
||||
Returns this parameters's class hint or NULL if there is none */
|
||||
ZEND_METHOD(reflection_parameter, getClass)
|
||||
{
|
||||
@@ -1559,7 +1569,7 @@ ZEND_METHOD(reflection_parameter, getClass)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public bool Reflection_Parameter::allowsNull()
|
||||
/* {{{ proto public bool ReflectionParameter::allowsNull()
|
||||
Returns whether NULL is allowed as this parameters's value */
|
||||
ZEND_METHOD(reflection_parameter, allowsNull)
|
||||
{
|
||||
@@ -1573,7 +1583,7 @@ ZEND_METHOD(reflection_parameter, allowsNull)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public bool Reflection_Parameter::isPassedByReference()
|
||||
/* {{{ proto public bool ReflectionParameter::isPassedByReference()
|
||||
Returns whether this parameters is passed to by reference */
|
||||
ZEND_METHOD(reflection_parameter, isPassedByReference)
|
||||
{
|
||||
@@ -1587,7 +1597,7 @@ ZEND_METHOD(reflection_parameter, isPassedByReference)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public static mixed Reflection_Method::export(mixed class, string name, [, bool return]) throws Reflection_Exception
|
||||
/* {{{ proto public static mixed ReflectionMethod::export(mixed class, string name, [, bool return]) throws ReflectionException
|
||||
Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */
|
||||
ZEND_METHOD(reflection_method, export)
|
||||
{
|
||||
@@ -1595,7 +1605,7 @@ ZEND_METHOD(reflection_method, export)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public Reflection_Method::__construct(mixed class, string name)
|
||||
/* {{{ proto public ReflectionMethod::__construct(mixed class, string name)
|
||||
Constructor. Throws an Exception in case the given method does not exist */
|
||||
ZEND_METHOD(reflection_method, __construct)
|
||||
{
|
||||
@@ -1662,7 +1672,7 @@ ZEND_METHOD(reflection_method, __construct)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public string Reflection_Method::__toString()
|
||||
/* {{{ proto public string ReflectionMethod::__toString()
|
||||
Returns a string representation */
|
||||
ZEND_METHOD(reflection_method, __toString)
|
||||
{
|
||||
@@ -1678,7 +1688,7 @@ ZEND_METHOD(reflection_method, __toString)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public mixed Reflection_Method::invoke(mixed object, mixed* args)
|
||||
/* {{{ proto public mixed ReflectionMethod::invoke(mixed object, mixed* args)
|
||||
Invokes the function. Pass a */
|
||||
ZEND_METHOD(reflection_method, invoke)
|
||||
{
|
||||
@@ -1781,7 +1791,7 @@ ZEND_METHOD(reflection_method, invoke)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public bool Reflection_Method::isFinal()
|
||||
/* {{{ proto public bool ReflectionMethod::isFinal()
|
||||
Returns whether this method is final */
|
||||
ZEND_METHOD(reflection_method, isFinal)
|
||||
{
|
||||
@@ -1789,7 +1799,7 @@ ZEND_METHOD(reflection_method, isFinal)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public bool Reflection_Method::isAbstract()
|
||||
/* {{{ proto public bool ReflectionMethod::isAbstract()
|
||||
Returns whether this method is abstract */
|
||||
ZEND_METHOD(reflection_method, isAbstract)
|
||||
{
|
||||
@@ -1797,7 +1807,7 @@ ZEND_METHOD(reflection_method, isAbstract)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public bool Reflection_Method::isPublic()
|
||||
/* {{{ proto public bool ReflectionMethod::isPublic()
|
||||
Returns whether this method is public */
|
||||
ZEND_METHOD(reflection_method, isPublic)
|
||||
{
|
||||
@@ -1805,7 +1815,7 @@ ZEND_METHOD(reflection_method, isPublic)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public bool Reflection_Method::isPrivate()
|
||||
/* {{{ proto public bool ReflectionMethod::isPrivate()
|
||||
Returns whether this method is private */
|
||||
ZEND_METHOD(reflection_method, isPrivate)
|
||||
{
|
||||
@@ -1813,7 +1823,7 @@ ZEND_METHOD(reflection_method, isPrivate)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public bool Reflection_Method::isProtected()
|
||||
/* {{{ proto public bool ReflectionMethod::isProtected()
|
||||
Returns whether this method is protected */
|
||||
ZEND_METHOD(reflection_method, isProtected)
|
||||
{
|
||||
@@ -1821,7 +1831,7 @@ ZEND_METHOD(reflection_method, isProtected)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public bool Reflection_Method::isStatic()
|
||||
/* {{{ proto public bool ReflectionMethod::isStatic()
|
||||
Returns whether this method is static */
|
||||
ZEND_METHOD(reflection_method, isStatic)
|
||||
{
|
||||
@@ -1829,7 +1839,7 @@ ZEND_METHOD(reflection_method, isStatic)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public bool Reflection_Method::isConstructor()
|
||||
/* {{{ proto public bool ReflectionMethod::isConstructor()
|
||||
Returns whether this method is the constructor */
|
||||
ZEND_METHOD(reflection_method, isConstructor)
|
||||
{
|
||||
@@ -1842,7 +1852,7 @@ ZEND_METHOD(reflection_method, isConstructor)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public bool Reflection_Method::isDestructor()
|
||||
/* {{{ proto public bool ReflectionMethod::isDestructor()
|
||||
Returns whether this method is static */
|
||||
ZEND_METHOD(reflection_method, isDestructor)
|
||||
{
|
||||
@@ -1855,7 +1865,7 @@ ZEND_METHOD(reflection_method, isDestructor)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public int Reflection_Method::getModifiers()
|
||||
/* {{{ proto public int ReflectionMethod::getModifiers()
|
||||
Returns a bitfield of the access modifiers for this method */
|
||||
ZEND_METHOD(reflection_method, getModifiers)
|
||||
{
|
||||
@@ -1869,7 +1879,7 @@ ZEND_METHOD(reflection_method, getModifiers)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public Reflection_Class Reflection_Method::getDeclaringClass()
|
||||
/* {{{ proto public ReflectionClass ReflectionMethod::getDeclaringClass()
|
||||
Get the declaring class */
|
||||
ZEND_METHOD(reflection_method, getDeclaringClass)
|
||||
{
|
||||
@@ -1883,7 +1893,7 @@ ZEND_METHOD(reflection_method, getDeclaringClass)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public static mixed Reflection_Class::export(mixed argument, [, bool return]) throws Reflection_Exception
|
||||
/* {{{ proto public static mixed ReflectionClass::export(mixed argument, [, bool return]) throws ReflectionException
|
||||
Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */
|
||||
ZEND_METHOD(reflection_class, export)
|
||||
{
|
||||
@@ -1942,7 +1952,7 @@ static void reflection_class_object_ctor(INTERNAL_FUNCTION_PARAMETERS, int is_ob
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public Reflection_Class::__construct(mixed argument) throws Reflection_Exception
|
||||
/* {{{ proto public ReflectionClass::__construct(mixed argument) throws ReflectionException
|
||||
Constructor. Takes a string or an instance as an argument */
|
||||
ZEND_METHOD(reflection_class, __construct)
|
||||
{
|
||||
@@ -1950,7 +1960,7 @@ ZEND_METHOD(reflection_class, __construct)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public array Reflection_Class::getStaticProperties()
|
||||
/* {{{ proto public array ReflectionClass::getStaticProperties()
|
||||
Returns an associative array containing all static property values of the class */
|
||||
ZEND_METHOD(reflection_class, getStaticProperties)
|
||||
{
|
||||
@@ -1965,7 +1975,7 @@ ZEND_METHOD(reflection_class, getStaticProperties)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public array Reflection_Class::getDefaultProperties()
|
||||
/* {{{ proto public array ReflectionClass::getDefaultProperties()
|
||||
Returns an associative array containing copies of all default property values of the class */
|
||||
ZEND_METHOD(reflection_class, getDefaultProperties)
|
||||
{
|
||||
@@ -2009,7 +2019,7 @@ ZEND_METHOD(reflection_class, getDefaultProperties)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public string Reflection_Class::__toString()
|
||||
/* {{{ proto public string ReflectionClass::__toString()
|
||||
Returns a string representation */
|
||||
ZEND_METHOD(reflection_class, __toString)
|
||||
{
|
||||
@@ -2025,7 +2035,7 @@ ZEND_METHOD(reflection_class, __toString)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public string Reflection_Class::getName()
|
||||
/* {{{ proto public string ReflectionClass::getName()
|
||||
Returns the class' name */
|
||||
ZEND_METHOD(reflection_class, getName)
|
||||
{
|
||||
@@ -2034,7 +2044,7 @@ ZEND_METHOD(reflection_class, getName)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public bool Reflection_Class::isInternal()
|
||||
/* {{{ proto public bool ReflectionClass::isInternal()
|
||||
Returns whether this class is an internal class */
|
||||
ZEND_METHOD(reflection_class, isInternal)
|
||||
{
|
||||
@@ -2047,7 +2057,7 @@ ZEND_METHOD(reflection_class, isInternal)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public bool Reflection_Class::isUserDefined()
|
||||
/* {{{ proto public bool ReflectionClass::isUserDefined()
|
||||
Returns whether this class is user-defined */
|
||||
ZEND_METHOD(reflection_class, isUserDefined)
|
||||
{
|
||||
@@ -2060,7 +2070,7 @@ ZEND_METHOD(reflection_class, isUserDefined)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public string Reflection_Class::getFileName()
|
||||
/* {{{ proto public string ReflectionClass::getFileName()
|
||||
Returns the filename of the file this class was declared in */
|
||||
ZEND_METHOD(reflection_class, getFileName)
|
||||
{
|
||||
@@ -2076,7 +2086,7 @@ ZEND_METHOD(reflection_class, getFileName)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public int Reflection_Class::getStartLine()
|
||||
/* {{{ proto public int ReflectionClass::getStartLine()
|
||||
Returns the line this class' declaration starts at */
|
||||
ZEND_METHOD(reflection_class, getStartLine)
|
||||
{
|
||||
@@ -2092,7 +2102,7 @@ ZEND_METHOD(reflection_class, getStartLine)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public int Reflection_Class::getEndLine()
|
||||
/* {{{ proto public int ReflectionClass::getEndLine()
|
||||
Returns the line this class' declaration ends at */
|
||||
ZEND_METHOD(reflection_class, getEndLine)
|
||||
{
|
||||
@@ -2108,7 +2118,7 @@ ZEND_METHOD(reflection_class, getEndLine)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public string Reflection_Class::getDocComment()
|
||||
/* {{{ proto public string ReflectionClass::getDocComment()
|
||||
Returns the doc comment for this class */
|
||||
ZEND_METHOD(reflection_class, getDocComment)
|
||||
{
|
||||
@@ -2124,7 +2134,7 @@ ZEND_METHOD(reflection_class, getDocComment)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public Reflection_Method Reflection_Class::getConstructor()
|
||||
/* {{{ proto public ReflectionMethod ReflectionClass::getConstructor()
|
||||
Returns the class' constructor if there is one, NULL otherwise */
|
||||
ZEND_METHOD(reflection_class, getConstructor)
|
||||
{
|
||||
@@ -2142,7 +2152,7 @@ ZEND_METHOD(reflection_class, getConstructor)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public Reflection_Method Reflection_Class::getMethod(string name)
|
||||
/* {{{ proto public ReflectionMethod ReflectionClass::getMethod(string name) throws ReflectionException
|
||||
Returns the class' method specified by it's name */
|
||||
ZEND_METHOD(reflection_class, getMethod)
|
||||
{
|
||||
@@ -2162,7 +2172,9 @@ ZEND_METHOD(reflection_class, getMethod)
|
||||
if (zend_hash_find(&ce->function_table, name, name_len + 1, (void**) &mptr) == SUCCESS) {
|
||||
reflection_method_factory(ce, mptr, return_value TSRMLS_CC);
|
||||
} else {
|
||||
RETURN_NULL();
|
||||
zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC,
|
||||
"Method %s does not exist", name);
|
||||
return;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
@@ -2185,7 +2197,7 @@ static int _addmethod(zend_function *mptr, int num_args, va_list args, zend_hash
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public Reflection_Method[] Reflection_Class::getMethods()
|
||||
/* {{{ proto public ReflectionMethod[] ReflectionClass::getMethods()
|
||||
Returns an array of this class' methods */
|
||||
ZEND_METHOD(reflection_class, getMethods)
|
||||
{
|
||||
@@ -2211,7 +2223,7 @@ ZEND_METHOD(reflection_class, getMethods)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public Reflection_Property Reflection_Class::getProperty(string name)
|
||||
/* {{{ proto public ReflectionProperty ReflectionClass::getProperty(string name) throws ReflectionException
|
||||
Returns the class' property specified by it's name */
|
||||
ZEND_METHOD(reflection_class, getProperty)
|
||||
{
|
||||
@@ -2230,7 +2242,9 @@ ZEND_METHOD(reflection_class, getProperty)
|
||||
if (zend_hash_find(&ce->properties_info, name, name_len + 1, (void**) &property_info) == SUCCESS) {
|
||||
reflection_property_factory(ce, property_info, return_value TSRMLS_CC);
|
||||
} else {
|
||||
RETURN_NULL();
|
||||
zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC,
|
||||
"Property %s does not exist", name);
|
||||
return;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
@@ -2253,7 +2267,7 @@ static int _addproperty(zend_property_info *pptr, int num_args, va_list args, ze
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public Reflection_Property[] Reflection_Class::getProperties()
|
||||
/* {{{ proto public ReflectionProperty[] ReflectionClass::getProperties()
|
||||
Returns an array of this class' properties */
|
||||
ZEND_METHOD(reflection_class, getProperties)
|
||||
{
|
||||
@@ -2279,7 +2293,7 @@ ZEND_METHOD(reflection_class, getProperties)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public array Reflection_Class::getConstants()
|
||||
/* {{{ proto public array ReflectionClass::getConstants()
|
||||
Returns an associative array containing this class' constants and their values */
|
||||
ZEND_METHOD(reflection_class, getConstants)
|
||||
{
|
||||
@@ -2294,7 +2308,7 @@ ZEND_METHOD(reflection_class, getConstants)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public mixed Reflection_Class::getConstant(string name)
|
||||
/* {{{ proto public mixed ReflectionClass::getConstant(string name)
|
||||
Returns the class' constant specified by its name */
|
||||
ZEND_METHOD(reflection_class, getConstant)
|
||||
{
|
||||
@@ -2330,7 +2344,7 @@ static void _class_check_flag(INTERNAL_FUNCTION_PARAMETERS, int mask)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public bool Reflection_Class::isInstantiable()
|
||||
/* {{{ proto public bool ReflectionClass::isInstantiable()
|
||||
Returns whether this class is instantiable */
|
||||
ZEND_METHOD(reflection_class, isInstantiable)
|
||||
{
|
||||
@@ -2353,7 +2367,7 @@ ZEND_METHOD(reflection_class, isInstantiable)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public bool Reflection_Class::isInterface()
|
||||
/* {{{ proto public bool ReflectionClass::isInterface()
|
||||
Returns whether this is an interface or a class */
|
||||
ZEND_METHOD(reflection_class, isInterface)
|
||||
{
|
||||
@@ -2361,7 +2375,7 @@ ZEND_METHOD(reflection_class, isInterface)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public bool Reflection_Class::isFinal()
|
||||
/* {{{ proto public bool ReflectionClass::isFinal()
|
||||
Returns whether this class is final */
|
||||
ZEND_METHOD(reflection_class, isFinal)
|
||||
{
|
||||
@@ -2369,15 +2383,15 @@ ZEND_METHOD(reflection_class, isFinal)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public bool Reflection_Class::isAbstract()
|
||||
/* {{{ proto public bool ReflectionClass::isAbstract()
|
||||
Returns whether this class is abstract */
|
||||
ZEND_METHOD(reflection_class, isAbstract)
|
||||
{
|
||||
_class_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_IMPLICIT_ABSTRACT_CLASS);
|
||||
_class_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_IMPLICIT_ABSTRACT_CLASS|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public int Reflection_Class::getModifiers()
|
||||
/* {{{ proto public int ReflectionClass::getModifiers()
|
||||
Returns a bitfield of the access modifiers for this class */
|
||||
ZEND_METHOD(reflection_class, getModifiers)
|
||||
{
|
||||
@@ -2391,7 +2405,7 @@ ZEND_METHOD(reflection_class, getModifiers)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public bool Reflection_Class::isInstance(stdclass object)
|
||||
/* {{{ proto public bool ReflectionClass::isInstance(stdclass object)
|
||||
Returns whether the given object is an instance of this class */
|
||||
ZEND_METHOD(reflection_class, isInstance)
|
||||
{
|
||||
@@ -2408,7 +2422,7 @@ ZEND_METHOD(reflection_class, isInstance)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public stdclass Reflection_Class::newInstance(mixed* args, ...)
|
||||
/* {{{ proto public stdclass ReflectionClass::newInstance(mixed* args, ...)
|
||||
Returns an instance of this class */
|
||||
ZEND_METHOD(reflection_class, newInstance)
|
||||
{
|
||||
@@ -2468,7 +2482,7 @@ ZEND_METHOD(reflection_class, newInstance)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public Reflection_Class[] Reflection_Class::getInterfaces()
|
||||
/* {{{ proto public ReflectionClass[] ReflectionClass::getInterfaces()
|
||||
Returns an array of interfaces this class implements */
|
||||
ZEND_METHOD(reflection_class, getInterfaces)
|
||||
{
|
||||
@@ -2494,7 +2508,7 @@ ZEND_METHOD(reflection_class, getInterfaces)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public Reflection_Class Reflection_Class::getParentClass()
|
||||
/* {{{ proto public ReflectionClass ReflectionClass::getParentClass()
|
||||
Returns the class' parent class, or, if none exists, FALSE */
|
||||
ZEND_METHOD(reflection_class, getParentClass)
|
||||
{
|
||||
@@ -2512,7 +2526,7 @@ ZEND_METHOD(reflection_class, getParentClass)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public bool Reflection_Class::isSubclassOf(string|reflection_class class)
|
||||
/* {{{ proto public bool ReflectionClass::isSubclassOf(string|reflection_class class)
|
||||
Returns whether this class is a subclass of another class */
|
||||
ZEND_METHOD(reflection_class, isSubclassOf)
|
||||
{
|
||||
@@ -2531,7 +2545,7 @@ ZEND_METHOD(reflection_class, isSubclassOf)
|
||||
case IS_STRING:
|
||||
if (zend_lookup_class(Z_STRVAL_P(class_name), Z_STRLEN_P(class_name), &pce TSRMLS_CC) == FAILURE) {
|
||||
zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC,
|
||||
"Interface %s doesn't exist", Z_STRVAL_P(class_name));
|
||||
"Interface %s does not exist", Z_STRVAL_P(class_name));
|
||||
return;
|
||||
}
|
||||
class_ce = *pce;
|
||||
@@ -2558,7 +2572,7 @@ ZEND_METHOD(reflection_class, isSubclassOf)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public bool Reflection_Class::implementsInterface(string|reflection_class interface_name)
|
||||
/* {{{ proto public bool ReflectionClass::implementsInterface(string|reflection_class interface_name)
|
||||
Returns whether this class is a subclass of another class */
|
||||
ZEND_METHOD(reflection_class, implementsInterface)
|
||||
{
|
||||
@@ -2577,7 +2591,7 @@ ZEND_METHOD(reflection_class, implementsInterface)
|
||||
case IS_STRING:
|
||||
if (zend_lookup_class(Z_STRVAL_P(interface), Z_STRLEN_P(interface), &pce TSRMLS_CC) == FAILURE) {
|
||||
zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC,
|
||||
"Interface %s doesn't exist", Z_STRVAL_P(interface));
|
||||
"Interface %s does not exist", Z_STRVAL_P(interface));
|
||||
return;
|
||||
}
|
||||
interface_ce = *pce;
|
||||
@@ -2608,7 +2622,7 @@ ZEND_METHOD(reflection_class, implementsInterface)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public bool Reflection_Class::isIterateable()
|
||||
/* {{{ proto public bool ReflectionClass::isIterateable()
|
||||
Returns whether this class is iterateable (can be used inside foreach) */
|
||||
ZEND_METHOD(reflection_class, isIterateable)
|
||||
{
|
||||
@@ -2622,7 +2636,7 @@ ZEND_METHOD(reflection_class, isIterateable)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public Reflection_Extension|NULL Reflection_Class::getExtension()
|
||||
/* {{{ proto public ReflectionExtension|NULL Reflection_Class::getExtension()
|
||||
Returns NULL or the extension the class belongs to */
|
||||
ZEND_METHOD(reflection_class, getExtension)
|
||||
{
|
||||
@@ -2638,7 +2652,7 @@ ZEND_METHOD(reflection_class, getExtension)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public string|false Reflection_Class::getExtensionName()
|
||||
/* {{{ proto public string|false ReflectionClass::getExtensionName()
|
||||
Returns false or the name of the extension the class belongs to */
|
||||
ZEND_METHOD(reflection_class, getExtensionName)
|
||||
{
|
||||
@@ -2656,7 +2670,7 @@ ZEND_METHOD(reflection_class, getExtensionName)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public static mixed Reflection_Object::export(mixed argument, [, bool return]) throws Reflection_Exception
|
||||
/* {{{ proto public static mixed ReflectionObject::export(mixed argument, [, bool return]) throws ReflectionException
|
||||
Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */
|
||||
ZEND_METHOD(reflection_object, export)
|
||||
{
|
||||
@@ -2664,7 +2678,7 @@ ZEND_METHOD(reflection_object, export)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public Reflection_Object::__construct(mixed argument) throws Reflection_Exception
|
||||
/* {{{ proto public ReflectionObject::__construct(mixed argument) throws ReflectionException
|
||||
Constructor. Takes an instance as an argument */
|
||||
ZEND_METHOD(reflection_object, __construct)
|
||||
{
|
||||
@@ -2672,7 +2686,7 @@ ZEND_METHOD(reflection_object, __construct)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public static mixed Reflection_Property::export(mixed class, string name, [, bool return]) throws Reflection_Exception
|
||||
/* {{{ proto public static mixed ReflectionProperty::export(mixed class, string name, [, bool return]) throws ReflectionException
|
||||
Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */
|
||||
ZEND_METHOD(reflection_property, export)
|
||||
{
|
||||
@@ -2680,11 +2694,11 @@ ZEND_METHOD(reflection_property, export)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public Reflection_Property::__construct(mixed class, string name)
|
||||
/* {{{ proto public ReflectionProperty::__construct(mixed class, string name)
|
||||
Constructor. Throws an Exception in case the given property does not exist */
|
||||
ZEND_METHOD(reflection_property, __construct)
|
||||
{
|
||||
zval *name, *classname;
|
||||
zval *propname, *classname;
|
||||
char *name_str;
|
||||
int name_len;
|
||||
zval *object;
|
||||
@@ -2693,7 +2707,6 @@ ZEND_METHOD(reflection_property, __construct)
|
||||
zend_class_entry *ce;
|
||||
zend_property_info *property_info;
|
||||
property_reference *reference;
|
||||
char *lcname;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zs", &classname, &name_str, &name_len) == FAILURE) {
|
||||
return;
|
||||
@@ -2725,10 +2738,7 @@ ZEND_METHOD(reflection_property, __construct)
|
||||
/* returns out of this function */
|
||||
}
|
||||
|
||||
lcname = do_alloca(name_len + 1);
|
||||
zend_str_tolower_copy(lcname, name_str, name_len);
|
||||
if (zend_hash_find(&ce->properties_info, lcname, name_len + 1, (void **) &property_info) == FAILURE) {
|
||||
free_alloca(lcname);
|
||||
if (zend_hash_find(&ce->properties_info, name_str, name_len + 1, (void **) &property_info) == FAILURE) {
|
||||
zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC,
|
||||
"Property %s::$%s does not exist", ce->name, name_str);
|
||||
return;
|
||||
@@ -2739,7 +2749,7 @@ ZEND_METHOD(reflection_property, __construct)
|
||||
zend_class_entry *tmp_ce = ce->parent;
|
||||
zend_property_info *tmp_info;
|
||||
|
||||
while (tmp_ce && zend_hash_find(&tmp_ce->properties_info, lcname, name_len + 1, (void **) &tmp_info) == SUCCESS) {
|
||||
while (tmp_ce && zend_hash_find(&tmp_ce->properties_info, name_str, name_len + 1, (void **) &tmp_info) == SUCCESS) {
|
||||
if (tmp_info->flags & ZEND_ACC_PRIVATE) {
|
||||
/* private in super class => NOT the same property */
|
||||
break;
|
||||
@@ -2750,15 +2760,13 @@ ZEND_METHOD(reflection_property, __construct)
|
||||
}
|
||||
}
|
||||
|
||||
free_alloca(lcname);
|
||||
|
||||
MAKE_STD_ZVAL(classname);
|
||||
ZVAL_STRINGL(classname, ce->name, ce->name_length, 1);
|
||||
zend_hash_update(Z_OBJPROP_P(object), "class", sizeof("class"), (void **) &classname, sizeof(zval *), NULL);
|
||||
|
||||
MAKE_STD_ZVAL(name);
|
||||
ZVAL_STRING(name, property_info->name, 1);
|
||||
zend_hash_update(Z_OBJPROP_P(object), "name", sizeof("name"), (void **) &name, sizeof(zval *), NULL);
|
||||
MAKE_STD_ZVAL(propname);
|
||||
ZVAL_STRING(propname, property_info->name, 1);
|
||||
zend_hash_update(Z_OBJPROP_P(object), "name", sizeof("name"), (void **) &propname, sizeof(zval *), NULL);
|
||||
|
||||
reference = (property_reference*) emalloc(sizeof(property_reference));
|
||||
reference->ce = ce;
|
||||
@@ -2768,7 +2776,7 @@ ZEND_METHOD(reflection_property, __construct)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public string Reflection_Property::__toString()
|
||||
/* {{{ proto public string ReflectionProperty::__toString()
|
||||
Returns a string representation */
|
||||
ZEND_METHOD(reflection_property, __toString)
|
||||
{
|
||||
@@ -2784,7 +2792,7 @@ ZEND_METHOD(reflection_property, __toString)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public string Reflection_Property::getName()
|
||||
/* {{{ proto public string ReflectionProperty::getName()
|
||||
Returns the class' name */
|
||||
ZEND_METHOD(reflection_property, getName)
|
||||
{
|
||||
@@ -2803,7 +2811,7 @@ static void _property_check_flag(INTERNAL_FUNCTION_PARAMETERS, int mask)
|
||||
RETURN_BOOL(ref->prop->flags & mask);
|
||||
}
|
||||
|
||||
/* {{{ proto public bool Reflection_Property::isPublic()
|
||||
/* {{{ proto public bool ReflectionProperty::isPublic()
|
||||
Returns whether this property is public */
|
||||
ZEND_METHOD(reflection_property, isPublic)
|
||||
{
|
||||
@@ -2811,7 +2819,7 @@ ZEND_METHOD(reflection_property, isPublic)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public bool Reflection_Property::isPrivate()
|
||||
/* {{{ proto public bool ReflectionProperty::isPrivate()
|
||||
Returns whether this property is private */
|
||||
ZEND_METHOD(reflection_property, isPrivate)
|
||||
{
|
||||
@@ -2819,7 +2827,7 @@ ZEND_METHOD(reflection_property, isPrivate)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public bool Reflection_Property::isProtected()
|
||||
/* {{{ proto public bool ReflectionProperty::isProtected()
|
||||
Returns whether this property is protected */
|
||||
ZEND_METHOD(reflection_property, isProtected)
|
||||
{
|
||||
@@ -2827,7 +2835,7 @@ ZEND_METHOD(reflection_property, isProtected)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public bool Reflection_Property::isStatic()
|
||||
/* {{{ proto public bool ReflectionProperty::isStatic()
|
||||
Returns whether this property is static */
|
||||
ZEND_METHOD(reflection_property, isStatic)
|
||||
{
|
||||
@@ -2835,7 +2843,7 @@ ZEND_METHOD(reflection_property, isStatic)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public bool Reflection_Property::isDefault()
|
||||
/* {{{ proto public bool ReflectionProperty::isDefault()
|
||||
Returns whether this property is default (declared at compilation time). */
|
||||
ZEND_METHOD(reflection_property, isDefault)
|
||||
{
|
||||
@@ -2843,7 +2851,7 @@ ZEND_METHOD(reflection_property, isDefault)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public int Reflection_Property::getModifiers()
|
||||
/* {{{ proto public int ReflectionProperty::getModifiers()
|
||||
Returns a bitfield of the access modifiers for this property */
|
||||
ZEND_METHOD(reflection_property, getModifiers)
|
||||
{
|
||||
@@ -2857,7 +2865,7 @@ ZEND_METHOD(reflection_property, getModifiers)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public mixed Reflection_Property::getValue(stdclass object)
|
||||
/* {{{ proto public mixed ReflectionProperty::getValue(stdclass object)
|
||||
Returns this property's value */
|
||||
ZEND_METHOD(reflection_property, getValue)
|
||||
{
|
||||
@@ -2869,7 +2877,7 @@ ZEND_METHOD(reflection_property, getValue)
|
||||
METHOD_NOTSTATIC;
|
||||
GET_REFLECTION_OBJECT_PTR(ref);
|
||||
|
||||
if (ref->prop->flags & ~ZEND_ACC_PUBLIC) {
|
||||
if (!(ref->prop->flags & ZEND_ACC_PUBLIC)) {
|
||||
_DO_THROW("Cannot access non-public member");
|
||||
/* Returns from this function */
|
||||
}
|
||||
@@ -2878,9 +2886,16 @@ ZEND_METHOD(reflection_property, getValue)
|
||||
return;
|
||||
}
|
||||
|
||||
if (zend_hash_quick_find(Z_OBJPROP_P(object), ref->prop->name, ref->prop->name_length + 1, ref->prop->h, (void **) &member) == FAILURE) {
|
||||
zend_error(E_ERROR, "Internal error: Could not find the property %s", ref->prop->name);
|
||||
/* Bails out */
|
||||
if ((ref->prop->flags & ZEND_ACC_STATIC)) {
|
||||
if (zend_hash_quick_find(Z_OBJCE_P(object)->static_members, ref->prop->name, ref->prop->name_length + 1, ref->prop->h, (void **) &member) == FAILURE) {
|
||||
zend_error(E_ERROR, "Internal error: Could not find the property %s", ref->prop->name);
|
||||
/* Bails out */
|
||||
}
|
||||
} else {
|
||||
if (zend_hash_quick_find(Z_OBJPROP_P(object), ref->prop->name, ref->prop->name_length + 1, ref->prop->h, (void **) &member) == FAILURE) {
|
||||
zend_error(E_ERROR, "Internal error: Could not find the property %s", ref->prop->name);
|
||||
/* Bails out */
|
||||
}
|
||||
}
|
||||
|
||||
*return_value= **member;
|
||||
@@ -2888,7 +2903,7 @@ ZEND_METHOD(reflection_property, getValue)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public void Reflection_Property::setValue(stdclass object, mixed value)
|
||||
/* {{{ proto public void ReflectionProperty::setValue(stdclass object, mixed value)
|
||||
Sets this property's value */
|
||||
ZEND_METHOD(reflection_property, setValue)
|
||||
{
|
||||
@@ -2942,7 +2957,7 @@ ZEND_METHOD(reflection_property, setValue)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public Reflection_Class Reflection_Property::getDeclaringClass()
|
||||
/* {{{ proto public ReflectionClass ReflectionProperty::getDeclaringClass()
|
||||
Get the declaring class */
|
||||
ZEND_METHOD(reflection_property, getDeclaringClass)
|
||||
{
|
||||
@@ -2955,7 +2970,7 @@ ZEND_METHOD(reflection_property, getDeclaringClass)
|
||||
reflection_class_factory(ref->ce, return_value TSRMLS_CC);
|
||||
}
|
||||
|
||||
/* {{{ proto public static mixed Reflection_Extension::export(string name, [, bool return]) throws Reflection_Exception
|
||||
/* {{{ proto public static mixed ReflectionExtension::export(string name, [, bool return]) throws ReflectionException
|
||||
Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */
|
||||
ZEND_METHOD(reflection_extension, export)
|
||||
{
|
||||
@@ -2963,7 +2978,7 @@ ZEND_METHOD(reflection_extension, export)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public Reflection_Extension::__construct(string name)
|
||||
/* {{{ proto public ReflectionExtension::__construct(string name)
|
||||
Constructor. Throws an Exception in case the given extension does not exist */
|
||||
ZEND_METHOD(reflection_extension, __construct)
|
||||
{
|
||||
@@ -3001,7 +3016,7 @@ ZEND_METHOD(reflection_extension, __construct)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public string Reflection_Extension::__toString()
|
||||
/* {{{ proto public string ReflectionExtension::__toString()
|
||||
Returns a string representation */
|
||||
ZEND_METHOD(reflection_extension, __toString)
|
||||
{
|
||||
@@ -3017,7 +3032,7 @@ ZEND_METHOD(reflection_extension, __toString)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public string Reflection_Extension::getName()
|
||||
/* {{{ proto public string ReflectionExtension::getName()
|
||||
Returns this extension's name */
|
||||
ZEND_METHOD(reflection_extension, getName)
|
||||
{
|
||||
@@ -3026,7 +3041,7 @@ ZEND_METHOD(reflection_extension, getName)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public string Reflection_Extension::getVersion()
|
||||
/* {{{ proto public string ReflectionExtension::getVersion()
|
||||
Returns this extension's version */
|
||||
ZEND_METHOD(reflection_extension, getVersion)
|
||||
{
|
||||
@@ -3045,7 +3060,7 @@ ZEND_METHOD(reflection_extension, getVersion)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public Reflection_Function[] Reflection_Extension::getFunctions()
|
||||
/* {{{ proto public ReflectionFunction[] ReflectionExtension::getFunctions()
|
||||
Returns an array of this extension's fuctions */
|
||||
ZEND_METHOD(reflection_extension, getFunctions)
|
||||
{
|
||||
@@ -3093,7 +3108,7 @@ static int _addconstant(zend_constant *constant, int num_args, va_list args, zen
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* {{{ proto public array Reflection_Extension::getConstants()
|
||||
/* {{{ proto public array ReflectionExtension::getConstants()
|
||||
Returns an associative array containing this extension's constants and their values */
|
||||
ZEND_METHOD(reflection_extension, getConstants)
|
||||
{
|
||||
@@ -3125,7 +3140,7 @@ static int _addinientry(zend_ini_entry *ini_entry, int num_args, va_list args, z
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public array Reflection_Extension::getINIEntries()
|
||||
/* {{{ proto public array ReflectionExtension::getINIEntries()
|
||||
Returns an associative array containing this extension's INI entries and their values */
|
||||
ZEND_METHOD(reflection_extension, getINIEntries)
|
||||
{
|
||||
@@ -3161,7 +3176,7 @@ static int add_extension_class(zend_class_entry **pce, int num_args, va_list arg
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public ReflectionClass[] Reflection_Extension::getClasses()
|
||||
/* {{{ proto public ReflectionClass[] ReflectionExtension::getClasses()
|
||||
Returns an array containing Reflection_Class objects for all classes of this extension */
|
||||
ZEND_METHOD(reflection_extension, getClasses)
|
||||
{
|
||||
@@ -3176,7 +3191,7 @@ ZEND_METHOD(reflection_extension, getClasses)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public array Reflection_Extension::getClassNames()
|
||||
/* {{{ proto public array ReflectionExtension::getClassNames()
|
||||
Returns an array containing all names of all classes of this extension */
|
||||
ZEND_METHOD(reflection_extension, getClassNames)
|
||||
{
|
||||
|
||||
+4
-4
@@ -49,7 +49,7 @@ ZEND_API int zend_stream_open(const char *filename, zend_file_handle *handle TSR
|
||||
return (handle->handle.fp) ? SUCCESS : FAILURE;
|
||||
}
|
||||
|
||||
int zend_stream_fixup(zend_file_handle *file_handle TSRMLS_DC)
|
||||
ZEND_API int zend_stream_fixup(zend_file_handle *file_handle TSRMLS_DC)
|
||||
{
|
||||
switch (file_handle->type) {
|
||||
case ZEND_HANDLE_FILENAME:
|
||||
@@ -90,7 +90,7 @@ int zend_stream_fixup(zend_file_handle *file_handle TSRMLS_DC)
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
size_t zend_stream_read(zend_file_handle *file_handle, char *buf, size_t len TSRMLS_DC)
|
||||
ZEND_API size_t zend_stream_read(zend_file_handle *file_handle, char *buf, size_t len TSRMLS_DC)
|
||||
{
|
||||
if (file_handle->handle.stream.interactive) {
|
||||
int c = '*', n;
|
||||
@@ -105,7 +105,7 @@ size_t zend_stream_read(zend_file_handle *file_handle, char *buf, size_t len TSR
|
||||
return file_handle->handle.stream.reader(file_handle->handle.stream.handle, buf, len TSRMLS_CC);
|
||||
}
|
||||
|
||||
int zend_stream_getc(zend_file_handle *file_handle TSRMLS_DC)
|
||||
ZEND_API int zend_stream_getc(zend_file_handle *file_handle TSRMLS_DC)
|
||||
{
|
||||
char buf;
|
||||
|
||||
@@ -115,7 +115,7 @@ int zend_stream_getc(zend_file_handle *file_handle TSRMLS_DC)
|
||||
return EOF;
|
||||
}
|
||||
|
||||
int zend_stream_ferror(zend_file_handle *file_handle TSRMLS_DC)
|
||||
ZEND_API int zend_stream_ferror(zend_file_handle *file_handle TSRMLS_DC)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
+4
-4
@@ -49,10 +49,10 @@ typedef struct _zend_file_handle {
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
ZEND_API int zend_stream_open(const char *filename, zend_file_handle *handle TSRMLS_DC);
|
||||
int zend_stream_ferror(zend_file_handle *file_handle TSRMLS_DC);
|
||||
int zend_stream_getc(zend_file_handle *file_handle TSRMLS_DC);
|
||||
size_t zend_stream_read(zend_file_handle *file_handle, char *buf, size_t len TSRMLS_DC);
|
||||
int zend_stream_fixup(zend_file_handle *file_handle TSRMLS_DC);
|
||||
ZEND_API int zend_stream_ferror(zend_file_handle *file_handle TSRMLS_DC);
|
||||
ZEND_API int zend_stream_getc(zend_file_handle *file_handle TSRMLS_DC);
|
||||
ZEND_API size_t zend_stream_read(zend_file_handle *file_handle, char *buf, size_t len TSRMLS_DC);
|
||||
ZEND_API int zend_stream_fixup(zend_file_handle *file_handle TSRMLS_DC);
|
||||
END_EXTERN_C()
|
||||
|
||||
#define zend_stream_close(handle) zend_file_handle_dtor((handle))
|
||||
|
||||
@@ -140,14 +140,16 @@ ZEND_API int _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
|
||||
case IS_CONSTANT_ARRAY: {
|
||||
zval *tmp;
|
||||
HashTable *original_ht = zvalue->value.ht;
|
||||
HashTable *tmp_ht = NULL;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
if (zvalue->value.ht == &EG(symbol_table)) {
|
||||
return SUCCESS; /* do nothing */
|
||||
}
|
||||
ALLOC_HASHTABLE_REL(zvalue->value.ht);
|
||||
zend_hash_init(zvalue->value.ht, 0, NULL, ZVAL_PTR_DTOR, 0);
|
||||
zend_hash_copy(zvalue->value.ht, original_ht, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
|
||||
ALLOC_HASHTABLE_REL(tmp_ht);
|
||||
zend_hash_init(tmp_ht, 0, NULL, ZVAL_PTR_DTOR, 0);
|
||||
zend_hash_copy(tmp_ht, original_ht, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
|
||||
zvalue->value.ht = tmp_ht;
|
||||
}
|
||||
break;
|
||||
case IS_OBJECT:
|
||||
|
||||
+2
-2
@@ -40,8 +40,8 @@ AC_CONFIG_HEADER(main/php_config.h)
|
||||
|
||||
MAJOR_VERSION=5
|
||||
MINOR_VERSION=0
|
||||
RELEASE_VERSION=0
|
||||
EXTRA_VERSION="RC3"
|
||||
RELEASE_VERSION=1
|
||||
EXTRA_VERSION=""
|
||||
VERSION="$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION"
|
||||
|
||||
dnl Define where extension directories are located in the configure context
|
||||
|
||||
+24
-8
@@ -53,8 +53,8 @@ zend_module_entry bcmath_module_entry = {
|
||||
bcmath_functions,
|
||||
PHP_MINIT(bcmath),
|
||||
PHP_MSHUTDOWN(bcmath),
|
||||
NULL,
|
||||
NULL,
|
||||
PHP_RINIT(bcmath),
|
||||
PHP_RSHUTDOWN(bcmath),
|
||||
PHP_MINFO(bcmath),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
@@ -86,8 +86,6 @@ PHP_MINIT_FUNCTION(bcmath)
|
||||
|
||||
REGISTER_INI_ENTRIES();
|
||||
|
||||
bc_init_numbers(TSRMLS_C);
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -96,15 +94,33 @@ PHP_MINIT_FUNCTION(bcmath)
|
||||
*/
|
||||
PHP_MSHUTDOWN_FUNCTION(bcmath)
|
||||
{
|
||||
_bc_free_num_ex(&BCG(_zero_), 1);
|
||||
_bc_free_num_ex(&BCG(_one_), 1);
|
||||
_bc_free_num_ex(&BCG(_two_), 1);
|
||||
|
||||
UNREGISTER_INI_ENTRIES();
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ PHP_RINIT_FUNCTION
|
||||
*/
|
||||
PHP_RINIT_FUNCTION(bcmath)
|
||||
{
|
||||
bc_init_numbers(TSRMLS_C);
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ PHP_RSHUTDOWN_FUNCTION
|
||||
*/
|
||||
PHP_RSHUTDOWN_FUNCTION(bcmath)
|
||||
{
|
||||
_bc_free_num_ex(&BCG(_zero_), 1);
|
||||
_bc_free_num_ex(&BCG(_one_), 1);
|
||||
_bc_free_num_ex(&BCG(_two_), 1);
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ PHP_MINFO_FUNCTION
|
||||
*/
|
||||
|
||||
@@ -30,6 +30,8 @@ extern zend_module_entry bcmath_module_entry;
|
||||
|
||||
PHP_MINIT_FUNCTION(bcmath);
|
||||
PHP_MSHUTDOWN_FUNCTION(bcmath);
|
||||
PHP_RINIT_FUNCTION(bcmath);
|
||||
PHP_RSHUTDOWN_FUNCTION(bcmath);
|
||||
PHP_MINFO_FUNCTION(bcmath);
|
||||
|
||||
PHP_FUNCTION(bcadd);
|
||||
|
||||
@@ -37,7 +37,7 @@ PHP_FUNCTION(com_create_instance)
|
||||
php_com_dotnet_object *obj;
|
||||
char *module_name, *typelib_name = NULL, *server_name = NULL;
|
||||
char *user_name = NULL, *domain_name = NULL, *password = NULL;
|
||||
long module_name_len, typelib_name_len, server_name_len,
|
||||
int module_name_len, typelib_name_len, server_name_len,
|
||||
user_name_len, domain_name_len, password_len;
|
||||
OLECHAR *moniker;
|
||||
CLSID clsid;
|
||||
@@ -287,7 +287,7 @@ PHP_FUNCTION(com_get_active_object)
|
||||
{
|
||||
CLSID clsid;
|
||||
char *module_name;
|
||||
long module_name_len;
|
||||
int module_name_len;
|
||||
long code_page = COMG(code_page);
|
||||
IUnknown *unk = NULL;
|
||||
IDispatch *obj = NULL;
|
||||
@@ -799,7 +799,7 @@ PHP_FUNCTION(com_message_pump)
|
||||
PHP_FUNCTION(com_load_typelib)
|
||||
{
|
||||
char *name;
|
||||
long namelen;
|
||||
int namelen;
|
||||
ITypeLib *pTL = NULL;
|
||||
zend_bool cs = TRUE;
|
||||
int codepage = COMG(code_page);
|
||||
|
||||
@@ -98,10 +98,11 @@ PHP_FUNCTION(com_dotnet_create_instance)
|
||||
zval *object = getThis();
|
||||
php_com_dotnet_object *obj;
|
||||
char *assembly_name, *datatype_name;
|
||||
long assembly_name_len, datatype_name_len;
|
||||
int assembly_name_len, datatype_name_len;
|
||||
struct dotnet_runtime_stuff *stuff;
|
||||
IObjectHandle *handle;
|
||||
DISPPARAMS params;
|
||||
OLECHAR *olestring;
|
||||
VARIANT vargs[2];
|
||||
VARIANT retval;
|
||||
HRESULT hr;
|
||||
@@ -138,10 +139,14 @@ PHP_FUNCTION(com_dotnet_create_instance)
|
||||
VariantInit(&retval);
|
||||
|
||||
V_VT(&vargs[0]) = VT_BSTR;
|
||||
V_BSTR(&vargs[0]) = php_com_string_to_olestring(datatype_name, datatype_name_len, obj->code_page TSRMLS_CC);
|
||||
olestring = php_com_string_to_olestring(datatype_name, datatype_name_len, obj->code_page TSRMLS_CC);
|
||||
V_BSTR(&vargs[0]) = SysAllocStringByteLen((char*)olestring, datatype_name_len * sizeof(OLECHAR));
|
||||
efree(olestring);
|
||||
|
||||
V_VT(&vargs[1]) = VT_BSTR;
|
||||
V_BSTR(&vargs[1]) = php_com_string_to_olestring(assembly_name, assembly_name_len, obj->code_page TSRMLS_CC);
|
||||
olestring = php_com_string_to_olestring(assembly_name, assembly_name_len, obj->code_page TSRMLS_CC);
|
||||
V_BSTR(&vargs[1]) = SysAllocStringByteLen((char*)olestring, assembly_name_len * sizeof(OLECHAR));
|
||||
efree(olestring);
|
||||
|
||||
hr = IDispatch_Invoke(stuff->dotnet_domain, stuff->create_instance, &IID_NULL, LOCALE_SYSTEM_DEFAULT,
|
||||
DISPATCH_METHOD, ¶ms, &retval, NULL, NULL);
|
||||
|
||||
@@ -194,7 +194,7 @@ PHP_MINIT_FUNCTION(com_dotnet)
|
||||
INIT_CLASS_ENTRY(ce, "com_exception", NULL);
|
||||
php_com_exception_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default(), NULL TSRMLS_CC);
|
||||
php_com_exception_class_entry->ce_flags |= ZEND_ACC_FINAL;
|
||||
php_com_exception_class_entry->constructor->common.fn_flags |= ZEND_ACC_PROTECTED;
|
||||
// php_com_exception_class_entry->constructor->common.fn_flags |= ZEND_ACC_PROTECTED;
|
||||
|
||||
INIT_CLASS_ENTRY(ce, "com_safearray_proxy", NULL);
|
||||
php_com_saproxy_class_entry = zend_register_internal_class(&ce TSRMLS_CC);
|
||||
|
||||
@@ -286,11 +286,19 @@ static void function_dtor(void *pDest)
|
||||
}
|
||||
}
|
||||
|
||||
static PHP_FUNCTION(com_method_handler)
|
||||
{
|
||||
Z_OBJ_HANDLER_P(getThis(), call_method)(
|
||||
((zend_internal_function*)EG(function_state_ptr)->function)->function_name,
|
||||
INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
||||
}
|
||||
|
||||
static union _zend_function *com_method_get(zval *object, char *name, int len TSRMLS_DC)
|
||||
{
|
||||
zend_internal_function f, *fptr = NULL;
|
||||
php_com_dotnet_object *obj;
|
||||
union _zend_function *func;
|
||||
DISPID dummy;
|
||||
|
||||
obj = CDNO_FETCH(object);
|
||||
|
||||
@@ -298,6 +306,10 @@ static union _zend_function *com_method_get(zval *object, char *name, int len TS
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (FAILED(php_com_get_id_of_name(obj, name, len, &dummy TSRMLS_CC))) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* check cache */
|
||||
if (obj->method_cache == NULL || FAILURE == zend_hash_find(obj->method_cache, name, len, (void**)&fptr)) {
|
||||
f.type = ZEND_OVERLOADED_FUNCTION;
|
||||
@@ -306,7 +318,10 @@ static union _zend_function *com_method_get(zval *object, char *name, int len TS
|
||||
f.scope = obj->ce;
|
||||
f.fn_flags = 0;
|
||||
f.function_name = estrndup(name, len);
|
||||
f.handler = PHP_FN(com_method_handler);
|
||||
|
||||
fptr = &f;
|
||||
|
||||
if (obj->typeinfo) {
|
||||
/* look for byref params */
|
||||
ITypeComp *comp;
|
||||
@@ -346,6 +361,9 @@ static union _zend_function *com_method_get(zval *object, char *name, int len TS
|
||||
case DESCKIND_TYPECOMP:
|
||||
ITypeComp_Release(bindptr.lptcomp);
|
||||
break;
|
||||
|
||||
case DESCKIND_NONE:
|
||||
break;
|
||||
}
|
||||
if (TI) {
|
||||
ITypeInfo_Release(TI);
|
||||
@@ -356,21 +374,27 @@ static union _zend_function *com_method_get(zval *object, char *name, int len TS
|
||||
}
|
||||
}
|
||||
|
||||
/* save this method in the cache */
|
||||
if (!obj->method_cache) {
|
||||
ALLOC_HASHTABLE(obj->method_cache);
|
||||
zend_hash_init(obj->method_cache, 2, NULL, function_dtor, 0);
|
||||
}
|
||||
if (fptr) {
|
||||
/* save this method in the cache */
|
||||
if (!obj->method_cache) {
|
||||
ALLOC_HASHTABLE(obj->method_cache);
|
||||
zend_hash_init(obj->method_cache, 2, NULL, function_dtor, 0);
|
||||
}
|
||||
|
||||
zend_hash_update(obj->method_cache, name, len, &f, sizeof(f), (void**)&fptr);
|
||||
zend_hash_update(obj->method_cache, name, len, &f, sizeof(f), (void**)&fptr);
|
||||
}
|
||||
}
|
||||
|
||||
/* duplicate this into a new chunk of emalloc'd memory,
|
||||
* since the engine will efree it */
|
||||
func = emalloc(sizeof(*fptr));
|
||||
memcpy(func, fptr, sizeof(*fptr));
|
||||
if (fptr) {
|
||||
/* duplicate this into a new chunk of emalloc'd memory,
|
||||
* since the engine will efree it */
|
||||
func = emalloc(sizeof(*fptr));
|
||||
memcpy(func, fptr, sizeof(*fptr));
|
||||
|
||||
return func;
|
||||
return func;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int com_call_method(char *method, INTERNAL_FUNCTION_PARAMETERS)
|
||||
|
||||
@@ -375,7 +375,7 @@ CPH_METHOD(SaveToFile)
|
||||
{
|
||||
HRESULT res;
|
||||
char *filename, *fullpath = NULL;
|
||||
long filename_len;
|
||||
int filename_len;
|
||||
zend_bool remember = TRUE;
|
||||
OLECHAR *olefilename = NULL;
|
||||
CPH_FETCH();
|
||||
@@ -438,7 +438,7 @@ CPH_METHOD(LoadFromFile)
|
||||
{
|
||||
HRESULT res;
|
||||
char *filename, *fullpath;
|
||||
long filename_len;
|
||||
int filename_len;
|
||||
long flags = 0;
|
||||
OLECHAR *olefilename;
|
||||
CPH_FETCH();
|
||||
|
||||
@@ -168,7 +168,7 @@ static zval *saproxy_read_dimension(zval *object, zval *offset, int type TSRMLS_
|
||||
VariantInit(&v);
|
||||
|
||||
/* we can return a real value */
|
||||
indices = do_alloca(dims * sizeof(LONG));
|
||||
indices = emalloc(dims * sizeof(LONG));
|
||||
|
||||
/* copy indices from proxy */
|
||||
for (i = 0; i < dims; i++) {
|
||||
@@ -191,7 +191,7 @@ static zval *saproxy_read_dimension(zval *object, zval *offset, int type TSRMLS_
|
||||
res = SafeArrayGetElement(sa, indices, &v.lVal);
|
||||
}
|
||||
|
||||
free_alloca(indices);
|
||||
efree(indices);
|
||||
|
||||
if (SUCCEEDED(res)) {
|
||||
php_com_wrap_variant(return_value, &v, proxy->obj->code_page TSRMLS_CC);
|
||||
@@ -244,7 +244,7 @@ static void saproxy_write_dimension(zval *object, zval *offset, zval *value TSRM
|
||||
VARTYPE vt;
|
||||
|
||||
dims = SafeArrayGetDim(V_ARRAY(&proxy->obj->v));
|
||||
indices = do_alloca(dims * sizeof(LONG));
|
||||
indices = emalloc(dims * sizeof(LONG));
|
||||
/* copy indices from proxy */
|
||||
for (i = 0; i < dims; i++) {
|
||||
convert_to_long(proxy->indices[i]);
|
||||
@@ -272,7 +272,7 @@ static void saproxy_write_dimension(zval *object, zval *offset, zval *value TSRM
|
||||
res = SafeArrayPutElement(V_ARRAY(&proxy->obj->v), indices, &v.lVal);
|
||||
}
|
||||
|
||||
free_alloca(indices);
|
||||
efree(indices);
|
||||
VariantClear(&v);
|
||||
|
||||
if (FAILED(res)) {
|
||||
|
||||
@@ -260,7 +260,7 @@ PHPAPI int php_com_zval_from_variant(zval *z, VARIANT *v, int codepage TSRMLS_DC
|
||||
/* {{{ com_variant_create_instance - ctor for new VARIANT() */
|
||||
PHP_FUNCTION(com_variant_create_instance)
|
||||
{
|
||||
VARTYPE vt = VT_EMPTY;
|
||||
/* VARTYPE == unsigned short */ long vt = VT_EMPTY;
|
||||
long codepage = CP_ACP;
|
||||
zval *object = getThis();
|
||||
php_com_dotnet_object *obj;
|
||||
@@ -290,7 +290,7 @@ PHP_FUNCTION(com_variant_create_instance)
|
||||
|
||||
if (ZEND_NUM_ARGS() >= 2) {
|
||||
|
||||
res = VariantChangeType(&obj->v, &obj->v, 0, vt);
|
||||
res = VariantChangeType(&obj->v, &obj->v, 0, (VARTYPE)vt);
|
||||
|
||||
if (FAILED(res)) {
|
||||
char *werr, *msg;
|
||||
@@ -788,7 +788,7 @@ PHP_FUNCTION(variant_date_to_timestamp)
|
||||
Returns a variant date representation of a unix timestamp */
|
||||
PHP_FUNCTION(variant_date_from_timestamp)
|
||||
{
|
||||
int timestamp;
|
||||
long timestamp;
|
||||
SYSTEMTIME systime;
|
||||
struct tm *tmv;
|
||||
VARIANT res;
|
||||
@@ -799,7 +799,8 @@ PHP_FUNCTION(variant_date_from_timestamp)
|
||||
}
|
||||
|
||||
VariantInit(&res);
|
||||
tmv = gmtime(×tamp);
|
||||
tzset();
|
||||
tmv = localtime(×tamp);
|
||||
memset(&systime, 0, sizeof(systime));
|
||||
|
||||
systime.wDay = tmv->tm_mday;
|
||||
@@ -841,7 +842,7 @@ PHP_FUNCTION(variant_set_type)
|
||||
{
|
||||
zval *zobj;
|
||||
php_com_dotnet_object *obj;
|
||||
VARTYPE vt;
|
||||
/* VARTYPE == unsigned short */ long vt;
|
||||
HRESULT res;
|
||||
|
||||
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
|
||||
@@ -850,7 +851,7 @@ PHP_FUNCTION(variant_set_type)
|
||||
}
|
||||
obj = CDNO_FETCH(zobj);
|
||||
|
||||
res = VariantChangeType(&obj->v, &obj->v, 0, vt);
|
||||
res = VariantChangeType(&obj->v, &obj->v, 0, (VARTYPE)vt);
|
||||
|
||||
if (SUCCEEDED(res)) {
|
||||
if (vt != VT_DISPATCH && obj->typeinfo) {
|
||||
@@ -876,7 +877,7 @@ PHP_FUNCTION(variant_cast)
|
||||
{
|
||||
zval *zobj;
|
||||
php_com_dotnet_object *obj;
|
||||
VARTYPE vt;
|
||||
/* VARTYPE == unsigned short */ long vt;
|
||||
VARIANT vres;
|
||||
HRESULT res;
|
||||
|
||||
@@ -887,7 +888,7 @@ PHP_FUNCTION(variant_cast)
|
||||
obj = CDNO_FETCH(zobj);
|
||||
|
||||
VariantInit(&vres);
|
||||
res = VariantChangeType(&vres, &obj->v, 0, vt);
|
||||
res = VariantChangeType(&vres, &obj->v, 0, (VARTYPE)vt);
|
||||
|
||||
if (SUCCEEDED(res)) {
|
||||
php_com_wrap_variant(return_value, &vres, obj->code_page TSRMLS_CC);
|
||||
|
||||
@@ -296,12 +296,16 @@ static HRESULT STDMETHODCALLTYPE disp_invokeex(
|
||||
} else if (wFlags & DISPATCH_PROPERTYPUT) {
|
||||
zend_update_property(Z_OBJCE_P(disp->object), disp->object, Z_STRVAL_PP(name), Z_STRLEN_PP(name)+1, *params[0] TSRMLS_CC);
|
||||
} else if (wFlags & DISPATCH_METHOD) {
|
||||
if (SUCCESS == call_user_function_ex(EG(function_table), &disp->object, *name,
|
||||
&retval, pdp->cArgs, params, 1, NULL TSRMLS_CC)) {
|
||||
ret = S_OK;
|
||||
} else {
|
||||
zend_try {
|
||||
if (SUCCESS == call_user_function_ex(EG(function_table), &disp->object, *name,
|
||||
&retval, pdp->cArgs, params, 1, NULL TSRMLS_CC)) {
|
||||
ret = S_OK;
|
||||
} else {
|
||||
ret = DISP_E_EXCEPTION;
|
||||
}
|
||||
} zend_catch {
|
||||
ret = DISP_E_EXCEPTION;
|
||||
}
|
||||
} zend_end_try();
|
||||
} else {
|
||||
trace("Don't know how to handle this invocation %08x\n", wFlags);
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ typedef struct _php_com_dotnet_object {
|
||||
VARIANT v;
|
||||
|
||||
ITypeInfo *typeinfo;
|
||||
int code_page;
|
||||
long code_page;
|
||||
unsigned int have_default_bind:1;
|
||||
|
||||
zend_class_entry *ce;
|
||||
|
||||
+1
-1
@@ -726,7 +726,7 @@ PHP_FUNCTION(cpdf_set_font)
|
||||
int id, type;
|
||||
CPDFdoc *pdf;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(ht, 4, &arg1, &arg2, &arg3, &arg4) == FAILURE) {
|
||||
if (ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, &arg1, &arg2, &arg3, &arg4) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
|
||||
+7
-1
@@ -97,7 +97,13 @@ PHP_MINFO_FUNCTION(ctype)
|
||||
return; \
|
||||
switch (Z_TYPE_P(c)) { \
|
||||
case IS_LONG: \
|
||||
RETURN_BOOL(iswhat(Z_LVAL_P(c))); \
|
||||
if (Z_LVAL_P(c) <= 255 && Z_LVAL_P(c) >= 0) { \
|
||||
RETURN_BOOL(iswhat(Z_LVAL_P(c))); \
|
||||
} else if (Z_LVAL_P(c) >= -128) { \
|
||||
RETURN_BOOL(iswhat(Z_LVAL_P(c) + 256)); \
|
||||
} \
|
||||
SEPARATE_ZVAL(&c); \
|
||||
convert_to_string(c); \
|
||||
case IS_STRING: \
|
||||
{ \
|
||||
char *p; \
|
||||
|
||||
@@ -1084,7 +1084,7 @@ PHP_FUNCTION(curl_setopt)
|
||||
error = curl_formadd(&first, &last,
|
||||
CURLFORM_COPYNAME, string_key,
|
||||
CURLFORM_NAMELENGTH, string_key_len - 1,
|
||||
(ZVAL_REFCOUNT(*zvalue) > 1 ? CURLFORM_PTRCONTENTS : CURLFORM_COPYCONTENTS), postval,
|
||||
CURLFORM_COPYCONTENTS, postval,
|
||||
CURLFORM_CONTENTSLENGTH, Z_STRLEN_PP(current),
|
||||
CURLFORM_END);
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ magic_quotes_runtime=1
|
||||
require_once('test.inc');
|
||||
echo "database handler: $handler\n";
|
||||
// print md5 checksum of test.cdb which is generated by cdb_make program
|
||||
var_dump(md5(implode('',file(dirname(__FILE__).'/test.cdb'))));
|
||||
var_dump(md5_file(dirname(__FILE__).'/test.cdb'));
|
||||
if (($db_make=dba_open($db_file, "n", $handler))!==FALSE) {
|
||||
dba_insert("1", "1", $db_make);
|
||||
dba_insert("2", "2", $db_make);
|
||||
@@ -26,7 +26,7 @@ magic_quotes_runtime=1
|
||||
// dba_replace cdb_make doesn't know replace
|
||||
dba_close($db_make);
|
||||
// write md5 checksum of generated database file
|
||||
var_dump(md5(implode('',file($db_file))));
|
||||
var_dump(md5_file($db_file));
|
||||
// no need to test created database: this is done by dba_cdb_read.phpt
|
||||
} else {
|
||||
echo "Error creating database\n";
|
||||
@@ -34,5 +34,5 @@ magic_quotes_runtime=1
|
||||
?>
|
||||
--EXPECT--
|
||||
database handler: cdb_make
|
||||
string(32) "723d19f39c1b15b3b455dd64323148d1"
|
||||
string(32) "723d19f39c1b15b3b455dd64323148d1"
|
||||
string(32) "12fc5ba2b9dcfef2480e5324eeb5f3e5"
|
||||
string(32) "12fc5ba2b9dcfef2480e5324eeb5f3e5"
|
||||
@@ -0,0 +1,9 @@
|
||||
// $Id$
|
||||
// vim:ft=javascript
|
||||
|
||||
ARG_ENABLE("dio", "Enable the direct I/O support", "no");
|
||||
|
||||
if (PHP_DIO != "no") {
|
||||
EXTENSION("dio", "dio.c");
|
||||
AC_DEFINE('HAVE_DIO', 1, 'dio support');
|
||||
}
|
||||
@@ -27,9 +27,15 @@
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <fcntl.h>
|
||||
#ifndef PHP_WIN32
|
||||
#include <termios.h>
|
||||
#endif
|
||||
|
||||
/* e.g. IRIX does not have CRTSCTS */
|
||||
#ifndef CRTSCTS
|
||||
@@ -45,14 +51,20 @@ static int le_fd;
|
||||
|
||||
function_entry dio_functions[] = {
|
||||
PHP_FE(dio_open, NULL)
|
||||
#ifndef PHP_WIN32
|
||||
PHP_FE(dio_truncate, NULL)
|
||||
#endif
|
||||
PHP_FE(dio_stat, NULL)
|
||||
PHP_FE(dio_seek, NULL)
|
||||
#ifndef PHP_WIN32
|
||||
PHP_FE(dio_fcntl, NULL)
|
||||
#endif
|
||||
PHP_FE(dio_read, NULL)
|
||||
PHP_FE(dio_write, NULL)
|
||||
PHP_FE(dio_close, NULL)
|
||||
#ifndef PHP_WIN32
|
||||
PHP_FE(dio_tcsetattr, NULL)
|
||||
#endif
|
||||
{NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
@@ -94,15 +106,22 @@ PHP_MINIT_FUNCTION(dio)
|
||||
RDIOC(O_EXCL);
|
||||
RDIOC(O_TRUNC);
|
||||
RDIOC(O_APPEND);
|
||||
#ifdef O_NONBLOCK
|
||||
RDIOC(O_NONBLOCK);
|
||||
#endif
|
||||
#ifdef O_NDELAY
|
||||
RDIOC(O_NDELAY);
|
||||
#endif
|
||||
#ifdef O_SYNC
|
||||
RDIOC(O_SYNC);
|
||||
#endif
|
||||
#ifdef O_ASYNC
|
||||
RDIOC(O_ASYNC);
|
||||
#endif
|
||||
#ifdef O_NOCTTY
|
||||
RDIOC(O_NOCTTY);
|
||||
#endif
|
||||
#ifndef PHP_WIN32
|
||||
RDIOC(S_IRWXU);
|
||||
RDIOC(S_IRUSR);
|
||||
RDIOC(S_IWUSR);
|
||||
@@ -127,6 +146,7 @@ PHP_MINIT_FUNCTION(dio)
|
||||
RDIOC(F_UNLCK);
|
||||
RDIOC(F_RDLCK);
|
||||
RDIOC(F_WRLCK);
|
||||
#endif
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
@@ -235,6 +255,7 @@ PHP_FUNCTION(dio_write)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#ifndef PHP_WIN32
|
||||
/* {{{ proto bool dio_truncate(resource fd, int offset)
|
||||
Truncate file descriptor fd to offset bytes */
|
||||
PHP_FUNCTION(dio_truncate)
|
||||
@@ -257,6 +278,7 @@ PHP_FUNCTION(dio_truncate)
|
||||
RETURN_TRUE;
|
||||
}
|
||||
/* }}} */
|
||||
#endif
|
||||
|
||||
#define ADD_FIELD(f, v) add_assoc_long_ex(return_value, (f), sizeof(f), v);
|
||||
|
||||
@@ -288,8 +310,10 @@ PHP_FUNCTION(dio_stat)
|
||||
ADD_FIELD("gid", s.st_gid);
|
||||
ADD_FIELD("device_type", s.st_rdev);
|
||||
ADD_FIELD("size", s.st_size);
|
||||
#ifndef PHP_WIN32
|
||||
ADD_FIELD("block_size", s.st_blksize);
|
||||
ADD_FIELD("blocks", s.st_blocks);
|
||||
#endif
|
||||
ADD_FIELD("atime", s.st_atime);
|
||||
ADD_FIELD("mtime", s.st_mtime);
|
||||
ADD_FIELD("ctime", s.st_ctime);
|
||||
@@ -315,6 +339,7 @@ PHP_FUNCTION(dio_seek)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#ifndef PHP_WIN32
|
||||
/* {{{ proto mixed dio_fcntl(resource fd, int cmd[, mixed arg])
|
||||
Perform a c library fcntl on fd */
|
||||
PHP_FUNCTION(dio_fcntl)
|
||||
@@ -415,7 +440,9 @@ PHP_FUNCTION(dio_fcntl)
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
#endif
|
||||
|
||||
#ifndef PHP_WIN32
|
||||
/* {{{ proto mixed dio_tcsetattr(resource fd, array args )
|
||||
Perform a c library tcsetattr on fd */
|
||||
PHP_FUNCTION(dio_tcsetattr)
|
||||
@@ -576,6 +603,7 @@ PHP_FUNCTION(dio_tcsetattr)
|
||||
RETURN_TRUE;
|
||||
}
|
||||
/* }}} */
|
||||
#endif
|
||||
|
||||
/* {{{ proto void dio_close(resource fd)
|
||||
Close the file descriptor given by fd */
|
||||
|
||||
+5
-5
@@ -1063,7 +1063,7 @@ PHP_FUNCTION(dom_document_import_node)
|
||||
/* }}} end dom_document_import_node */
|
||||
|
||||
|
||||
/* {{{ proto DOMElement dom_document_create_element_ns(string namespaceURI, string qualifiedName);
|
||||
/* {{{ proto DOMElement dom_document_create_element_ns(string namespaceURI, string qualifiedName [,string value]);
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-DocCrElNS
|
||||
Since: DOM Level 2
|
||||
*/
|
||||
@@ -1073,13 +1073,13 @@ PHP_FUNCTION(dom_document_create_element_ns)
|
||||
xmlDocPtr docp;
|
||||
xmlNodePtr nodep = NULL;
|
||||
xmlNsPtr nsptr = NULL;
|
||||
int ret, uri_len = 0, name_len = 0;
|
||||
char *uri, *name;
|
||||
int ret, uri_len = 0, name_len = 0, value_len = 0;
|
||||
char *uri, *name, *value = NULL;
|
||||
char *localname = NULL, *prefix = NULL;
|
||||
int errorcode;
|
||||
dom_object *intern;
|
||||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s", &id, dom_document_class_entry, &uri, &uri_len, &name, &name_len) == FAILURE) {
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s|s", &id, dom_document_class_entry, &uri, &uri_len, &name, &name_len, &value, &value_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1089,7 +1089,7 @@ PHP_FUNCTION(dom_document_create_element_ns)
|
||||
|
||||
if (errorcode == 0) {
|
||||
if (xmlValidateName((xmlChar *) localname, 0) == 0) {
|
||||
nodep = xmlNewDocNode (docp, NULL, localname, NULL);
|
||||
nodep = xmlNewDocNode (docp, NULL, localname, value);
|
||||
if (nodep != NULL && uri != NULL) {
|
||||
nsptr = xmlSearchNsByHref (nodep->doc, nodep, uri);
|
||||
if (nsptr == NULL) {
|
||||
|
||||
+148
-64
@@ -874,6 +874,11 @@ PHP_FUNCTION(dom_node_insert_before)
|
||||
}
|
||||
|
||||
DOM_GET_OBJ(parentp, id, xmlNodePtr, intern);
|
||||
|
||||
if (dom_node_children_valid(parentp) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
DOM_GET_OBJ(child, node, xmlNodePtr, childobj);
|
||||
|
||||
new_child = NULL;
|
||||
@@ -896,6 +901,11 @@ PHP_FUNCTION(dom_node_insert_before)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (child->type == XML_DOCUMENT_FRAG_NODE && child->children == NULL) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Document Fragment is empty");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (child->doc == NULL && parentp->doc != NULL) {
|
||||
childobj->document = intern->document;
|
||||
php_libxml_increment_doc_ref((php_libxml_node_object *)childobj, NULL TSRMLS_CC);
|
||||
@@ -912,25 +922,25 @@ PHP_FUNCTION(dom_node_insert_before)
|
||||
xmlUnlinkNode(child);
|
||||
}
|
||||
|
||||
if (child->type == XML_TEXT_NODE) {
|
||||
if (refp->type == XML_TEXT_NODE) {
|
||||
xmlChar *tmp;
|
||||
if (child->type == XML_TEXT_NODE && (refp->type == XML_TEXT_NODE ||
|
||||
(refp->prev != NULL && refp->prev->type == XML_TEXT_NODE))) {
|
||||
if (child->doc == NULL) {
|
||||
xmlSetTreeDoc(child, parentp->doc);
|
||||
}
|
||||
new_child = child;
|
||||
new_child->parent = refp->parent;
|
||||
new_child->next = refp;
|
||||
new_child->prev = refp->prev;
|
||||
refp->prev = new_child;
|
||||
if (new_child->prev != NULL) {
|
||||
new_child->prev->next = new_child;
|
||||
}
|
||||
if (new_child->parent != NULL) {
|
||||
if (new_child->parent->children == refp) {
|
||||
new_child->parent->children = new_child;
|
||||
}
|
||||
}
|
||||
|
||||
tmp = xmlStrdup(child->content);
|
||||
tmp = xmlStrcat(tmp, refp->content);
|
||||
xmlNodeSetContent(refp, tmp);
|
||||
xmlFree(tmp);
|
||||
php_libxml_node_free_resource(child TSRMLS_CC);
|
||||
DOM_RET_OBJ(rv, refp, &ret, intern);
|
||||
return;
|
||||
}
|
||||
if ((refp->prev != NULL) && (refp->prev->type == XML_TEXT_NODE)
|
||||
&& (refp->name == refp->prev->name)) {
|
||||
xmlNodeAddContent(refp->prev, child->content);
|
||||
php_libxml_node_free_resource(child TSRMLS_CC);
|
||||
DOM_RET_OBJ(rv, refp->prev, &ret, intern);
|
||||
return;
|
||||
}
|
||||
} else if (child->type == XML_ATTRIBUTE_NODE) {
|
||||
xmlAttrPtr lastattr;
|
||||
|
||||
@@ -947,29 +957,56 @@ PHP_FUNCTION(dom_node_insert_before)
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else if (child->type == XML_DOCUMENT_FRAG_NODE) {
|
||||
xmlNodePtr fragment;
|
||||
|
||||
fragment = child;
|
||||
new_child = child->children;
|
||||
child = new_child;
|
||||
while (child->next != NULL) {
|
||||
child->parent = parentp;
|
||||
if (child->doc != parentp->doc) {
|
||||
xmlSetTreeDoc(child, parentp->doc);
|
||||
}
|
||||
child = child->next;
|
||||
}
|
||||
child->parent = parentp;
|
||||
if (child->doc != parentp->doc) {
|
||||
xmlSetTreeDoc(child, parentp->doc);
|
||||
}
|
||||
|
||||
if (refp->prev != NULL) {
|
||||
refp->prev->next = new_child;
|
||||
} else {
|
||||
parentp->children = new_child;
|
||||
}
|
||||
new_child->prev = refp->prev;
|
||||
refp->prev = child;
|
||||
child->next = refp;
|
||||
fragment->children = NULL;
|
||||
}
|
||||
|
||||
if (new_child == NULL) {
|
||||
new_child = xmlAddPrevSibling(refp, child);
|
||||
}
|
||||
new_child = xmlAddPrevSibling(refp, child);
|
||||
} else {
|
||||
if (child->parent == parentp){
|
||||
xmlUnlinkNode(child);
|
||||
}
|
||||
if (child->type == XML_TEXT_NODE) {
|
||||
if ((parentp->type == XML_TEXT_NODE) &&
|
||||
(parentp->content != NULL) &&
|
||||
(parentp != child)) {
|
||||
xmlNodeAddContent(parentp, child->content);
|
||||
php_libxml_node_free_resource(child TSRMLS_CC);
|
||||
DOM_RET_OBJ(rv, parentp, &ret, intern);
|
||||
return;
|
||||
if (child->type == XML_TEXT_NODE && parentp->last != NULL && parentp->last->type == XML_TEXT_NODE) {
|
||||
child->parent = parentp;
|
||||
if (child->doc == NULL) {
|
||||
xmlSetTreeDoc(child, parentp->doc);
|
||||
}
|
||||
if ((parentp->last != NULL) && (parentp->last->type == XML_TEXT_NODE) &&
|
||||
(parentp->last->name == child->name) &&
|
||||
(parentp->last != child)) {
|
||||
xmlNodeAddContent(parentp->last, child->content);
|
||||
php_libxml_node_free_resource(child TSRMLS_CC);
|
||||
DOM_RET_OBJ(rv, parentp->last, &ret, intern);
|
||||
return;
|
||||
new_child = child;
|
||||
if (parentp->children == NULL) {
|
||||
parentp->children = child;
|
||||
parentp->last = child;
|
||||
} else {
|
||||
child = parentp->last;
|
||||
child->next = new_child;
|
||||
new_child->prev = child;
|
||||
parentp->last = new_child;
|
||||
}
|
||||
} else if (child->type == XML_ATTRIBUTE_NODE) {
|
||||
xmlAttrPtr lastattr;
|
||||
@@ -987,15 +1024,37 @@ PHP_FUNCTION(dom_node_insert_before)
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else if (child->type == XML_DOCUMENT_FRAG_NODE) {
|
||||
new_child = xmlAddChildList(parentp, child->children);
|
||||
if (new_child != NULL) {
|
||||
child->children = NULL;
|
||||
} else if (child->type == XML_DOCUMENT_FRAG_NODE) {
|
||||
xmlNodePtr fragment;
|
||||
|
||||
fragment = child;
|
||||
|
||||
new_child = child->children;
|
||||
if (parentp->children == NULL) {
|
||||
parentp->children = new_child;
|
||||
} else {
|
||||
child = parentp->last;
|
||||
child->next = new_child;
|
||||
new_child->prev = child;
|
||||
}
|
||||
DOM_RET_OBJ(rv, new_child, &ret, intern);
|
||||
return;
|
||||
child = new_child;
|
||||
while (child->next != NULL) {
|
||||
child->parent = parentp;
|
||||
if (child->doc != parentp->doc) {
|
||||
xmlSetTreeDoc(child, parentp->doc);
|
||||
}
|
||||
child = child->next;
|
||||
}
|
||||
child->parent = parentp;
|
||||
if (child->doc != parentp->doc) {
|
||||
xmlSetTreeDoc(child, parentp->doc);
|
||||
}
|
||||
parentp->last = child;
|
||||
fragment->children = NULL;
|
||||
}
|
||||
if (new_child == NULL) {
|
||||
new_child = xmlAddChild(parentp, child);
|
||||
}
|
||||
new_child = xmlAddChild(parentp, child);
|
||||
}
|
||||
|
||||
if (NULL == new_child) {
|
||||
@@ -1186,6 +1245,11 @@ PHP_FUNCTION(dom_node_append_child)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (child->type == XML_DOCUMENT_FRAG_NODE && child->children == NULL) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Document Fragment is empty");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (child->doc == NULL && nodep->doc != NULL) {
|
||||
childobj->document = intern->document;
|
||||
php_libxml_increment_doc_ref((php_libxml_node_object *)childobj, NULL TSRMLS_CC);
|
||||
@@ -1195,20 +1259,20 @@ PHP_FUNCTION(dom_node_append_child)
|
||||
xmlUnlinkNode(child);
|
||||
}
|
||||
|
||||
if (child->type == XML_TEXT_NODE) {
|
||||
if ((nodep->type == XML_TEXT_NODE) &&
|
||||
(nodep->content != NULL)) {
|
||||
xmlNodeAddContent(nodep, child->content);
|
||||
php_libxml_node_free_resource(child TSRMLS_CC);
|
||||
DOM_RET_OBJ(rv, nodep, &ret, intern);
|
||||
return;
|
||||
if (child->type == XML_TEXT_NODE && nodep->last != NULL && nodep->last->type == XML_TEXT_NODE) {
|
||||
child->parent = nodep;
|
||||
if (child->doc == NULL) {
|
||||
xmlSetTreeDoc(child, nodep->doc);
|
||||
}
|
||||
if ((nodep->last != NULL) && (nodep->last->type == XML_TEXT_NODE) &&
|
||||
(nodep->last->name == child->name)) {
|
||||
xmlNodeAddContent(nodep->last, child->content);
|
||||
php_libxml_node_free_resource(child TSRMLS_CC);
|
||||
DOM_RET_OBJ(rv, nodep->last, &ret, intern);
|
||||
return;
|
||||
new_child = child;
|
||||
if (nodep->children == NULL) {
|
||||
nodep->children = child;
|
||||
nodep->last = child;
|
||||
} else {
|
||||
child = nodep->last;
|
||||
child->next = new_child;
|
||||
new_child->prev = child;
|
||||
nodep->last = new_child;
|
||||
}
|
||||
} else if (child->type == XML_ATTRIBUTE_NODE) {
|
||||
xmlAttrPtr lastattr;
|
||||
@@ -1223,20 +1287,40 @@ PHP_FUNCTION(dom_node_append_child)
|
||||
php_libxml_node_free_resource((xmlNodePtr) lastattr TSRMLS_CC);
|
||||
}
|
||||
}
|
||||
} else if (child->type == XML_DOCUMENT_FRAG_NODE) {
|
||||
new_child = xmlAddChildList(nodep, child->children);
|
||||
if (new_child != NULL) {
|
||||
child->children = NULL;
|
||||
} else if (child->type == XML_DOCUMENT_FRAG_NODE) {
|
||||
xmlNodePtr fragment;
|
||||
|
||||
fragment = child;
|
||||
new_child = child->children;
|
||||
if (nodep->children == NULL) {
|
||||
nodep->children = new_child;
|
||||
} else {
|
||||
child = nodep->last;
|
||||
child->next = new_child;
|
||||
new_child->prev = child;
|
||||
}
|
||||
DOM_RET_OBJ(rv, new_child, &ret, intern);
|
||||
return;
|
||||
child = new_child;
|
||||
while (child->next != NULL) {
|
||||
child->parent = nodep;
|
||||
if (child->doc != nodep->doc) {
|
||||
xmlSetTreeDoc(child, nodep->doc);
|
||||
}
|
||||
child = child->next;
|
||||
}
|
||||
child->parent = nodep;
|
||||
if (child->doc != nodep->doc) {
|
||||
xmlSetTreeDoc(child, nodep->doc);
|
||||
}
|
||||
nodep->last = child;
|
||||
fragment->children = NULL;
|
||||
}
|
||||
|
||||
new_child = xmlAddChild(nodep, child);
|
||||
|
||||
if (new_child == NULL) {
|
||||
php_error(E_WARNING, "Couldn't append node");
|
||||
RETURN_FALSE;
|
||||
new_child = xmlAddChild(nodep, child);
|
||||
if (new_child == NULL) {
|
||||
php_error(E_WARNING, "Couldn't append node");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
dom_reconcile_ns(nodep->doc, new_child);
|
||||
|
||||
+25
-2
@@ -322,6 +322,30 @@ PHP_FUNCTION(dom_import_simplexml)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
zend_object_value dom_objects_store_clone_obj(zval *zobject TSRMLS_DC)
|
||||
{
|
||||
zend_object_value retval;
|
||||
void *new_object;
|
||||
dom_object *intern;
|
||||
struct _store_object *obj;
|
||||
zend_object_handle handle = Z_OBJ_HANDLE_P(zobject);
|
||||
|
||||
obj = &EG(objects_store).object_buckets[handle].bucket.obj;
|
||||
|
||||
if (obj->clone == NULL) {
|
||||
zend_error(E_CORE_ERROR, "Trying to clone uncloneable object of class %s", Z_OBJCE_P(zobject)->name);
|
||||
}
|
||||
|
||||
obj->clone(obj->object, &new_object TSRMLS_CC);
|
||||
|
||||
retval.handle = zend_objects_store_put(new_object, obj->dtor, obj->free_storage, obj->clone TSRMLS_CC);
|
||||
intern = (dom_object *) new_object;
|
||||
intern->handle = retval.handle;
|
||||
retval.handlers = Z_OBJ_HT_P(zobject);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
static zend_function_entry dom_functions[] = {
|
||||
PHP_FE(dom_import_simplexml, NULL)
|
||||
{NULL, NULL, NULL}
|
||||
@@ -353,14 +377,13 @@ PHP_MINIT_FUNCTION(dom)
|
||||
dom_object_handlers.read_property = dom_read_property;
|
||||
dom_object_handlers.write_property = dom_write_property;
|
||||
dom_object_handlers.get_property_ptr_ptr = NULL;
|
||||
dom_object_handlers.clone_obj = zend_objects_store_clone_obj;
|
||||
dom_object_handlers.clone_obj = dom_objects_store_clone_obj;
|
||||
|
||||
zend_hash_init(&classes, 0, NULL, NULL, 1);
|
||||
|
||||
INIT_CLASS_ENTRY(ce, "DOMException", php_dom_domexception_class_functions);
|
||||
dom_domexception_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default(), NULL TSRMLS_CC);
|
||||
dom_domexception_class_entry->ce_flags |= ZEND_ACC_FINAL;
|
||||
dom_domexception_class_entry->constructor->common.fn_flags |= ZEND_ACC_PROTECTED;
|
||||
zend_declare_property_long(dom_domexception_class_entry, "code", sizeof("code")-1, 0, ZEND_ACC_PUBLIC TSRMLS_CC);
|
||||
|
||||
REGISTER_DOM_CLASS(ce, "DOMStringList", NULL, php_dom_domstringlist_class_functions, dom_domstringlist_class_entry);
|
||||
|
||||
@@ -0,0 +1,485 @@
|
||||
--TEST--
|
||||
Bug # 28721: (appendChild() and insertBefore() unset DOMText)
|
||||
--SKIPIF--
|
||||
<?php require_once('skipif.php'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
function print_node(DomNode $node) {
|
||||
echo "name (value): " . $node->nodeName . " (" . $node->nodeValue . ")\n";
|
||||
}
|
||||
|
||||
function print_node_r(DomNode $node) {
|
||||
static $indent = "";
|
||||
echo "\n" . $indent;
|
||||
print_node($node);
|
||||
|
||||
echo $indent . "parent: ";
|
||||
if ( $node->parentNode )
|
||||
print_node($node->parentNode);
|
||||
else
|
||||
echo "NULL\n";
|
||||
|
||||
echo $indent . "previousSibling: ";
|
||||
if ( $node->previousSibling )
|
||||
print_node($node->previousSibling);
|
||||
else
|
||||
echo "NULL\n";
|
||||
|
||||
echo $indent . "nextSibling: ";
|
||||
if ( $node->nextSibling )
|
||||
print_node($node->nextSibling);
|
||||
else
|
||||
echo "NULL\n";
|
||||
|
||||
if ( !$node->hasChildNodes() )
|
||||
return;
|
||||
|
||||
foreach ($node->childNodes as $child) {
|
||||
|
||||
$old_indent = $indent;
|
||||
$indent .= " ";
|
||||
print_node_r($child);
|
||||
$indent = $old_indent;
|
||||
}
|
||||
}
|
||||
|
||||
function err_handler($errno, $errstr, $errfile, $errline) {
|
||||
echo "Error ($errno) on line $errline: $errstr\n";
|
||||
}
|
||||
|
||||
// Record 'DocumentFragment is empty' warnings
|
||||
set_error_handler("err_handler", E_WARNING);
|
||||
|
||||
$xml = new DomDocument();
|
||||
|
||||
$p = $xml->createElement("p");
|
||||
|
||||
$p->appendChild($t1 = $xml->createTextNode(" t1 "));
|
||||
$p->appendChild($b = $xml->createElement("b"));
|
||||
$b->appendChild($xml->createTextNode("X"));
|
||||
$p->appendChild($t2 = $xml->createTextNode(" t2 "));
|
||||
$p->appendChild($xml->createTextNode(" xxx "));
|
||||
|
||||
print_node_r($p);
|
||||
|
||||
echo "\nAppend t1 to p:\n";
|
||||
$ret = $p->appendChild($t1);
|
||||
|
||||
print_node_r($p);
|
||||
echo "\n";
|
||||
|
||||
echo "t1 == ret: ";
|
||||
var_dump( $t1 === $ret );
|
||||
|
||||
|
||||
$d = $xml->createElement("div");
|
||||
$d->appendChild($t3 = $xml->createTextNode(" t3 "));
|
||||
$d->appendChild($b = $xml->createElement("b"));
|
||||
$b->appendChild($xml->createElement("X"));
|
||||
$d->appendChild($t4 = $xml->createTextNode(" t4 "));
|
||||
$d->appendChild($xml->createTextNode(" xxx "));
|
||||
|
||||
echo "\ndiv:\n";
|
||||
print_node_r($d);
|
||||
|
||||
echo "\nInsert t4 before t3:\n";
|
||||
|
||||
$ret = $d->insertBefore($t4, $t3);
|
||||
|
||||
print_node_r($d);
|
||||
echo "\n";
|
||||
|
||||
$frag = $xml->createDocumentFragment();
|
||||
|
||||
$t5 = $frag->appendChild($xml->createTextNode(" t5 "));
|
||||
$frag->appendChild($i = $xml->createElement("i"));
|
||||
$i->appendChild($xml->createTextNode(" frob "));
|
||||
$frag->appendChild($xml->createTextNOde(" t6 "));
|
||||
|
||||
echo "\np:\n";
|
||||
print_node_r($p);
|
||||
echo "\nFragment:\n";
|
||||
print_node_r($frag);
|
||||
|
||||
echo "\nAppending fragment to p:\n";
|
||||
$p->appendChild($frag);
|
||||
|
||||
print_node_r($p);
|
||||
echo "\nFragment:\n";
|
||||
print_node_r($frag);
|
||||
|
||||
echo "\ndiv:\n";
|
||||
print_node_r($d);
|
||||
echo "\nInserting fragment before t4\n";
|
||||
$d->insertBefore($frag, $t4);
|
||||
print_node_r($d);
|
||||
|
||||
echo "\np:\n";
|
||||
print_node_r($p);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
|
||||
name (value): p ( t1 X t2 xxx )
|
||||
parent: NULL
|
||||
previousSibling: NULL
|
||||
nextSibling: NULL
|
||||
|
||||
name (value): #text ( t1 )
|
||||
parent: name (value): p ( t1 X t2 xxx )
|
||||
previousSibling: NULL
|
||||
nextSibling: name (value): b (X)
|
||||
|
||||
name (value): b (X)
|
||||
parent: name (value): p ( t1 X t2 xxx )
|
||||
previousSibling: name (value): #text ( t1 )
|
||||
nextSibling: name (value): #text ( t2 )
|
||||
|
||||
name (value): #text (X)
|
||||
parent: name (value): b (X)
|
||||
previousSibling: NULL
|
||||
nextSibling: NULL
|
||||
|
||||
name (value): #text ( t2 )
|
||||
parent: name (value): p ( t1 X t2 xxx )
|
||||
previousSibling: name (value): b (X)
|
||||
nextSibling: name (value): #text ( xxx )
|
||||
|
||||
name (value): #text ( xxx )
|
||||
parent: name (value): p ( t1 X t2 xxx )
|
||||
previousSibling: name (value): #text ( t2 )
|
||||
nextSibling: NULL
|
||||
|
||||
Append t1 to p:
|
||||
|
||||
name (value): p (X t2 xxx t1 )
|
||||
parent: NULL
|
||||
previousSibling: NULL
|
||||
nextSibling: NULL
|
||||
|
||||
name (value): b (X)
|
||||
parent: name (value): p (X t2 xxx t1 )
|
||||
previousSibling: NULL
|
||||
nextSibling: name (value): #text ( t2 )
|
||||
|
||||
name (value): #text (X)
|
||||
parent: name (value): b (X)
|
||||
previousSibling: NULL
|
||||
nextSibling: NULL
|
||||
|
||||
name (value): #text ( t2 )
|
||||
parent: name (value): p (X t2 xxx t1 )
|
||||
previousSibling: name (value): b (X)
|
||||
nextSibling: name (value): #text ( xxx )
|
||||
|
||||
name (value): #text ( xxx )
|
||||
parent: name (value): p (X t2 xxx t1 )
|
||||
previousSibling: name (value): #text ( t2 )
|
||||
nextSibling: name (value): #text ( t1 )
|
||||
|
||||
name (value): #text ( t1 )
|
||||
parent: name (value): p (X t2 xxx t1 )
|
||||
previousSibling: name (value): #text ( xxx )
|
||||
nextSibling: NULL
|
||||
|
||||
t1 == ret: bool(true)
|
||||
|
||||
div:
|
||||
|
||||
name (value): div ( t3 t4 xxx )
|
||||
parent: NULL
|
||||
previousSibling: NULL
|
||||
nextSibling: NULL
|
||||
|
||||
name (value): #text ( t3 )
|
||||
parent: name (value): div ( t3 t4 xxx )
|
||||
previousSibling: NULL
|
||||
nextSibling: name (value): b ()
|
||||
|
||||
name (value): b ()
|
||||
parent: name (value): div ( t3 t4 xxx )
|
||||
previousSibling: name (value): #text ( t3 )
|
||||
nextSibling: name (value): #text ( t4 )
|
||||
|
||||
name (value): X ()
|
||||
parent: name (value): b ()
|
||||
previousSibling: NULL
|
||||
nextSibling: NULL
|
||||
|
||||
name (value): #text ( t4 )
|
||||
parent: name (value): div ( t3 t4 xxx )
|
||||
previousSibling: name (value): b ()
|
||||
nextSibling: name (value): #text ( xxx )
|
||||
|
||||
name (value): #text ( xxx )
|
||||
parent: name (value): div ( t3 t4 xxx )
|
||||
previousSibling: name (value): #text ( t4 )
|
||||
nextSibling: NULL
|
||||
|
||||
Insert t4 before t3:
|
||||
|
||||
name (value): div ( t4 t3 xxx )
|
||||
parent: NULL
|
||||
previousSibling: NULL
|
||||
nextSibling: NULL
|
||||
|
||||
name (value): #text ( t4 )
|
||||
parent: name (value): div ( t4 t3 xxx )
|
||||
previousSibling: NULL
|
||||
nextSibling: name (value): #text ( t3 )
|
||||
|
||||
name (value): #text ( t3 )
|
||||
parent: name (value): div ( t4 t3 xxx )
|
||||
previousSibling: name (value): #text ( t4 )
|
||||
nextSibling: name (value): b ()
|
||||
|
||||
name (value): b ()
|
||||
parent: name (value): div ( t4 t3 xxx )
|
||||
previousSibling: name (value): #text ( t3 )
|
||||
nextSibling: name (value): #text ( xxx )
|
||||
|
||||
name (value): X ()
|
||||
parent: name (value): b ()
|
||||
previousSibling: NULL
|
||||
nextSibling: NULL
|
||||
|
||||
name (value): #text ( xxx )
|
||||
parent: name (value): div ( t4 t3 xxx )
|
||||
previousSibling: name (value): b ()
|
||||
nextSibling: NULL
|
||||
|
||||
|
||||
p:
|
||||
|
||||
name (value): p (X t2 xxx t1 )
|
||||
parent: NULL
|
||||
previousSibling: NULL
|
||||
nextSibling: NULL
|
||||
|
||||
name (value): b (X)
|
||||
parent: name (value): p (X t2 xxx t1 )
|
||||
previousSibling: NULL
|
||||
nextSibling: name (value): #text ( t2 )
|
||||
|
||||
name (value): #text (X)
|
||||
parent: name (value): b (X)
|
||||
previousSibling: NULL
|
||||
nextSibling: NULL
|
||||
|
||||
name (value): #text ( t2 )
|
||||
parent: name (value): p (X t2 xxx t1 )
|
||||
previousSibling: name (value): b (X)
|
||||
nextSibling: name (value): #text ( xxx )
|
||||
|
||||
name (value): #text ( xxx )
|
||||
parent: name (value): p (X t2 xxx t1 )
|
||||
previousSibling: name (value): #text ( t2 )
|
||||
nextSibling: name (value): #text ( t1 )
|
||||
|
||||
name (value): #text ( t1 )
|
||||
parent: name (value): p (X t2 xxx t1 )
|
||||
previousSibling: name (value): #text ( xxx )
|
||||
nextSibling: NULL
|
||||
|
||||
Fragment:
|
||||
|
||||
name (value): #document-fragment ()
|
||||
parent: NULL
|
||||
previousSibling: NULL
|
||||
nextSibling: NULL
|
||||
|
||||
name (value): #text ( t5 )
|
||||
parent: name (value): #document-fragment ()
|
||||
previousSibling: NULL
|
||||
nextSibling: name (value): i ( frob )
|
||||
|
||||
name (value): i ( frob )
|
||||
parent: name (value): #document-fragment ()
|
||||
previousSibling: name (value): #text ( t5 )
|
||||
nextSibling: name (value): #text ( t6 )
|
||||
|
||||
name (value): #text ( frob )
|
||||
parent: name (value): i ( frob )
|
||||
previousSibling: NULL
|
||||
nextSibling: NULL
|
||||
|
||||
name (value): #text ( t6 )
|
||||
parent: name (value): #document-fragment ()
|
||||
previousSibling: name (value): i ( frob )
|
||||
nextSibling: NULL
|
||||
|
||||
Appending fragment to p:
|
||||
|
||||
name (value): p (X t2 xxx t1 t5 frob t6 )
|
||||
parent: NULL
|
||||
previousSibling: NULL
|
||||
nextSibling: NULL
|
||||
|
||||
name (value): b (X)
|
||||
parent: name (value): p (X t2 xxx t1 t5 frob t6 )
|
||||
previousSibling: NULL
|
||||
nextSibling: name (value): #text ( t2 )
|
||||
|
||||
name (value): #text (X)
|
||||
parent: name (value): b (X)
|
||||
previousSibling: NULL
|
||||
nextSibling: NULL
|
||||
|
||||
name (value): #text ( t2 )
|
||||
parent: name (value): p (X t2 xxx t1 t5 frob t6 )
|
||||
previousSibling: name (value): b (X)
|
||||
nextSibling: name (value): #text ( xxx )
|
||||
|
||||
name (value): #text ( xxx )
|
||||
parent: name (value): p (X t2 xxx t1 t5 frob t6 )
|
||||
previousSibling: name (value): #text ( t2 )
|
||||
nextSibling: name (value): #text ( t1 )
|
||||
|
||||
name (value): #text ( t1 )
|
||||
parent: name (value): p (X t2 xxx t1 t5 frob t6 )
|
||||
previousSibling: name (value): #text ( xxx )
|
||||
nextSibling: name (value): #text ( t5 )
|
||||
|
||||
name (value): #text ( t5 )
|
||||
parent: name (value): p (X t2 xxx t1 t5 frob t6 )
|
||||
previousSibling: name (value): #text ( t1 )
|
||||
nextSibling: name (value): i ( frob )
|
||||
|
||||
name (value): i ( frob )
|
||||
parent: name (value): p (X t2 xxx t1 t5 frob t6 )
|
||||
previousSibling: name (value): #text ( t5 )
|
||||
nextSibling: name (value): #text ( t6 )
|
||||
|
||||
name (value): #text ( frob )
|
||||
parent: name (value): i ( frob )
|
||||
previousSibling: NULL
|
||||
nextSibling: NULL
|
||||
|
||||
name (value): #text ( t6 )
|
||||
parent: name (value): p (X t2 xxx t1 t5 frob t6 )
|
||||
previousSibling: name (value): i ( frob )
|
||||
nextSibling: NULL
|
||||
|
||||
Fragment:
|
||||
|
||||
name (value): #document-fragment ()
|
||||
parent: NULL
|
||||
previousSibling: NULL
|
||||
nextSibling: NULL
|
||||
|
||||
div:
|
||||
|
||||
name (value): div ( t4 t3 xxx )
|
||||
parent: NULL
|
||||
previousSibling: NULL
|
||||
nextSibling: NULL
|
||||
|
||||
name (value): #text ( t4 )
|
||||
parent: name (value): div ( t4 t3 xxx )
|
||||
previousSibling: NULL
|
||||
nextSibling: name (value): #text ( t3 )
|
||||
|
||||
name (value): #text ( t3 )
|
||||
parent: name (value): div ( t4 t3 xxx )
|
||||
previousSibling: name (value): #text ( t4 )
|
||||
nextSibling: name (value): b ()
|
||||
|
||||
name (value): b ()
|
||||
parent: name (value): div ( t4 t3 xxx )
|
||||
previousSibling: name (value): #text ( t3 )
|
||||
nextSibling: name (value): #text ( xxx )
|
||||
|
||||
name (value): X ()
|
||||
parent: name (value): b ()
|
||||
previousSibling: NULL
|
||||
nextSibling: NULL
|
||||
|
||||
name (value): #text ( xxx )
|
||||
parent: name (value): div ( t4 t3 xxx )
|
||||
previousSibling: name (value): b ()
|
||||
nextSibling: NULL
|
||||
|
||||
Inserting fragment before t4
|
||||
Error (2) on line 109: DOMNode::insertBefore(): Document Fragment is empty
|
||||
|
||||
name (value): div ( t4 t3 xxx )
|
||||
parent: NULL
|
||||
previousSibling: NULL
|
||||
nextSibling: NULL
|
||||
|
||||
name (value): #text ( t4 )
|
||||
parent: name (value): div ( t4 t3 xxx )
|
||||
previousSibling: NULL
|
||||
nextSibling: name (value): #text ( t3 )
|
||||
|
||||
name (value): #text ( t3 )
|
||||
parent: name (value): div ( t4 t3 xxx )
|
||||
previousSibling: name (value): #text ( t4 )
|
||||
nextSibling: name (value): b ()
|
||||
|
||||
name (value): b ()
|
||||
parent: name (value): div ( t4 t3 xxx )
|
||||
previousSibling: name (value): #text ( t3 )
|
||||
nextSibling: name (value): #text ( xxx )
|
||||
|
||||
name (value): X ()
|
||||
parent: name (value): b ()
|
||||
previousSibling: NULL
|
||||
nextSibling: NULL
|
||||
|
||||
name (value): #text ( xxx )
|
||||
parent: name (value): div ( t4 t3 xxx )
|
||||
previousSibling: name (value): b ()
|
||||
nextSibling: NULL
|
||||
|
||||
p:
|
||||
|
||||
name (value): p (X t2 xxx t1 t5 frob t6 )
|
||||
parent: NULL
|
||||
previousSibling: NULL
|
||||
nextSibling: NULL
|
||||
|
||||
name (value): b (X)
|
||||
parent: name (value): p (X t2 xxx t1 t5 frob t6 )
|
||||
previousSibling: NULL
|
||||
nextSibling: name (value): #text ( t2 )
|
||||
|
||||
name (value): #text (X)
|
||||
parent: name (value): b (X)
|
||||
previousSibling: NULL
|
||||
nextSibling: NULL
|
||||
|
||||
name (value): #text ( t2 )
|
||||
parent: name (value): p (X t2 xxx t1 t5 frob t6 )
|
||||
previousSibling: name (value): b (X)
|
||||
nextSibling: name (value): #text ( xxx )
|
||||
|
||||
name (value): #text ( xxx )
|
||||
parent: name (value): p (X t2 xxx t1 t5 frob t6 )
|
||||
previousSibling: name (value): #text ( t2 )
|
||||
nextSibling: name (value): #text ( t1 )
|
||||
|
||||
name (value): #text ( t1 )
|
||||
parent: name (value): p (X t2 xxx t1 t5 frob t6 )
|
||||
previousSibling: name (value): #text ( xxx )
|
||||
nextSibling: name (value): #text ( t5 )
|
||||
|
||||
name (value): #text ( t5 )
|
||||
parent: name (value): p (X t2 xxx t1 t5 frob t6 )
|
||||
previousSibling: name (value): #text ( t1 )
|
||||
nextSibling: name (value): i ( frob )
|
||||
|
||||
name (value): i ( frob )
|
||||
parent: name (value): p (X t2 xxx t1 t5 frob t6 )
|
||||
previousSibling: name (value): #text ( t5 )
|
||||
nextSibling: name (value): #text ( t6 )
|
||||
|
||||
name (value): #text ( frob )
|
||||
parent: name (value): i ( frob )
|
||||
previousSibling: NULL
|
||||
nextSibling: NULL
|
||||
|
||||
name (value): #text ( t6 )
|
||||
parent: name (value): p (X t2 xxx t1 t5 frob t6 )
|
||||
previousSibling: name (value): i ( frob )
|
||||
nextSibling: NULL
|
||||
@@ -23,7 +23,7 @@ function adjustDoctype($xml) {
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html><head><title>Hello world</title></head><body><p>
|
||||
This is a not well-formed<br/>
|
||||
html files with undeclared entities
|
||||
html files with undeclared entities 
|
||||
</p></body></html>
|
||||
--- save as HTML
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
|
||||
+4
-1
@@ -259,6 +259,7 @@ AC_DEFUN(PHP_GD_CHECK_VERSION,[
|
||||
PHP_CHECK_LIBRARY(gd, gdImageGifCtx, [AC_DEFINE(HAVE_GD_GIF_CTX, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdCacheCreate, [AC_DEFINE(HAVE_GD_CACHE_CREATE, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdFontCacheShutdown, [AC_DEFINE(HAVE_GD_THREAD_SAFE, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdNewDynamicCtxEx, [AC_DEFINE(HAVE_GD_DYNAMIC_CTX_EX, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
])
|
||||
|
||||
dnl
|
||||
@@ -272,7 +273,7 @@ if test "$PHP_GD" = "yes"; then
|
||||
libgd/gdxpm.c libgd/gdfontt.c libgd/gdfonts.c libgd/gdfontmb.c libgd/gdfontl.c \
|
||||
libgd/gdfontg.c libgd/gdtables.c libgd/gdft.c libgd/gdcache.c libgd/gdkanji.c \
|
||||
libgd/wbmp.c libgd/gd_wbmp.c libgd/gdhelpers.c libgd/gd_topal.c libgd/gd_gif_in.c \
|
||||
libgd/xbm.c"
|
||||
libgd/xbm.c libgd/gd_gif_out.c "
|
||||
|
||||
dnl check for fabsf and floorf which are available since C99
|
||||
AC_CHECK_FUNCS(fabsf floorf)
|
||||
@@ -306,7 +307,9 @@ dnl These are always available with bundled library
|
||||
AC_DEFINE(HAVE_GD_XBM, 1, [ ])
|
||||
AC_DEFINE(HAVE_GD_BUNDLED, 1, [ ])
|
||||
AC_DEFINE(HAVE_GD_GIF_READ, 1, [ ])
|
||||
AC_DEFINE(HAVE_GD_GIF_CREATE, 1, [ ])
|
||||
AC_DEFINE(HAVE_GD_IMAGEELLIPSE, 1, [ ])
|
||||
AC_DEFINE(HAVE_GD_DYNAMIC_CTX_EX, 1, [ ])
|
||||
|
||||
dnl Make sure the libgd/ is first in the include path
|
||||
GDLIB_CFLAGS="-DHAVE_LIBPNG"
|
||||
|
||||
+2
-1
@@ -13,7 +13,7 @@ if (PHP_GD != "no") {
|
||||
EXTENSION("gd", "gd.c gdttf.c", null, "-Iext/gd/libgd", "php_gd2.dll");
|
||||
ADD_SOURCES("ext/gd/libgd", "gd2copypal.c gd_arc_f_buggy.c gd.c \
|
||||
gdcache.c gdfontg.c gdfontl.c gdfontmb.c gdfonts.c gdfontt.c \
|
||||
gdft.c gd_gd2.c gd_gd.c gd_gif_in.c gdhelpers.c gd_io.c gd_io_dp.c \
|
||||
gdft.c gd_gd2.c gd_gd.c gd_gif_in.c gd_gif_out.c gdhelpers.c gd_io.c gd_io_dp.c \
|
||||
gd_io_file.c gd_io_ss.c gd_jpeg.c gdkanji.c gd_png.c gd_ss.c \
|
||||
gdtables.c gd_topal.c gd_wbmp.c gdxpm.c wbmp.c xbm.c", "gd");
|
||||
AC_DEFINE('HAVE_LIBGD', 1, 'GD support');
|
||||
@@ -21,6 +21,7 @@ if (PHP_GD != "no") {
|
||||
/D HAVE_GD_BUNDLED=1 \
|
||||
/D HAVE_GD_GD2 \
|
||||
/D HAVE_GD_GIF_READ=1 \
|
||||
/D HAVE_GD_GIF_CREATE=1 \
|
||||
/D HAVE_GDIMAGECOLORRESOLVE=1 \
|
||||
/D HAVE_GD_IMAGESETBRUSH=1 \
|
||||
/D HAVE_GD_IMAGESETTILE=1 \
|
||||
|
||||
+8
-4
@@ -115,6 +115,10 @@ extern int gdImageColorResolve(gdImagePtr, int, int, int);
|
||||
int gdImageColorClosestHWB(gdImagePtr im, int r, int g, int b);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GD_DYNAMIC_CTX_EX
|
||||
#define gdNewDynamicCtxEx(len, data, val) gdNewDynamicCtx(len, data)
|
||||
#endif
|
||||
|
||||
/* Section Filters Declarations */
|
||||
/* IMPORTANT NOTE FOR NEW FILTER
|
||||
* Do not forget to update:
|
||||
@@ -453,7 +457,7 @@ PHP_RSHUTDOWN_FUNCTION(gd)
|
||||
/* }}} */
|
||||
|
||||
#if HAVE_GD_BUNDLED
|
||||
#define PHP_GD_VERSION_STRING "bundled (2.0.23 compatible)"
|
||||
#define PHP_GD_VERSION_STRING "bundled (2.0.28 compatible)"
|
||||
#elif HAVE_LIBGD20
|
||||
#define PHP_GD_VERSION_STRING "2.0 or higher"
|
||||
#elif HAVE_GDIMAGECOLORRESOLVE
|
||||
@@ -1343,7 +1347,7 @@ static int _php_image_type (char data[8])
|
||||
#ifdef HAVE_GD_WBMP
|
||||
else {
|
||||
gdIOCtx *io_ctx;
|
||||
io_ctx = gdNewDynamicCtx(8, data);
|
||||
io_ctx = gdNewDynamicCtxEx(8, data, 0);
|
||||
if (io_ctx) {
|
||||
if (getmbi((int(*)(void *)) gdGetC, io_ctx) == 0 && skipheader((int(*)(void *)) gdGetC, io_ctx) == 0 ) {
|
||||
#if HAVE_LIBGD204
|
||||
@@ -1375,7 +1379,7 @@ gdImagePtr _php_image_create_from_string(zval **data, char *tn, gdImagePtr (*ioc
|
||||
gdImagePtr im;
|
||||
gdIOCtx *io_ctx;
|
||||
|
||||
io_ctx = gdNewDynamicCtx (Z_STRLEN_PP(data), Z_STRVAL_PP(data));
|
||||
io_ctx = gdNewDynamicCtxEx(Z_STRLEN_PP(data), Z_STRVAL_PP(data), 0);
|
||||
|
||||
if (!io_ctx) {
|
||||
return NULL;
|
||||
@@ -1530,7 +1534,7 @@ static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type,
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
io_ctx = gdNewDynamicCtx(buff_size, buff);
|
||||
io_ctx = gdNewDynamicCtxEx(buff_size, buff, 0);
|
||||
if (!io_ctx) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING,"Cannot allocate GD IO context");
|
||||
goto out_err;
|
||||
|
||||
+8
-4
@@ -43,8 +43,8 @@ RSC=rc.exe
|
||||
# PROP Intermediate_Dir "Release_TS"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\zlib" /I "..\..\TSRM" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_GD" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_GD_GIF_READ=1 /D HAVE_GDIMAGECOLORRESOLVE=1 /D "HAVE_GD_PNG" /D "HAVE_GD_JPG" /D "HAVE_GD_WBMP" /D "HAVE_GD_XBM" /D HAVE_LIBGD13=1 /D HAVE_LIBGD=1 /D HAVE_LIBGD15=1 /D HAVE_LIBGD204=1 /FR /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\zlib" /I "..\..\TSRM" /I "libgd" /D ZEND_DEBUG=0 /D HAVE_LIBGD15=1 /D HAVE_LIBGD204=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_GD" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_GD_GIF_READ=1 /D HAVE_GDIMAGECOLORRESOLVE=1 /D "HAVE_GD_PNG" /D "HAVE_GD_JPG" /D "HAVE_GD_WBMP" /D "HAVE_GD_XBM" /D HAVE_LIBGD=1 /D HAVE_LIBGD13=1 /D HAVE_LIBGD20=1 /D "USE_GD_IOCTX" /D HAVE_LIBFREETYPE=1 /D "USE_GD_IMGSTRTTF" /D HAVE_GD_STRINGTTF=1 /D HAVE_GD_BUNDLED=1 /D "MSWIN32" /D "HAVE_LIBPNG" /D "HAVE_LIBJPEG" /D "HAVE_GD_GD2" /D HAVE_GD_STRINGFTEX=1 /D HAVE_GD_IMAGESETBRUSH=1 /D HAVE_GD_IMAGESETTILE=1 /FR /FD /c
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\zlib" /I "..\..\TSRM" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_GD" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_GD_GIF_READ=1 /D HAVE_GD_GIF_CREATE=1 /D HAVE_GDIMAGECOLORRESOLVE=1 /D "HAVE_GD_PNG" /D "HAVE_GD_JPG" /D "HAVE_GD_WBMP" /D "HAVE_GD_XBM" /D HAVE_LIBGD13=1 /D HAVE_LIBGD=1 /D HAVE_LIBGD15=1 /D HAVE_LIBGD204=1 /FR /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\zlib" /I "..\..\TSRM" /I "libgd" /D ZEND_DEBUG=0 /D HAVE_LIBGD15=1 /D HAVE_LIBGD204=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_GD" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_GD_GIF_READ=1 /D HAVE_GD_GIF_CREATE=1 /D HAVE_GDIMAGECOLORRESOLVE=1 /D "HAVE_GD_PNG" /D "HAVE_GD_JPG" /D "HAVE_GD_WBMP" /D "HAVE_GD_XBM" /D HAVE_LIBGD=1 /D HAVE_LIBGD13=1 /D HAVE_LIBGD20=1 /D "USE_GD_IOCTX" /D HAVE_LIBFREETYPE=1 /D "USE_GD_IMGSTRTTF" /D HAVE_GD_STRINGTTF=1 /D HAVE_GD_BUNDLED=1 /D "MSWIN32" /D "HAVE_LIBPNG" /D "HAVE_LIBJPEG" /D "HAVE_GD_GD2" /D HAVE_GD_STRINGFTEX=1 /D HAVE_GD_IMAGESETBRUSH=1 /D HAVE_GD_IMAGESETTILE=1 /FR /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
@@ -73,8 +73,8 @@ LINK32=link.exe
|
||||
# PROP Intermediate_Dir "Debug_TS"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\zlib" /I "..\..\TSRM" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_GD" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_GD_GIF_READ=1 /D HAVE_GDIMAGECOLORRESOLVE=1 /D "HAVE_GD_PNG" /D "HAVE_GD_JPG" /D "HAVE_GD_WBMP" /D HAVE_LIBGD13=1 /D HAVE_LIBGD=1 /D HAVE_LIBGD15=1 /D HAVE_LIBGD204=1 /FR /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\zlib" /I "..\..\TSRM" /I "libgd" /D ZEND_DEBUG=1 /D "HAVE_LIBGD15" /D HAVE_LIBGD204=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_GD" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_GD_GIF_READ=1 /D HAVE_GDIMAGECOLORRESOLVE=1 /D "HAVE_GD_PNG" /D "HAVE_GD_JPG" /D "HAVE_GD_WBMP" /D HAVE_LIBGD=1 /D HAVE_LIBGD13=1 /D HAVE_LIBGD20=1 /D "USE_GD_IOCTX" /D HAVE_LIBFREETYPE=1 /D "USE_GD_IMGSTRTTF" /D HAVE_GD_STRINGTTF=1 /D HAVE_GD_BUNDLED=1 /D "MSWIN32" /D "HAVE_LIBPNG" /D "HAVE_LIBJPEG" /D "HAVE_GD_GD2" /D HAVE_GD_STRINGFTEX=1 /D HAVE_GD_IMAGESETBRUSH=1 /D HAVE_GD_IMAGESETTILE=1 /FR /FD /c
|
||||
# ADD BASE CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\zlib" /I "..\..\TSRM" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_GD" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_GD_GIF_READ=1 /D HAVE_GD_GIF_CREATE=1 /D HAVE_GDIMAGECOLORRESOLVE=1 /D "HAVE_GD_PNG" /D "HAVE_GD_JPG" /D "HAVE_GD_WBMP" /D HAVE_LIBGD13=1 /D HAVE_LIBGD=1 /D HAVE_LIBGD15=1 /D HAVE_LIBGD204=1 /FR /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\zlib" /I "..\..\TSRM" /I "libgd" /D ZEND_DEBUG=1 /D "HAVE_LIBGD15" /D HAVE_LIBGD204=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_GD" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_GD_GIF_READ=1 /D HAVE_GD_GIF_CREATE=1 /D HAVE_GDIMAGECOLORRESOLVE=1 /D "HAVE_GD_PNG" /D "HAVE_GD_JPG" /D "HAVE_GD_WBMP" /D HAVE_LIBGD=1 /D HAVE_LIBGD13=1 /D HAVE_LIBGD20=1 /D "USE_GD_IOCTX" /D HAVE_LIBFREETYPE=1 /D "USE_GD_IMGSTRTTF" /D HAVE_GD_STRINGTTF=1 /D HAVE_GD_BUNDLED=1 /D "MSWIN32" /D "HAVE_LIBPNG" /D "HAVE_LIBJPEG" /D "HAVE_GD_GD2" /D HAVE_GD_STRINGFTEX=1 /D HAVE_GD_IMAGESETBRUSH=1 /D HAVE_GD_IMAGESETTILE=1 /FR /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
@@ -213,6 +213,10 @@ SOURCE=.\libgd\gd_gd2.c
|
||||
SOURCE=.\libgd\gd_gif_in.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\libgd\gd_gif_out.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\libgd\gd_io.c
|
||||
|
||||
|
||||
@@ -407,8 +407,11 @@ void gdImageColorDeallocate(gdImagePtr im, int color);
|
||||
conversion to palette is not great (for small images
|
||||
it can be negative) and the quality loss is ugly. */
|
||||
|
||||
gdImagePtr gdImageCreatePaletteFromTrueColor (gdImagePtr im, int ditherFlag, int colorsWanted);
|
||||
|
||||
void gdImageTrueColorToPalette(gdImagePtr im, int ditherFlag, int colorsWanted);
|
||||
|
||||
|
||||
/* An attempt at getting the results of gdImageTrueColorToPalette
|
||||
to look a bit more like the original (im1 is the original
|
||||
and im2 is the palette version */
|
||||
@@ -428,6 +431,8 @@ void gdImageColorTransparent(gdImagePtr im, int color);
|
||||
void gdImagePaletteCopy(gdImagePtr dst, gdImagePtr src);
|
||||
void gdImagePng(gdImagePtr im, FILE *out);
|
||||
void gdImagePngCtx(gdImagePtr im, gdIOCtx *out);
|
||||
void gdImageGif(gdImagePtr im, FILE *out);
|
||||
void gdImageGifCtx(gdImagePtr im, gdIOCtx *out);
|
||||
/* 2.0.12: Compression level: 0-9 or -1, where 0 is NO COMPRESSION at all,
|
||||
* 1 is FASTEST but produces larger files, 9 provides the best
|
||||
* compression (smallest files) but takes a long time to compress, and
|
||||
|
||||
@@ -0,0 +1,759 @@
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include "gd.h"
|
||||
|
||||
/* Code drawn from ppmtogif.c, from the pbmplus package
|
||||
**
|
||||
** Based on GIFENCOD by David Rowley <mgardi@watdscu.waterloo.edu>. A
|
||||
** Lempel-Zim compression based on "compress".
|
||||
**
|
||||
** Modified by Marcel Wijkstra <wijkstra@fwi.uva.nl>
|
||||
**
|
||||
** Copyright (C) 1989 by Jef Poskanzer.
|
||||
**
|
||||
** Permission to use, copy, modify, and distribute this software and its
|
||||
** documentation for any purpose and without fee is hereby granted, provided
|
||||
** that the above copyright notice appear in all copies and that both that
|
||||
** copyright notice and this permission notice appear in supporting
|
||||
** documentation. This software is provided "as is" without express or
|
||||
** implied warranty.
|
||||
**
|
||||
** The Graphics Interchange Format(c) is the Copyright property of
|
||||
** CompuServe Incorporated. GIF(sm) is a Service Mark property of
|
||||
** CompuServe Incorporated.
|
||||
*/
|
||||
|
||||
/*
|
||||
* a code_int must be able to hold 2**GIFBITS values of type int, and also -1
|
||||
*/
|
||||
typedef int code_int;
|
||||
|
||||
#ifdef SIGNED_COMPARE_SLOW
|
||||
typedef unsigned long int count_int;
|
||||
typedef unsigned short int count_short;
|
||||
#else /*SIGNED_COMPARE_SLOW*/
|
||||
typedef long int count_int;
|
||||
#endif /*SIGNED_COMPARE_SLOW*/
|
||||
|
||||
/* 2.0.28: threadsafe */
|
||||
|
||||
#define maxbits GIFBITS
|
||||
|
||||
/* should NEVER generate this code */
|
||||
#define maxmaxcode ((code_int)1 << GIFBITS)
|
||||
|
||||
#define HSIZE 5003 /* 80% occupancy */
|
||||
#define hsize HSIZE /* Apparently invariant, left over from
|
||||
compress */
|
||||
|
||||
typedef struct {
|
||||
int Width, Height;
|
||||
int curx, cury;
|
||||
long CountDown;
|
||||
int Pass;
|
||||
int Interlace;
|
||||
int n_bits; /* number of bits/code */
|
||||
code_int maxcode; /* maximum code, given n_bits */
|
||||
count_int htab [HSIZE];
|
||||
unsigned short codetab [HSIZE];
|
||||
code_int free_ent; /* first unused entry */
|
||||
/*
|
||||
* block compression parameters -- after all codes are used up,
|
||||
* and compression rate changes, start over.
|
||||
*/
|
||||
int clear_flg;
|
||||
int offset;
|
||||
long int in_count; /* length of input */
|
||||
long int out_count; /* # of codes output (for debugging) */
|
||||
|
||||
int g_init_bits;
|
||||
gdIOCtx * g_outfile;
|
||||
|
||||
int ClearCode;
|
||||
int EOFCode;
|
||||
unsigned long cur_accum;
|
||||
int cur_bits;
|
||||
/*
|
||||
* Number of characters so far in this 'packet'
|
||||
*/
|
||||
int a_count;
|
||||
/*
|
||||
* Define the storage for the packet accumulator
|
||||
*/
|
||||
char accum[ 256 ];
|
||||
} GifCtx;
|
||||
|
||||
static int gifPutWord(int w, gdIOCtx *out);
|
||||
static int colorstobpp(int colors);
|
||||
static void BumpPixel (GifCtx *ctx);
|
||||
static int GIFNextPixel (gdImagePtr im, GifCtx *ctx);
|
||||
static void GIFEncode (gdIOCtxPtr fp, int GWidth, int GHeight, int GInterlace, int Background, int Transparent, int BitsPerPixel, int *Red, int *Green, int *Blue, gdImagePtr im);
|
||||
static void compress (int init_bits, gdIOCtx *outfile, gdImagePtr im, GifCtx *ctx);
|
||||
static void output (code_int code, GifCtx *ctx);
|
||||
static void cl_block (GifCtx *ctx);
|
||||
static void cl_hash (register count_int chsize, GifCtx *ctx);
|
||||
static void char_init (GifCtx *ctx);
|
||||
static void char_out (int c, GifCtx *ctx);
|
||||
static void flush_char (GifCtx *ctx);
|
||||
void * gdImageGifPtr (gdImagePtr im, int *size)
|
||||
{
|
||||
void *rv;
|
||||
gdIOCtx *out = gdNewDynamicCtx (2048, NULL);
|
||||
gdImageGifCtx (im, out);
|
||||
rv = gdDPExtractData (out, size);
|
||||
out->gd_free (out);
|
||||
return rv;
|
||||
}
|
||||
|
||||
void gdImageGif (gdImagePtr im, FILE * outFile)
|
||||
{
|
||||
gdIOCtx *out = gdNewFileCtx (outFile);
|
||||
gdImageGifCtx (im, out);
|
||||
out->gd_free (out);
|
||||
}
|
||||
|
||||
void gdImageGifCtx(gdImagePtr im, gdIOCtxPtr out)
|
||||
{
|
||||
gdImagePtr pim = 0, tim = im;
|
||||
int interlace, transparent, BitsPerPixel;
|
||||
interlace = im->interlace;
|
||||
transparent = im->transparent;
|
||||
if (im->trueColor) {
|
||||
/* Expensive, but the only way that produces an
|
||||
acceptable result: mix down to a palette
|
||||
based temporary image. */
|
||||
pim = gdImageCreatePaletteFromTrueColor(im, 1, 256);
|
||||
if (!pim) {
|
||||
return;
|
||||
}
|
||||
tim = pim;
|
||||
}
|
||||
BitsPerPixel = colorstobpp(tim->colorsTotal);
|
||||
/* All set, let's do it. */
|
||||
GIFEncode(
|
||||
out, tim->sx, tim->sy, interlace, 0, transparent, BitsPerPixel,
|
||||
tim->red, tim->green, tim->blue, tim);
|
||||
if (pim) {
|
||||
/* Destroy palette based temporary image. */
|
||||
gdImageDestroy( pim);
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
colorstobpp(int colors)
|
||||
{
|
||||
int bpp = 0;
|
||||
|
||||
if ( colors <= 2 )
|
||||
bpp = 1;
|
||||
else if ( colors <= 4 )
|
||||
bpp = 2;
|
||||
else if ( colors <= 8 )
|
||||
bpp = 3;
|
||||
else if ( colors <= 16 )
|
||||
bpp = 4;
|
||||
else if ( colors <= 32 )
|
||||
bpp = 5;
|
||||
else if ( colors <= 64 )
|
||||
bpp = 6;
|
||||
else if ( colors <= 128 )
|
||||
bpp = 7;
|
||||
else if ( colors <= 256 )
|
||||
bpp = 8;
|
||||
return bpp;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* GIFENCODE.C - GIF Image compression interface
|
||||
*
|
||||
* GIFEncode( FName, GHeight, GWidth, GInterlace, Background, Transparent,
|
||||
* BitsPerPixel, Red, Green, Blue, gdImagePtr )
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
/*
|
||||
* Bump the 'curx' and 'cury' to point to the next pixel
|
||||
*/
|
||||
static void
|
||||
BumpPixel(GifCtx *ctx)
|
||||
{
|
||||
/*
|
||||
* Bump the current X position
|
||||
*/
|
||||
++(ctx->curx);
|
||||
|
||||
/*
|
||||
* If we are at the end of a scan line, set curx back to the beginning
|
||||
* If we are interlaced, bump the cury to the appropriate spot,
|
||||
* otherwise, just increment it.
|
||||
*/
|
||||
if( ctx->curx == ctx->Width ) {
|
||||
ctx->curx = 0;
|
||||
|
||||
if( !ctx->Interlace )
|
||||
++(ctx->cury);
|
||||
else {
|
||||
switch( ctx->Pass ) {
|
||||
|
||||
case 0:
|
||||
ctx->cury += 8;
|
||||
if( ctx->cury >= ctx->Height ) {
|
||||
++(ctx->Pass);
|
||||
ctx->cury = 4;
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
ctx->cury += 8;
|
||||
if( ctx->cury >= ctx->Height ) {
|
||||
++(ctx->Pass);
|
||||
ctx->cury = 2;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
ctx->cury += 4;
|
||||
if( ctx->cury >= ctx->Height ) {
|
||||
++(ctx->Pass);
|
||||
ctx->cury = 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
ctx->cury += 2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the next pixel from the image
|
||||
*/
|
||||
static int
|
||||
GIFNextPixel(gdImagePtr im, GifCtx *ctx)
|
||||
{
|
||||
int r;
|
||||
|
||||
if( ctx->CountDown == 0 )
|
||||
return EOF;
|
||||
|
||||
--(ctx->CountDown);
|
||||
|
||||
r = gdImageGetPixel(im, ctx->curx, ctx->cury);
|
||||
|
||||
BumpPixel(ctx);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
/* public */
|
||||
|
||||
static void
|
||||
GIFEncode(gdIOCtxPtr fp, int GWidth, int GHeight, int GInterlace, int Background, int Transparent, int BitsPerPixel, int *Red, int *Green, int *Blue, gdImagePtr im)
|
||||
{
|
||||
int B;
|
||||
int RWidth, RHeight;
|
||||
int LeftOfs, TopOfs;
|
||||
int Resolution;
|
||||
int ColorMapSize;
|
||||
int InitCodeSize;
|
||||
int i;
|
||||
GifCtx ctx;
|
||||
ctx.Interlace = GInterlace;
|
||||
ctx.in_count = 1;
|
||||
memset(&ctx, 0, sizeof(ctx));
|
||||
ColorMapSize = 1 << BitsPerPixel;
|
||||
|
||||
RWidth = ctx.Width = GWidth;
|
||||
RHeight = ctx.Height = GHeight;
|
||||
LeftOfs = TopOfs = 0;
|
||||
|
||||
Resolution = BitsPerPixel;
|
||||
|
||||
/*
|
||||
* Calculate number of bits we are expecting
|
||||
*/
|
||||
ctx.CountDown = (long)ctx.Width * (long)ctx.Height;
|
||||
|
||||
/*
|
||||
* Indicate which pass we are on (if interlace)
|
||||
*/
|
||||
ctx.Pass = 0;
|
||||
|
||||
/*
|
||||
* The initial code size
|
||||
*/
|
||||
if( BitsPerPixel <= 1 )
|
||||
InitCodeSize = 2;
|
||||
else
|
||||
InitCodeSize = BitsPerPixel;
|
||||
|
||||
/*
|
||||
* Set up the current x and y position
|
||||
*/
|
||||
ctx.curx = ctx.cury = 0;
|
||||
|
||||
/*
|
||||
* Write the Magic header
|
||||
*/
|
||||
gdPutBuf(Transparent < 0 ? "GIF87a" : "GIF89a", 6, fp );
|
||||
|
||||
/*
|
||||
* Write out the screen width and height
|
||||
*/
|
||||
gifPutWord( RWidth, fp );
|
||||
gifPutWord( RHeight, fp );
|
||||
|
||||
/*
|
||||
* Indicate that there is a global colour map
|
||||
*/
|
||||
B = 0x80; /* Yes, there is a color map */
|
||||
|
||||
/*
|
||||
* OR in the resolution
|
||||
*/
|
||||
B |= (Resolution - 1) << 5;
|
||||
|
||||
/*
|
||||
* OR in the Bits per Pixel
|
||||
*/
|
||||
B |= (BitsPerPixel - 1);
|
||||
|
||||
/*
|
||||
* Write it out
|
||||
*/
|
||||
gdPutC( B, fp );
|
||||
|
||||
/*
|
||||
* Write out the Background colour
|
||||
*/
|
||||
gdPutC( Background, fp );
|
||||
|
||||
/*
|
||||
* Byte of 0's (future expansion)
|
||||
*/
|
||||
gdPutC( 0, fp );
|
||||
|
||||
/*
|
||||
* Write out the Global Colour Map
|
||||
*/
|
||||
for( i=0; i<ColorMapSize; ++i ) {
|
||||
gdPutC( Red[i], fp );
|
||||
gdPutC( Green[i], fp );
|
||||
gdPutC( Blue[i], fp );
|
||||
}
|
||||
|
||||
/*
|
||||
* Write out extension for transparent colour index, if necessary.
|
||||
*/
|
||||
if ( Transparent >= 0 ) {
|
||||
gdPutC( '!', fp );
|
||||
gdPutC( 0xf9, fp );
|
||||
gdPutC( 4, fp );
|
||||
gdPutC( 1, fp );
|
||||
gdPutC( 0, fp );
|
||||
gdPutC( 0, fp );
|
||||
gdPutC( (unsigned char) Transparent, fp );
|
||||
gdPutC( 0, fp );
|
||||
}
|
||||
|
||||
/*
|
||||
* Write an Image separator
|
||||
*/
|
||||
gdPutC( ',', fp );
|
||||
|
||||
/*
|
||||
* Write the Image header
|
||||
*/
|
||||
|
||||
gifPutWord( LeftOfs, fp );
|
||||
gifPutWord( TopOfs, fp );
|
||||
gifPutWord( ctx.Width, fp );
|
||||
gifPutWord( ctx.Height, fp );
|
||||
|
||||
/*
|
||||
* Write out whether or not the image is interlaced
|
||||
*/
|
||||
if( ctx.Interlace )
|
||||
gdPutC( 0x40, fp );
|
||||
else
|
||||
gdPutC( 0x00, fp );
|
||||
|
||||
/*
|
||||
* Write out the initial code size
|
||||
*/
|
||||
gdPutC( InitCodeSize, fp );
|
||||
|
||||
/*
|
||||
* Go and actually compress the data
|
||||
*/
|
||||
compress( InitCodeSize+1, fp, im, &ctx );
|
||||
|
||||
/*
|
||||
* Write out a Zero-length packet (to end the series)
|
||||
*/
|
||||
gdPutC( 0, fp );
|
||||
|
||||
/*
|
||||
* Write the GIF file terminator
|
||||
*/
|
||||
gdPutC( ';', fp );
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* GIFCOMPR.C - GIF Image compression routines
|
||||
*
|
||||
* Lempel-Ziv compression based on 'compress'. GIF modifications by
|
||||
* David Rowley (mgardi@watdcsu.waterloo.edu)
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/*
|
||||
* General DEFINEs
|
||||
*/
|
||||
|
||||
#define GIFBITS 12
|
||||
|
||||
#ifdef NO_UCHAR
|
||||
typedef char char_type;
|
||||
#else /*NO_UCHAR*/
|
||||
typedef unsigned char char_type;
|
||||
#endif /*NO_UCHAR*/
|
||||
|
||||
/*
|
||||
*
|
||||
* GIF Image compression - modified 'compress'
|
||||
*
|
||||
* Based on: compress.c - File compression ala IEEE Computer, June 1984.
|
||||
*
|
||||
* By Authors: Spencer W. Thomas (decvax!harpo!utah-cs!utah-gr!thomas)
|
||||
* Jim McKie (decvax!mcvax!jim)
|
||||
* Steve Davies (decvax!vax135!petsd!peora!srd)
|
||||
* Ken Turkowski (decvax!decwrl!turtlevax!ken)
|
||||
* James A. Woods (decvax!ihnp4!ames!jaw)
|
||||
* Joe Orost (decvax!vax135!petsd!joe)
|
||||
*
|
||||
*/
|
||||
#include <ctype.h>
|
||||
|
||||
#define ARGVAL() (*++(*argv) || (--argc && *++argv))
|
||||
|
||||
#ifdef COMPATIBLE /* But wrong! */
|
||||
# define MAXCODE(n_bits) ((code_int) 1 << (n_bits) - 1)
|
||||
#else /*COMPATIBLE*/
|
||||
# define MAXCODE(n_bits) (((code_int) 1 << (n_bits)) - 1)
|
||||
#endif /*COMPATIBLE*/
|
||||
|
||||
#define HashTabOf(i) ctx->htab[i]
|
||||
#define CodeTabOf(i) ctx->codetab[i]
|
||||
|
||||
|
||||
/*
|
||||
* To save much memory, we overlay the table used by compress() with those
|
||||
* used by decompress(). The tab_prefix table is the same size and type
|
||||
* as the codetab. The tab_suffix table needs 2**GIFBITS characters. We
|
||||
* get this from the beginning of htab. The output stack uses the rest
|
||||
* of htab, and contains characters. There is plenty of room for any
|
||||
* possible stack (stack used to be 8000 characters).
|
||||
*/
|
||||
|
||||
#define tab_prefixof(i) CodeTabOf(i)
|
||||
#define tab_suffixof(i) ((char_type*)(htab))[i]
|
||||
#define de_stack ((char_type*)&tab_suffixof((code_int)1<<GIFBITS))
|
||||
|
||||
/*
|
||||
* compress stdin to stdout
|
||||
*
|
||||
* Algorithm: use open addressing double hashing (no chaining) on the
|
||||
* prefix code / next character combination. We do a variant of Knuth's
|
||||
* algorithm D (vol. 3, sec. 6.4) along with G. Knott's relatively-prime
|
||||
* secondary probe. Here, the modular division first probe is gives way
|
||||
* to a faster exclusive-or manipulation. Also do block compression with
|
||||
* an adaptive reset, whereby the code table is cleared when the compression
|
||||
* ratio decreases, but after the table fills. The variable-length output
|
||||
* codes are re-sized at this point, and a special CLEAR code is generated
|
||||
* for the decompressor. Late addition: construct the table according to
|
||||
* file size for noticeable speed improvement on small files. Please direct
|
||||
* questions about this implementation to ames!jaw.
|
||||
*/
|
||||
|
||||
static void
|
||||
output(code_int code, GifCtx *ctx);
|
||||
|
||||
static void
|
||||
compress(int init_bits, gdIOCtxPtr outfile, gdImagePtr im, GifCtx *ctx)
|
||||
{
|
||||
register long fcode;
|
||||
register code_int i /* = 0 */;
|
||||
register int c;
|
||||
register code_int ent;
|
||||
register code_int disp;
|
||||
register code_int hsize_reg;
|
||||
register int hshift;
|
||||
|
||||
/*
|
||||
* Set up the globals: g_init_bits - initial number of bits
|
||||
* g_outfile - pointer to output file
|
||||
*/
|
||||
ctx->g_init_bits = init_bits;
|
||||
ctx->g_outfile = outfile;
|
||||
|
||||
/*
|
||||
* Set up the necessary values
|
||||
*/
|
||||
ctx->offset = 0;
|
||||
ctx->out_count = 0;
|
||||
ctx->clear_flg = 0;
|
||||
ctx->in_count = 1;
|
||||
ctx->maxcode = MAXCODE(ctx->n_bits = ctx->g_init_bits);
|
||||
|
||||
ctx->ClearCode = (1 << (init_bits - 1));
|
||||
ctx->EOFCode = ctx->ClearCode + 1;
|
||||
ctx->free_ent = ctx->ClearCode + 2;
|
||||
|
||||
char_init(ctx);
|
||||
|
||||
ent = GIFNextPixel( im, ctx );
|
||||
|
||||
hshift = 0;
|
||||
for ( fcode = (long) hsize; fcode < 65536L; fcode *= 2L )
|
||||
++hshift;
|
||||
hshift = 8 - hshift; /* set hash code range bound */
|
||||
|
||||
hsize_reg = hsize;
|
||||
cl_hash( (count_int) hsize_reg, ctx ); /* clear hash table */
|
||||
|
||||
output( (code_int)ctx->ClearCode, ctx );
|
||||
|
||||
#ifdef SIGNED_COMPARE_SLOW
|
||||
while ( (c = GIFNextPixel( im )) != (unsigned) EOF ) {
|
||||
#else /*SIGNED_COMPARE_SLOW*/
|
||||
while ( (c = GIFNextPixel( im, ctx )) != EOF ) { /* } */
|
||||
#endif /*SIGNED_COMPARE_SLOW*/
|
||||
|
||||
++(ctx->in_count);
|
||||
|
||||
fcode = (long) (((long) c << maxbits) + ent);
|
||||
i = (((code_int)c << hshift) ^ ent); /* xor hashing */
|
||||
|
||||
if ( HashTabOf (i) == fcode ) {
|
||||
ent = CodeTabOf (i);
|
||||
continue;
|
||||
} else if ( (long)HashTabOf (i) < 0 ) /* empty slot */
|
||||
goto nomatch;
|
||||
disp = hsize_reg - i; /* secondary hash (after G. Knott) */
|
||||
if ( i == 0 )
|
||||
disp = 1;
|
||||
probe:
|
||||
if ( (i -= disp) < 0 )
|
||||
i += hsize_reg;
|
||||
|
||||
if ( HashTabOf (i) == fcode ) {
|
||||
ent = CodeTabOf (i);
|
||||
continue;
|
||||
}
|
||||
if ( (long)HashTabOf (i) > 0 )
|
||||
goto probe;
|
||||
nomatch:
|
||||
output ( (code_int) ent, ctx );
|
||||
++(ctx->out_count);
|
||||
ent = c;
|
||||
#ifdef SIGNED_COMPARE_SLOW
|
||||
if ( (unsigned) ctx->free_ent < (unsigned) maxmaxcode) {
|
||||
#else /*SIGNED_COMPARE_SLOW*/
|
||||
if ( ctx->free_ent < maxmaxcode ) { /* } */
|
||||
#endif /*SIGNED_COMPARE_SLOW*/
|
||||
CodeTabOf (i) = ctx->free_ent++; /* code -> hashtable */
|
||||
HashTabOf (i) = fcode;
|
||||
} else
|
||||
cl_block(ctx);
|
||||
}
|
||||
/*
|
||||
* Put out the final code.
|
||||
*/
|
||||
output( (code_int)ent, ctx );
|
||||
++(ctx->out_count);
|
||||
output( (code_int) ctx->EOFCode, ctx );
|
||||
}
|
||||
|
||||
/*****************************************************************
|
||||
* TAG( output )
|
||||
*
|
||||
* Output the given code.
|
||||
* Inputs:
|
||||
* code: A n_bits-bit integer. If == -1, then EOF. This assumes
|
||||
* that n_bits =< (long)wordsize - 1.
|
||||
* Outputs:
|
||||
* Outputs code to the file.
|
||||
* Assumptions:
|
||||
* Chars are 8 bits long.
|
||||
* Algorithm:
|
||||
* Maintain a GIFBITS character long buffer (so that 8 codes will
|
||||
* fit in it exactly). Use the VAX insv instruction to insert each
|
||||
* code in turn. When the buffer fills up empty it and start over.
|
||||
*/
|
||||
|
||||
static unsigned long masks[] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000F,
|
||||
0x001F, 0x003F, 0x007F, 0x00FF,
|
||||
0x01FF, 0x03FF, 0x07FF, 0x0FFF,
|
||||
0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF };
|
||||
|
||||
static void
|
||||
output(code_int code, GifCtx *ctx)
|
||||
{
|
||||
ctx->cur_accum &= masks[ ctx->cur_bits ];
|
||||
|
||||
if( ctx->cur_bits > 0 )
|
||||
ctx->cur_accum |= ((long)code << ctx->cur_bits);
|
||||
else
|
||||
ctx->cur_accum = code;
|
||||
|
||||
ctx->cur_bits += ctx->n_bits;
|
||||
|
||||
while( ctx->cur_bits >= 8 ) {
|
||||
char_out( (unsigned int)(ctx->cur_accum & 0xff), ctx );
|
||||
ctx->cur_accum >>= 8;
|
||||
ctx->cur_bits -= 8;
|
||||
}
|
||||
|
||||
/*
|
||||
* If the next entry is going to be too big for the code size,
|
||||
* then increase it, if possible.
|
||||
*/
|
||||
if ( ctx->free_ent > ctx->maxcode || ctx->clear_flg ) {
|
||||
|
||||
if( ctx->clear_flg ) {
|
||||
|
||||
ctx->maxcode = MAXCODE (ctx->n_bits = ctx->g_init_bits);
|
||||
ctx->clear_flg = 0;
|
||||
|
||||
} else {
|
||||
|
||||
++(ctx->n_bits);
|
||||
if ( ctx->n_bits == maxbits )
|
||||
ctx->maxcode = maxmaxcode;
|
||||
else
|
||||
ctx->maxcode = MAXCODE(ctx->n_bits);
|
||||
}
|
||||
}
|
||||
|
||||
if( code == ctx->EOFCode ) {
|
||||
/*
|
||||
* At EOF, write the rest of the buffer.
|
||||
*/
|
||||
while( ctx->cur_bits > 0 ) {
|
||||
char_out( (unsigned int)(ctx->cur_accum & 0xff), ctx);
|
||||
ctx->cur_accum >>= 8;
|
||||
ctx->cur_bits -= 8;
|
||||
}
|
||||
|
||||
flush_char(ctx);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Clear out the hash table
|
||||
*/
|
||||
static void
|
||||
cl_block (GifCtx *ctx) /* table clear for block compress */
|
||||
{
|
||||
|
||||
cl_hash ( (count_int) hsize, ctx );
|
||||
ctx->free_ent = ctx->ClearCode + 2;
|
||||
ctx->clear_flg = 1;
|
||||
|
||||
output( (code_int)ctx->ClearCode, ctx);
|
||||
}
|
||||
|
||||
static void
|
||||
cl_hash(register count_int chsize, GifCtx *ctx) /* reset code table */
|
||||
|
||||
{
|
||||
|
||||
register count_int *htab_p = ctx->htab+chsize;
|
||||
|
||||
register long i;
|
||||
register long m1 = -1;
|
||||
|
||||
i = chsize - 16;
|
||||
do { /* might use Sys V memset(3) here */
|
||||
*(htab_p-16) = m1;
|
||||
*(htab_p-15) = m1;
|
||||
*(htab_p-14) = m1;
|
||||
*(htab_p-13) = m1;
|
||||
*(htab_p-12) = m1;
|
||||
*(htab_p-11) = m1;
|
||||
*(htab_p-10) = m1;
|
||||
*(htab_p-9) = m1;
|
||||
*(htab_p-8) = m1;
|
||||
*(htab_p-7) = m1;
|
||||
*(htab_p-6) = m1;
|
||||
*(htab_p-5) = m1;
|
||||
*(htab_p-4) = m1;
|
||||
*(htab_p-3) = m1;
|
||||
*(htab_p-2) = m1;
|
||||
*(htab_p-1) = m1;
|
||||
htab_p -= 16;
|
||||
} while ((i -= 16) >= 0);
|
||||
|
||||
for ( i += 16; i > 0; --i )
|
||||
*--htab_p = m1;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* GIF Specific routines
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/*
|
||||
* Set up the 'byte output' routine
|
||||
*/
|
||||
static void
|
||||
char_init(GifCtx *ctx)
|
||||
{
|
||||
ctx->a_count = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add a character to the end of the current packet, and if it is 254
|
||||
* characters, flush the packet to disk.
|
||||
*/
|
||||
static void
|
||||
char_out(int c, GifCtx *ctx)
|
||||
{
|
||||
ctx->accum[ ctx->a_count++ ] = c;
|
||||
if( ctx->a_count >= 254 )
|
||||
flush_char(ctx);
|
||||
}
|
||||
|
||||
/*
|
||||
* Flush the packet to disk, and reset the accumulator
|
||||
*/
|
||||
static void
|
||||
flush_char(GifCtx *ctx)
|
||||
{
|
||||
if( ctx->a_count > 0 ) {
|
||||
gdPutC( ctx->a_count, ctx->g_outfile );
|
||||
gdPutBuf( ctx->accum, ctx->a_count, ctx->g_outfile );
|
||||
ctx->a_count = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static int gifPutWord(int w, gdIOCtx *out)
|
||||
{
|
||||
/* Byte order is little-endian */
|
||||
gdPutC(w & 0xFF, out);
|
||||
gdPutC((w >> 8) & 0xFF, out);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
+1333
-1137
File diff suppressed because it is too large.
Load diff
+1
-1
@@ -914,7 +914,7 @@ gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist, double ptsi
|
||||
}
|
||||
|
||||
/* EAM DEBUG */
|
||||
#if (defined(FREETYPE_MAJOR) && (FREETYPE_MAJOR >=2 ) && (FREETYPE_MINOR >= 1))
|
||||
#if (defined(FREETYPE_MAJOR) && ((FREETYPE_MAJOR == 2 && ((FREETYPE_MINOR == 1 && FREETYPE_PATCH >= 3) || FREETYPE_MINOR > 1) || FREETYPE_MAJOR > 2)))
|
||||
if (font->face->charmap->encoding == FT_ENCODING_MS_SYMBOL) {
|
||||
/* I do not know the significance of the constant 0xf000.
|
||||
* It was determined by inspection of the character codes
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#if HAVE_LIBINTL
|
||||
|
||||
#include <stdio.h>
|
||||
#include <libintl.h>
|
||||
#include "ext/standard/info.h"
|
||||
#include "php_gettext.h"
|
||||
|
||||
@@ -57,6 +56,8 @@ function_entry php_gettext_functions[] = {
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
#include <libintl.h>
|
||||
|
||||
zend_module_entry php_gettext_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"gettext",
|
||||
|
||||
+1
-2
@@ -842,8 +842,7 @@ ZEND_FUNCTION(gmp_powm)
|
||||
}
|
||||
FETCH_GMP_ZVAL(gmpnum_mod, mod_arg);
|
||||
|
||||
convert_to_long_ex(mod_arg);
|
||||
if (!Z_LVAL_PP(mod_arg)) {
|
||||
if (!mpz_cmp_ui(*gmpnum_mod, 0)) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ dnl $Id$
|
||||
dnl
|
||||
|
||||
PHP_ARG_WITH(iconv, for iconv support,
|
||||
[ --without-iconv[=DIR] Include iconv support], yes)
|
||||
[ --without-iconv[=DIR] Exclude iconv support], yes)
|
||||
|
||||
if test "$PHP_ICONV" != "no"; then
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@ if (PHP_ICONV != "no") {
|
||||
AC_DEFINE("HAVE_LIBICONV", 1, "Define if libiconv is available");
|
||||
AC_DEFINE("PHP_ICONV_IMPL", "\"libiconv\"", "Which iconv implementation to use");
|
||||
AC_DEFINE("ICONV_SUPPORTS_ERRNO", 1, "Whether iconv supports errno or not");
|
||||
if (!PHP_ICONV_SHARED) {
|
||||
ADD_DEF_FILE("ext\\iconv\\php_iconv.def");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+58
-23
@@ -2344,7 +2344,7 @@ static php_iconv_err_t php_iconv_stream_filter_ctor(php_iconv_stream_filter *sel
|
||||
/* }}} */
|
||||
|
||||
/* {{{ php_iconv_stream_filter_append_bucket */
|
||||
static size_t php_iconv_stream_filter_append_bucket(
|
||||
static int php_iconv_stream_filter_append_bucket(
|
||||
php_iconv_stream_filter *self,
|
||||
php_stream *stream, php_stream_filter *filter,
|
||||
php_stream_bucket_brigade *buckets_out,
|
||||
@@ -2367,7 +2367,11 @@ static size_t php_iconv_stream_filter_append_bucket(
|
||||
}
|
||||
|
||||
out_buf_size = ocnt = prev_ocnt = initial_out_buf_size;
|
||||
out_buf = pd = pemalloc(out_buf_size, self->persistent);
|
||||
if (NULL == (out_buf = pemalloc(out_buf_size, persistent))) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
pd = out_buf;
|
||||
|
||||
if (self->stub_len > 0) {
|
||||
pt = self->stub;
|
||||
@@ -2407,14 +2411,26 @@ static size_t php_iconv_stream_filter_append_bucket(
|
||||
|
||||
if (new_out_buf_size < out_buf_size) {
|
||||
/* whoa! no bigger buckets are sold anywhere... */
|
||||
new_bucket = php_stream_bucket_new(stream, out_buf, (out_buf_size - ocnt), 1, self->persistent TSRMLS_CC);
|
||||
if (NULL == (new_bucket = php_stream_bucket_new(stream, out_buf, (out_buf_size - ocnt), 1, persistent TSRMLS_CC))) {
|
||||
goto out_failure;
|
||||
}
|
||||
|
||||
php_stream_bucket_append(buckets_out, new_bucket TSRMLS_CC);
|
||||
|
||||
out_buf_size = ocnt = initial_out_buf_size;
|
||||
out_buf = pd = pemalloc(out_buf_size, self->persistent);
|
||||
if (NULL == (out_buf = pemalloc(out_buf_size, persistent))) {
|
||||
return FAILURE;
|
||||
}
|
||||
pd = out_buf;
|
||||
} else {
|
||||
new_out_buf = perealloc(out_buf, new_out_buf_size, self->persistent);
|
||||
if (NULL == (new_out_buf = perealloc(out_buf, new_out_buf_size, persistent))) {
|
||||
if (NULL == (new_bucket = php_stream_bucket_new(stream, out_buf, (out_buf_size - ocnt), 1, persistent TSRMLS_CC))) {
|
||||
goto out_failure;
|
||||
}
|
||||
|
||||
php_stream_bucket_append(buckets_out, new_bucket TSRMLS_CC);
|
||||
return FAILURE;
|
||||
}
|
||||
pd = new_out_buf + (pd - out_buf);
|
||||
ocnt += (new_out_buf_size - out_buf_size);
|
||||
out_buf = new_out_buf;
|
||||
@@ -2472,14 +2488,26 @@ static size_t php_iconv_stream_filter_append_bucket(
|
||||
|
||||
if (new_out_buf_size < out_buf_size) {
|
||||
/* whoa! no bigger buckets are sold anywhere... */
|
||||
new_bucket = php_stream_bucket_new(stream, out_buf, (out_buf_size - ocnt), 1, self->persistent TSRMLS_CC);
|
||||
if (NULL == (new_bucket = php_stream_bucket_new(stream, out_buf, (out_buf_size - ocnt), 1, persistent TSRMLS_CC))) {
|
||||
goto out_failure;
|
||||
}
|
||||
|
||||
php_stream_bucket_append(buckets_out, new_bucket TSRMLS_CC);
|
||||
|
||||
out_buf_size = ocnt = initial_out_buf_size;
|
||||
out_buf = pd = pemalloc(out_buf_size, self->persistent);
|
||||
if (NULL == (out_buf = pemalloc(out_buf_size, persistent))) {
|
||||
return FAILURE;
|
||||
}
|
||||
pd = out_buf;
|
||||
} else {
|
||||
new_out_buf = perealloc(out_buf, new_out_buf_size, self->persistent);
|
||||
if (NULL == (new_out_buf = perealloc(out_buf, new_out_buf_size, persistent))) {
|
||||
if (NULL == (new_bucket = php_stream_bucket_new(stream, out_buf, (out_buf_size - ocnt), 1, persistent TSRMLS_CC))) {
|
||||
goto out_failure;
|
||||
}
|
||||
|
||||
php_stream_bucket_append(buckets_out, new_bucket TSRMLS_CC);
|
||||
return FAILURE;
|
||||
}
|
||||
pd = new_out_buf + (pd - out_buf);
|
||||
ocnt += (new_out_buf_size - out_buf_size);
|
||||
out_buf = new_out_buf;
|
||||
@@ -2506,17 +2534,19 @@ static size_t php_iconv_stream_filter_append_bucket(
|
||||
}
|
||||
|
||||
if (out_buf_size - ocnt > 0) {
|
||||
new_bucket = php_stream_bucket_new(stream, out_buf, (out_buf_size - ocnt), 1, self->persistent TSRMLS_CC);
|
||||
if (NULL == (new_bucket = php_stream_bucket_new(stream, out_buf, (out_buf_size - ocnt), 1, persistent TSRMLS_CC))) {
|
||||
goto out_failure;
|
||||
}
|
||||
php_stream_bucket_append(buckets_out, new_bucket TSRMLS_CC);
|
||||
} else {
|
||||
pefree(out_buf, self->persistent);
|
||||
pefree(out_buf, persistent);
|
||||
}
|
||||
*consumed += buf_len - icnt;
|
||||
|
||||
return SUCCESS;
|
||||
|
||||
out_failure:
|
||||
pefree(out_buf, self->persistent);
|
||||
pefree(out_buf, persistent);
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
@@ -2531,27 +2561,32 @@ static php_stream_filter_status_t php_iconv_stream_filter_do_filter(
|
||||
size_t consumed = 0;
|
||||
php_iconv_stream_filter *self = (php_iconv_stream_filter *)filter->abstract;
|
||||
|
||||
if (flags != PSFS_FLAG_NORMAL) {
|
||||
if (php_iconv_stream_filter_append_bucket(self, stream, filter, buckets_out, NULL, 0, &consumed, self->persistent TSRMLS_CC) != SUCCESS) {
|
||||
while (buckets_in->head != NULL) {
|
||||
bucket = buckets_in->head;
|
||||
|
||||
php_stream_bucket_unlink(bucket TSRMLS_CC);
|
||||
|
||||
if (php_iconv_stream_filter_append_bucket(self, stream, filter,
|
||||
buckets_out, bucket->buf, bucket->buflen, &consumed,
|
||||
php_stream_is_persistent(stream) TSRMLS_CC) != SUCCESS) {
|
||||
goto out_failure;
|
||||
}
|
||||
} else {
|
||||
while (buckets_in->head != NULL) {
|
||||
bucket = buckets_in->head;
|
||||
|
||||
php_stream_bucket_unlink(bucket TSRMLS_CC);
|
||||
php_stream_bucket_delref(bucket TSRMLS_CC);
|
||||
}
|
||||
|
||||
if (php_iconv_stream_filter_append_bucket(self, stream, filter, buckets_out, bucket->buf, bucket->buflen, &consumed, self->persistent TSRMLS_CC) != SUCCESS) { goto out_failure;
|
||||
}
|
||||
|
||||
php_stream_bucket_delref(bucket TSRMLS_CC);
|
||||
if (flags != PSFS_FLAG_NORMAL) {
|
||||
if (php_iconv_stream_filter_append_bucket(self, stream, filter,
|
||||
buckets_out, NULL, 0, &consumed,
|
||||
php_stream_is_persistent(stream) TSRMLS_CC) != SUCCESS) {
|
||||
goto out_failure;
|
||||
}
|
||||
}
|
||||
|
||||
if (bytes_consumed) {
|
||||
if (bytes_consumed != NULL) {
|
||||
*bytes_consumed = consumed;
|
||||
}
|
||||
|
||||
|
||||
return PSFS_PASS_ON;
|
||||
|
||||
out_failure:
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
EXPORTS
|
||||
_libiconv_version
|
||||
libiconv_close
|
||||
libiconv
|
||||
libiconv_open
|
||||
libiconv_set_relocation_prefix
|
||||
+27
-25
@@ -112,7 +112,7 @@ function_entry imap_functions[] = {
|
||||
PHP_FE(imap_qprint, NULL)
|
||||
PHP_FE(imap_8bit, NULL)
|
||||
PHP_FE(imap_binary, NULL)
|
||||
PHP_FE(imap_utf8, NULL)
|
||||
PHP_FE(imap_utf8, NULL)
|
||||
PHP_FE(imap_status, NULL)
|
||||
PHP_FE(imap_mailboxmsginfo, NULL)
|
||||
PHP_FE(imap_setflag_full, NULL)
|
||||
@@ -131,24 +131,24 @@ function_entry imap_functions[] = {
|
||||
PHP_FE(imap_utf7_encode, NULL)
|
||||
PHP_FE(imap_mime_header_decode, NULL)
|
||||
PHP_FE(imap_thread, NULL)
|
||||
PHP_FE(imap_timeout, NULL)
|
||||
PHP_FE(imap_timeout, NULL)
|
||||
|
||||
#if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
|
||||
PHP_FE(imap_get_quota, NULL)
|
||||
PHP_FE(imap_get_quotaroot, NULL)
|
||||
PHP_FE(imap_set_quota, NULL)
|
||||
PHP_FE(imap_setacl, NULL)
|
||||
PHP_FE(imap_getacl, NULL)
|
||||
PHP_FE(imap_setacl, NULL)
|
||||
PHP_FE(imap_getacl, NULL)
|
||||
#endif
|
||||
|
||||
PHP_FE(imap_mail, NULL)
|
||||
|
||||
PHP_FALIAS(imap_header, imap_headerinfo, NULL)
|
||||
PHP_FALIAS(imap_listmailbox, imap_list, NULL)
|
||||
PHP_FALIAS(imap_getmailboxes, imap_list_full, NULL)
|
||||
PHP_FALIAS(imap_scanmailbox, imap_listscan, NULL)
|
||||
PHP_FALIAS(imap_listsubscribed, imap_lsub, NULL)
|
||||
PHP_FALIAS(imap_getsubscribed, imap_lsub_full, NULL)
|
||||
PHP_FALIAS(imap_header, imap_headerinfo, NULL)
|
||||
PHP_FALIAS(imap_listmailbox, imap_list, NULL)
|
||||
PHP_FALIAS(imap_getmailboxes, imap_list_full, NULL)
|
||||
PHP_FALIAS(imap_scanmailbox, imap_listscan, NULL)
|
||||
PHP_FALIAS(imap_listsubscribed, imap_lsub, NULL)
|
||||
PHP_FALIAS(imap_getsubscribed, imap_lsub_full, NULL)
|
||||
PHP_FALIAS(imap_fetchtext, imap_body, NULL)
|
||||
PHP_FALIAS(imap_scan, imap_listscan, NULL)
|
||||
PHP_FALIAS(imap_create, imap_createmailbox, NULL)
|
||||
@@ -182,6 +182,12 @@ ZEND_GET_MODULE(imap)
|
||||
/* True globals, no need for thread safety */
|
||||
static int le_imap;
|
||||
|
||||
#define PHP_IMAP_CHECK_MSGNO(msgindex) \
|
||||
if ((msgindex < 1) || ((unsigned) msgindex > imap_le_struct->imap_stream->nmsgs)) { \
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bad message number"); \
|
||||
RETURN_FALSE; \
|
||||
} \
|
||||
|
||||
/* {{{ mail_close_it
|
||||
*/
|
||||
static void mail_close_it(zend_rsrc_list_entry *rsrc TSRMLS_DC)
|
||||
@@ -1529,11 +1535,8 @@ PHP_FUNCTION(imap_headerinfo)
|
||||
convert_to_string_ex(defaulthost);
|
||||
}
|
||||
|
||||
if (!Z_LVAL_PP(msgno) || Z_LVAL_PP(msgno) < 1 || (unsigned) Z_LVAL_PP(msgno) > imap_le_struct->imap_stream->nmsgs) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bad message number");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
PHP_IMAP_CHECK_MSGNO(Z_LVAL_PP(msgno));
|
||||
|
||||
if (mail_fetchstructure(imap_le_struct->imap_stream, Z_LVAL_PP(msgno), NIL)) {
|
||||
cache = mail_elt(imap_le_struct->imap_stream, Z_LVAL_PP(msgno));
|
||||
} else {
|
||||
@@ -1779,10 +1782,7 @@ PHP_FUNCTION(imap_fetchstructure)
|
||||
} else {
|
||||
msgindex = Z_LVAL_PP(msgno);
|
||||
}
|
||||
if ((msgindex < 1) || ((unsigned) msgindex > imap_le_struct->imap_stream->nmsgs)) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bad message number");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
PHP_IMAP_CHECK_MSGNO(msgindex);
|
||||
|
||||
mail_fetchstructure_full(imap_le_struct->imap_stream, Z_LVAL_PP(msgno), &body , myargc == 3 ? Z_LVAL_PP(flags) : NIL);
|
||||
|
||||
@@ -1816,7 +1816,12 @@ PHP_FUNCTION(imap_fetchbody)
|
||||
if (myargc == 4) {
|
||||
convert_to_long_ex(flags);
|
||||
}
|
||||
|
||||
|
||||
if (myargc < 4 || !(Z_LVAL_PP(flags) & FT_UID)) {
|
||||
/* only perform the check if the msgno is a message number and not a UID */
|
||||
PHP_IMAP_CHECK_MSGNO(Z_LVAL_PP(msgno));
|
||||
}
|
||||
|
||||
body = mail_fetchbody_full(imap_le_struct->imap_stream, Z_LVAL_PP(msgno), Z_STRVAL_PP(sec), &len, myargc==4 ? Z_LVAL_PP(flags) : NIL);
|
||||
|
||||
if (!body) {
|
||||
@@ -2512,10 +2517,7 @@ PHP_FUNCTION(imap_fetchheader)
|
||||
msgindex = Z_LVAL_PP(msgno);
|
||||
}
|
||||
|
||||
if ((msgindex < 1) || ((unsigned) msgindex > imap_le_struct->imap_stream->nmsgs)) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bad message number");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
PHP_IMAP_CHECK_MSGNO(msgindex);
|
||||
|
||||
RETVAL_STRING(mail_fetchheader_full(imap_le_struct->imap_stream, Z_LVAL_PP(msgno), NIL, NIL, (myargc == 3 ? Z_LVAL_PP(flags) : NIL)), 1);
|
||||
}
|
||||
@@ -3708,7 +3710,7 @@ static void _php_imap_parse_address (ADDRESS *addresslist, char **fulladdress, z
|
||||
addresstmp = addresslist;
|
||||
|
||||
if ((len = _php_imap_address_size(addresstmp))) {
|
||||
tmpstr = (char *) malloc (len);
|
||||
tmpstr = (char *) malloc(len + 1);
|
||||
tmpstr[0] = '\0';
|
||||
rfc822_write_address(tmpstr, addresstmp);
|
||||
*fulladdress = tmpstr;
|
||||
|
||||
@@ -17,7 +17,7 @@ if (PHP_INFORMIX != "no") {
|
||||
|
||||
ADD_FLAG("CFLAGS_INFORMIX", "/I " + php_ifx_dir + "\\incl\\esql ");
|
||||
|
||||
EXTENSION('informix', 'ifx.c', null, "/D IFX_VERSION=921 /D HAVE_IFX_IUS=1", "php_ifx.dll");
|
||||
EXTENSION('informix', 'ifx.c', null, "/D IFX_VERSION=921 /D HAVE_IFX_IUS=1 /D HAVE_IFX=1", "php_ifx.dll");
|
||||
MFO.WriteLine(configure_module_dirname + "\\ifx.c: " + configure_module_dirname + "\\ifx.ec");
|
||||
MFO.WriteLine("\t<<informix_build.bat");
|
||||
MFO.WriteLine("PATH " + php_ifx_bin + ";%PATH%");
|
||||
|
||||
+16
-15
@@ -23,6 +23,7 @@
|
||||
#endif
|
||||
|
||||
#include "php.h"
|
||||
#include "php_ini.h"
|
||||
|
||||
#if HAVE_IBASE
|
||||
|
||||
@@ -553,7 +554,7 @@ static int _php_ibase_bind_array(zval *val, char *buf, unsigned long buf_size, /
|
||||
case SQL_TIMESTAMP:
|
||||
convert_to_string(val);
|
||||
#ifdef HAVE_STRPTIME
|
||||
strptime(Z_STRVAL_P(val), IBG(timestampformat), &t);
|
||||
strptime(Z_STRVAL_P(val), INI_STR("ibase.timestampformat"), &t);
|
||||
#else
|
||||
n = sscanf(Z_STRVAL_P(val), "%d%*[/]%d%*[/]%d %d%*[:]%d%*[:]%d",
|
||||
&t.tm_mon, &t.tm_mday, &t.tm_year, &t.tm_hour, &t.tm_min, &t.tm_sec);
|
||||
@@ -571,7 +572,7 @@ static int _php_ibase_bind_array(zval *val, char *buf, unsigned long buf_size, /
|
||||
case SQL_TYPE_DATE:
|
||||
convert_to_string(val);
|
||||
#ifdef HAVE_STRPTIME
|
||||
strptime(Z_STRVAL_P(val), IBG(dateformat), &t);
|
||||
strptime(Z_STRVAL_P(val), INI_STR("ibase.dateformat"), &t);
|
||||
#else
|
||||
n = sscanf(Z_STRVAL_P(val), "%d%*[/]%d%*[/]%d", &t.tm_mon, &t.tm_mday, &t.tm_year);
|
||||
|
||||
@@ -588,7 +589,7 @@ static int _php_ibase_bind_array(zval *val, char *buf, unsigned long buf_size, /
|
||||
case SQL_TYPE_TIME:
|
||||
convert_to_string(val);
|
||||
#ifdef HAVE_STRPTIME
|
||||
strptime(Z_STRVAL_P(val), IBG(timeformat), &t);
|
||||
strptime(Z_STRVAL_P(val), INI_STR("ibase.timeformat"), &t);
|
||||
#else
|
||||
n = sscanf(Z_STRVAL_P(val), "%d%*[:]%d%*[:]%d", &t.tm_hour, &t.tm_min, &t.tm_sec);
|
||||
|
||||
@@ -678,16 +679,16 @@ static int _php_ibase_bind(XSQLDA *sqlda, zval ***b_vars, BIND_BUF *buf, /* {{{
|
||||
t = *gmtime(&Z_LVAL_P(b_var));
|
||||
} else {
|
||||
#ifdef HAVE_STRPTIME
|
||||
char *format = IBG(timestampformat);
|
||||
char *format = INI_STR("ibase.timestampformat");
|
||||
|
||||
convert_to_string(b_var);
|
||||
|
||||
switch (var->sqltype & ~1) {
|
||||
case SQL_TYPE_DATE:
|
||||
format = IBG(dateformat);
|
||||
format = INI_STR("ibase.dateformat");
|
||||
break;
|
||||
case SQL_TYPE_TIME:
|
||||
format = IBG(timeformat);
|
||||
format = INI_STR("ibase.timeformat");
|
||||
}
|
||||
if (! strptime(Z_STRVAL_P(b_var), format, &t)) {
|
||||
/* strptime() cannot handle it, so let IB have a try */
|
||||
@@ -1083,9 +1084,9 @@ PHP_FUNCTION(ibase_query)
|
||||
_php_ibase_module_error("CREATE DATABASE is not allowed in SQL safe mode"
|
||||
TSRMLS_CC);
|
||||
|
||||
} else if ((IBG(max_links) != -1) && (IBG(num_links) >= IBG(max_links))) {
|
||||
} else if (((l = INI_INT("ibase.max_links")) != -1) && (IBG(num_links) >= l)) {
|
||||
_php_ibase_module_error("CREATE DATABASE is not allowed: maximum link count "
|
||||
"(%ld) reached" TSRMLS_CC, IBG(max_links));
|
||||
"(%ld) reached" TSRMLS_CC, l);
|
||||
|
||||
} else if (isc_dsql_execute_immediate(IB_STATUS, &db, &trans, (short)query_len,
|
||||
query, SQL_DIALECT_CURRENT, NULL)) {
|
||||
@@ -1143,7 +1144,7 @@ PHP_FUNCTION(ibase_query)
|
||||
break;
|
||||
}
|
||||
} else if (bind_n > 0) {
|
||||
bind_args = (zval ***) do_alloca(sizeof(zval **) * ZEND_NUM_ARGS());
|
||||
bind_args = (zval ***) emalloc(sizeof(zval **) * ZEND_NUM_ARGS());
|
||||
|
||||
if (FAILURE == zend_get_parameters_array_ex(ZEND_NUM_ARGS(), bind_args)) {
|
||||
break;
|
||||
@@ -1169,7 +1170,7 @@ PHP_FUNCTION(ibase_query)
|
||||
_php_ibase_free_query(&ib_query TSRMLS_CC);
|
||||
|
||||
if (bind_args) {
|
||||
free_alloca(bind_args);
|
||||
efree(bind_args);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
@@ -1321,7 +1322,7 @@ static int _php_ibase_var_zval(zval *val, void *data, int type, int len, /* {{{
|
||||
|
||||
if (n >= 0) {
|
||||
l = sprintf(string_data, "%" LL_MASK "d.%0*" LL_MASK "d", n / f, -scale, n % f);
|
||||
} else if (n < -f) {
|
||||
} else if (n <= -f) {
|
||||
l = sprintf(string_data, "%" LL_MASK "d.%0*" LL_MASK "d", n / f, -scale, -n % f);
|
||||
} else {
|
||||
l = sprintf(string_data, "-0.%0*" LL_MASK "d", -scale, -n % f);
|
||||
@@ -1340,7 +1341,7 @@ static int _php_ibase_var_zval(zval *val, void *data, int type, int len, /* {{{
|
||||
|
||||
if (n >= 0) {
|
||||
l = sprintf(string_data, "%ld.%0*ld", n / f, -scale, n % f);
|
||||
} else if (n < -f) {
|
||||
} else if (n <= -f) {
|
||||
l = sprintf(string_data, "%ld.%0*ld", n / f, -scale, -n % f);
|
||||
} else {
|
||||
l = sprintf(string_data, "-0.%0*ld", -scale, -n % f);
|
||||
@@ -1355,15 +1356,15 @@ static int _php_ibase_var_zval(zval *val, void *data, int type, int len, /* {{{
|
||||
ZVAL_DOUBLE(val, *(double *) data);
|
||||
break;
|
||||
case SQL_DATE: /* == case SQL_TIMESTAMP: */
|
||||
format = IBG(timestampformat);
|
||||
format = INI_STR("ibase.timestampformat");
|
||||
isc_decode_timestamp((ISC_TIMESTAMP *) data, &t);
|
||||
goto format_date_time;
|
||||
case SQL_TYPE_DATE:
|
||||
format = IBG(dateformat);
|
||||
format = INI_STR("ibase.dateformat");
|
||||
isc_decode_sql_date((ISC_DATE *) data, &t);
|
||||
goto format_date_time;
|
||||
case SQL_TYPE_TIME:
|
||||
format = IBG(timeformat);
|
||||
format = INI_STR("ibase.timeformat");
|
||||
isc_decode_sql_time((ISC_TIME *) data, &t);
|
||||
|
||||
format_date_time:
|
||||
|
||||
+61
-66
@@ -174,7 +174,7 @@ zend_module_entry ibase_module_entry = {
|
||||
ibase_functions,
|
||||
PHP_MINIT(ibase),
|
||||
PHP_MSHUTDOWN(ibase),
|
||||
PHP_RINIT(ibase),
|
||||
NULL,
|
||||
PHP_RSHUTDOWN(ibase),
|
||||
PHP_MINFO(ibase),
|
||||
NO_VERSION_YET,
|
||||
@@ -284,7 +284,7 @@ void _php_ibase_get_link_trans(INTERNAL_FUNCTION_PARAMETERS, /* {{{ */
|
||||
/* Transaction resource: make sure it refers to one link only, then
|
||||
fetch it; database link is stored in ib_trans->db_link[]. */
|
||||
IBDEBUG("Type is le_trans");
|
||||
ZEND_FETCH_RESOURCE(*trans, ibase_trans *, link_id, -1, "InterBase transaction", le_trans);
|
||||
ZEND_FETCH_RESOURCE(*trans, ibase_trans *, link_id, -1, LE_TRANS, le_trans);
|
||||
if ((*trans)->link_cnt > 1) {
|
||||
_php_ibase_module_error("Link id is ambiguous: transaction spans multiple connections."
|
||||
TSRMLS_CC);
|
||||
@@ -297,7 +297,7 @@ void _php_ibase_get_link_trans(INTERNAL_FUNCTION_PARAMETERS, /* {{{ */
|
||||
IBDEBUG("Type is le_[p]link or id not found");
|
||||
/* Database link resource, use default transaction. */
|
||||
*trans = NULL;
|
||||
ZEND_FETCH_RESOURCE2(*ib_link, ibase_db_link *, link_id, -1, "InterBase link", le_link, le_plink);
|
||||
ZEND_FETCH_RESOURCE2(*ib_link, ibase_db_link *, link_id, -1, LE_LINK, le_link, le_plink);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -436,22 +436,23 @@ static PHP_INI_DISP(php_ibase_password_displayer_cb)
|
||||
|
||||
/* {{{ startup, shutdown and info functions */
|
||||
PHP_INI_BEGIN()
|
||||
STD_PHP_INI_BOOLEAN("ibase.allow_persistent", "1", PHP_INI_SYSTEM, OnUpdateBool, allow_persistent, zend_ibase_globals, ibase_globals)
|
||||
STD_PHP_INI_ENTRY_EX("ibase.max_persistent", "-1", PHP_INI_SYSTEM, OnUpdateLong, max_persistent, zend_ibase_globals, ibase_globals, display_link_numbers)
|
||||
STD_PHP_INI_ENTRY_EX("ibase.max_links", "-1", PHP_INI_SYSTEM, OnUpdateLong, max_links, zend_ibase_globals, ibase_globals, display_link_numbers)
|
||||
STD_PHP_INI_ENTRY("ibase.default_db", NULL, PHP_INI_SYSTEM, OnUpdateString, default_db, zend_ibase_globals, ibase_globals)
|
||||
STD_PHP_INI_ENTRY("ibase.default_user", NULL, PHP_INI_ALL, OnUpdateString, default_user, zend_ibase_globals, ibase_globals)
|
||||
STD_PHP_INI_ENTRY_EX("ibase.default_password", NULL, PHP_INI_ALL, OnUpdateString, default_password, zend_ibase_globals, ibase_globals,php_ibase_password_displayer_cb)
|
||||
STD_PHP_INI_ENTRY("ibase.default_charset", NULL, PHP_INI_ALL, OnUpdateString, default_charset, zend_ibase_globals, ibase_globals)
|
||||
STD_PHP_INI_ENTRY("ibase.timestampformat", IB_DEF_DATE_FMT " " IB_DEF_TIME_FMT, PHP_INI_ALL, OnUpdateString, timestampformat, zend_ibase_globals, ibase_globals)
|
||||
STD_PHP_INI_ENTRY("ibase.dateformat", IB_DEF_DATE_FMT, PHP_INI_ALL, OnUpdateString, dateformat, zend_ibase_globals, ibase_globals)
|
||||
STD_PHP_INI_ENTRY("ibase.timeformat", IB_DEF_TIME_FMT, PHP_INI_ALL, OnUpdateString, timeformat, zend_ibase_globals, ibase_globals)
|
||||
PHP_INI_ENTRY_EX("ibase.allow_persistent", "1", PHP_INI_SYSTEM, NULL, zend_ini_boolean_displayer_cb)
|
||||
PHP_INI_ENTRY_EX("ibase.max_persistent", "-1", PHP_INI_SYSTEM, NULL, display_link_numbers)
|
||||
PHP_INI_ENTRY_EX("ibase.max_links", "-1", PHP_INI_SYSTEM, NULL, display_link_numbers)
|
||||
PHP_INI_ENTRY("ibase.default_db", NULL, PHP_INI_SYSTEM, NULL)
|
||||
PHP_INI_ENTRY("ibase.default_user", NULL, PHP_INI_ALL, NULL)
|
||||
PHP_INI_ENTRY_EX("ibase.default_password", NULL, PHP_INI_ALL, NULL, php_ibase_password_displayer_cb)
|
||||
PHP_INI_ENTRY("ibase.default_charset", NULL, PHP_INI_ALL, NULL)
|
||||
PHP_INI_ENTRY("ibase.timestampformat", IB_DEF_DATE_FMT " " IB_DEF_TIME_FMT, PHP_INI_ALL, NULL)
|
||||
PHP_INI_ENTRY("ibase.dateformat", IB_DEF_DATE_FMT, PHP_INI_ALL, NULL)
|
||||
PHP_INI_ENTRY("ibase.timeformat", IB_DEF_TIME_FMT, PHP_INI_ALL, NULL)
|
||||
PHP_INI_END()
|
||||
|
||||
static void php_ibase_init_globals(zend_ibase_globals *ibase_globals)
|
||||
{
|
||||
ibase_globals->num_persistent = 0;
|
||||
ibase_globals->sql_code = 0;
|
||||
ibase_globals->num_persistent = ibase_globals->num_links = 0;
|
||||
ibase_globals->sql_code = *ibase_globals->errmsg = 0;
|
||||
ibase_globals->default_link = -1;
|
||||
}
|
||||
|
||||
PHP_MINIT_FUNCTION(ibase)
|
||||
@@ -460,9 +461,9 @@ PHP_MINIT_FUNCTION(ibase)
|
||||
|
||||
REGISTER_INI_ENTRIES();
|
||||
|
||||
le_link = zend_register_list_destructors_ex(_php_ibase_close_link, NULL, "interbase link", module_number);
|
||||
le_plink = zend_register_list_destructors_ex(php_ibase_commit_link_rsrc, _php_ibase_close_plink, "interbase link persistent", module_number);
|
||||
le_trans = zend_register_list_destructors_ex(_php_ibase_free_trans, NULL, "interbase transaction", module_number);
|
||||
le_link = zend_register_list_destructors_ex(_php_ibase_close_link, NULL, LE_LINK, module_number);
|
||||
le_plink = zend_register_list_destructors_ex(php_ibase_commit_link_rsrc, _php_ibase_close_plink, LE_PLINK, module_number);
|
||||
le_trans = zend_register_list_destructors_ex(_php_ibase_free_trans, NULL, LE_TRANS, module_number);
|
||||
|
||||
REGISTER_LONG_CONSTANT("IBASE_DEFAULT", PHP_IBASE_DEFAULT, CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("IBASE_CREATE", PHP_IBASE_CREATE, CONST_PERSISTENT);
|
||||
@@ -490,16 +491,6 @@ PHP_MINIT_FUNCTION(ibase)
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
PHP_RINIT_FUNCTION(ibase)
|
||||
{
|
||||
IBG(default_link)= -1;
|
||||
IBG(num_links) = IBG(num_persistent);
|
||||
|
||||
RESET_ERRMSG;
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
PHP_MSHUTDOWN_FUNCTION(ibase)
|
||||
{
|
||||
#ifndef PHP_WIN32
|
||||
@@ -527,6 +518,11 @@ PHP_MSHUTDOWN_FUNCTION(ibase)
|
||||
|
||||
PHP_RSHUTDOWN_FUNCTION(ibase)
|
||||
{
|
||||
IBG(num_links) = IBG(num_persistent);
|
||||
IBG(default_link)= -1;
|
||||
|
||||
RESET_ERRMSG;
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@@ -616,7 +612,7 @@ int _php_ibase_attach_db(char **args, int *len, long *largs, isc_db_handle *db T
|
||||
|
||||
static void _php_ibase_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) /* {{{ */
|
||||
{
|
||||
char hash[16], *args[] = { NULL, NULL, NULL, NULL, NULL };
|
||||
char *c, hash[16], *args[] = { NULL, NULL, NULL, NULL, NULL };
|
||||
int i, len[] = { 0, 0, 0, 0, 0 };
|
||||
long largs[] = { 0, 0, 0 };
|
||||
PHP_MD5_CTX hash_context;
|
||||
@@ -634,21 +630,21 @@ static void _php_ibase_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) /*
|
||||
}
|
||||
|
||||
/* restrict to the server/db in the .ini if in safe mode */
|
||||
if ((!len[DB] || PG(sql_safe_mode)) && IBG(default_db)) {
|
||||
args[DB] = IBG(default_db);
|
||||
len[DB] = strlen(IBG(default_db));
|
||||
if ((!len[DB] || PG(sql_safe_mode)) && (c = INI_STR("ibase.default_db"))) {
|
||||
args[DB] = c;
|
||||
len[DB] = strlen(c);
|
||||
}
|
||||
if (!len[USER] && IBG(default_user)) {
|
||||
args[USER] = IBG(default_user);
|
||||
len[USER] = strlen(args[USER]);
|
||||
if (!len[USER] && (c = INI_STR("ibase.default_user"))) {
|
||||
args[USER] = c;
|
||||
len[USER] = strlen(c);
|
||||
}
|
||||
if (!len[PASS] && IBG(default_password)) {
|
||||
args[PASS] = IBG(default_password);
|
||||
len[PASS] = strlen(args[PASS]);
|
||||
if (!len[PASS] && (c = INI_STR("ibase.default_password"))) {
|
||||
args[PASS] = c;
|
||||
len[PASS] = strlen(c);
|
||||
}
|
||||
if (!len[CSET] && IBG(default_charset)) {
|
||||
args[CSET] = IBG(default_charset);
|
||||
len[CSET] = strlen(args[CSET]);
|
||||
if (!len[CSET] && (c = INI_STR("ibase.default_charset"))) {
|
||||
args[CSET] = c;
|
||||
len[CSET] = strlen(c);
|
||||
}
|
||||
|
||||
/* don't want usernames and passwords floating around */
|
||||
@@ -681,6 +677,8 @@ static void _php_ibase_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) /*
|
||||
|
||||
/* ... or a persistent one */
|
||||
switch (zend_hash_find(&EG(persistent_list), hash, sizeof(hash), (void *) &le)) {
|
||||
long l;
|
||||
|
||||
static char info[] = { isc_info_base_level, isc_info_end };
|
||||
char result[8];
|
||||
ISC_STATUS status[20];
|
||||
@@ -702,7 +700,7 @@ static void _php_ibase_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) /*
|
||||
|
||||
/* no link found, so we have to open one */
|
||||
|
||||
if (IBG(max_links) != -1 && IBG(num_links) >= IBG(max_links)) {
|
||||
if ((l = INI_INT("ibase.max_links")) != -1 && IBG(num_links) >= l) {
|
||||
_php_ibase_module_error("Too many open links (%ld)" TSRMLS_CC, IBG(num_links));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
@@ -713,7 +711,7 @@ static void _php_ibase_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) /*
|
||||
}
|
||||
|
||||
/* use non-persistent if allowed number of persistent links is exceeded */
|
||||
if (!persistent || (IBG(max_persistent) != -1 && IBG(num_persistent) >= IBG(max_persistent))) {
|
||||
if (!persistent || ((l = INI_INT("ibase.max_persistent") != -1) && IBG(num_persistent) >= l)) {
|
||||
ib_link = (ibase_db_link *) emalloc(sizeof(ibase_db_link));
|
||||
ZEND_REGISTER_RESOURCE(return_value, ib_link, le_link);
|
||||
} else {
|
||||
@@ -763,7 +761,7 @@ PHP_FUNCTION(ibase_connect)
|
||||
Open a persistent connection to an InterBase database */
|
||||
PHP_FUNCTION(ibase_pconnect)
|
||||
{
|
||||
_php_ibase_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU, IBG(allow_persistent));
|
||||
_php_ibase_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU, INI_INT("ibase.allow_persistent"));
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -794,8 +792,7 @@ PHP_FUNCTION(ibase_close)
|
||||
break;
|
||||
}
|
||||
|
||||
ZEND_FETCH_RESOURCE2(ib_link, ibase_db_link *, link_arg, link_id, "InterBase link",
|
||||
le_link, le_plink);
|
||||
ZEND_FETCH_RESOURCE2(ib_link, ibase_db_link *, link_arg, link_id, LE_LINK, le_link, le_plink);
|
||||
zend_list_delete(link_id);
|
||||
RETURN_TRUE;
|
||||
}
|
||||
@@ -829,8 +826,8 @@ PHP_FUNCTION(ibase_drop_db)
|
||||
break;
|
||||
}
|
||||
|
||||
ZEND_FETCH_RESOURCE2(ib_link, ibase_db_link *, link_arg, link_id, "InterBase link",
|
||||
le_link, le_plink);
|
||||
ZEND_FETCH_RESOURCE2(ib_link, ibase_db_link *, link_arg, link_id, LE_LINK, le_link, le_plink);
|
||||
|
||||
if (isc_drop_database(IB_STATUS, &ib_link->handle)) {
|
||||
_php_ibase_error(TSRMLS_C);
|
||||
RETURN_FALSE;
|
||||
@@ -865,22 +862,22 @@ PHP_FUNCTION(ibase_trans)
|
||||
argn = ZEND_NUM_ARGS();
|
||||
|
||||
/* (1+argn) is an upper bound for the number of links this trans connects to */
|
||||
ib_link = (ibase_db_link **) do_alloca(sizeof(ibase_db_link *) * (1+argn));
|
||||
ib_link = (ibase_db_link **) safe_emalloc(sizeof(ibase_db_link *),1+argn,0);
|
||||
|
||||
if (argn > 0) {
|
||||
long trans_argl = 0;
|
||||
char *tpb;
|
||||
ISC_TEB *teb;
|
||||
zval ***args = (zval ***) do_alloca(sizeof(zval **) * argn);
|
||||
zval ***args = (zval ***) safe_emalloc(sizeof(zval **),argn,0);
|
||||
|
||||
if (zend_get_parameters_array_ex(argn, args) == FAILURE) {
|
||||
free_alloca(args);
|
||||
free_alloca(ib_link);
|
||||
efree(args);
|
||||
efree(ib_link);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
teb = (ISC_TEB *) do_alloca(sizeof(ISC_TEB) * argn);
|
||||
tpb = (char *) do_alloca(TPB_MAX_SIZE * argn);
|
||||
teb = (ISC_TEB *) safe_emalloc(sizeof(ISC_TEB),argn,0);
|
||||
tpb = (char *) safe_emalloc(TPB_MAX_SIZE,argn,0);
|
||||
|
||||
/* enumerate all the arguments: assume every non-resource argument
|
||||
specifies modifiers for the link ids that follow it */
|
||||
@@ -889,7 +886,7 @@ PHP_FUNCTION(ibase_trans)
|
||||
if (Z_TYPE_PP(args[i]) == IS_RESOURCE) {
|
||||
|
||||
ZEND_FETCH_RESOURCE2(ib_link[link_cnt], ibase_db_link *, args[i], -1,
|
||||
"InterBase link", le_link, le_plink);
|
||||
LE_LINK, le_link, le_plink);
|
||||
|
||||
/* copy the most recent modifier string into tbp[] */
|
||||
memcpy(&tpb[TPB_MAX_SIZE * link_cnt], last_tpb, TPB_MAX_SIZE);
|
||||
@@ -946,14 +943,14 @@ PHP_FUNCTION(ibase_trans)
|
||||
result = isc_start_multiple(IB_STATUS, &tr_handle, link_cnt, teb);
|
||||
}
|
||||
|
||||
free_alloca(args);
|
||||
free_alloca(tpb);
|
||||
free_alloca(teb);
|
||||
efree(args);
|
||||
efree(tpb);
|
||||
efree(teb);
|
||||
}
|
||||
|
||||
if (link_cnt == 0) {
|
||||
link_cnt = 1;
|
||||
ZEND_FETCH_RESOURCE2(ib_link[0], ibase_db_link *, NULL, IBG(default_link), "InterBase link",
|
||||
ZEND_FETCH_RESOURCE2(ib_link[0], ibase_db_link *, NULL, IBG(default_link), LE_LINK,
|
||||
le_link, le_plink);
|
||||
result = isc_start_transaction(IB_STATUS, &tr_handle, 1, &ib_link[0]->handle, tpb_len, last_tpb);
|
||||
}
|
||||
@@ -961,7 +958,7 @@ PHP_FUNCTION(ibase_trans)
|
||||
/* start the transaction */
|
||||
if (result) {
|
||||
_php_ibase_error(TSRMLS_C);
|
||||
free_alloca(ib_link);
|
||||
efree(ib_link);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -987,7 +984,7 @@ PHP_FUNCTION(ibase_trans)
|
||||
(*l)->trans = ib_trans;
|
||||
(*l)->next = NULL;
|
||||
}
|
||||
free_alloca(ib_link);
|
||||
efree(ib_link);
|
||||
ZEND_REGISTER_RESOURCE(return_value, ib_trans, le_trans);
|
||||
}
|
||||
/* }}} */
|
||||
@@ -1044,7 +1041,7 @@ static void _php_ibase_trans_end(INTERNAL_FUNCTION_PARAMETERS, int commit) /* {{
|
||||
int type;
|
||||
|
||||
case 0:
|
||||
ZEND_FETCH_RESOURCE2(ib_link, ibase_db_link *, NULL, IBG(default_link), "InterBase link",
|
||||
ZEND_FETCH_RESOURCE2(ib_link, ibase_db_link *, NULL, IBG(default_link), LE_LINK,
|
||||
le_link, le_plink);
|
||||
if (ib_link->tr_list == NULL || ib_link->tr_list->trans == NULL) {
|
||||
/* this link doesn't have a default transaction */
|
||||
@@ -1060,14 +1057,12 @@ static void _php_ibase_trans_end(INTERNAL_FUNCTION_PARAMETERS, int commit) /* {{
|
||||
}
|
||||
/* one id was passed, could be db or trans id */
|
||||
if (zend_list_find(Z_LVAL_PP(arg), &type) && type == le_trans) {
|
||||
ZEND_FETCH_RESOURCE(trans, ibase_trans *, arg, -1, "InterBase transaction",
|
||||
le_trans);
|
||||
ZEND_FETCH_RESOURCE(trans, ibase_trans *, arg, -1, LE_TRANS, le_trans);
|
||||
|
||||
convert_to_long_ex(arg);
|
||||
res_id = Z_LVAL_PP(arg);
|
||||
} else {
|
||||
ZEND_FETCH_RESOURCE2(ib_link, ibase_db_link *, arg, -1, "InterBase link",
|
||||
le_link, le_plink);
|
||||
ZEND_FETCH_RESOURCE2(ib_link, ibase_db_link *, arg, -1, LE_LINK, le_link, le_plink);
|
||||
|
||||
if (ib_link->tr_list == NULL || ib_link->tr_list->trans == NULL) {
|
||||
/* this link doesn't have a default transaction */
|
||||
|
||||
@@ -23,8 +23,8 @@ CFG=interbase - Win32 Debug_TS
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
# PROP Scc_ProjName "interbase"
|
||||
# PROP Scc_LocalPath "."
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
@@ -54,7 +54,7 @@ BSC32=bscmake.exe
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ib_util_ms.lib gds32_ms.lib php5ts_debug.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php5ts_debug.lib /nologo /dll /debug /machine:I386 /out:"..\..\Debug_TS/php_interbase.dll" /pdbtype:sept /libpath:"..\..\..\php_build\Interbase SDK\lib_ms" /libpath:"..\..\Debug_TS"
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php5ts_debug.lib gds32_ms.lib /nologo /dll /debug /machine:I386 /out:"..\..\Debug_TS/php_interbase.dll" /pdbtype:sept /libpath:"..\..\..\php_build\Interbase SDK\lib_ms" /libpath:"..\..\Debug_TS"
|
||||
|
||||
!ELSEIF "$(CFG)" == "interbase - Win32 Release_TS"
|
||||
|
||||
@@ -81,7 +81,7 @@ BSC32=bscmake.exe
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 php5ts.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ib_util_ms.lib gds32_ms.lib /nologo /dll /machine:I386
|
||||
# ADD LINK32 php5ts.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_interbase.dll" /libpath:"..\..\..\php_build\Interbase SDK\lib_ms" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline"
|
||||
# ADD LINK32 php5ts.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib gds32_ms.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_interbase.dll" /libpath:"..\..\..\php_build\Interbase SDK\lib_ms" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline"
|
||||
|
||||
!ENDIF
|
||||
|
||||
@@ -94,6 +94,22 @@ LINK32=link.exe
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ibase_blobs.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ibase_events.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ibase_query.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ibase_service.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\interbase.c
|
||||
# End Source File
|
||||
# End Group
|
||||
@@ -111,7 +127,8 @@ SOURCE=.\php_interbase.h
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\interbase.rc
|
||||
# ADD RSC /i "..\..\main" /i "..\..\win32" /d "PHP_H"
|
||||
# ADD BASE RSC /l 0x413
|
||||
# ADD RSC /l 0x413 /i "..\..\main" /i "..\..\win32" /d "PHP_H"
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
|
||||
@@ -66,7 +66,6 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "FileDescription", "PHP Interbase module\0"
|
||||
VALUE "FileVersion", PHP_VERSION "\0"
|
||||
VALUE "File Revision", FILE_REVISION "\0"
|
||||
VALUE "LegalCopyright", "Copyright © 2003 The PHP Group\0"
|
||||
VALUE "Build Type", BUILD_TYPE "\0"
|
||||
VALUE "Client Library", CLIENT_LIB "\0"
|
||||
|
||||
@@ -64,10 +64,6 @@ ZEND_BEGIN_MODULE_GLOBALS(ibase)
|
||||
ISC_STATUS status[20];
|
||||
long default_link;
|
||||
long num_links, num_persistent;
|
||||
long max_links, max_persistent;
|
||||
long allow_persistent;
|
||||
char *default_db, *default_user, *default_password, *default_charset;
|
||||
char *timestampformat, *dateformat, *timeformat;
|
||||
char errmsg[MAX_ERRMSG];
|
||||
long sql_code;
|
||||
ZEND_END_MODULE_GLOBALS(ibase)
|
||||
|
||||
+1
-4
@@ -616,10 +616,7 @@ static void php_ldap_do_search(INTERNAL_FUNCTION_PARAMETERS, int scope)
|
||||
}
|
||||
|
||||
num_attribs = zend_hash_num_elements(Z_ARRVAL_PP(attrs));
|
||||
if ((ldap_attrs = safe_emalloc((num_attribs+1), sizeof(char *), 0)) == NULL) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not allocate memory");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
ldap_attrs = safe_emalloc((num_attribs+1), sizeof(char *), 0);
|
||||
|
||||
for (i = 0; i<num_attribs; i++) {
|
||||
if (zend_hash_index_find(Z_ARRVAL_PP(attrs), i, (void **) &attr) == FAILURE) {
|
||||
|
||||
@@ -15,6 +15,7 @@ if (PHP_LIBXML == "yes") {
|
||||
if (!PHP_LIBXML_SHARED) {
|
||||
ADD_DEF_FILE("ext\\libxml\\php_libxml2.def");
|
||||
}
|
||||
ADD_EXTENSION_DEP('libxml', 'iconv');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -377,7 +377,7 @@ void php_libxml_ctx_warning(void *ctx, const char *msg, ...)
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
void php_libxml_error_handler(void *ctx, const char *msg, ...)
|
||||
PHP_LIBXML_API void php_libxml_error_handler(void *ctx, const char *msg, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, msg);
|
||||
@@ -568,7 +568,7 @@ int php_libxml_decrement_node_ptr(php_libxml_node_object *object TSRMLS_DC) {
|
||||
obj_node = (php_libxml_node_ptr *) object->node;
|
||||
ret_refcount = --obj_node->refcount;
|
||||
if (ret_refcount == 0) {
|
||||
if (obj_node->node != NULL && obj_node->node->type != XML_DOCUMENT_NODE) {
|
||||
if (obj_node->node != NULL) {
|
||||
obj_node->node->_private = NULL;
|
||||
}
|
||||
efree(obj_node);
|
||||
|
||||
@@ -77,7 +77,7 @@ PHP_LIBXML_API int php_libxml_register_export(zend_class_entry *ce, php_libxml_e
|
||||
void php_libxml_node_free_resource(xmlNodePtr node TSRMLS_DC);
|
||||
/* When object dtor is called as node may still be referenced */
|
||||
void php_libxml_node_decrement_resource(php_libxml_node_object *object TSRMLS_DC);
|
||||
void php_libxml_error_handler(void *ctx, const char *msg, ...);
|
||||
PHP_LIBXML_API void php_libxml_error_handler(void *ctx, const char *msg, ...);
|
||||
void php_libxml_ctx_warning(void *ctx, const char *msg, ...);
|
||||
void php_libxml_ctx_error(void *ctx, const char *msg, ...);
|
||||
|
||||
|
||||
+339
-6
@@ -13,13 +13,22 @@ __xmlGenericError
|
||||
__xmlGenericErrorContext
|
||||
__xmlGetWarningsDefaultValue
|
||||
__xmlIndentTreeOutput
|
||||
xmlIsBaseCharGroup DATA
|
||||
xmlIsCharGroup DATA
|
||||
xmlIsCombiningGroup DATA
|
||||
xmlIsDigitGroup DATA
|
||||
xmlIsExtenderGroup DATA
|
||||
xmlIsIdeographicGroup DATA
|
||||
xmlIsPubidChar_tab DATA
|
||||
__xmlKeepBlanksDefaultValue
|
||||
xmlLastError DATA
|
||||
__xmlLineNumbersDefaultValue
|
||||
__xmlLoadExtDtdDefaultValue
|
||||
xmlMalloc DATA
|
||||
xmlMallocAtomic DATA
|
||||
xmlMemStrdup DATA
|
||||
__xmlParserDebugEntities
|
||||
xmlParserMaxDepth DATA
|
||||
__xmlParserVersion
|
||||
__xmlPedanticParserDefaultValue
|
||||
xmlRealloc DATA
|
||||
@@ -28,6 +37,7 @@ __xmlSaveNoEmptyTags
|
||||
xmlStringComment DATA
|
||||
xmlStringText DATA
|
||||
xmlStringTextNoenc DATA
|
||||
xmlStructuredError DATA
|
||||
__xmlSubstituteEntitiesDefaultValue
|
||||
__xmlTreeIndentString
|
||||
xmlXPathNAN DATA
|
||||
@@ -72,6 +82,13 @@ htmlAutoCloseTag
|
||||
htmlCreateFileParserCtxt
|
||||
htmlCreateMemoryParserCtxt
|
||||
htmlCreatePushParserCtxt
|
||||
htmlCtxtReadDoc
|
||||
htmlCtxtReadFd
|
||||
htmlCtxtReadFile
|
||||
htmlCtxtReadIO
|
||||
htmlCtxtReadMemory
|
||||
htmlCtxtReset
|
||||
htmlCtxtUseOptions
|
||||
htmlDefaultSAXHandlerInit
|
||||
htmlDocContentDumpFormatOutput
|
||||
htmlDocContentDumpOutput
|
||||
@@ -104,6 +121,11 @@ htmlParseDocument
|
||||
htmlParseElement
|
||||
htmlParseEntityRef
|
||||
htmlParseFile
|
||||
htmlReadDoc
|
||||
htmlReadFd
|
||||
htmlReadFile
|
||||
htmlReadIO
|
||||
htmlReadMemory
|
||||
htmlSAXParseDoc
|
||||
htmlSAXParseFile
|
||||
htmlSaveFile
|
||||
@@ -159,6 +181,7 @@ xmlAddRef
|
||||
xmlAddSibling
|
||||
xmlAllocOutputBuffer
|
||||
xmlAllocParserInputBuffer
|
||||
xmlAttrSerializeTxtContent
|
||||
xmlAutomataCompile
|
||||
xmlAutomataGetInitState
|
||||
xmlAutomataIsDeterminist
|
||||
@@ -181,6 +204,7 @@ xmlBufferCat
|
||||
xmlBufferContent
|
||||
xmlBufferCreate
|
||||
xmlBufferCreateSize
|
||||
xmlBufferCreateStatic
|
||||
xmlBufferDump
|
||||
xmlBufferEmpty
|
||||
xmlBufferFree
|
||||
@@ -194,6 +218,7 @@ xmlBufferWriteChar
|
||||
xmlBufferWriteQuotedString
|
||||
xmlBuildQName
|
||||
xmlBuildURI
|
||||
xmlByteConsumed
|
||||
xmlC14NDocDumpMemory
|
||||
xmlC14NDocSave
|
||||
xmlC14NDocSaveTo
|
||||
@@ -223,9 +248,11 @@ xmlCharEncCloseFunc
|
||||
xmlCharEncFirstLine
|
||||
xmlCharEncInFunc
|
||||
xmlCharEncOutFunc
|
||||
xmlCharInRange
|
||||
xmlCharStrdup
|
||||
xmlCharStrndup
|
||||
xmlCheckFilename
|
||||
xmlCheckHTTPInput
|
||||
xmlCheckLanguageID
|
||||
xmlCheckUTF8
|
||||
xmlCheckVersion
|
||||
@@ -233,6 +260,7 @@ xmlCleanupCharEncodingHandlers
|
||||
xmlCleanupEncodingAliases
|
||||
xmlCleanupGlobals
|
||||
xmlCleanupInputCallbacks
|
||||
xmlCleanupMemory
|
||||
xmlCleanupOutputCallbacks
|
||||
xmlCleanupParser
|
||||
xmlCleanupPredefinedEntities
|
||||
@@ -249,6 +277,7 @@ xmlCopyElementContent
|
||||
xmlCopyElementTable
|
||||
xmlCopyEntitiesTable
|
||||
xmlCopyEnumeration
|
||||
xmlCopyError
|
||||
xmlCopyNamespace
|
||||
xmlCopyNamespaceList
|
||||
xmlCopyNode
|
||||
@@ -266,7 +295,26 @@ xmlCreateIntSubset
|
||||
xmlCreateMemoryParserCtxt
|
||||
xmlCreatePushParserCtxt
|
||||
xmlCreateURI
|
||||
xmlCreateURLParserCtxt
|
||||
xmlCtxtGetLastError
|
||||
xmlCtxtReadDoc
|
||||
xmlCtxtReadFd
|
||||
xmlCtxtReadFile
|
||||
xmlCtxtReadIO
|
||||
xmlCtxtReadMemory
|
||||
xmlCtxtReset
|
||||
xmlCtxtResetLastError
|
||||
xmlCtxtResetPush
|
||||
xmlCtxtUseOptions
|
||||
xmlCurrentChar
|
||||
xmlDictCreate
|
||||
xmlDictCreateSub
|
||||
xmlDictFree
|
||||
xmlDictLookup
|
||||
xmlDictOwns
|
||||
xmlDictQLookup
|
||||
xmlDictReference
|
||||
xmlDictSize
|
||||
xmlDebugDumpAttr
|
||||
xmlDebugDumpAttrList
|
||||
xmlDebugDumpDTD
|
||||
@@ -282,6 +330,14 @@ xmlDefaultSAXHandlerInit
|
||||
xmlDelEncodingAlias
|
||||
xmlDeregisterNodeDefault
|
||||
xmlDetectCharEncoding
|
||||
xmlDictCreate
|
||||
xmlDictCreateSub
|
||||
xmlDictFree
|
||||
xmlDictLookup
|
||||
xmlDictOwns
|
||||
xmlDictQLookup
|
||||
xmlDictReference
|
||||
xmlDictSize
|
||||
xmlDocCopyNode
|
||||
xmlDocDump
|
||||
xmlDocDumpFormatMemory
|
||||
@@ -303,6 +359,7 @@ xmlElemDump
|
||||
xmlEncodeEntities
|
||||
xmlEncodeEntitiesReentrant
|
||||
xmlEncodeSpecialChars
|
||||
xmlErrMemory
|
||||
xmlFileClose
|
||||
xmlFileMatch
|
||||
xmlFileOpen
|
||||
@@ -327,11 +384,14 @@ xmlFreeNs
|
||||
xmlFreeNsList
|
||||
xmlFreeParserCtxt
|
||||
xmlFreeParserInputBuffer
|
||||
xmlFreePattern
|
||||
xmlFreePatternList
|
||||
xmlFreeProp
|
||||
xmlFreePropList
|
||||
xmlFreeRMutex
|
||||
xmlFreeRefTable
|
||||
xmlFreeTextReader
|
||||
xmlFreeTextWriter
|
||||
xmlFreeURI
|
||||
xmlFreeValidCtxt
|
||||
xmlGcMemGet
|
||||
@@ -356,6 +416,7 @@ xmlGetGlobalState
|
||||
xmlGetID
|
||||
xmlGetIntSubset
|
||||
xmlGetLastChild
|
||||
xmlGetLastError
|
||||
xmlGetLineNo
|
||||
xmlGetNoNsProp
|
||||
xmlGetNodePath
|
||||
@@ -379,6 +440,9 @@ xmlHashFree
|
||||
xmlHashLookup
|
||||
xmlHashLookup2
|
||||
xmlHashLookup3
|
||||
xmlHashQLookup
|
||||
xmlHashQLookup2
|
||||
xmlHashQLookup3
|
||||
xmlHashRemoveEntry
|
||||
xmlHashRemoveEntry2
|
||||
xmlHashRemoveEntry3
|
||||
@@ -425,6 +489,12 @@ xmlIsMixedElement
|
||||
xmlIsPubidChar
|
||||
xmlIsRef
|
||||
xmlIsXHTML
|
||||
xmlIsBaseCharGroup DATA
|
||||
xmlIsCharGroup DATA
|
||||
xmlIsCombiningGroup DATA
|
||||
xmlIsDigitGroup DATA
|
||||
xmlIsExtenderGroup DATA
|
||||
xmlIsIdeographicGroup DATA
|
||||
xmlKeepBlanksDefault
|
||||
xmlLineNumbersDefault
|
||||
xmlLinkGetData
|
||||
@@ -461,6 +531,8 @@ xmlLoadSGMLSuperCatalog
|
||||
xmlLockLibrary
|
||||
xmlLsCountNode
|
||||
xmlLsOneNode
|
||||
xmlMallocAtomicLoc
|
||||
xmlMallocLoc
|
||||
xmlMemDisplay
|
||||
xmlMemFree
|
||||
xmlMemGet
|
||||
@@ -468,6 +540,7 @@ xmlMemMalloc
|
||||
xmlMemRealloc
|
||||
xmlMemSetup
|
||||
xmlMemShow
|
||||
xmlMemStrdupLoc
|
||||
xmlMemUsed
|
||||
xmlMemoryDump
|
||||
xmlMemoryStrdup
|
||||
@@ -501,13 +574,16 @@ xmlNanoFTPUpdateURL
|
||||
xmlNanoHTTPAuthHeader
|
||||
xmlNanoHTTPCleanup
|
||||
xmlNanoHTTPClose
|
||||
xmlNanoHTTPEncoding
|
||||
xmlNanoHTTPFetch
|
||||
xmlNanoHTTPInit
|
||||
xmlNanoHTTPMethod
|
||||
xmlNanoHTTPMethodRedir
|
||||
xmlNanoHTTPMimeType
|
||||
xmlNanoHTTPOpen
|
||||
xmlNanoHTTPOpenRedir
|
||||
xmlNanoHTTPRead
|
||||
xmlNanoHTTPRedir
|
||||
xmlNanoHTTPReturnCode
|
||||
xmlNanoHTTPSave
|
||||
xmlNanoHTTPScanProxy
|
||||
@@ -551,11 +627,18 @@ xmlNewTextChild
|
||||
xmlNewTextLen
|
||||
xmlNewTextReader
|
||||
xmlNewTextReaderFilename
|
||||
xmlNewTextWriter
|
||||
xmlNewTextWriterDoc
|
||||
xmlNewTextWriterFilename
|
||||
xmlNewTextWriterMemory
|
||||
xmlNewTextWriterPushParser
|
||||
xmlNewTextWriterTree
|
||||
xmlNewValidCtxt
|
||||
xmlNextChar
|
||||
xmlNoNetExternalEntityLoader
|
||||
xmlNodeAddContent
|
||||
xmlNodeAddContentLen
|
||||
xmlNodeBufGetContent
|
||||
xmlNodeDump
|
||||
xmlNodeDumpOutput
|
||||
xmlNodeGetBase
|
||||
@@ -655,6 +738,7 @@ xmlParserInputBufferCreateFile
|
||||
xmlParserInputBufferCreateFilename
|
||||
xmlParserInputBufferCreateIO
|
||||
xmlParserInputBufferCreateMem
|
||||
xmlParserInputBufferCreateStatic
|
||||
xmlParserInputBufferGrow
|
||||
xmlParserInputBufferPush
|
||||
xmlParserInputBufferRead
|
||||
@@ -666,12 +750,32 @@ xmlParserPrintFileInfo
|
||||
xmlParserValidityError
|
||||
xmlParserValidityWarning
|
||||
xmlParserWarning
|
||||
xmlPatternMatch
|
||||
xmlPatterncompile
|
||||
xmlPedanticParserDefault
|
||||
xmlPopInput
|
||||
xmlPrintURI
|
||||
xmlPushInput
|
||||
xmlRMutexLock
|
||||
xmlRMutexUnlock
|
||||
xmlReadDoc
|
||||
xmlReadFd
|
||||
xmlReadFile
|
||||
xmlReadIO
|
||||
xmlReadMemory
|
||||
xmlReaderForDoc
|
||||
xmlReaderForFd
|
||||
xmlReaderForFile
|
||||
xmlReaderForIO
|
||||
xmlReaderForMemory
|
||||
xmlReaderNewDoc
|
||||
xmlReaderNewFd
|
||||
xmlReaderNewFile
|
||||
xmlReaderNewIO
|
||||
xmlReaderNewMemory
|
||||
xmlReaderNewWalker
|
||||
xmlReaderWalker
|
||||
xmlReallocLoc
|
||||
xmlReconciliateNs
|
||||
xmlRecoverDoc
|
||||
xmlRecoverFile
|
||||
@@ -712,10 +816,47 @@ xmlRelaxNGValidateFullElement
|
||||
xmlRelaxNGValidatePopElement
|
||||
xmlRelaxNGValidatePushCData
|
||||
xmlRelaxNGValidatePushElement
|
||||
xmlRelaxParserSetFlag
|
||||
xmlRemoveID
|
||||
xmlRemoveProp
|
||||
xmlRemoveRef
|
||||
xmlReplaceNode
|
||||
xmlResetError
|
||||
xmlResetLastError
|
||||
xmlSAX2AttributeDecl
|
||||
xmlSAX2CDataBlock
|
||||
xmlSAX2Characters
|
||||
xmlSAX2Comment
|
||||
xmlSAX2ElementDecl
|
||||
xmlSAX2EndDocument
|
||||
xmlSAX2EndElement
|
||||
xmlSAX2EndElementNs
|
||||
xmlSAX2EntityDecl
|
||||
xmlSAX2ExternalSubset
|
||||
xmlSAX2GetColumnNumber
|
||||
xmlSAX2GetEntity
|
||||
xmlSAX2GetLineNumber
|
||||
xmlSAX2GetParameterEntity
|
||||
xmlSAX2GetPublicId
|
||||
xmlSAX2GetSystemId
|
||||
xmlSAX2HasExternalSubset
|
||||
xmlSAX2HasInternalSubset
|
||||
xmlSAX2IgnorableWhitespace
|
||||
xmlSAX2InitDefaultSAXHandler
|
||||
xmlSAX2InitDocbDefaultSAXHandler
|
||||
xmlSAX2InitHtmlDefaultSAXHandler
|
||||
xmlSAX2InternalSubset
|
||||
xmlSAX2IsStandalone
|
||||
xmlSAX2NotationDecl
|
||||
xmlSAX2ProcessingInstruction
|
||||
xmlSAX2Reference
|
||||
xmlSAX2ResolveEntity
|
||||
xmlSAX2SetDocumentLocator
|
||||
xmlSAX2StartDocument
|
||||
xmlSAX2StartElement
|
||||
xmlSAX2StartElementNs
|
||||
xmlSAX2UnparsedEntityDecl
|
||||
xmlSAXDefaultVersion
|
||||
xmlSAXParseDTD
|
||||
xmlSAXParseDoc
|
||||
xmlSAXParseEntity
|
||||
@@ -725,6 +866,7 @@ xmlSAXParseMemory
|
||||
xmlSAXParseMemoryWithData
|
||||
xmlSAXUserParseFile
|
||||
xmlSAXUserParseMemory
|
||||
xmlSAXVersion
|
||||
xmlSaveFile
|
||||
xmlSaveFileEnc
|
||||
xmlSaveFileTo
|
||||
@@ -745,6 +887,7 @@ xmlSchemaFreeValidCtxt
|
||||
xmlSchemaFreeValue
|
||||
xmlSchemaGetPredefinedType
|
||||
xmlSchemaInitTypes
|
||||
xmlSchemaNewDocParserCtxt
|
||||
xmlSchemaNewFacet
|
||||
xmlSchemaNewMemParserCtxt
|
||||
xmlSchemaNewParserCtxt
|
||||
@@ -770,6 +913,7 @@ xmlSetListDoc
|
||||
xmlSetNs
|
||||
xmlSetNsProp
|
||||
xmlSetProp
|
||||
xmlSetStructuredErrorFunc
|
||||
xmlSetTreeDoc
|
||||
xmlSetupParserForBuffer
|
||||
xmlShell
|
||||
@@ -794,6 +938,9 @@ xmlSplitQName3
|
||||
xmlSprintfElementContent
|
||||
xmlStopParser
|
||||
xmlStrEqual
|
||||
xmlStrPrintf
|
||||
xmlStrQEqual
|
||||
xmlStrVPrintf
|
||||
xmlStrcasecmp
|
||||
xmlStrcasestr
|
||||
xmlStrcat
|
||||
@@ -803,22 +950,33 @@ xmlStrdup
|
||||
xmlStringCurrentChar
|
||||
xmlStringDecodeEntities
|
||||
xmlStringGetNodeList
|
||||
xmlStringLenDecodeEntities
|
||||
xmlStringLenGetNodeList
|
||||
xmlStrlen
|
||||
xmlStrncasecmp
|
||||
xmlStrncat
|
||||
xmlStrncatNew
|
||||
xmlStrncmp
|
||||
xmlStrndup
|
||||
xmlStrstr
|
||||
xmlStrsub
|
||||
xmlSubstituteEntitiesDefault
|
||||
xmlSwitchEncoding
|
||||
xmlSwitchInputEncoding
|
||||
xmlSwitchToEncoding
|
||||
xmlTextConcat
|
||||
xmlTextMerge
|
||||
xmlTextReaderAttributeCount
|
||||
xmlTextReaderBaseUri
|
||||
xmlTextReaderClose
|
||||
xmlTextReaderConstBaseUri
|
||||
xmlTextReaderConstLocalName
|
||||
xmlTextReaderConstName
|
||||
xmlTextReaderConstNamespaceUri
|
||||
xmlTextReaderConstPrefix
|
||||
xmlTextReaderConstString
|
||||
xmlTextReaderConstValue
|
||||
xmlTextReaderConstXmlLang
|
||||
xmlTextReaderCurrentDoc
|
||||
xmlTextReaderCurrentNode
|
||||
xmlTextReaderDepth
|
||||
@@ -847,9 +1005,12 @@ xmlTextReaderMoveToNextAttribute
|
||||
xmlTextReaderName
|
||||
xmlTextReaderNamespaceUri
|
||||
xmlTextReaderNext
|
||||
xmlTextReaderNextSibling
|
||||
xmlTextReaderNodeType
|
||||
xmlTextReaderNormalization
|
||||
xmlTextReaderPrefix
|
||||
xmlTextReaderPreserve
|
||||
xmlTextReaderPreservePattern
|
||||
xmlTextReaderQuoteChar
|
||||
xmlTextReaderRead
|
||||
xmlTextReaderReadAttributeValue
|
||||
@@ -861,8 +1022,77 @@ xmlTextReaderRelaxNGSetSchema
|
||||
xmlTextReaderRelaxNGValidate
|
||||
xmlTextReaderSetErrorHandler
|
||||
xmlTextReaderSetParserProp
|
||||
xmlTextReaderSetStructuredErrorHandler
|
||||
xmlTextReaderValue
|
||||
xmlTextReaderXmlLang
|
||||
xmlTextWriterEndAttribute
|
||||
xmlTextWriterEndCDATA
|
||||
xmlTextWriterEndComment
|
||||
xmlTextWriterEndDTD
|
||||
xmlTextWriterEndDocument
|
||||
xmlTextWriterEndElement
|
||||
xmlTextWriterEndPI
|
||||
xmlTextWriterFlush
|
||||
xmlTextWriterFullEndElement
|
||||
xmlTextWriterSetIndent
|
||||
xmlTextWriterSetIndentString
|
||||
xmlTextWriterStartAttribute
|
||||
xmlTextWriterStartAttributeNS
|
||||
xmlTextWriterStartCDATA
|
||||
xmlTextWriterStartComment
|
||||
xmlTextWriterStartDTD
|
||||
xmlTextWriterStartDTDAttlist
|
||||
xmlTextWriterStartDTDElement
|
||||
xmlTextWriterStartDTDEntity
|
||||
xmlTextWriterStartDocument
|
||||
xmlTextWriterStartElement
|
||||
xmlTextWriterStartElementNS
|
||||
xmlTextWriterStartPI
|
||||
xmlTextWriterWriteAttribute
|
||||
xmlTextWriterWriteAttributeNS
|
||||
xmlTextWriterWriteBase64
|
||||
xmlTextWriterWriteBinHex
|
||||
xmlTextWriterWriteCDATA
|
||||
xmlTextWriterWriteComment
|
||||
xmlTextWriterWriteDTD
|
||||
xmlTextWriterWriteDTDAttlist
|
||||
xmlTextWriterWriteDTDElement
|
||||
xmlTextWriterWriteDTDEntity
|
||||
xmlTextWriterWriteDTDExternalEntity
|
||||
xmlTextWriterWriteDTDInternalEntity
|
||||
xmlTextWriterWriteDTDNotation
|
||||
xmlTextWriterWriteElement
|
||||
xmlTextWriterWriteElementNS
|
||||
xmlTextWriterWriteFormatAttribute
|
||||
xmlTextWriterWriteFormatAttributeNS
|
||||
xmlTextWriterWriteFormatCDATA
|
||||
xmlTextWriterWriteFormatComment
|
||||
xmlTextWriterWriteFormatDTD
|
||||
xmlTextWriterWriteFormatDTDAttlist
|
||||
xmlTextWriterWriteFormatDTDElement
|
||||
xmlTextWriterWriteFormatDTDInternalEntity
|
||||
xmlTextWriterWriteFormatElement
|
||||
xmlTextWriterWriteFormatElementNS
|
||||
xmlTextWriterWriteFormatPI
|
||||
xmlTextWriterWriteFormatRaw
|
||||
xmlTextWriterWriteFormatString
|
||||
xmlTextWriterWritePI
|
||||
xmlTextWriterWriteRaw
|
||||
xmlTextWriterWriteRawLen
|
||||
xmlTextWriterWriteString
|
||||
xmlTextWriterWriteVFormatAttribute
|
||||
xmlTextWriterWriteVFormatAttributeNS
|
||||
xmlTextWriterWriteVFormatCDATA
|
||||
xmlTextWriterWriteVFormatComment
|
||||
xmlTextWriterWriteVFormatDTD
|
||||
xmlTextWriterWriteVFormatDTDAttlist
|
||||
xmlTextWriterWriteVFormatDTDElement
|
||||
xmlTextWriterWriteVFormatDTDInternalEntity
|
||||
xmlTextWriterWriteVFormatElement
|
||||
xmlTextWriterWriteVFormatElementNS
|
||||
xmlTextWriterWriteVFormatPI
|
||||
xmlTextWriterWriteVFormatRaw
|
||||
xmlTextWriterWriteVFormatString
|
||||
xmlThrDefBufferAllocScheme
|
||||
xmlThrDefDefaultBufferSize
|
||||
xmlThrDefDeregisterNodeDefault
|
||||
@@ -877,8 +1107,10 @@ xmlThrDefPedanticParserDefaultValue
|
||||
xmlThrDefRegisterNodeDefault
|
||||
xmlThrDefSaveNoEmptyTags
|
||||
xmlThrDefSetGenericErrorFunc
|
||||
xmlThrDefSetStructuredErrorFunc
|
||||
xmlThrDefSubstituteEntitiesDefaultValue
|
||||
xmlThrDefTreeIndentString
|
||||
xmlUCSIsAegeanNumbers
|
||||
xmlUCSIsAlphabeticPresentationForms
|
||||
xmlUCSIsArabic
|
||||
xmlUCSIsArabicPresentationFormsA
|
||||
@@ -893,6 +1125,7 @@ xmlUCSIsBopomofo
|
||||
xmlUCSIsBopomofoExtended
|
||||
xmlUCSIsBoxDrawing
|
||||
xmlUCSIsBraillePatterns
|
||||
xmlUCSIsBuhid
|
||||
xmlUCSIsByzantineMusicalSymbols
|
||||
xmlUCSIsCJKCompatibility
|
||||
xmlUCSIsCJKCompatibilityForms
|
||||
@@ -942,11 +1175,14 @@ xmlUCSIsCatZp
|
||||
xmlUCSIsCatZs
|
||||
xmlUCSIsCherokee
|
||||
xmlUCSIsCombiningDiacriticalMarks
|
||||
xmlUCSIsCombiningDiacriticalMarksforSymbols
|
||||
xmlUCSIsCombiningHalfMarks
|
||||
xmlUCSIsCombiningMarksforSymbols
|
||||
xmlUCSIsControlPictures
|
||||
xmlUCSIsCurrencySymbols
|
||||
xmlUCSIsCypriotSyllabary
|
||||
xmlUCSIsCyrillic
|
||||
xmlUCSIsCyrillicSupplement
|
||||
xmlUCSIsDeseret
|
||||
xmlUCSIsDevanagari
|
||||
xmlUCSIsDingbats
|
||||
@@ -959,12 +1195,14 @@ xmlUCSIsGeorgian
|
||||
xmlUCSIsGothic
|
||||
xmlUCSIsGreek
|
||||
xmlUCSIsGreekExtended
|
||||
xmlUCSIsGreekandCoptic
|
||||
xmlUCSIsGujarati
|
||||
xmlUCSIsGurmukhi
|
||||
xmlUCSIsHalfwidthandFullwidthForms
|
||||
xmlUCSIsHangulCompatibilityJamo
|
||||
xmlUCSIsHangulJamo
|
||||
xmlUCSIsHangulSyllables
|
||||
xmlUCSIsHanunoo
|
||||
xmlUCSIsHebrew
|
||||
xmlUCSIsHighPrivateUseSurrogates
|
||||
xmlUCSIsHighSurrogates
|
||||
@@ -975,18 +1213,26 @@ xmlUCSIsKanbun
|
||||
xmlUCSIsKangxiRadicals
|
||||
xmlUCSIsKannada
|
||||
xmlUCSIsKatakana
|
||||
xmlUCSIsKatakanaPhoneticExtensions
|
||||
xmlUCSIsKhmer
|
||||
xmlUCSIsKhmerSymbols
|
||||
xmlUCSIsLao
|
||||
xmlUCSIsLatin1Supplement
|
||||
xmlUCSIsLatinExtendedA
|
||||
xmlUCSIsLatinExtendedAdditional
|
||||
xmlUCSIsLatinExtendedB
|
||||
xmlUCSIsLetterlikeSymbols
|
||||
xmlUCSIsLimbu
|
||||
xmlUCSIsLinearBIdeograms
|
||||
xmlUCSIsLinearBSyllabary
|
||||
xmlUCSIsLowSurrogates
|
||||
xmlUCSIsMalayalam
|
||||
xmlUCSIsMathematicalAlphanumericSymbols
|
||||
xmlUCSIsMathematicalOperators
|
||||
xmlUCSIsMiscellaneousMathematicalSymbolsA
|
||||
xmlUCSIsMiscellaneousMathematicalSymbolsB
|
||||
xmlUCSIsMiscellaneousSymbols
|
||||
xmlUCSIsMiscellaneousSymbolsandArrows
|
||||
xmlUCSIsMiscellaneousTechnical
|
||||
xmlUCSIsMongolian
|
||||
xmlUCSIsMusicalSymbols
|
||||
@@ -996,23 +1242,40 @@ xmlUCSIsOgham
|
||||
xmlUCSIsOldItalic
|
||||
xmlUCSIsOpticalCharacterRecognition
|
||||
xmlUCSIsOriya
|
||||
xmlUCSIsOsmanya
|
||||
xmlUCSIsPhoneticExtensions
|
||||
xmlUCSIsPrivateUse
|
||||
xmlUCSIsPrivateUseArea
|
||||
xmlUCSIsRunic
|
||||
xmlUCSIsShavian
|
||||
xmlUCSIsSinhala
|
||||
xmlUCSIsSmallFormVariants
|
||||
xmlUCSIsSpacingModifierLetters
|
||||
xmlUCSIsSpecials
|
||||
xmlUCSIsSuperscriptsandSubscripts
|
||||
xmlUCSIsSupplementalArrowsA
|
||||
xmlUCSIsSupplementalArrowsB
|
||||
xmlUCSIsSupplementalMathematicalOperators
|
||||
xmlUCSIsSupplementaryPrivateUseAreaA
|
||||
xmlUCSIsSupplementaryPrivateUseAreaB
|
||||
xmlUCSIsSyriac
|
||||
xmlUCSIsTagalog
|
||||
xmlUCSIsTagbanwa
|
||||
xmlUCSIsTags
|
||||
xmlUCSIsTaiLe
|
||||
xmlUCSIsTaiXuanJingSymbols
|
||||
xmlUCSIsTamil
|
||||
xmlUCSIsTelugu
|
||||
xmlUCSIsThaana
|
||||
xmlUCSIsThai
|
||||
xmlUCSIsTibetan
|
||||
xmlUCSIsUgaritic
|
||||
xmlUCSIsUnifiedCanadianAboriginalSyllabics
|
||||
xmlUCSIsVariationSelectors
|
||||
xmlUCSIsVariationSelectorsSupplement
|
||||
xmlUCSIsYiRadicals
|
||||
xmlUCSIsYiSyllables
|
||||
xmlUCSIsYijingHexagramSymbols
|
||||
xmlURIEscape
|
||||
xmlURIEscapeStr
|
||||
xmlURIUnescapeString
|
||||
@@ -1058,8 +1321,14 @@ xmlValidatePushCData
|
||||
xmlValidatePushElement
|
||||
xmlValidateQName
|
||||
xmlValidateRoot
|
||||
xmlXIncludeFreeContext
|
||||
xmlXIncludeNewContext
|
||||
xmlXIncludeProcess
|
||||
xmlXIncludeProcessFlags
|
||||
xmlXIncludeProcessNode
|
||||
xmlXIncludeProcessTree
|
||||
xmlXIncludeProcessTreeFlags
|
||||
xmlXIncludeSetFlags
|
||||
xmlXPathAddValues
|
||||
xmlXPathBooleanFunction
|
||||
xmlXPathCastBooleanToNumber
|
||||
@@ -1078,6 +1347,7 @@ xmlXPathCastToNumber
|
||||
xmlXPathCastToString
|
||||
xmlXPathCeilingFunction
|
||||
xmlXPathCmpNodes
|
||||
xmlXPathCtxtCompile
|
||||
xmlXPathCompareValues
|
||||
xmlXPathCompile
|
||||
xmlXPathCompiledEval
|
||||
@@ -1087,6 +1357,7 @@ xmlXPathConvertBoolean
|
||||
xmlXPathConvertNumber
|
||||
xmlXPathConvertString
|
||||
xmlXPathCountFunction
|
||||
xmlXPathCtxtCompile
|
||||
xmlXPathDebugDumpCompExpr
|
||||
xmlXPathDebugDumpObject
|
||||
xmlXPathDifference
|
||||
@@ -1094,6 +1365,7 @@ xmlXPathDistinct
|
||||
xmlXPathDistinctSorted
|
||||
xmlXPathDivValues
|
||||
xmlXPathEqualValues
|
||||
xmlXPathErr
|
||||
xmlXPathEval
|
||||
xmlXPathEvalExpr
|
||||
xmlXPathEvalExpression
|
||||
@@ -1208,6 +1480,7 @@ xmlXPathWrapCString
|
||||
xmlXPathWrapExternal
|
||||
xmlXPathWrapNodeSet
|
||||
xmlXPathWrapString
|
||||
xmlXPathErr
|
||||
xmlXPatherror
|
||||
xmlXPtrBuildNodeList
|
||||
xmlXPtrEval
|
||||
@@ -1230,9 +1503,69 @@ xmlXPtrNewRangePointNode
|
||||
xmlXPtrNewRangePoints
|
||||
xmlXPtrRangeToFunction
|
||||
xmlXPtrWrapLocationSet
|
||||
_libiconv_version
|
||||
libiconv_close
|
||||
libiconv
|
||||
libiconv_open
|
||||
libiconv_set_relocation_prefix
|
||||
| ||||