mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-12 11:40:50 +00:00
Compare commits
3411
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c48e01f14 | ||
|
|
a3ac1e5e59 | ||
|
|
0340340673 | ||
|
|
3f029b61e8 | ||
|
|
6fb861d7a8 | ||
|
|
df03379b4e | ||
|
|
4ce6480745 | ||
|
|
fea19e97db | ||
|
|
a582ce8735 | ||
|
|
69d7ea4f30 | ||
|
|
e4b86c2cd5 | ||
|
|
b280bec492 | ||
|
|
5d568a2e22 | ||
|
|
b4db46606e | ||
|
|
6da32c3314 | ||
|
|
491792e0d0 | ||
|
|
8419dc332b | ||
|
|
8c79054ad2 | ||
|
|
7fd92b524d | ||
|
|
b43f85d641 | ||
|
|
9df63e183e | ||
|
|
b763b25c96 | ||
|
|
3b2bcf3c41 | ||
|
|
7ec4e5e21b | ||
|
|
6a048bfd64 | ||
|
|
7b31a19305 | ||
|
|
70003624fa | ||
|
|
db546462b6 | ||
|
|
fcd82d34c5 | ||
|
|
a2d42419a5 | ||
|
|
a0f70aa618 | ||
|
|
04daa555aa | ||
|
|
b880fb5bcc | ||
|
|
96f01b1414 | ||
|
|
a9f0e0176b | ||
|
|
2572b088d0 | ||
|
|
863e6fd242 | ||
|
|
5dba477467 | ||
|
|
18e1e63e78 | ||
|
|
6a7bc777ca | ||
|
|
1e4e9b34e2 | ||
|
|
7e576d36e8 | ||
|
|
c8d0be50c5 | ||
|
|
c0cede82f1 | ||
|
|
1239651126 | ||
|
|
5bdd53972f | ||
|
|
7b02e9fc35 | ||
|
|
5b2bad3825 | ||
|
|
6db18997bb | ||
|
|
334bde365c | ||
|
|
0eaa79e4eb | ||
|
|
7bd5794a07 | ||
|
|
92ca446e47 | ||
|
|
40e99c5e9f | ||
|
|
326f69f54e | ||
|
|
2e68fc59e3 | ||
|
|
4d68c944d9 | ||
|
|
3e99a228df | ||
|
|
7c003f8c0c | ||
|
|
7acbcc9601 | ||
|
|
13e7413182 | ||
|
|
bf18f87644 | ||
|
|
65ccee97a6 | ||
|
|
6bd7d3db64 | ||
|
|
4ab3d2d22c | ||
|
|
c32e09f791 | ||
|
|
49c32728af | ||
|
|
48fc7c447f | ||
|
|
7ef5212400 | ||
|
|
36912e5ff9 | ||
|
|
82aa0d1404 | ||
|
|
d5ad9de048 | ||
|
|
1c8c9ad231 | ||
|
|
073b7acc90 | ||
|
|
42c874ba5f | ||
|
|
0bf6633452 | ||
|
|
90ad09dc1d | ||
|
|
e5ceb99a1e | ||
|
|
5366478e18 | ||
|
|
7db7884e8c | ||
|
|
245428b241 | ||
|
|
3b88c31bfc | ||
|
|
d015d47527 | ||
|
|
6e6eb6002b | ||
|
|
ec52ce44a9 | ||
|
|
827ad656cb | ||
|
|
608b96a8aa | ||
|
|
e88bde0a73 | ||
|
|
8b8077709e | ||
|
|
512ff32f87 | ||
|
|
f5a77d04ff | ||
|
|
e4df84a8da | ||
|
|
3092c10e93 | ||
|
|
c059cd6181 | ||
|
|
caf9049ae1 | ||
|
|
0b8ea28832 | ||
|
|
cf6a2b1621 | ||
|
|
1e0b71df1f | ||
|
|
959a550780 | ||
|
|
0979233f5a | ||
|
|
9d3ca44e4d | ||
|
|
b3ecf2feaf | ||
|
|
cd83fb18c0 | ||
|
|
b46c44b485 | ||
|
|
1bcdb436c1 | ||
|
|
2a3fdcb73d | ||
|
|
8c9388c984 | ||
|
|
14f76028aa | ||
|
|
c46d1e3402 | ||
|
|
5c281c6116 | ||
|
|
f0d631ad8f | ||
|
|
1ed113d925 | ||
|
|
3cb7cf43de | ||
|
|
74169f5fc4 | ||
|
|
0583ae2648 | ||
|
|
ddf3740cf9 | ||
|
|
033209b061 | ||
|
|
f856855efd | ||
|
|
0fe5aef05e | ||
|
|
a4bf381557 | ||
|
|
b28d6b50c2 | ||
|
|
73b732a31c | ||
|
|
7658768705 | ||
|
|
c56df5cac0 | ||
|
|
15dd8e61a2 | ||
|
|
ee286febe7 | ||
|
|
f30765e1a0 | ||
|
|
83304f3d2c | ||
|
|
cc64b583fb | ||
|
|
2702340dd9 | ||
|
|
3e5398ffba | ||
|
|
6ac297fbc1 | ||
|
|
77b158159f | ||
|
|
2cb6e338a1 | ||
|
|
ca7fcf038f | ||
|
|
95fa99702c | ||
|
|
ae67ddc318 | ||
|
|
26eaf668e7 | ||
|
|
29c41fe46d | ||
|
|
db065413d1 | ||
|
|
553eb2391d | ||
|
|
b19d1bdb0f | ||
|
|
bc8e138250 | ||
|
|
49cc8a7805 | ||
|
|
50a2574e97 | ||
|
|
adc620708b | ||
|
|
4e21e2ee2e | ||
|
|
69c2faf510 | ||
|
|
84569c08fc | ||
|
|
fe37f4bca9 | ||
|
|
e7eccd2438 | ||
|
|
61379fe0c3 | ||
|
|
7fc5c94478 | ||
|
|
ac7d60ecec | ||
|
|
e92f6f15cb | ||
|
|
a32c54bdbb | ||
|
|
773d0560f2 | ||
|
|
712ffd4c14 | ||
|
|
ea033715a9 | ||
|
|
9c146016d3 | ||
|
|
9c192f526e | ||
|
|
70eb0c78f8 | ||
|
|
da4f3edac4 | ||
|
|
2f23538ba0 | ||
|
|
6e2c7e5137 | ||
|
|
65b6639481 | ||
|
|
20cc50db4c | ||
|
|
bd1140e71d | ||
|
|
85940d676f | ||
|
|
fa5ab18f2e | ||
|
|
63fb0326e9 | ||
|
|
d0b9a3989b | ||
|
|
05cf4423b9 | ||
|
|
05aa5cb831 | ||
|
|
bb09ee9505 | ||
|
|
00c14f7413 | ||
|
|
caeaaf4d98 | ||
|
|
e20b13751b | ||
|
|
61b1fe45d2 | ||
|
|
355eda0cf3 | ||
|
|
7cd40d3a53 | ||
|
|
1aba4ea9d0 | ||
|
|
649d8721db | ||
|
|
9dca788ca0 | ||
|
|
fe558092e4 | ||
|
|
781b6e9435 | ||
|
|
d63341ea5f | ||
|
|
4a50fde509 | ||
|
|
cc14640f17 | ||
|
|
7b346d0a12 | ||
|
|
f42a770f65 | ||
|
|
b460dcfa0a | ||
|
|
c405b64e57 | ||
|
|
51c10e49dd | ||
|
|
715aa0388c | ||
|
|
8ad55cbd94 | ||
|
|
88c98d3e3f | ||
|
|
eedd3ac4d0 | ||
|
|
f3cd07fe7d | ||
|
|
5951b166c8 | ||
|
|
b5de395367 | ||
|
|
9cc704421a | ||
|
|
d609112c0e | ||
|
|
cf89b8db5a | ||
|
|
fc1bc7102f | ||
|
|
29ed30f77c | ||
|
|
ab5ca792e4 | ||
|
|
909f3af8dc | ||
|
|
3bd9e02380 | ||
|
|
9d0c2484c0 | ||
|
|
ce562b6280 | ||
|
|
db33bb8ff6 | ||
|
|
f6460bfe6f | ||
|
|
81ff62c271 | ||
|
|
e8cf4a40d4 | ||
|
|
5b570ecc01 | ||
|
|
bf87ec7aeb | ||
|
|
69ee40691f | ||
|
|
045653dfed | ||
|
|
e24e95bdec | ||
|
|
ff2443eb67 | ||
|
|
ba50898123 | ||
|
|
9abeb4819f | ||
|
|
1a3864b15c | ||
|
|
d037fdc8be | ||
|
|
b5e13a0f97 | ||
|
|
96351ba5ee | ||
|
|
5f883e802a | ||
|
|
3852f8076f | ||
|
|
70a6f84862 | ||
|
|
71a4bdc882 | ||
|
|
77fb7d2b64 | ||
|
|
bd418f0741 | ||
|
|
9b98d3ca0b | ||
|
|
a2121549aa | ||
|
|
6e1ad8c00d | ||
|
|
213491a146 | ||
|
|
2d2c494970 | ||
|
|
fa56e42b08 | ||
|
|
a9f7101365 | ||
|
|
acdeb47444 | ||
|
|
57f3e61220 | ||
|
|
1ceb19f196 | ||
|
|
05024cb094 | ||
|
|
4cb71a069b | ||
|
|
ec8add1a4c | ||
|
|
ae11f08d69 | ||
|
|
9f870d1e6c | ||
|
|
3b6d718f18 | ||
|
|
f5c0eb98c4 | ||
|
|
d5005ff5d7 | ||
|
|
fa7f4d1e6a | ||
|
|
d69b38ea65 | ||
|
|
12b2f2af8f | ||
|
|
99e0b36321 | ||
|
|
031808cd1b | ||
|
|
b6bc7dcd10 | ||
|
|
5864290d20 | ||
|
|
0c3b839af9 | ||
|
|
4bc0565d14 | ||
|
|
42ca607e71 | ||
|
|
09ab7fc6ca | ||
|
|
ca737cc01f | ||
|
|
4562f7b6d7 | ||
|
|
d02fe90b00 | ||
|
|
31c9ad1831 | ||
|
|
d7f21375d4 | ||
|
|
0beaaa9356 | ||
|
|
6ef9f9fe9c | ||
|
|
36abfe1121 | ||
|
|
898ff287f2 | ||
|
|
29c133f11d | ||
|
|
edb2b71387 | ||
|
|
92943a0c3f | ||
|
|
fc173b6ace | ||
|
|
ad5b022ed1 | ||
|
|
5e55e47f7f | ||
|
|
331d0fd83c | ||
|
|
dc70a25a1d | ||
|
|
fbea48211e | ||
|
|
64df92e053 | ||
|
|
313de641eb | ||
|
|
56251a7239 | ||
|
|
dedd0eb898 | ||
|
|
2897c6fe25 | ||
|
|
79e36bd365 | ||
|
|
e7d03185c4 | ||
|
|
b4b82e05d8 | ||
|
|
6cbb9fa288 | ||
|
|
ceb247762f | ||
|
|
76d027d3e7 | ||
|
|
0a092b6226 | ||
|
|
b1de472ba3 | ||
|
|
0e18779e8b | ||
|
|
5610800a7b | ||
|
|
315999da94 | ||
|
|
365f379435 | ||
|
|
84bafc1002 | ||
|
|
99d782cf60 | ||
|
|
d34b144061 | ||
|
|
0d19142fc2 | ||
|
|
9ade072706 | ||
|
|
9dd0086785 | ||
|
|
3bfe29fddb | ||
|
|
b053e6422f | ||
|
|
dd4f37a4cf | ||
|
|
9318964f25 | ||
|
|
6401dc10b2 | ||
|
|
51e6ab21d7 | ||
|
|
2139099781 | ||
|
|
8afd1b1d97 | ||
|
|
bd09614526 | ||
|
|
eeb9e688f2 | ||
|
|
f14a3042be | ||
|
|
70bd8c71b5 | ||
|
|
68c10efe1b | ||
|
|
ffd70dca19 | ||
|
|
9e0ae58772 | ||
|
|
fc636abfa7 | ||
|
|
aa52ee54c1 | ||
|
|
4682085405 | ||
|
|
11c654bbcd | ||
|
|
2552876786 | ||
|
|
ad311c35c7 | ||
|
|
74fba75ca0 | ||
|
|
14c223b2c7 | ||
|
|
906b922051 | ||
|
|
f8aec3164c | ||
|
|
8b55704887 | ||
|
|
bf8f42835f | ||
|
|
d693d6b2cb | ||
|
|
52eebff6f8 | ||
|
|
70893ff7af | ||
|
|
33cb181af2 | ||
|
|
4dd71d4cfe | ||
|
|
110b670d44 | ||
|
|
e38c4ae3ad | ||
|
|
4e5acab610 | ||
|
|
490569ca28 | ||
|
|
ae552c39fd | ||
|
|
44a52bcd9b | ||
|
|
9f3c8ffeb0 | ||
|
|
f19fe37dec | ||
|
|
c87f13951f | ||
|
|
e37ddc1368 | ||
|
|
aeb6f86fe6 | ||
|
|
cc91e5ea64 | ||
|
|
a05db57374 | ||
|
|
c5977f6503 | ||
|
|
4c7af667a7 | ||
|
|
b7c1735cb8 | ||
|
|
4711a6113d | ||
|
|
08427debe8 | ||
|
|
3e616b5a31 | ||
|
|
97cea1b933 | ||
|
|
d3d45277a1 | ||
|
|
0e7e4d30f6 | ||
|
|
6189e219ff | ||
|
|
bafbbea051 | ||
|
|
fd629e6ee0 | ||
|
|
250118b1b1 | ||
|
|
78c9eaccd9 | ||
|
|
583556a3c2 | ||
|
|
45315698d8 | ||
|
|
556e2b9c6e | ||
|
|
d91d3bbee2 | ||
|
|
e45c1af8b4 | ||
|
|
a4ea1d6826 | ||
|
|
68ab1d3d07 | ||
|
|
42d553c8ae | ||
|
|
ff84e15146 | ||
|
|
68df5c5019 | ||
|
|
08055feffa | ||
|
|
865b7ac545 | ||
|
|
863651dff1 | ||
|
|
67cc918c3c | ||
|
|
48bc90a8aa | ||
|
|
312071bd08 | ||
|
|
908cdfafe1 | ||
|
|
c33fa392de | ||
|
|
4beb8a0d7d | ||
|
|
7a955aa1c1 | ||
|
|
5222c8872d | ||
|
|
ece1369191 | ||
|
|
137e1a1379 | ||
|
|
f1d0753f71 | ||
|
|
e5c8aeb3f1 | ||
|
|
f7f7094bcf | ||
|
|
685fd42965 | ||
|
|
0e90b9dc83 | ||
|
|
e6146d6bf3 | ||
|
|
051a30bc65 | ||
|
|
1bcdcebe67 | ||
|
|
3b783ef57b | ||
|
|
1261271839 | ||
|
|
fd344d3602 | ||
|
|
88b31ecb28 | ||
|
|
ae08e0500e | ||
|
|
a86e27db95 | ||
|
|
6131b78748 | ||
|
|
3a59390e9d | ||
|
|
a508bec819 | ||
|
|
c7843d3b4e | ||
|
|
80782eff1f | ||
|
|
4d7150657c | ||
|
|
bf5cb890b0 | ||
|
|
1841e77906 | ||
|
|
d4fd66687d | ||
|
|
1b42c94968 | ||
|
|
bc3a6ebae0 | ||
|
|
28a6ba5fc0 | ||
|
|
937db8cc80 | ||
|
|
3f6e1be9da | ||
|
|
d23e5d837a | ||
|
|
1170876974 | ||
|
|
33a564c971 | ||
|
|
99d572ad14 | ||
|
|
10f52b4805 | ||
|
|
83d20ab305 | ||
|
|
c0b3d86d91 | ||
|
|
ab7bbbb160 | ||
|
|
f0cfb4aee8 | ||
|
|
8fa4f7d83f | ||
|
|
ba03c9f2aa | ||
|
|
b51805caeb | ||
|
|
e387105e35 | ||
|
|
35a5c6f192 | ||
|
|
c846de3fb4 | ||
|
|
0178fb1ab5 | ||
|
|
76ec07c402 | ||
|
|
5520a43b77 | ||
|
|
478abf57d4 | ||
|
|
7a22bb09d7 | ||
|
|
f5cc1929eb | ||
|
|
8481cdf62f | ||
|
|
971a6f1702 | ||
|
|
284491887f | ||
|
|
c07b5282af | ||
|
|
2b9b11d3af | ||
|
|
c401bbe22e | ||
|
|
3bd34bf386 | ||
|
|
59d1066525 | ||
|
|
4a37c618e6 | ||
|
|
d64c1652e2 | ||
|
|
fca41d2752 | ||
|
|
189847996d | ||
|
|
0275e4f665 | ||
|
|
88b903da66 | ||
|
|
fe615efb5c | ||
|
|
7da7a50c69 | ||
|
|
3b5efa05f7 | ||
|
|
dcf5f1a8d5 | ||
|
|
5bccee70ae | ||
|
|
9c94a2b971 | ||
|
|
ac22cb771b | ||
|
|
1200b075dc | ||
|
|
b82f261918 | ||
|
|
9d1847cdd4 | ||
|
|
6981775d23 | ||
|
|
b275477b76 | ||
|
|
4eae85673a | ||
|
|
de6c9f35a1 | ||
|
|
ccc386c8e3 | ||
|
|
a965c2d73b | ||
|
|
fcd0c2a03f | ||
|
|
c475b6112a | ||
|
|
1e1e162e31 | ||
|
|
a8c7a9deb8 | ||
|
|
027512320f | ||
|
|
7bc9ea2b9f | ||
|
|
11e2405489 | ||
|
|
324391bc30 | ||
|
|
1970a527ff | ||
|
|
ecb74a01a1 | ||
|
|
6aff02506e | ||
|
|
53e1ea7728 | ||
|
|
86c96359f3 | ||
|
|
eb1cc78be8 | ||
|
|
21ca719293 | ||
|
|
9dc605afe5 | ||
|
|
b828e6971c | ||
|
|
da8c6bea46 | ||
|
|
835fb93f63 | ||
|
|
4c0058f44a | ||
|
|
f788b6743b | ||
|
|
e3d76db455 | ||
|
|
67f6945e8a | ||
|
|
ceebb2db61 | ||
|
|
5283b0b821 | ||
|
|
98674b73bd | ||
|
|
9133a9b8b0 | ||
|
|
5f34cfddbc | ||
|
|
18fee17d38 | ||
|
|
e06c2021c9 | ||
|
|
3b74bbe999 | ||
|
|
b117adeded | ||
|
|
1e5749f47f | ||
|
|
838bab821c | ||
|
|
e9abf023b4 | ||
|
|
d5f6f5cb50 | ||
|
|
74c94b2b1a | ||
|
|
485d10cb13 | ||
|
|
e0b0919375 | ||
|
|
da98cacafc | ||
|
|
a75a9fb8ef | ||
|
|
2fb4209083 | ||
|
|
a763da63ad | ||
|
|
aa7efd11b7 | ||
|
|
5dd0055c77 | ||
|
|
9ff0159bf4 | ||
|
|
13f27d8063 | ||
|
|
b99722ddf5 | ||
|
|
b7e53b12f6 | ||
|
|
361ae6886e | ||
|
|
ef1ea9c895 | ||
|
|
22099d934e | ||
|
|
8a61125a54 | ||
|
|
bac6df0475 | ||
|
|
349e81e468 | ||
|
|
c3db2fe705 | ||
|
|
021836efcb | ||
|
|
c764f2e3ab | ||
|
|
9a7909c983 | ||
|
|
6e7b5172ea | ||
|
|
e3f95d1c5f | ||
|
|
7763337255 | ||
|
|
1ce2132b97 | ||
|
|
7eb1f5b28c | ||
|
|
ccaff4461b | ||
|
|
86fa2aade2 | ||
|
|
17129a0deb | ||
|
|
9b621d1c8f | ||
|
|
80ca00005f | ||
|
|
0ac9536d99 | ||
|
|
43819ff6b2 | ||
|
|
bf25d1cec9 | ||
|
|
d7c9624c5b | ||
|
|
71613cbd57 | ||
|
|
739bdec582 | ||
|
|
4f8ae75f4f | ||
|
|
ceba50b6ed | ||
|
|
eb9d799876 | ||
|
|
e4cc1ad900 | ||
|
|
6c330bd6bf | ||
|
|
f77e6a4499 | ||
|
|
1c4532dcbf | ||
|
|
0cda28f77b | ||
|
|
fe9abd3219 | ||
|
|
c54864e3af | ||
|
|
d7e34cf6ea | ||
|
|
f1dac01f11 | ||
|
|
e6b768105d | ||
|
|
02d647b5f9 | ||
|
|
9935ddee99 | ||
|
|
ee26ec5e9c | ||
|
|
51ef369d45 | ||
|
|
466e30c83e | ||
|
|
f27920214c | ||
|
|
ae22fe4c52 | ||
|
|
a0f2e9bf34 | ||
|
|
18b8440c95 | ||
|
|
8f6a42f11b | ||
|
|
087e39a7ef | ||
|
|
588ea96deb | ||
|
|
4549b969f9 | ||
|
|
2f633d91ca | ||
|
|
d526de3fa8 | ||
|
|
9eef999b38 | ||
|
|
a6393de6f7 | ||
|
|
8805f09d87 | ||
|
|
64057e992b | ||
|
|
995c565fba | ||
|
|
f1a2ee55e0 | ||
|
|
08dc9ba24f | ||
|
|
18f57df605 | ||
|
|
3a6dfeaa76 | ||
|
|
6062f199d9 | ||
|
|
b770a07e9c | ||
|
|
75b1316e70 | ||
|
|
9bb9221642 | ||
|
|
a5c143f415 | ||
|
|
2ba009c0f1 | ||
|
|
1ed56d5d08 | ||
|
|
9b840c5f59 | ||
|
|
fc74c302be | ||
|
|
2a4d65f3b8 | ||
|
|
6b51b3f92f | ||
|
|
d66d7c6e3a | ||
|
|
af220872b9 | ||
|
|
9819391442 | ||
|
|
1fae341a98 | ||
|
|
6dba297a79 | ||
|
|
c854703ad6 | ||
|
|
f79688e848 | ||
|
|
acddf10f80 | ||
|
|
74daa1d74a | ||
|
|
e9dcdb8f97 | ||
|
|
1f19c43d9d | ||
|
|
4a211a80fb | ||
|
|
ea459657d1 | ||
|
|
530bb8ec9e | ||
|
|
4661030b38 | ||
|
|
24150ded0d | ||
|
|
42bcac7a18 | ||
|
|
385b6a22a4 | ||
|
|
f331c22623 | ||
|
|
69e950ecfc | ||
|
|
167f772966 | ||
|
|
7fa17e8e08 | ||
|
|
95c7788747 | ||
|
|
e24bb8c492 | ||
|
|
475b31f1e0 | ||
|
|
f71098906b | ||
|
|
b881578f67 | ||
|
|
0811dfe257 | ||
|
|
f4c778ff04 | ||
|
|
12315f78a2 | ||
|
|
1cca60e704 | ||
|
|
603aca0bb3 | ||
|
|
7fa7c8a8e3 | ||
|
|
bac7a5085e | ||
|
|
7441ee5175 | ||
|
|
6ae0902498 | ||
|
|
017a6353d1 | ||
|
|
e578fad099 | ||
|
|
3811b58a7d | ||
|
|
bb302a755c | ||
|
|
920b7b2841 | ||
|
|
9d4e4545fe | ||
|
|
23b633e071 | ||
|
|
81662eb8f4 | ||
|
|
b08f85aeef | ||
|
|
0b1c8b455a | ||
|
|
003ef1aa74 | ||
|
|
bbb25255b0 | ||
|
|
d997d485ff | ||
|
|
d1db3691a1 | ||
|
|
829f4f334b | ||
|
|
e781caf962 | ||
|
|
883c62b5e9 | ||
|
|
e7a4d5f18d | ||
|
|
bfe09e8305 | ||
|
|
0036b8bba0 | ||
|
|
f6eb750183 | ||
|
|
b1a00f722e | ||
|
|
34723d02f8 | ||
|
|
a60e91b313 | ||
|
|
94be61fde5 | ||
|
|
0f4b9aa812 | ||
|
|
6a79c379cc | ||
|
|
055645b079 | ||
|
|
fe93919b48 | ||
|
|
2e7093d5ef | ||
|
|
80bdd19e03 | ||
|
|
80f4886c5a | ||
|
|
12d3e3d775 | ||
|
|
fe416bd353 | ||
|
|
89553f5df6 | ||
|
|
f9e0d94a65 | ||
|
|
a4c68caedd | ||
|
|
1c7f36465b | ||
|
|
8d012c45e2 | ||
|
|
29280bb9ec | ||
|
|
732eeeabd9 | ||
|
|
8709369720 | ||
|
|
49e98c3ddd | ||
|
|
6723bdd920 | ||
|
|
6d0ab6166c | ||
|
|
9709f7ec73 | ||
|
|
25b5cb9599 | ||
|
|
79726c8864 | ||
|
|
42765d50e0 | ||
|
|
5bdd18caf1 | ||
|
|
41f6bca92f | ||
|
|
aa50e6368a | ||
|
|
c59993005c | ||
|
|
0fd89aa20d | ||
|
|
7d926a0e0c | ||
|
|
ec0e2d7312 | ||
|
|
b48eebb114 | ||
|
|
091acff312 | ||
|
|
f452c7762f | ||
|
|
bc5c9d8d7b | ||
|
|
945e9c3f20 | ||
|
|
681f352a9d | ||
|
|
073b148167 | ||
|
|
59b53ea2c8 | ||
|
|
404bbe1f26 | ||
|
|
4a824eb8cb | ||
|
|
992e808451 | ||
|
|
e79c87aca0 | ||
|
|
c59c663619 | ||
|
|
c8b321c678 | ||
|
|
39c4687816 | ||
|
|
ba256fb835 | ||
|
|
de8471ab4e | ||
|
|
e548a31510 | ||
|
|
ab465c5857 | ||
|
|
338608ab31 | ||
|
|
12f9173c6d | ||
|
|
2e7f24a487 | ||
|
|
9603c7cc83 | ||
|
|
06c586932a | ||
|
|
7ddde45863 | ||
|
|
01c532dc22 | ||
|
|
236db28a93 | ||
|
|
2460569ccb | ||
|
|
ebddd16c75 | ||
|
|
489b705d4b | ||
|
|
ca5622c711 | ||
|
|
a7063b1aee | ||
|
|
0f1c2504b1 | ||
|
|
c2fd6752cf | ||
|
|
3b5659ae92 | ||
|
|
ed04cedecc | ||
|
|
018072529a | ||
|
|
d5abab7322 | ||
|
|
0c470af314 | ||
|
|
de0774041c | ||
|
|
ce62bbb674 | ||
|
|
aee1dd9ec0 | ||
|
|
5194ebe6a8 | ||
|
|
264bf67584 | ||
|
|
2da5f17e52 | ||
|
|
6a75df6cd7 | ||
|
|
4b0da428e7 | ||
|
|
aa539466f7 | ||
|
|
44c0f591f7 | ||
|
|
90ac20ebb5 | ||
|
|
59e466d54c | ||
|
|
bc8c90f0d2 | ||
|
|
5aae762143 | ||
|
|
c630fe664f | ||
|
|
7f48989be6 | ||
|
|
1616b5193c | ||
|
|
82dbc9c74f | ||
|
|
8c813dbb96 | ||
|
|
39cb8fe0ac | ||
|
|
bf609338ae | ||
|
|
b1a837ad17 | ||
|
|
b29ad75564 | ||
|
|
3d297cfe81 | ||
|
|
9d34140191 | ||
|
|
212e25e4be | ||
|
|
c12aa454ff | ||
|
|
f207b3623e | ||
|
|
3a816341f9 | ||
|
|
9f51f154aa | ||
|
|
5ac1ee403b | ||
|
|
1755f655db | ||
|
|
ef5d72cc37 | ||
|
|
c77aa759ea | ||
|
|
8055da9830 | ||
|
|
b6197bcf90 | ||
|
|
2e90a7a368 | ||
|
|
600e4a11c7 | ||
|
|
68413a7452 | ||
|
|
38fb57f9d6 | ||
|
|
fb46032cbb | ||
|
|
e0628436f3 | ||
|
|
a6869f2333 | ||
|
|
0b414c4e4e | ||
|
|
a04a28fbb5 | ||
|
|
ddc0f79f50 | ||
|
|
cf20c54292 | ||
|
|
8b9e07dace | ||
|
|
1a4e39838f | ||
|
|
ef4cd692e0 | ||
|
|
e1a753c3d0 | ||
|
|
0c535aa355 | ||
|
|
a6748c555e | ||
|
|
254fdd754c | ||
|
|
b3ec6d5d05 | ||
|
|
b4864206aa | ||
|
|
625828657a | ||
|
|
1258fbb077 | ||
|
|
0ce0db5158 | ||
|
|
3ccff40306 | ||
|
|
22c5c021f0 | ||
|
|
f0f00daa92 | ||
|
|
135eb22124 | ||
|
|
bee49753c8 | ||
|
|
b995d2cc2f | ||
|
|
83a0278171 | ||
|
|
c47452f729 | ||
|
|
485412ecb1 | ||
|
|
a753430fb9 | ||
|
|
5cabf74445 | ||
|
|
39adeaf4f4 | ||
|
|
01e6ca33ab | ||
|
|
e30b061a06 | ||
|
|
131e3a06fb | ||
|
|
c145f85638 | ||
|
|
11f53347c7 | ||
|
|
8c4ab98e17 | ||
|
|
d6afe4bac7 | ||
|
|
91bb21c522 | ||
|
|
79daecb7d5 | ||
|
|
ca48239da1 | ||
|
|
86a19f4714 | ||
|
|
1d1b59da76 | ||
|
|
45686e3a55 | ||
|
|
f2d3ce4170 | ||
|
|
0517436bf9 | ||
|
|
f8e1457be0 | ||
|
|
409f06b330 | ||
|
|
11fdbdf427 | ||
|
|
2f50aaa349 | ||
|
|
53a0d6fb9d | ||
|
|
5540028340 | ||
|
|
fdbca7526f | ||
|
|
01362974d6 | ||
|
|
54259250e5 | ||
|
|
430571d62c | ||
|
|
0296bba808 | ||
|
|
b32b8d0d44 | ||
|
|
8a2f6c5e60 | ||
|
|
8a75e48bd4 | ||
|
|
400f464307 | ||
|
|
ad115d2088 | ||
|
|
c60c1b8172 | ||
|
|
680d2dae32 | ||
|
|
796ce90c1e | ||
|
|
b2449f929c | ||
|
|
6864e05ae3 | ||
|
|
7663e4f65e | ||
|
|
b862a8b728 | ||
|
|
5da185594c | ||
|
|
336bf35a2c | ||
|
|
059b64efbe | ||
|
|
c23056719e | ||
|
|
99f079a349 | ||
|
|
ab16816eb8 | ||
|
|
7723bdbaa7 | ||
|
|
e02d610df8 | ||
|
|
9ab35ae393 | ||
|
|
270eff1dfe | ||
|
|
d231293832 | ||
|
|
a8bb0a452d | ||
|
|
fc678100cd | ||
|
|
6f63373bb2 | ||
|
|
3a35a6955d | ||
|
|
137765c95a | ||
|
|
302ccb0d97 | ||
|
|
b87e48802e | ||
|
|
5924c920ec | ||
|
|
31e3466556 | ||
|
|
d0cb4d09aa | ||
|
|
8b9765a917 | ||
|
|
87f72a4b06 | ||
|
|
49be46409c | ||
|
|
4585f7bf1f | ||
|
|
5c3917478a | ||
|
|
99ff6e3b76 | ||
|
|
58a0844b1c | ||
|
|
97f64988e2 | ||
|
|
fafbf6d8da | ||
|
|
adec56938e | ||
|
|
e6ba28b680 | ||
|
|
c3677ca907 | ||
|
|
92633067af | ||
|
|
af2ef0830a | ||
|
|
aa73f6b68f | ||
|
|
2b6d84ff37 | ||
|
|
7271c050a3 | ||
|
|
99783fe795 | ||
|
|
d3690efffe | ||
|
|
b7b97df93f | ||
|
|
58fb1a3922 | ||
|
|
e6c203832e | ||
|
|
fb6a1b8b83 | ||
|
|
4b006cb8b0 | ||
|
|
549cf0381a | ||
|
|
f6ac18841d | ||
|
|
cd377b646d | ||
|
|
c6df8ab565 | ||
|
|
df138c2e2f | ||
|
|
bbe2172c38 | ||
|
|
19d978d1c7 | ||
|
|
a965dc5b40 | ||
|
|
62114c1806 | ||
|
|
ec386cc9fd | ||
|
|
ee08b81aab | ||
|
|
97e1ad136a | ||
|
|
2dea694ab4 | ||
|
|
dc0e663241 | ||
|
|
4352cb55f1 | ||
|
|
8950aa75c4 | ||
|
|
83097f136a | ||
|
|
437e396455 | ||
|
|
840697c69b | ||
|
|
bd375505f7 | ||
|
|
3e5dc58f35 | ||
|
|
caaeb9ff12 | ||
|
|
878906fbb8 | ||
|
|
2fc0dac01e | ||
|
|
44a712d810 | ||
|
|
bfc85c288a | ||
|
|
4423bf9d10 | ||
|
|
a0591b32c7 | ||
|
|
470fe972f5 | ||
|
|
b83739945e | ||
|
|
259c05829b | ||
|
|
c93a189028 | ||
|
|
bf4d20aaa8 | ||
|
|
b42603eee6 | ||
|
|
c7667cec62 | ||
|
|
a0b08b5e0b | ||
|
|
64c6e1e90e | ||
|
|
3ff75e5b8b | ||
|
|
e078a04fd0 | ||
|
|
7d425f38ee | ||
|
|
24156db252 | ||
|
|
f24931222c | ||
|
|
3f74baed02 | ||
|
|
972631be71 | ||
|
|
c658fc5cbd | ||
|
|
bf7b292db9 | ||
|
|
da67577ed3 | ||
|
|
4d83b0a315 | ||
|
|
d67a4cec24 | ||
|
|
03505c7226 | ||
|
|
3164ac7217 | ||
|
|
0dab12ec9f | ||
|
|
736570923d | ||
|
|
0aeeb7b169 | ||
|
|
78e84f9da3 | ||
|
|
a4dc650d11 | ||
|
|
d3cad4f289 | ||
|
|
8acd3e3818 | ||
|
|
e8b74e56c9 | ||
|
|
e1334ec9bb | ||
|
|
7d5ba9d058 | ||
|
|
c32a44111f | ||
|
|
18a476686d | ||
|
|
b29063a1ea | ||
|
|
48e10ec9c4 | ||
|
|
3559dc0037 | ||
|
|
4bd0b72b98 | ||
|
|
b645013ee5 | ||
|
|
304d60c8f3 | ||
|
|
9a07df6c4a | ||
|
|
abd545682e | ||
|
|
3076a86685 | ||
|
|
16a35c234e | ||
|
|
44e9e95933 | ||
|
|
af22085c51 | ||
|
|
60841f1231 | ||
|
|
b8cebe32e3 | ||
|
|
bdefd5da15 | ||
|
|
402a9db2fe | ||
|
|
95cd75dce7 | ||
|
|
2602a59e87 | ||
|
|
a2f46f8e68 | ||
|
|
ed3c962b39 | ||
|
|
a241a80d68 | ||
|
|
576df38f59 | ||
|
|
f29ee8f7ee | ||
|
|
c5589a9dd5 | ||
|
|
4595bf1e20 | ||
|
|
8e99c415ab | ||
|
|
f04aeeb649 | ||
|
|
a667251458 | ||
|
|
cd2b3616bb | ||
|
|
35286e2922 | ||
|
|
c91ecdb1a0 | ||
|
|
da8ad4f20f | ||
|
|
a51deb5371 | ||
|
|
7b0b368fc3 | ||
|
|
c4b6a034f1 | ||
|
|
990ac99c97 | ||
|
|
0ab3cda84a | ||
|
|
953bf8bbf6 | ||
|
|
bc6811ec90 | ||
|
|
6570dc0e31 | ||
|
|
e2961b5e11 | ||
|
|
890c1de998 | ||
|
|
800ffda01c | ||
|
|
6bdbd306b1 | ||
|
|
4a4fe0974f | ||
|
|
8edf2b88dc | ||
|
|
e81d9aaca3 | ||
|
|
a6d4b30d19 | ||
|
|
2fd8cbff2a | ||
|
|
3dce6028f7 | ||
|
|
43ae2bffbb | ||
|
|
3762f2d25c | ||
|
|
4765396846 | ||
|
|
61b9e78e1b | ||
|
|
fce126bcb1 | ||
|
|
ccb4b18348 | ||
|
|
f2d703e916 | ||
|
|
400ee6caa0 | ||
|
|
a95547478a | ||
|
|
f5bf967660 | ||
|
|
797b8885c5 | ||
|
|
a4e1579afa | ||
|
|
6bbe440f6d | ||
|
|
7c88c6fce1 | ||
|
|
5b2ecc5b82 | ||
|
|
701a00d391 | ||
|
|
5a5ef06c57 | ||
|
|
0c46c25633 | ||
|
|
afe0e5601b | ||
|
|
2a7fb51466 | ||
|
|
7948fe36c4 | ||
|
|
c76f23420e | ||
|
|
48c35eaeaa | ||
|
|
b92aadb6ee | ||
|
|
163f5f4993 | ||
|
|
3a82ae9244 | ||
|
|
6e1884a352 | ||
|
|
531b5ecbfc | ||
|
|
5864b57eec | ||
|
|
cf5a5fb1dd | ||
|
|
2c99bef442 | ||
|
|
e3af8ed321 | ||
|
|
7070605a17 | ||
|
|
f2f8d38efa | ||
|
|
6bf3529919 | ||
|
|
9aef66711e | ||
|
|
06dda03a98 | ||
|
|
d93da3c1c3 | ||
|
|
85a5a2873e | ||
|
|
f62473e8c1 | ||
|
|
289dc0b6ed | ||
|
|
80e20b5fea | ||
|
|
8f88443aba | ||
|
|
381349a8cd | ||
|
|
eb0971609b | ||
|
|
aec0bb339b | ||
|
|
32ef59b290 | ||
|
|
09d2e3d159 | ||
|
|
a20c76fcbc | ||
|
|
3238c7ec2c | ||
|
|
155fd22de0 | ||
|
|
fbff71727b | ||
|
|
f3240be016 | ||
|
|
eb1927d94e | ||
|
|
546af70783 | ||
|
|
5d65261362 | ||
|
|
8395516b7d | ||
|
|
53da0c2fba | ||
|
|
5a0e5b7fc6 | ||
|
|
28ef78e4cb | ||
|
|
39d9a93acc | ||
|
|
b640c27a08 | ||
|
|
c34a062f5c | ||
|
|
b7a5b3c309 | ||
|
|
27daca31f3 | ||
|
|
1ad06e428d | ||
|
|
ebd4445ba2 | ||
|
|
8eb145a3be | ||
|
|
9cf1a98d0e | ||
|
|
7e156e73b5 | ||
|
|
4e1baf3a4e | ||
|
|
a770520bff | ||
|
|
3c50b7ee45 | ||
|
|
b90bc0b15c | ||
|
|
90e1b0734e | ||
|
|
068596552d | ||
|
|
10dd60795c | ||
|
|
aec33aa753 | ||
|
|
14f915ece6 | ||
|
|
235386b245 | ||
|
|
c517633b49 | ||
|
|
809a2c6254 | ||
|
|
90f1218fbb | ||
|
|
7d2d48e116 | ||
|
|
7f27821c5f | ||
|
|
88b7ed053f | ||
|
|
d6f788f56a | ||
|
|
50e49b4a5f | ||
|
|
e0690e4e12 | ||
|
|
e3ff6b561d | ||
|
|
9120a4231c | ||
|
|
e25e3f092a | ||
|
|
735efc17f3 | ||
|
|
21b403d4d9 | ||
|
|
57fbbf2036 | ||
|
|
3bf1b04cb4 | ||
|
|
e28aff2f7a | ||
|
|
fc6c531ec2 | ||
|
|
0ef049d707 | ||
|
|
69f8907a29 | ||
|
|
3f6e00e48d | ||
|
|
62b2087a84 | ||
|
|
946df29029 | ||
|
|
af925f0a14 | ||
|
|
9903bb93a2 | ||
|
|
eab451e6e8 | ||
|
|
7a2471ede0 | ||
|
|
b996436b4c | ||
|
|
3b86ea7dc0 | ||
|
|
44ffdc182f | ||
|
|
3c8990eb36 | ||
|
|
67b4b3a634 | ||
|
|
63d0849403 | ||
|
|
a94721fc4c | ||
|
|
9156d86009 | ||
|
|
a04805ce88 | ||
|
|
337bcc7014 | ||
|
|
458f3e427f | ||
|
|
4e095276af | ||
|
|
34075d480e | ||
|
|
dd2a2a8072 | ||
|
|
5eeb9db457 | ||
|
|
473632bf0d | ||
|
|
81913fc35c | ||
|
|
a1160a3eb9 | ||
|
|
aa3737e6e1 | ||
|
|
b0e1f9ca2f | ||
|
|
304f1ebcb2 | ||
|
|
23f92bfa20 | ||
|
|
1601a2dac9 | ||
|
|
5ba5f00f65 | ||
|
|
3ae459b83e | ||
|
|
41392f5497 | ||
|
|
11967c94fc | ||
|
|
1fe57c9505 | ||
|
|
5939b3d702 | ||
|
|
5c56fd4793 | ||
|
|
3d7d75cef8 | ||
|
|
ec33704c39 | ||
|
|
ff737b6090 | ||
|
|
f4d14ad69c | ||
|
|
19f0603885 | ||
|
|
6f5f74da55 | ||
|
|
c07a14a01f | ||
|
|
4674b6d652 | ||
|
|
095909be79 | ||
|
|
f889148335 | ||
|
|
a2276107ab | ||
|
|
e538fcbf10 | ||
|
|
f0888ccaef | ||
|
|
42847f7d5c | ||
|
|
0f1acb60a1 | ||
|
|
cc205c60ae | ||
|
|
99b83a38de | ||
|
|
23e5aedd37 | ||
|
|
fa1f318d74 | ||
|
|
80bab9d939 | ||
|
|
ff7a79c6cf | ||
|
|
e96c5401f1 | ||
|
|
4fb1e2788f | ||
|
|
8a4170e6bd | ||
|
|
3a47431122 | ||
|
|
5ae205fb41 | ||
|
|
5c3666eb00 | ||
|
|
1a48d4d155 | ||
|
|
07bb5d89b3 | ||
|
|
51bea21b3b | ||
|
|
8306501e48 | ||
|
|
06ab44337f | ||
|
|
a31237a21f | ||
|
|
12f9894f54 | ||
|
|
8a34d1a7e0 | ||
|
|
931bbca113 | ||
|
|
2e07f02451 | ||
|
|
efeadf086b | ||
|
|
ed0a307ccd | ||
|
|
742c58c240 | ||
|
|
6e1dbe497c | ||
|
|
469966917b | ||
|
|
a2cc070fc2 | ||
|
|
1ad5180f28 | ||
|
|
be1bb28355 | ||
|
|
f455a484bd | ||
|
|
2603f1c419 | ||
|
|
5eba3fbd34 | ||
|
|
a4c22c8b3a | ||
|
|
724e4e2259 | ||
|
|
839390c19c | ||
|
|
0d70a91b6d | ||
|
|
56a5e84f9d | ||
|
|
f5d5637f72 | ||
|
|
665078d0c4 | ||
|
|
eb54c032c8 | ||
|
|
9ea9ca32ba | ||
|
|
dc0a5f9c24 | ||
|
|
8224207b26 | ||
|
|
4148381dff | ||
|
|
2d87ae9ab6 | ||
|
|
4d2b0715d1 | ||
|
|
b4b39c6886 | ||
|
|
4dbf758f4c | ||
|
|
489de5dce2 | ||
|
|
223c674c2a | ||
|
|
9947223800 | ||
|
|
cb45c2ea55 | ||
|
|
143b02d8a4 | ||
|
|
48fb8ba3cd | ||
|
|
213d0e2fb2 | ||
|
|
e760c2b3b9 | ||
|
|
63d4411560 | ||
|
|
497b3fe2c5 | ||
|
|
b3c440c06a | ||
|
|
2185831922 | ||
|
|
bf1effa4bc | ||
|
|
d15e7a5ec2 | ||
|
|
ce10927efb | ||
|
|
a1ad2872ee | ||
|
|
f1fcb022be | ||
|
|
11c9545416 | ||
|
|
cd7d5546ae | ||
|
|
21e53485dd | ||
|
|
47b49c8a68 | ||
|
|
28bfab716b | ||
|
|
6bdcfc745d | ||
|
|
74dcad5107 | ||
|
|
69c046e53b | ||
|
|
e1e08ae506 | ||
|
|
ea20775565 | ||
|
|
e18a883796 | ||
|
|
3db6716761 | ||
|
|
6c3477c003 | ||
|
|
83fef4866d | ||
|
|
3ee4e65c95 | ||
|
|
8a581c3536 | ||
|
|
cce755591b | ||
|
|
2ad04e47c5 | ||
|
|
396bccfb1d | ||
|
|
878ed4934c | ||
|
|
bb3ca12629 | ||
|
|
502bb9c746 | ||
|
|
59a3b83bf5 | ||
|
|
66f5e50050 | ||
|
|
2d0b84ee30 | ||
|
|
fb1c77bd4f | ||
|
|
71dddd7db7 | ||
|
|
a3c6514332 | ||
|
|
02d3b39420 | ||
|
|
9ebd037226 | ||
|
|
fb61a2c944 | ||
|
|
13b2c79f6a | ||
|
|
a4c484a4d8 | ||
|
|
1687075373 | ||
|
|
91549cfa4f | ||
|
|
7fe808ea02 | ||
|
|
6aa9078d16 | ||
|
|
5c95a044dd | ||
|
|
6dcfd23eeb | ||
|
|
8f17fbb900 | ||
|
|
17b74af457 | ||
|
|
5da8a25c5c | ||
|
|
d787ea5346 | ||
|
|
5b4306d183 | ||
|
|
db67fc0cfd | ||
|
|
679bfd11aa | ||
|
|
43e0ef5e72 | ||
|
|
8a879b8fc5 | ||
|
|
9201cfdd81 | ||
|
|
c9c6446aa1 | ||
|
|
d8000684bf | ||
|
|
ced9cee10c | ||
|
|
3c700f9260 | ||
|
|
158979f838 | ||
|
|
b68f3af503 | ||
|
|
22344ea595 | ||
|
|
005c9d0341 | ||
|
|
46b14f85c3 | ||
|
|
1ccad1ab7d | ||
|
|
4e86f5d754 | ||
|
|
5ca6da5ae8 | ||
|
|
bc7b3fc745 | ||
|
|
795295206b | ||
|
|
7bb95460d5 | ||
|
|
704151ca19 | ||
|
|
1be7a8d461 | ||
|
|
88892c6792 | ||
|
|
3fdf0dbedc | ||
|
|
7dfeb4fd21 | ||
|
|
7af301be55 | ||
|
|
32486ef0b3 | ||
|
|
1cad06afda | ||
|
|
ad764253ca | ||
|
|
6553540153 | ||
|
|
8267934235 | ||
|
|
d90daba134 | ||
|
|
8ebba516a3 | ||
|
|
dfe01a37a4 | ||
|
|
660e392458 | ||
|
|
63e8df2320 | ||
|
|
a15916a47a | ||
|
|
457a13dac5 | ||
|
|
e911ee38bd | ||
|
|
9ac3e94dcc | ||
|
|
08d762cb0c | ||
|
|
75db7e91c6 | ||
|
|
00e3bb678d | ||
|
|
050835e955 | ||
|
|
61a6a92618 | ||
|
|
d9258da42e | ||
|
|
f30278b96b | ||
|
|
1627a57d96 | ||
|
|
591cdd1cfb | ||
|
|
996216b499 | ||
|
|
5928624a1c | ||
|
|
ecb6e75add | ||
|
|
0233d7cf82 | ||
|
|
db27dadf27 | ||
|
|
58a33274c9 | ||
|
|
9279df2025 | ||
|
|
9278d9d911 | ||
|
|
4762285e40 | ||
|
|
5d00c366e7 | ||
|
|
696ab2b0e6 | ||
|
|
a42bf72ec0 | ||
|
|
dbaf6c5c65 | ||
|
|
0c779c51c9 | ||
|
|
33d82cb6d1 | ||
|
|
17ff0f3af3 | ||
|
|
7365698268 | ||
|
|
4bd855e69f | ||
|
|
e8c6e01dc5 | ||
|
|
2b2e6ff6cb | ||
|
|
4b6a03236b | ||
|
|
969c727b1e | ||
|
|
e08b2e7b0f | ||
|
|
415d53e751 | ||
|
|
d18ff45c4c | ||
|
|
a14d2ce1b2 | ||
|
|
a70d0097c9 | ||
|
|
7e4bd9fb60 | ||
|
|
2a794e8205 | ||
|
|
7bbe67d25a | ||
|
|
06489b6ebe | ||
|
|
0489895d0b | ||
|
|
99b5652f40 | ||
|
|
25096ac9e9 | ||
|
|
ec7088e1df | ||
|
|
f8df1e98d9 | ||
|
|
580dd72a24 | ||
|
|
e19e57d2f7 | ||
|
|
01c7fc6c8f | ||
|
|
276c0a378d | ||
|
|
f7089e600f | ||
|
|
40340b5aa0 | ||
|
|
208696f489 | ||
|
|
19023f3a05 | ||
|
|
5fad6deb65 | ||
|
|
9e2cd01ac5 | ||
|
|
dac598790b | ||
|
|
c2eae47a23 | ||
|
|
44f6f66bd2 | ||
|
|
9c89f731e8 | ||
|
|
b9f27a4743 | ||
|
|
8abf724678 | ||
|
|
6068b5bdac | ||
|
|
be197551c7 | ||
|
|
7284ec7ab4 | ||
|
|
7b7192dda3 | ||
|
|
8fdd352404 | ||
|
|
4f52bab52f | ||
|
|
e36be38140 | ||
|
|
7ac99e5aa3 | ||
|
|
f02f67e83c | ||
|
|
ccb7e4fa03 | ||
|
|
2f7693963d | ||
|
|
19ce7e05db | ||
|
|
c89b7e195c | ||
|
|
a807dd31e9 | ||
|
|
512c641794 | ||
|
|
5cdb16ad09 | ||
|
|
3d160b5b7c | ||
|
|
ee1b5bdcec | ||
|
|
1fe899d8cd | ||
|
|
e3cbafdda6 | ||
|
|
091c58f734 | ||
|
|
2b843e37a0 | ||
|
|
32f91f5e6b | ||
|
|
76207d5de8 | ||
|
|
998a9ed0ff | ||
|
|
540f780735 | ||
|
|
0d993a8c42 | ||
|
|
ef596bbafb | ||
|
|
40eb2bb5b0 | ||
|
|
291066c459 | ||
|
|
beb9723617 | ||
|
|
1095f8a502 | ||
|
|
db3cf21e55 | ||
|
|
a9a5f24029 | ||
|
|
02d76f8b86 | ||
|
|
b47cb50ccd | ||
|
|
00c3ac908b | ||
|
|
5df43c134f | ||
|
|
5201f90588 | ||
|
|
7ae5d271b6 | ||
|
|
0d7c37b0bf | ||
|
|
eee0bdadc4 | ||
|
|
94bf353b51 | ||
|
|
983ea2696e | ||
|
|
5aeba52b34 | ||
|
|
e793b11363 | ||
|
|
624117e5e4 | ||
|
|
d24a718b57 | ||
|
|
6d4c75202c | ||
|
|
420b11a0fd | ||
|
|
f2a090c6f1 | ||
|
|
2e7c800e06 | ||
|
|
9d975ee69e | ||
|
|
4a445c1bb7 | ||
|
|
6f41683925 | ||
|
|
f17f3e4fa1 | ||
|
|
d9a86285f6 | ||
|
|
4a60eed469 | ||
|
|
9417570dc1 | ||
|
|
70df2d7478 | ||
|
|
e5d956dbac | ||
|
|
45f9527518 | ||
|
|
dfd0f8824c | ||
|
|
ca362445c4 | ||
|
|
ae1b7bf4b8 | ||
|
|
2aaece2db6 | ||
|
|
289543b5f9 | ||
|
|
8bd56f2b7e | ||
|
|
f362208033 | ||
|
|
0dd9658485 | ||
|
|
68aa4997e3 | ||
|
|
0d96b8da6b | ||
|
|
0d885602f4 | ||
|
|
5b983c944f | ||
|
|
83ce7c13d1 | ||
|
|
43047fdca6 | ||
|
|
7532393c1a | ||
|
|
4993f93c7c | ||
|
|
7fc583f7ff | ||
|
|
8713ce5d38 | ||
|
|
d1820e47af | ||
|
|
b1eb7855cd | ||
|
|
7347ca9a08 | ||
|
|
20190c966d | ||
|
|
f962a35df7 | ||
|
|
0a276c2ff3 | ||
|
|
4c8259b538 | ||
|
|
8f91051dda | ||
|
|
efc84af940 | ||
|
|
ad30b198d4 | ||
|
|
9baad80459 | ||
|
|
da5464b145 | ||
|
|
502bb337fe | ||
|
|
b978a64ebb | ||
|
|
6fb3b8c66f | ||
|
|
f6e8a597a9 | ||
|
|
aaadc71d5d | ||
|
|
3570e8891d | ||
|
|
cad92c80cc | ||
|
|
2b3f80b776 | ||
|
|
34e71e378c | ||
|
|
689265145a | ||
|
|
70b97864f8 | ||
|
|
7c43bda4fb | ||
|
|
b40afedd7e | ||
|
|
99df46fa62 | ||
|
|
e345066140 | ||
|
|
fec413c557 | ||
|
|
2e024a0005 | ||
|
|
c7b4d3cbf1 | ||
|
|
1a77231633 | ||
|
|
39a99dd695 | ||
|
|
f19426e412 | ||
|
|
7c209d774c | ||
|
|
ebaeb919da | ||
|
|
0d7e971355 | ||
|
|
6728e8e8d5 | ||
|
|
a8f71d621f | ||
|
|
992eb497bf | ||
|
|
401580a716 | ||
|
|
639c491da4 | ||
|
|
964bf9f288 | ||
|
|
c34560b53d | ||
|
|
a050e023df | ||
|
|
162adb778e | ||
|
|
1e13f0fd20 | ||
|
|
0c75839820 | ||
|
|
7107266d7c | ||
|
|
2f5efbdea6 | ||
|
|
c92db34492 | ||
|
|
67f4cfe1aa | ||
|
|
fdcaba4096 | ||
|
|
b92d70aabe | ||
|
|
6fa71d811b | ||
|
|
117d6a4151 | ||
|
|
ccd5da30be | ||
|
|
1b6bead88f | ||
|
|
23a1a8246e | ||
|
|
7e9a1bc5e7 | ||
|
|
2467dd6d05 | ||
|
|
93536507f6 | ||
|
|
2ddc4fe4f5 | ||
|
|
158088ca1a | ||
|
|
15d47e551a | ||
|
|
3467337217 | ||
|
|
d6fd485692 | ||
|
|
9bba81c296 | ||
|
|
3b515617a4 | ||
|
|
fce775e8a3 | ||
|
|
94c36e8846 | ||
|
|
14382523bf | ||
|
|
4f6a88aa9f | ||
|
|
933c3121c5 | ||
|
|
126756d728 | ||
|
|
d1056090dc | ||
|
|
9ee28d537f | ||
|
|
ff9b75314f | ||
|
|
00f8f24d74 | ||
|
|
b9e59b296d | ||
|
|
51572c2dcd | ||
|
|
3bbe1e6a55 | ||
|
|
adf12b60d3 | ||
|
|
cfc7e27a7f | ||
|
|
3a17630121 | ||
|
|
2337d110f9 | ||
|
|
5463dd5b38 | ||
|
|
08304a3c93 | ||
|
|
2df67b7c9e | ||
|
|
bc38c052e9 | ||
|
|
1e6c79bc15 | ||
|
|
2086e31aa8 | ||
|
|
558c3272f5 | ||
|
|
fc56fc8ae0 | ||
|
|
5c0f205383 | ||
|
|
d1f21493e1 | ||
|
|
f0eebb3e58 | ||
|
|
1bb69dcf2d | ||
|
|
8f39384d91 | ||
|
|
e3b5b98813 | ||
|
|
fd9265362c | ||
|
|
a76c133df1 | ||
|
|
4ba143907b | ||
|
|
e4191245cd | ||
|
|
85d8128be8 | ||
|
|
0383909477 | ||
|
|
6c6c0a630c | ||
|
|
80cb563d0a | ||
|
|
33394b1d57 | ||
|
|
3c6fb15d55 | ||
|
|
bd8b285a9e | ||
|
|
d9eb533c80 | ||
|
|
263c6856dd | ||
|
|
0ab2c37540 | ||
|
|
efddcd8313 | ||
|
|
7cefad61ed | ||
|
|
6132f85c8d | ||
|
|
d3c941fc5f | ||
|
|
6803c62507 | ||
|
|
97a44d2643 | ||
|
|
236cd42699 | ||
|
|
bad23a1286 | ||
|
|
6216edda44 | ||
|
|
883e219bef | ||
|
|
77963c8d2b | ||
|
|
93bd6bc9de | ||
|
|
82fb207f44 | ||
|
|
10be07ab19 | ||
|
|
8573448db2 | ||
|
|
d7f3b5a182 | ||
|
|
ecc77c81cc | ||
|
|
3e8303abf0 | ||
|
|
33bdf19051 | ||
|
|
b6e6dddc30 | ||
|
|
64a9858874 | ||
|
|
c73e2731c7 | ||
|
|
e4812c0fa3 | ||
|
|
8812857f35 | ||
|
|
85210ed9bf | ||
|
|
4481898ff7 | ||
|
|
6cdebd85a2 | ||
|
|
74f6202aa6 | ||
|
|
6be3723f3d | ||
|
|
58153dfed0 | ||
|
|
cd53944435 | ||
|
|
1a851b5d03 | ||
|
|
56a9e10b73 | ||
|
|
9f386181f5 | ||
|
|
2ec047e1ec | ||
|
|
71b1219ee3 | ||
|
|
3d092da662 | ||
|
|
1f9a496601 | ||
|
|
6d97609a31 | ||
|
|
b53bc48847 | ||
|
|
f0187ef3c9 | ||
|
|
ac8736c8ee | ||
|
|
ec18b99d86 | ||
|
|
524f0b1b0a | ||
|
|
a64691615a | ||
|
|
e56e63a6e4 | ||
|
|
35b30a8d0c | ||
|
|
2f6ded9ac9 | ||
|
|
fe48f6ed6a | ||
|
|
1c6173619e | ||
|
|
2f10b7ede8 | ||
|
|
957b079232 | ||
|
|
061cfea2ac | ||
|
|
94b5119898 | ||
|
|
8696442671 | ||
|
|
38819040b6 | ||
|
|
9fc9502ecc | ||
|
|
5d34e43f8d | ||
|
|
327e8f7e06 | ||
|
|
f617a46305 | ||
|
|
f62a08c2ae | ||
|
|
442f8b3c3c | ||
|
|
7e3563c1c2 | ||
|
|
5d3ae9c2b2 | ||
|
|
cad85534c6 | ||
|
|
419f2a2511 | ||
|
|
5f5bd0954b | ||
|
|
353686c9c5 | ||
|
|
4b8b9705e4 | ||
|
|
0f7444c4a8 | ||
|
|
9ed5ad0c58 | ||
|
|
d462115341 | ||
|
|
3b2a88d4d4 | ||
|
|
2671eaa33b | ||
|
|
3d4bef49b2 | ||
|
|
9284f73f4f | ||
|
|
df5308e502 | ||
|
|
ad9b5927dc | ||
|
|
18fb96efb4 | ||
|
|
19f88f097c | ||
|
|
98d6afb90b | ||
|
|
633d18de0f | ||
|
|
a4c75707fb | ||
|
|
769e25e168 | ||
|
|
b86acfd3a2 | ||
|
|
6262280ad4 | ||
|
|
bb557d26fe | ||
|
|
a69fb4b5e9 | ||
|
|
1973990286 | ||
|
|
dcd9bd9aa8 | ||
|
|
30476d6d21 | ||
|
|
ec873323d2 | ||
|
|
8fb4122333 | ||
|
|
96e1d4a4b1 | ||
|
|
cbf3bc3267 | ||
|
|
59d34af972 | ||
|
|
db0fcc6d11 | ||
|
|
e9742f5458 | ||
|
|
368e1960ea | ||
|
|
9781bf59cb | ||
|
|
6a25e05d95 | ||
|
|
2681a6b169 | ||
|
|
92aaf17ba2 | ||
|
|
1d593a89da | ||
|
|
b48b0734ca | ||
|
|
503e97a66d | ||
|
|
39a389d855 | ||
|
|
42f8f2516d | ||
|
|
5385610450 | ||
|
|
43d857f5e5 | ||
|
|
d580b7da3e | ||
|
|
ef7e7ebfc8 | ||
|
|
4733395538 | ||
|
|
b264733bc1 | ||
|
|
9820dd0927 | ||
|
|
103b5cb285 | ||
|
|
4da3f0cc9a | ||
|
|
b5c521c3f8 | ||
|
|
8aed1627c0 | ||
|
|
62ed6e2c06 | ||
|
|
3b9673ca58 | ||
|
|
1a34aa8d73 | ||
|
|
86a0efcff5 | ||
|
|
e8b05d1137 | ||
|
|
7966dbc01c | ||
|
|
62f7420001 | ||
|
|
541087d17a | ||
|
|
be6dde2639 | ||
|
|
7bda9c0a2e | ||
|
|
78dd178857 | ||
|
|
fb50f7da29 | ||
|
|
fc95f04b10 | ||
|
|
63a3e9ac45 | ||
|
|
11030ee410 | ||
|
|
f3ca328b34 | ||
|
|
6358c6631b | ||
|
|
5cc10ecec2 | ||
|
|
0929985414 | ||
|
|
f24db304ee | ||
|
|
2451ff5368 | ||
|
|
ee1380e6b0 | ||
|
|
9788129e0e | ||
|
|
afcd361117 | ||
|
|
1831279f0c | ||
|
|
64eac40e77 | ||
|
|
450bd9c164 | ||
|
|
9a047652cc | ||
|
|
90ecf41b19 | ||
|
|
51c83e9f4b | ||
|
|
e4e8c3539f | ||
|
|
2013026c14 | ||
|
|
111c24b5b1 | ||
|
|
9e26d8a3c9 | ||
|
|
22aeaedc0e | ||
|
|
f4767f385a | ||
|
|
b89689f2ef | ||
|
|
0c65c8a23c | ||
|
|
770ef718c5 | ||
|
|
cc3d636f66 | ||
|
|
3ae0f5fdc4 | ||
|
|
71a8c018cb | ||
|
|
3e59135a5c | ||
|
|
1f11e07fc6 | ||
|
|
817a11e7ed | ||
|
|
0094b765eb | ||
|
|
3bffcbef5b | ||
|
|
b712c9360d | ||
|
|
1f41ddfe7f | ||
|
|
049b74b88f | ||
|
|
8e34f69c09 | ||
|
|
0cb70ef9bb | ||
|
|
111cedbbea | ||
|
|
560c0c4308 | ||
|
|
fd41750d87 | ||
|
|
cee88d3852 | ||
|
|
4bb5e353d5 | ||
|
|
abe0176840 | ||
|
|
b416e57770 | ||
|
|
52045afb08 | ||
|
|
3150bd63e9 | ||
|
|
927260bf57 | ||
|
|
800e00727a | ||
|
|
51d018d292 | ||
|
|
407a1fbe66 | ||
|
|
e46198bf7b | ||
|
|
3cd140cdef | ||
|
|
61142e4341 | ||
|
|
247d3d3345 | ||
|
|
9e14736315 | ||
|
|
7239aad9c4 | ||
|
|
b7b614d0b5 | ||
|
|
dbb67ab9dc | ||
|
|
87d6372a14 | ||
|
|
bb6dacfb69 | ||
|
|
65557ffe88 | ||
|
|
dca71900c1 | ||
|
|
c1e3f5cb17 | ||
|
|
6c51d44141 | ||
|
|
30cfeece94 | ||
|
|
897127d44a | ||
|
|
d019ed533f | ||
|
|
b85f2cba43 | ||
|
|
13582b4fe2 | ||
|
|
25c56d15cd | ||
|
|
2b08dfec28 | ||
|
|
f3bcc012c6 | ||
|
|
6755a85a38 | ||
|
|
4127b34a0a | ||
|
|
f2b0c70512 | ||
|
|
2327b6b954 | ||
|
|
5f8f410e51 | ||
|
|
4ebf7b85ad | ||
|
|
db59169015 | ||
|
|
c898d87aad | ||
|
|
62eeb9278c | ||
|
|
438addf331 | ||
|
|
afc9e1257b | ||
|
|
d35ea24fc0 | ||
|
|
3c1b362235 | ||
|
|
677bf03f07 | ||
|
|
bcb2214e99 | ||
|
|
c166a6fb83 | ||
|
|
117ebf3ca6 | ||
|
|
942c0b3521 | ||
|
|
194d75c3a8 | ||
|
|
c810659379 | ||
|
|
3dc7757a99 | ||
|
|
7dd7f38003 | ||
|
|
e82ad7e9c3 | ||
|
|
64070d9474 | ||
|
|
ceae3847b8 | ||
|
|
6f57224890 | ||
|
|
e20e9786b3 | ||
|
|
d64e09a322 | ||
|
|
e61fea3029 | ||
|
|
d8d8b30972 | ||
|
|
ea3d47b804 | ||
|
|
4a22643375 | ||
|
|
639354357f | ||
|
|
78e6e79a65 | ||
|
|
3581f0d037 | ||
|
|
7a4e1a9b0f | ||
|
|
2de9baf655 | ||
|
|
6e4114daf0 | ||
|
|
044789447c | ||
|
|
392659fabe | ||
|
|
f3fb441979 | ||
|
|
3f1a9fd706 | ||
|
|
ab5c4e2230 | ||
|
|
2cc9f1d377 | ||
|
|
cc5304a9d9 | ||
|
|
45c254d89c | ||
|
|
f6f74737d3 | ||
|
|
5bb017f6d4 | ||
|
|
16ea76a880 | ||
|
|
e07220a006 | ||
|
|
5a7943c9ed | ||
|
|
a5317327c7 | ||
|
|
ef941dd700 | ||
|
|
2204607b10 | ||
|
|
5c28619f51 | ||
|
|
751e5d15f9 | ||
|
|
20c9a79432 | ||
|
|
fd056d0c01 | ||
|
|
a4ff16dd68 | ||
|
|
eb231bb180 | ||
|
|
0c2e3e4e7d | ||
|
|
a14d96ef72 | ||
|
|
9e1cfb4f6e | ||
|
|
d17a12319f | ||
|
|
60766eff5a | ||
|
|
fdc6d630db | ||
|
|
86418fde5b | ||
|
|
e95fe291d4 | ||
|
|
ce8e31be71 | ||
|
|
ecf83739f4 | ||
|
|
9542dbaf54 | ||
|
|
7bc251058a | ||
|
|
b87228e491 | ||
|
|
63d47b7735 | ||
|
|
d1ecda53b7 | ||
|
|
e5983e9ef5 | ||
|
|
880d7666ab | ||
|
|
c2e062c843 | ||
|
|
14a870e940 | ||
|
|
9738fdff44 | ||
|
|
512f4519c6 | ||
|
|
0700ad3417 | ||
|
|
c6b05b2e6b | ||
|
|
b1f13fcc35 | ||
|
|
abac416be7 | ||
|
|
84f8583426 | ||
|
|
d5233c482b | ||
|
|
f8d111d153 | ||
|
|
ce4f149734 | ||
|
|
1890a59cd6 | ||
|
|
602cb959fc | ||
|
|
3964c92f8b | ||
|
|
0d5a9358f0 | ||
|
|
aa3123e87b | ||
|
|
f2099fccfb | ||
|
|
a4c8d7dddc | ||
|
|
170db8b580 | ||
|
|
35e82edf47 | ||
|
|
2fb2c11c09 | ||
|
|
1746a30108 | ||
|
|
d400f52ca4 | ||
|
|
e5ca107a3d | ||
|
|
a79bdcc28f | ||
|
|
6d988ec694 | ||
|
|
b1c4f8978d | ||
|
|
af07e331ac | ||
|
|
1e0bc24992 | ||
|
|
358af8b9eb | ||
|
|
11287bba4d | ||
|
|
f31c9d7d2a | ||
|
|
229a26a497 | ||
|
|
3ab5606732 | ||
|
|
81c24791e1 | ||
|
|
1fe76945f7 | ||
|
|
92f6a8b20e | ||
|
|
fa09e56a43 | ||
|
|
1fd576485f | ||
|
|
fb52cb2d30 | ||
|
|
27b22a7ee3 | ||
|
|
ce63a5b611 | ||
|
|
f7440c020d | ||
|
|
093aaaa23e | ||
|
|
82798e99c8 | ||
|
|
6a30ec5343 | ||
|
|
242631c4bb | ||
|
|
91f068e4c5 | ||
|
|
5a391e843a | ||
|
|
3bfc215091 | ||
|
|
cf0868fec8 | ||
|
|
bbb1a4f8eb | ||
|
|
5175c71cc0 | ||
|
|
f160ee8782 | ||
|
|
a3a7413be8 | ||
|
|
88ca873f3a | ||
|
|
5d291c8ea5 | ||
|
|
990d5d72ea | ||
|
|
9704cd4873 | ||
|
|
e921d0feab | ||
|
|
83c79bb154 | ||
|
|
10fa640f5c | ||
|
|
8fd99b071d | ||
|
|
e8bccbdca9 | ||
|
|
329de3041b | ||
|
|
b8ecfa18c1 | ||
|
|
ea880d2b86 | ||
|
|
c171eecd7a | ||
|
|
1a2f656816 | ||
|
|
c885fc1f53 | ||
|
|
6b69ebf2b8 | ||
|
|
138d5e0f79 | ||
|
|
21ce8b7c64 | ||
|
|
377ed94b2f | ||
|
|
ad922a272d | ||
|
|
7f35cfda71 | ||
|
|
5d70df50ba | ||
|
|
d5b0e6d820 | ||
|
|
31b1a8fc7f | ||
|
|
6581d11cea | ||
|
|
387f15d895 | ||
|
|
a29baa30c8 | ||
|
|
51ea5cc70a | ||
|
|
7305cb156c | ||
|
|
6576719dcb | ||
|
|
a9dcde33e2 | ||
|
|
dfbf2ea001 | ||
|
|
9b83d1ca5d | ||
|
|
23882d31c4 | ||
|
|
3e307aacc4 | ||
|
|
280f379186 | ||
|
|
e9fc8bb300 | ||
|
|
31f38edf35 | ||
|
|
01400c0c15 | ||
|
|
4703eb404d | ||
|
|
230556b646 | ||
|
|
1747a5e505 | ||
|
|
d5bde1d658 | ||
|
|
8a3e0ced12 | ||
|
|
5212b2fe5b | ||
|
|
33ebd52387 | ||
|
|
df6d06def4 | ||
|
|
90087382e4 | ||
|
|
604c14ab00 | ||
|
|
41b87a238e | ||
|
|
af8f84a27c | ||
|
|
1dd908b102 | ||
|
|
c799969a81 | ||
|
|
b31ef32c1d | ||
|
|
c4d21e7632 | ||
|
|
1e2bf3960b | ||
|
|
26c019eaa1 | ||
|
|
65b152948e | ||
|
|
816627b16c | ||
|
|
ee6c1ea743 | ||
|
|
f3127955ba | ||
|
|
98f025430e | ||
|
|
70b41809f2 | ||
|
|
24d2325ecb | ||
|
|
7a205f6087 | ||
|
|
578c6035c8 | ||
|
|
b69656177b | ||
|
|
a3f5afb1c0 | ||
|
|
4fe14a780c | ||
|
|
20a7232d95 | ||
|
|
4f013f8e2d | ||
|
|
cf1134787a | ||
|
|
52a30fd21b | ||
|
|
670654ea87 | ||
|
|
1d66fd7a94 | ||
|
|
51b1d2af6a | ||
|
|
515206ec4e | ||
|
|
6025dd0bda | ||
|
|
d8868ab205 | ||
|
|
9e0017536d | ||
|
|
133c95cf8c | ||
|
|
ad84f02efb | ||
|
|
e74d81f2ed | ||
|
|
0a829ab104 | ||
|
|
db69449d9f | ||
|
|
c279668168 | ||
|
|
e956a266e2 | ||
|
|
ce1f3a7d83 | ||
|
|
e906d4548a | ||
|
|
b625bbd14a | ||
|
|
22fb5f281a | ||
|
|
3ee9dbea0c | ||
|
|
c671332b29 | ||
|
|
738c36932a | ||
|
|
c5149f12b6 | ||
|
|
86e031d9e8 | ||
|
|
ac997bb6c2 | ||
|
|
d3a39771c1 | ||
|
|
b5c3c7bfc9 | ||
|
|
d69d118cbd | ||
|
|
231fe2e1aa | ||
|
|
62c1407a4d | ||
|
|
9295bd2577 | ||
|
|
4a8cac0878 | ||
|
|
4d7c162d16 | ||
|
|
e77485a8f7 | ||
|
|
d58e6f2b00 | ||
|
|
185d90fe22 | ||
|
|
ead9008644 | ||
|
|
1d9584c087 | ||
|
|
a4e9a5ca8f | ||
|
|
e2d66a6d28 | ||
|
|
f5fa29184c | ||
|
|
8bafcd3aa7 | ||
|
|
dea3d7527a | ||
|
|
2170fa6dea | ||
|
|
e6ffafa264 | ||
|
|
6e07d060fc | ||
|
|
489a49d2fe | ||
|
|
8819b58a65 | ||
|
|
8cc4fc6111 | ||
|
|
0cc1641447 | ||
|
|
4fe8a2c1bd | ||
|
|
4a39d66973 | ||
|
|
837596dc21 | ||
|
|
a02ac0c1fc | ||
|
|
7dfbf440ef | ||
|
|
86bb3fa0c0 | ||
|
|
6d7c18c1f5 | ||
|
|
fc48083437 | ||
|
|
d6feb3c1d2 | ||
|
|
faa1891782 | ||
|
|
290db7ace3 | ||
|
|
ff4a3a6a94 | ||
|
|
79977b7fcf | ||
|
|
d070e7e557 | ||
|
|
9e773dfde2 | ||
|
|
531bc520c1 | ||
|
|
8864313c48 | ||
|
|
4d52ee2bc6 | ||
|
|
81aa9a36b6 | ||
|
|
cab346f50c | ||
|
|
e1b77165c9 | ||
|
|
c72b97bf5b | ||
|
|
f2939ffadd | ||
|
|
4f4e2bd506 | ||
|
|
3a88d5a68e | ||
|
|
283dd53bf5 | ||
|
|
c42142bc03 | ||
|
|
f961f0e976 | ||
|
|
93f294b76f | ||
|
|
ee06ab4069 | ||
|
|
8a23f7e215 | ||
|
|
7573b236ea | ||
|
|
40cc9d9d7a | ||
|
|
00bcd72637 | ||
|
|
594f61521b | ||
|
|
274ce69429 | ||
|
|
ea567a73f1 | ||
|
|
f2608c3fdb | ||
|
|
f331865e3b | ||
|
|
c2d127b3ed | ||
|
|
aab49be24a | ||
|
|
ec04c922aa | ||
|
|
37159e7863 | ||
|
|
1df149ec1a | ||
|
|
4c920d1da6 | ||
|
|
92a10866a9 | ||
|
|
8090041fbb | ||
|
|
a19f5933d5 | ||
|
|
afdb73e62f | ||
|
|
200052b51c | ||
|
|
05ed227dde | ||
|
|
2051682665 | ||
|
|
405934a483 | ||
|
|
965c9c2187 | ||
|
|
9c995e93d7 | ||
|
|
3f6108b646 | ||
|
|
442628d935 | ||
|
|
9e870afa39 | ||
|
|
0bbe641a91 | ||
|
|
85575e9a2c | ||
|
|
3909ab4195 | ||
|
|
cfd2a241da | ||
|
|
d6fd672624 | ||
|
|
379889339f | ||
|
|
9109d8dcdd | ||
|
|
5a6fe43d58 | ||
|
|
02795f9961 | ||
|
|
3652bc01ab | ||
|
|
02553b5e7c | ||
|
|
3f1c010615 | ||
|
|
93b12f5fbd | ||
|
|
483a4642f0 | ||
|
|
cfec25f3b2 | ||
|
|
36ff78d232 | ||
|
|
6cd07c5165 | ||
|
|
2a6d170dc0 | ||
|
|
743b3851b1 | ||
|
|
017aff4f6d | ||
|
|
9b654728ef | ||
|
|
60b2d65b2b | ||
|
|
ca6cf936b8 | ||
|
|
91dffe9126 | ||
|
|
3562eb2999 | ||
|
|
ac4a798570 | ||
|
|
718351f882 | ||
|
|
0d89395481 | ||
|
|
2148fe61a0 | ||
|
|
b311342faf | ||
|
|
f352444541 | ||
|
|
d480d23e97 | ||
|
|
b6a90547f6 | ||
|
|
712105cd5d | ||
|
|
601b837c56 | ||
|
|
5fed1466ef | ||
|
|
966b87e814 | ||
|
|
1606365a12 | ||
|
|
b2edf87b39 | ||
|
|
e3d0c91dbb | ||
|
|
8959144837 | ||
|
|
781a53b807 | ||
|
|
c6b91f789d | ||
|
|
bf61827518 | ||
|
|
4fee036f43 | ||
|
|
bd62c63c3b | ||
|
|
657edcd50e | ||
|
|
4b212d1ce6 | ||
|
|
3ec401ec84 | ||
|
|
0817d2a8db | ||
|
|
8c473e1f47 | ||
|
|
6f4cca9cff | ||
|
|
6dea22808e | ||
|
|
dff6e711ce | ||
|
|
d71eb7bbe6 | ||
|
|
7fe8812d3e | ||
|
|
f48a4916ea | ||
|
|
b510a6d11f | ||
|
|
35e7bcbb9d | ||
|
|
693207a845 | ||
|
|
2dd9f01a69 | ||
|
|
2785fbce1e | ||
|
|
60d87e1914 | ||
|
|
7976bcbd28 | ||
|
|
f71789ee71 | ||
|
|
84df96ef37 | ||
|
|
e0fe7b9c03 | ||
|
|
7b8ee930f4 | ||
|
|
5a605ae6f4 | ||
|
|
c36bff57ca | ||
|
|
e0d561a35b | ||
|
|
1a4f22e4ed | ||
|
|
1877b0779c | ||
|
|
c27bbc4086 | ||
|
|
e74b985432 | ||
|
|
2e32234461 | ||
|
|
537aefdb26 | ||
|
|
cb78ebc0de | ||
|
|
cec7e90996 | ||
|
|
95c970030b | ||
|
|
6b2003dd2a | ||
|
|
cbddc54b6f | ||
|
|
337541636b | ||
|
|
f1f8b8a9a2 | ||
|
|
7aed3d51fc | ||
|
|
cfaf694afa | ||
|
|
afc51baaa3 | ||
|
|
590f9c1dee | ||
|
|
f18254e433 | ||
|
|
e67005e748 | ||
|
|
8ae3f4b027 | ||
|
|
232afa4816 | ||
|
|
ec01d01400 | ||
|
|
3e202d75ff | ||
|
|
95d49b10b4 | ||
|
|
ca1d1f832a | ||
|
|
008810dc29 | ||
|
|
8266f8a515 | ||
|
|
6847fefad9 | ||
|
|
b357d0eaf8 | ||
|
|
3f1465a66e | ||
|
|
0dbabb9871 | ||
|
|
0fe632bcee | ||
|
|
1c0f136405 | ||
|
|
f114050fc8 | ||
|
|
8617cc60ad | ||
|
|
a0296da876 | ||
|
|
27fb752fce | ||
|
|
079d9711ac | ||
|
|
9e4b5f7c3a | ||
|
|
9009c4481b | ||
|
|
55218a98f2 | ||
|
|
68d423b3ee | ||
|
|
e721e560e5 | ||
|
|
b7e248dd06 | ||
|
|
56af2d063e | ||
|
|
bbc72d6eb6 | ||
|
|
26b5ef7435 | ||
|
|
debf741e82 | ||
|
|
9387719dac | ||
|
|
62f0dbb0c4 | ||
|
|
34e4269172 | ||
|
|
32604578de | ||
|
|
56834ff66a | ||
|
|
e40667440d | ||
|
|
77ddd3a35b | ||
|
|
be2668c027 | ||
|
|
86357a9c27 | ||
|
|
4dd47ffbc1 | ||
|
|
f67a65543d | ||
|
|
23e8d1762d | ||
|
|
a92fb5fe3d | ||
|
|
7e75bf8f88 | ||
|
|
03d354dcf9 | ||
|
|
6f34f1a68d | ||
|
|
7258842c29 | ||
|
|
7ed678f819 | ||
|
|
97f105e450 | ||
|
|
d926d95066 | ||
|
|
7982d27528 | ||
|
|
33ba4ec2a9 | ||
|
|
5320c897f5 | ||
|
|
16e1cbee07 | ||
|
|
cf4afd61f0 | ||
|
|
4db370ab9c | ||
|
|
dbccd75b06 | ||
|
|
9221981fa3 | ||
|
|
02c0ab8d0c | ||
|
|
174c79dcba | ||
|
|
202d7dd216 | ||
|
|
06d04d15a8 | ||
|
|
446e5d0fff | ||
|
|
16ff84429a | ||
|
|
1cb0d88186 | ||
|
|
db4820447f | ||
|
|
2fa5e6dd6a | ||
|
|
284bc523d6 | ||
|
|
73c8429282 | ||
|
|
59d5462a6a | ||
|
|
cf6c92949c | ||
|
|
b56fd4602f | ||
|
|
f83ff3eb73 | ||
|
|
4c4c8555eb | ||
|
|
7ed68c0f53 | ||
|
|
74bc24d9d5 | ||
|
|
9156c2c8d1 | ||
|
|
4c3f393743 | ||
|
|
a054e6e61e | ||
|
|
20ba4ec0bd | ||
|
|
9442b13939 | ||
|
|
e846baa14b | ||
|
|
288c73580b | ||
|
|
402b2a5d6d | ||
|
|
2a854ca8b9 | ||
|
|
154663e9a2 | ||
|
|
7665e9ef27 | ||
|
|
375c85e27f | ||
|
|
0413f52480 | ||
|
|
10591231ca | ||
|
|
3bc6f8155c | ||
|
|
b7a1130143 | ||
|
|
96b6bdff27 | ||
|
|
0ac169b474 | ||
|
|
a5dbe81a76 | ||
|
|
feccd9f104 | ||
|
|
806abdb87c | ||
|
|
17df2892bd | ||
|
|
1d9f6b8a57 | ||
|
|
09ad17f67e | ||
|
|
182ac10749 | ||
|
|
8b462c1acf | ||
|
|
df42e494d7 | ||
|
|
4fff0386ac | ||
|
|
57668a27cf | ||
|
|
7922481919 | ||
|
|
b5524a0981 | ||
|
|
104209a328 | ||
|
|
091e91c051 | ||
|
|
f8b9b0db69 | ||
|
|
dd7b4680da | ||
|
|
e6006d03ca | ||
|
|
00b2df7b8f | ||
|
|
9d1c26481a | ||
|
|
3ce44b1046 | ||
|
|
7588b1bd81 | ||
|
|
2c9ee99743 | ||
|
|
eb754de807 | ||
|
|
4e8c8fd992 | ||
|
|
bfa7b6b145 | ||
|
|
a412eb08cb | ||
|
|
5453d0be3c | ||
|
|
0c02153bb9 | ||
|
|
ba01cefc0c | ||
|
|
7a1fff1441 | ||
|
|
d8895c02f7 | ||
|
|
e303647058 | ||
|
|
5a35438c21 | ||
|
|
54fed6c652 | ||
|
|
be0eeccdbc | ||
|
|
8ad2f4a2e8 | ||
|
|
c626d9e47b | ||
|
|
79e729d6b2 | ||
|
|
a4bc9478f8 | ||
|
|
63b101f36d | ||
|
|
701bd7cfad | ||
|
|
032b459205 | ||
|
|
33a946d317 | ||
|
|
bd3132bcda | ||
|
|
56654596a3 | ||
|
|
10ec822b59 | ||
|
|
360675cee3 | ||
|
|
83a5bfdd04 | ||
|
|
e99e7c04ba | ||
|
|
86133ef45e | ||
|
|
85844ace95 | ||
|
|
c8ac4bb069 | ||
|
|
f0ee629b04 | ||
|
|
8bf4fe02db | ||
|
|
1e573a9acd | ||
|
|
63c15d292a | ||
|
|
4efa22c84e | ||
|
|
9f07657b48 | ||
|
|
de8120f5d0 | ||
|
|
7d759e6781 | ||
|
|
1e13eb646e | ||
|
|
ba8b703ba1 | ||
|
|
edb2032c4e | ||
|
|
820adaddf1 | ||
|
|
ed731497fe | ||
|
|
fd3f26c100 | ||
|
|
21d8c984da | ||
|
|
1220513252 | ||
|
|
4a35689b48 | ||
|
|
4b0707cf32 | ||
|
|
33de7a2ea4 | ||
|
|
24c5143122 | ||
|
|
49c891f2cf | ||
|
|
8c6da509f2 | ||
|
|
5f3515652a | ||
|
|
8b4000f4cb | ||
|
|
0b1226219c | ||
|
|
cc31ea96a5 | ||
|
|
7e5ef04b13 | ||
|
|
709286c0d2 | ||
|
|
773a26bb22 | ||
|
|
9ea5e71a75 | ||
|
|
33eb7d83ca | ||
|
|
1e57766b11 | ||
|
|
228a537bbe | ||
|
|
cd0957112b | ||
|
|
53fb0ea075 | ||
|
|
8771472210 | ||
|
|
5d70fbf6c1 | ||
|
|
8638a61df9 | ||
|
|
3f684e77a7 | ||
|
|
240d17f12f | ||
|
|
d47b44e3c2 | ||
|
|
cf00d75980 | ||
|
|
8b1195ffcc | ||
|
|
a30f028a12 | ||
|
|
9f1d0dec47 | ||
|
|
1324095627 | ||
|
|
08389808ee | ||
|
|
6735ebb271 | ||
|
|
68217ef564 | ||
|
|
7e686b1b95 | ||
|
|
565c322797 | ||
|
|
5e3bbea0ff | ||
|
|
678c204e32 | ||
|
|
7831d30265 | ||
|
|
06a18f169b | ||
|
|
96a19593b2 | ||
|
|
c0dcedcafc | ||
|
|
babad2694e | ||
|
|
4247839610 | ||
|
|
82c8a9e745 | ||
|
|
eb66458ed9 | ||
|
|
f84ba1b039 | ||
|
|
85ca1dfb08 | ||
|
|
fffbcf5297 | ||
|
|
7a4a5944f9 | ||
|
|
6c0c410acf | ||
|
|
13d840bc3f | ||
|
|
8c75ad3dd3 | ||
|
|
ee382ca76a | ||
|
|
4bb329eafb | ||
|
|
22d6f64f54 | ||
|
|
4dcb388c0c | ||
|
|
3bfef7eef1 | ||
|
|
1ac04fe9f4 | ||
|
|
a5783da8a9 | ||
|
|
de13056307 | ||
|
|
6ddd686141 | ||
|
|
39dbe1d41b | ||
|
|
a4838358f3 | ||
|
|
dbc6964fbb | ||
|
|
8dbbeaf55a | ||
|
|
aa5102490a | ||
|
|
ab185b11b5 | ||
|
|
20ee106672 | ||
|
|
83bbb90d10 | ||
|
|
32c7eaa9e3 | ||
|
|
6780b649c6 | ||
|
|
7d519f2f84 | ||
|
|
c051b3868b | ||
|
|
128b733eca | ||
|
|
5a5646dce1 | ||
|
|
55272d3df8 | ||
|
|
567b3cef6b | ||
|
|
d01370cdc2 | ||
|
|
09af5f967f | ||
|
|
5a468e740c | ||
|
|
61f288ced3 | ||
|
|
79fd46c3a1 | ||
|
|
51ad9501d1 | ||
|
|
98d95dd88e | ||
|
|
52e769d883 | ||
|
|
ec50085da3 | ||
|
|
71a4740847 | ||
|
|
13e67642fa | ||
|
|
f52ffb8943 | ||
|
|
359a3af2a1 | ||
|
|
13a74e6979 | ||
|
|
93313c576c | ||
|
|
f0688ad7e2 | ||
|
|
e20af627c2 | ||
|
|
cf0ea12384 | ||
|
|
119b85b736 | ||
|
|
39df209ddd | ||
|
|
823a48558c | ||
|
|
0320532962 | ||
|
|
8ea07b1fd2 | ||
|
|
fa0f9ed367 | ||
|
|
a597f24b5e | ||
|
|
92896a9945 | ||
|
|
efea424869 | ||
|
|
e23d66fb5c | ||
|
|
6ecd417b34 | ||
|
|
de73bd0123 | ||
|
|
b287aa2cf4 | ||
|
|
22ce3af972 | ||
|
|
e7ad3bbec2 | ||
|
|
21a0c57cb1 | ||
|
|
3491633aa0 | ||
|
|
093e9f5e97 | ||
|
|
328d08bd63 | ||
|
|
1740e6ee4e | ||
|
|
36101a55ad | ||
|
|
100148168a | ||
|
|
0a7fc83253 | ||
|
|
0b601a7bea | ||
|
|
37d7b91d48 | ||
|
|
6a836bee6f | ||
|
|
870a6679ff | ||
|
|
61a3c147c3 | ||
|
|
4b6328e052 | ||
|
|
cdd360043e | ||
|
|
da599af7cb | ||
|
|
0fd0323956 | ||
|
|
41da939988 | ||
|
|
ac1a484c84 | ||
|
|
598aaba8ca | ||
|
|
331221eec6 | ||
|
|
809198b916 | ||
|
|
95303a4bb2 | ||
|
|
c2042b1561 | ||
|
|
93c35c3352 | ||
|
|
c21663b3e7 | ||
|
|
af1e5ad881 | ||
|
|
f858b6891c | ||
|
|
d5bafdaa20 | ||
|
|
b88ef58a9f | ||
|
|
3f0696dada | ||
|
|
b2c0acb9ec | ||
|
|
ce5a09ea40 | ||
|
|
9e3315799c | ||
|
|
5f1793e21c | ||
|
|
c656292b96 | ||
|
|
96559e91fe | ||
|
|
ac524d4b94 | ||
|
|
2e844a0799 | ||
|
|
691881a505 | ||
|
|
f2ff18e71e | ||
|
|
d5968b8f21 | ||
|
|
da973fe6bf | ||
|
|
a1784083e9 | ||
|
|
5a6b8653b9 | ||
|
|
036cc83ed6 | ||
|
|
3a9f68eb11 | ||
|
|
b203fb3481 | ||
|
|
276c815f04 | ||
|
|
0ac98aa95a | ||
|
|
0c3ada7dd4 | ||
|
|
d8fc73b5c4 | ||
|
|
9531846163 | ||
|
|
b0f01a4778 | ||
|
|
f040ce584d | ||
|
|
9706aa1daa | ||
|
|
99caa5d43b | ||
|
|
2f39b484f5 | ||
|
|
dda0b783df | ||
|
|
533ef3988b | ||
|
|
7afbcb4fef | ||
|
|
27afe4e49b | ||
|
|
7f42813ad8 | ||
|
|
15fee4d3a6 | ||
|
|
1b6ccfe86c | ||
|
|
fb910c64cd | ||
|
|
177341f899 | ||
|
|
b5c6dfdd0c | ||
|
|
494defe52b | ||
|
|
9ae2115123 | ||
|
|
7cb18f7109 | ||
|
|
b87e105411 | ||
|
|
b147536a10 | ||
|
|
75b03f5f72 | ||
|
|
c8f88a0c0b | ||
|
|
d7357c0649 | ||
|
|
ca1b3ffbc8 | ||
|
|
055472d3b4 | ||
|
|
2f9260fe4c | ||
|
|
7dc2579bfe | ||
|
|
f2b3c3c2f6 | ||
|
|
63243be5ac | ||
|
|
22f066e708 | ||
|
|
7567b96c22 | ||
|
|
f0a988a26a | ||
|
|
ca4005f623 | ||
|
|
6bcb8eb1be | ||
|
|
67daaa7aac | ||
|
|
42e39d474b | ||
|
|
afecff3aa4 | ||
|
|
d4b10839b3 | ||
|
|
558d287af9 | ||
|
|
66a636a6ae | ||
|
|
b43cf1a583 | ||
|
|
bb4bc40cf9 | ||
|
|
e4e39b8263 | ||
|
|
48ab0fb57d | ||
|
|
6101d108e0 | ||
|
|
06362129fa | ||
|
|
5c40e7c41e | ||
|
|
7aacff63c9 | ||
|
|
cff218cf54 | ||
|
|
d6c9c23ff5 | ||
|
|
209fe717b1 | ||
|
|
51b01ca9b7 | ||
|
|
928863f85b | ||
|
|
959ad0e9ea | ||
|
|
4bc3097e6f | ||
|
|
f1afd5796c | ||
|
|
a0bad70bd1 | ||
|
|
f0f7b9de53 | ||
|
|
c7cdb687da | ||
|
|
e4b7bf4ae8 | ||
|
|
8ee14c990b | ||
|
|
2829eaeee8 | ||
|
|
623406cf2b | ||
|
|
009025e00d | ||
|
|
4d5491e285 | ||
|
|
dad0716e37 | ||
|
|
af2dca818c | ||
|
|
a38995a832 | ||
|
|
93252bd556 | ||
|
|
f3e63d9e71 | ||
|
|
cb25b1222e | ||
|
|
5cc16d86b0 | ||
|
|
8aa0c92bc6 | ||
|
|
7ebbe20fb0 | ||
|
|
2807ba18e1 | ||
|
|
52cb8bb275 | ||
|
|
14d9a59f1c | ||
|
|
99947a251e | ||
|
|
5bcc067687 | ||
|
|
dd509608a1 | ||
|
|
361a09e5fa | ||
|
|
8a7d806054 | ||
|
|
5a2189f3d3 | ||
|
|
04b0bc4c70 | ||
|
|
8c2f752c3d | ||
|
|
06545c3364 | ||
|
|
bcb0020705 | ||
|
|
f42659a8f1 | ||
|
|
ce4e09daff | ||
|
|
54ec3a8e2f | ||
|
|
7d33215124 | ||
|
|
fcd55e03cb | ||
|
|
045aaef644 | ||
|
|
56b75920b4 | ||
|
|
d3439023d3 | ||
|
|
82d975d671 | ||
|
|
0bede914ab | ||
|
|
8e9cd1e4ae | ||
|
|
3af5f84c9d | ||
|
|
ef943e75a5 | ||
|
|
c12d4bc7d4 | ||
|
|
6d4ab7372d | ||
|
|
62fc17983a | ||
|
|
81301ad2a9 | ||
|
|
7e70c1ad91 | ||
|
|
c49cdc9a64 | ||
|
|
7796f4d995 | ||
|
|
7e50dda96b | ||
|
|
43523e9854 | ||
|
|
63b272998c | ||
|
|
0d66693cc3 | ||
|
|
5e4a85f2e3 | ||
|
|
3160cab22b | ||
|
|
a9fd483aff | ||
|
|
90f67c6245 | ||
|
|
d7d966f7c6 | ||
|
|
3feb4b3bdd | ||
|
|
c1a4861eb1 | ||
|
|
f72897c29d | ||
|
|
3e591dabbd | ||
|
|
8e8d923fea | ||
|
|
5b293ecd4d | ||
|
|
690575e51f | ||
|
|
331823337c | ||
|
|
bc53807a17 | ||
|
|
9a17e7b6f5 | ||
|
|
d447d17602 | ||
|
|
18d11eea40 | ||
|
|
94bc5f6c55 | ||
|
|
f8d9ef14b5 | ||
|
|
303558e6cf | ||
|
|
ee56524324 | ||
|
|
276c876171 | ||
|
|
69fa5199bc | ||
|
|
2521b5550a | ||
|
|
7b083fe5d1 | ||
|
|
a3f77686ef | ||
|
|
1bce4ebfd8 | ||
|
|
9e959a0b8a | ||
|
|
5b52d07ea6 | ||
|
|
ed74428ca1 | ||
|
|
b6789ae332 | ||
|
|
7894c0cc1a | ||
|
|
26415d0465 | ||
|
|
4092f4b8c0 | ||
|
|
b5375a323d | ||
|
|
fb981b9650 | ||
|
|
788b25ccf8 | ||
|
|
b55d490ef0 | ||
|
|
0e5f26c6bb | ||
|
|
e8e88afd11 | ||
|
|
125da02aa7 | ||
|
|
5600f889b2 | ||
|
|
869eeb62f4 | ||
|
|
621fe70048 | ||
|
|
db44261039 | ||
|
|
2c0b8b5ac8 | ||
|
|
7c08c88a87 | ||
|
|
a27ed294df | ||
|
|
3a52ee44f5 | ||
|
|
81e0131bc9 | ||
|
|
ce6db81dce | ||
|
|
1dcee0c840 | ||
|
|
053712c95d | ||
|
|
52cd153723 | ||
|
|
4628f3021b | ||
|
|
563cb21539 | ||
|
|
cda27ae9ac | ||
|
|
023cb6474b | ||
|
|
49824ee8cb | ||
|
|
aa8b27ba1d | ||
|
|
9eea00c086 | ||
|
|
f681b37c7b | ||
|
|
afb0c684dc | ||
|
|
1dadb97552 | ||
|
|
6821da54f8 | ||
|
|
a92788ddd9 | ||
|
|
8ccce347a3 | ||
|
|
e0166ebc06 | ||
|
|
aa147184ba | ||
|
|
1a218328da | ||
|
|
02822cbc33 | ||
|
|
2c88f2950c | ||
|
|
f297719cdb | ||
|
|
1bfb1f7958 | ||
|
|
8b44285b90 | ||
|
|
746ce67b66 | ||
|
|
3b408ce516 | ||
|
|
33ed504ef4 | ||
|
|
7a9ad9d0c8 | ||
|
|
c5d640d8af | ||
|
|
f065529b6d | ||
|
|
c7f7b1c3d6 | ||
|
|
7e250d06f5 | ||
|
|
d8a322e7be | ||
|
|
9aea8d5bdc | ||
|
|
d9bf422f12 | ||
|
|
a05e8e7a75 | ||
|
|
48a8b14a47 | ||
|
|
196b2350f4 | ||
|
|
0e43d751ea | ||
|
|
d82728c4d0 | ||
|
|
d13f6d754f | ||
|
|
306c8a7fc8 | ||
|
|
85151a61ce | ||
|
|
433880bc6e | ||
|
|
1dd31c38a6 | ||
|
|
02d6ec2a6b | ||
|
|
070dfe0833 | ||
|
|
f9b8901791 | ||
|
|
c9bb8db0ad | ||
|
|
6313238c63 | ||
|
|
e5aa4c844f | ||
|
|
01ed90ccef | ||
|
|
17f132f9ee | ||
|
|
67e81da36b | ||
|
|
c3fe95d971 | ||
|
|
aeec4e198a | ||
|
|
e5fbf4414a | ||
|
|
4747a40964 | ||
|
|
2bcf787a29 | ||
|
|
7d52d5b786 | ||
|
|
314f107498 | ||
|
|
7f97086631 | ||
|
|
fd28fec38b | ||
|
|
c10c675f5b | ||
|
|
869c196fa0 | ||
|
|
c1218de0d2 | ||
|
|
3f48a5524d | ||
|
|
f63da06238 | ||
|
|
bed72caf06 | ||
|
|
9e9050a428 | ||
|
|
e3aeb15678 | ||
|
|
50bfff5502 | ||
|
|
cd2006f8b7 | ||
|
|
39f6b22dae | ||
|
|
65e6d82771 | ||
|
|
96fd258d07 | ||
|
|
acd6114fa7 | ||
|
|
71e3f6fde3 | ||
|
|
52d6ab608f | ||
|
|
1f4d09c09f | ||
|
|
4ceffd7131 | ||
|
|
01b178292e | ||
|
|
b9d17aaab4 | ||
|
|
f08430ec65 | ||
|
|
1d9a7c2623 | ||
|
|
4136916e2f | ||
|
|
8339e8c81d | ||
|
|
4d738adb38 | ||
|
|
90e2bc1580 | ||
|
|
3d05a0d9cc | ||
|
|
0e1db64f8d | ||
|
|
ba78cb9c53 | ||
|
|
f93ce67426 | ||
|
|
e30a2740cf | ||
|
|
a5a5902fbc | ||
|
|
a0bf6b0923 | ||
|
|
236d54114c | ||
|
|
a08dc937c7 | ||
|
|
b5f5e9a6d1 | ||
|
|
94ce166244 | ||
|
|
4e33a1d677 | ||
|
|
796c4a021a | ||
|
|
c85209985a | ||
|
|
f12728f13e | ||
|
|
96d4220a5d | ||
|
|
ef5b7e212d | ||
|
|
2560bfd5f9 | ||
|
|
55a6c270dd | ||
|
|
7145d1a21a | ||
|
|
25829488c4 | ||
|
|
58e24ac18a | ||
|
|
5ae3f32b24 | ||
|
|
e8f465f3d4 | ||
|
|
5fbe27828b | ||
|
|
d13824b0bc | ||
|
|
2d3ef1b8ae | ||
|
|
646db4f072 | ||
|
|
443b99805e | ||
|
|
d4346da6cb | ||
|
|
e6241dc703 | ||
|
|
205309f1c1 | ||
|
|
28f9dc6e56 | ||
|
|
50f0a1b5d8 | ||
|
|
269785f95e | ||
|
|
63931ff4e8 | ||
|
|
0076374125 | ||
|
|
f0552d929f | ||
|
|
c356371437 | ||
|
|
fdc253e99d | ||
|
|
8588b58a5e | ||
|
|
17bd995568 | ||
|
|
d8ad991022 | ||
|
|
4bfcb29c46 | ||
|
|
c791d60ad9 | ||
|
|
3516ee485a | ||
|
|
11781bdaa8 | ||
|
|
da536e8a32 | ||
|
|
5d2206d3af | ||
|
|
3d8bd038d2 | ||
|
|
26b123b7f9 | ||
|
|
daa7982110 | ||
|
|
78f8d04e63 | ||
|
|
720d32f581 | ||
|
|
7ceaa82d30 | ||
|
|
1e6c159422 | ||
|
|
9b09f412bf | ||
|
|
a7d6450ea1 | ||
|
|
fd87bb3321 | ||
|
|
1701a9e22f | ||
|
|
9f2e9c5140 | ||
|
|
6c40fa15b6 | ||
|
|
4f3f4699ea | ||
|
|
125300b563 | ||
|
|
0487650536 | ||
|
|
6393ab1486 | ||
|
|
53aea140df | ||
|
|
edabed5604 | ||
|
|
37d7d08482 | ||
|
|
f95edc016b | ||
|
|
65ee58da41 | ||
|
|
4f2dd59e24 | ||
|
|
7ef3076a56 | ||
|
|
4b8a100ec9 | ||
|
|
104de20298 | ||
|
|
96ab2781ab | ||
|
|
6b5f0dde77 | ||
|
|
f81c6b18f4 | ||
|
|
d172a6b581 | ||
|
|
48c3643753 | ||
|
|
2c73cc3b29 | ||
|
|
b56086ae33 | ||
|
|
1a6f498b8c | ||
|
|
7c7fe83615 | ||
|
|
9a1edceb46 | ||
|
|
f09d8b68ab | ||
|
|
2aa4138668 | ||
|
|
1570c5b30e | ||
|
|
f2fe56ff69 | ||
|
|
bbe27ffae9 | ||
|
|
ecc1aa80e7 | ||
|
|
a36fa329a2 | ||
|
|
1207465e59 | ||
|
|
5d10addd01 | ||
|
|
dcf9114329 | ||
|
|
30569aac45 | ||
|
|
3cb1eb0471 | ||
|
|
07e0885519 | ||
|
|
42c586b97c | ||
|
|
33d27f5bfe | ||
|
|
05585132ca | ||
|
|
98037c425d | ||
|
|
b55a6c9185 | ||
|
|
91ec4763fd | ||
|
|
e2f17b298c | ||
|
|
7297f5196e | ||
|
|
2dda8d7f97 | ||
|
|
2639ab7d03 | ||
|
|
41cf3b96db | ||
|
|
698459ea93 | ||
|
|
afeb7704c9 | ||
|
|
01c2701a0f | ||
|
|
eb3d12c6dd | ||
|
|
338405d343 | ||
|
|
ba290e05a8 | ||
|
|
6aefb8bae3 | ||
|
|
3ee8c8f0da | ||
|
|
620d013499 | ||
|
|
e1a84e442e | ||
|
|
447eb3b031 | ||
|
|
2c32cc81dd | ||
|
|
e9e7bc6db3 | ||
|
|
48ffdd79f7 | ||
|
|
739132e58d | ||
|
|
e3246872e3 | ||
|
|
7d0715d53d | ||
|
|
741ca16711 | ||
|
|
a7af382874 | ||
|
|
5aa3eff94f | ||
|
|
d69ec49dc6 | ||
|
|
e1b5df4b55 | ||
|
|
fc478e5935 | ||
|
|
879bfc7a34 | ||
|
|
d49b53b5e1 | ||
|
|
c4bc4871ee | ||
|
|
07d691174b | ||
|
|
bb8046c4a9 | ||
|
|
348b2f0730 | ||
|
|
71ffa09f41 | ||
|
|
88322d2ea0 | ||
|
|
a99ccfc6ef | ||
|
|
c6840056a9 | ||
|
|
15d87d2452 | ||
|
|
6b79bbe842 | ||
|
|
cd0dd562f0 | ||
|
|
ad671669ce | ||
|
|
55b31d5103 | ||
|
|
9bee15a080 | ||
|
|
3bea592273 | ||
|
|
9d0d2e5a69 | ||
|
|
09628fd51e | ||
|
|
4215a17639 | ||
|
|
075146773f | ||
|
|
41308d4b43 | ||
|
|
980c803cd7 | ||
|
|
1b2c932cc2 | ||
|
|
7af5579e3f | ||
|
|
7d77a63342 | ||
|
|
fe0fbdc5b6 | ||
|
|
221c80d26d | ||
|
|
8f51f72dc6 | ||
|
|
bc781c94ed | ||
|
|
c901d4c528 | ||
|
|
ac7768adbf | ||
|
|
736f4831a5 | ||
|
|
f6f0f285cc | ||
|
|
97c496fc9d | ||
|
|
fff675c448 | ||
|
|
46783929a3 | ||
|
|
7c2f1384d4 | ||
|
|
b81789eb1e | ||
|
|
68e32f6ac3 | ||
|
|
24eb90c524 | ||
|
|
ae64b9096e | ||
|
|
0cdb7d6a29 | ||
|
|
2b2bda778e | ||
|
|
4199c6d6a0 | ||
|
|
9c754da0fc | ||
|
|
1b6fae101a | ||
|
|
b0c60bd249 | ||
|
|
d9f6ea2fc3 | ||
|
|
8de073782c | ||
|
|
cd8d7c7c8a | ||
|
|
cb2ab20a11 | ||
|
|
974f278257 | ||
|
|
244cc30c14 | ||
|
|
a30af3e355 | ||
|
|
ecc51ad6de | ||
|
|
1d3b055eba | ||
|
|
a100c51f51 | ||
|
|
e4252b8092 | ||
|
|
830be36b56 | ||
|
|
58cb2362c6 | ||
|
|
9dd45ec800 | ||
|
|
270be258d3 | ||
|
|
63a48afcd5 | ||
|
|
028cf1a368 | ||
|
|
76bef75836 | ||
|
|
84aa8cce64 | ||
|
|
33f30aee64 | ||
|
|
2c2e4c463f | ||
|
|
8bf949b5d6 | ||
|
|
beceb905cd | ||
|
|
083b2df569 | ||
|
|
6d0fa9bdae | ||
|
|
00238ad1ba | ||
|
|
b291b0902d | ||
|
|
6c856de82d | ||
|
|
6cdea551cc | ||
|
|
64ed8f7141 | ||
|
|
78d420e9fe | ||
|
|
f110b97975 | ||
|
|
c927593c6d | ||
|
|
d3e8858413 | ||
|
|
5bae591f88 | ||
|
|
de1acfe33a | ||
|
|
3ccb07f34b | ||
|
|
84656f113e | ||
|
|
f5bfd16b0b | ||
|
|
c640f3d8c8 | ||
|
|
7ae27b5bcd | ||
|
|
64dae03eea | ||
|
|
a5a07063d2 | ||
|
|
925d48dae6 | ||
|
|
dc7cffcd43 | ||
|
|
d9f52fe0a7 | ||
|
|
57323801f8 | ||
|
|
e6fadabf43 | ||
|
|
56402ec375 | ||
|
|
f857a77e2f | ||
|
|
9a910ed353 | ||
|
|
7ac7537776 | ||
|
|
0de0ad6348 | ||
|
|
f78caff762 | ||
|
|
b33d0fd7e7 | ||
|
|
3843821d11 | ||
|
|
adbf932744 | ||
|
|
f9b0f60098 | ||
|
|
57f0f15b9f | ||
|
|
968d6d9f8d | ||
|
|
2ab934bfc2 | ||
|
|
8c63ef0605 | ||
|
|
4c285ecdf5 | ||
|
|
575d8541db | ||
|
|
58bb4adae1 | ||
|
|
63f7648fdc | ||
|
|
a7e3a952e7 | ||
|
|
dbe9e99213 | ||
|
|
76cf93994c | ||
|
|
6b82192bf7 | ||
|
|
72f675be50 | ||
|
|
3ff606a934 | ||
|
|
acb9cae36d | ||
|
|
2d1b6f0801 | ||
|
|
f8fdee1c66 | ||
|
|
07e30106b9 | ||
|
|
bf8c6dbd99 | ||
|
|
e0e331967f | ||
|
|
ea28db8625 | ||
|
|
40de81a5d9 | ||
|
|
a04521b4f2 | ||
|
|
ced8e51328 | ||
|
|
b64eaf737b | ||
|
|
8d1de13aef | ||
|
|
e78fc33c35 | ||
|
|
5fdd45695b | ||
|
|
2bc33cbba1 | ||
|
|
851ee7b598 | ||
|
|
c1853b5628 | ||
|
|
e19abb96dd | ||
|
|
8a9d0fa9eb | ||
|
|
353a2d38d8 | ||
|
|
a064237fc0 | ||
|
|
d1b1e3513f | ||
|
|
951f65f6ed | ||
|
|
afb16a5818 | ||
|
|
18579a5f64 | ||
|
|
e3daad2d67 | ||
|
|
99a2aa0f80 | ||
|
|
3b7d588f40 | ||
|
|
e5cfc70f7d | ||
|
|
715dc6b23a | ||
|
|
3335c8ea0d | ||
|
|
4518351648 | ||
|
|
5a3e983fa4 | ||
|
|
614b4b781e | ||
|
|
fbe571a43a | ||
|
|
cbcf7c66bc | ||
|
|
bc29ceef1b | ||
|
|
101e1f4c0f | ||
|
|
dd14884877 | ||
|
|
fc268e1c7e | ||
|
|
3736b9b7ce | ||
|
|
8a7784d462 | ||
|
|
7af3ce63a6 | ||
|
|
9bb36e9cfe | ||
|
|
a6dc6b88d2 | ||
|
|
3b142d5a3d | ||
|
|
51aa31b671 | ||
|
|
35b3b03fe4 | ||
|
|
af58c35f5c | ||
|
|
8a15917de1 | ||
|
|
a316ff791c | ||
|
|
459ed2b1ad | ||
|
|
7201cdac96 | ||
|
|
538e1cd230 | ||
|
|
bd07cce770 | ||
|
|
36cf6cf22a | ||
|
|
68b0f0b418 | ||
|
|
1671424a5f | ||
|
|
064a4ea88a | ||
|
|
e20424e45f | ||
|
|
a6a09f7e98 | ||
|
|
916f2f2927 | ||
|
|
58a6d48014 | ||
|
|
dc09865f4a | ||
|
|
f17bbb9014 | ||
|
|
4e6c2b468c | ||
|
|
2c91f1d91b | ||
|
|
d66fad5fcd | ||
|
|
e7e2af5d78 | ||
|
|
b5b1117760 | ||
|
|
c5724cbd14 | ||
|
|
42736999bc | ||
|
|
91d7ba7610 | ||
|
|
da648c0fb1 | ||
|
|
2a39219142 | ||
|
|
30c131c8ae | ||
|
|
4ea29a808d | ||
|
|
f5ffc630aa | ||
|
|
68de8a2842 | ||
|
|
527a7429bc | ||
|
|
eaebc48e5e | ||
|
|
1db7f1a910 | ||
|
|
2a43afd2ce | ||
|
|
5fc8562b5d | ||
|
|
582f6d032e | ||
|
|
895cab2838 | ||
|
|
138dd94c8d | ||
|
|
b7fe07d8dc | ||
|
|
e883283590 | ||
|
|
75f62dc415 | ||
|
|
762158aa65 | ||
|
|
2beb929311 | ||
|
|
0fa438a22a | ||
|
|
549dfc78e2 | ||
|
|
db2594ff13 | ||
|
|
3e6bce59b3 | ||
|
|
fec59d3b4d | ||
|
|
d22cbad17d | ||
|
|
ce6faf02f6 | ||
|
|
05e4d7bb33 | ||
|
|
078c3ce198 | ||
|
|
f03ad4c7d6 | ||
|
|
8f29babc8e | ||
|
|
fa7605f289 | ||
|
|
2b2b3147de | ||
|
|
4dc22e32b6 | ||
|
|
fa764cb027 | ||
|
|
be66f224b0 | ||
|
|
c37ceccb54 | ||
|
|
fdce4ae1da | ||
|
|
81b5402a16 | ||
|
|
f40a16bac9 | ||
|
|
9b85ba490e | ||
|
|
d4fb7d9e37 | ||
|
|
5a288ffdc8 | ||
|
|
a80609c773 | ||
|
|
f0febf044f | ||
|
|
3b037ebbe9 | ||
|
|
44947bf563 | ||
|
|
fb7a4b6486 | ||
|
|
dc933fc50b | ||
|
|
909590ba7b | ||
|
|
cccd2445ee | ||
|
|
82563bde60 | ||
|
|
03d33b2f88 | ||
|
|
6fcf8aa12c | ||
|
|
0fadd053fa | ||
|
|
c43c235427 | ||
|
|
2a6da7814c | ||
|
|
6ec1acbe32 | ||
|
|
5f62c347c7 | ||
|
|
3a9cb0220c | ||
|
|
81d901b14d | ||
|
|
db1e0bc820 | ||
|
|
cdce334c56 | ||
|
|
cc26d0e609 | ||
|
|
6abe9c34d9 | ||
|
|
81f5522210 | ||
|
|
743935ca8e | ||
|
|
cef4df1fee | ||
|
|
cb2a2ea9d3 | ||
|
|
1a33277e3d | ||
|
|
d894cf44d8 | ||
|
|
ff9407b56b | ||
|
|
e88d121be1 | ||
|
|
fdc1b9262d | ||
|
|
da155aae1c | ||
|
|
5baaa716dc | ||
|
|
8ee9fd5768 | ||
|
|
52308cd368 | ||
|
|
7aa981f5b7 | ||
|
|
f6164dbf3a | ||
|
|
0e3f5a69f7 | ||
|
|
8788f30c12 | ||
|
|
ad0076ee53 | ||
|
|
e9cb3539ad | ||
|
|
cab8290b8e | ||
|
|
eb5c6da5a4 | ||
|
|
d189972737 | ||
|
|
745c5efc37 | ||
|
|
dbb24c2e0e | ||
|
|
6132bc3111 | ||
|
|
377d7d599d | ||
|
|
6dd7254b39 | ||
|
|
c2b8a4667b | ||
|
|
012e1abb4f | ||
|
|
c56116029d | ||
|
|
d6169276dd | ||
|
|
9fbbc53008 | ||
|
|
daca96353e | ||
|
|
baa75917c8 | ||
|
|
a010baa18d | ||
|
|
063051d6ac | ||
|
|
22ba66b7f6 | ||
|
|
6f3b0f799b | ||
|
|
7bbd454143 | ||
|
|
e0fff74d41 | ||
|
|
e08182156e | ||
|
|
8b51ad8157 | ||
|
|
081da5006e | ||
|
|
2f92fc0326 | ||
|
|
73b9beff19 | ||
|
|
eef062572a | ||
|
|
aa485e9161 | ||
|
|
72aa9e2e2b | ||
|
|
2a44f45cbe | ||
|
|
45386d8af4 | ||
|
|
d00b516f84 | ||
|
|
c42305c54e | ||
|
|
9ece796086 | ||
|
|
900850497d | ||
|
|
03e16899bc | ||
|
|
2d185cc7e2 | ||
|
|
973f679df0 | ||
|
|
fe4efa91c3 | ||
|
|
2e690ac4b5 | ||
|
|
2397e5d419 | ||
|
|
1f02914005 | ||
|
|
49d98c5a3f | ||
|
|
258d427647 | ||
|
|
3e5f7a806f | ||
|
|
88ed2002da | ||
|
|
d5fc465a67 | ||
|
|
6a2b28ba51 | ||
|
|
335078b4fd | ||
|
|
a6aacfd2b6 | ||
|
|
17f725d21a | ||
|
|
26a7fe78f2 | ||
|
|
db400222ff | ||
|
|
650986c8d1 | ||
|
|
bd031b0422 | ||
|
|
30e80d1a8c | ||
|
|
8ba3889572 | ||
|
|
e205a6749d | ||
|
|
d819da4897 | ||
|
|
fa7cba7d5d | ||
|
|
adde17749b | ||
|
|
3b36670df1 | ||
|
|
aa4e00b33c | ||
|
|
d1169e735e | ||
|
|
d4f24f19ad | ||
|
|
320541430b | ||
|
|
36416f1109 | ||
|
|
98b6ddda90 | ||
|
|
6ec7163796 | ||
|
|
f3ef2ff1d0 | ||
|
|
d41af4b7eb | ||
|
|
18962f1993 | ||
|
|
c471c77c58 | ||
|
|
df86725019 | ||
|
|
226f75e0f3 | ||
|
|
acddd0f13c | ||
|
|
3eac45ea80 | ||
|
|
31c8ec4c80 | ||
|
|
5fa6882567 | ||
|
|
8139b776e9 | ||
|
|
bc50e68a1b | ||
|
|
7f8e11d6d3 | ||
|
|
2b8c85bd0b | ||
|
|
8052667684 | ||
|
|
af56b0f936 | ||
|
|
43a466a076 | ||
|
|
2b97cb1f88 | ||
|
|
c3151f742b | ||
|
|
943a911485 | ||
|
|
d035af4af1 | ||
|
|
138d601ab1 | ||
|
|
bb190f8565 | ||
|
|
8def18813f | ||
|
|
57882d58e1 | ||
|
|
63a845f2f6 | ||
|
|
f88464ee6d | ||
|
|
cd74a455dd | ||
|
|
62fc2f5f7f | ||
|
|
d92c591514 | ||
|
|
467523bac5 | ||
|
|
2ca5404046 | ||
|
|
5d62d88ece | ||
|
|
14463b1ba8 | ||
|
|
a22d6b980e | ||
|
|
27f1799b68 | ||
|
|
117a2fba07 | ||
|
|
5d4579a1f4 | ||
|
|
80f1ce5eed | ||
|
|
8eec7a022f | ||
|
|
8c4411b5da | ||
|
|
f86fb810a0 | ||
|
|
336392ea6c | ||
|
|
7719f86292 | ||
|
|
bdbdaa4369 | ||
|
|
215a88ade1 | ||
|
|
a916379c21 | ||
|
|
96bfbc7904 | ||
|
|
c50cd2df99 | ||
|
|
4bf413e358 | ||
|
|
be14ccadf1 | ||
|
|
8c43c5f708 | ||
|
|
0d560de1b7 | ||
|
|
9f106c61ec | ||
|
|
d6595d628c | ||
|
|
d47d83511a | ||
|
|
54d210427a | ||
|
|
f8bac0f8ad | ||
|
|
6b16188db0 | ||
|
|
4b062fdfec | ||
|
|
963a004481 | ||
|
|
99fd17df63 | ||
|
|
da9faa2c3a | ||
|
|
1798a0183a | ||
|
|
c1f75b6fda | ||
|
|
83de88e90c | ||
|
|
2bb01b6f81 | ||
|
|
3b1843bc9f | ||
|
|
f6ad4b09c1 | ||
|
|
f7072fbf87 | ||
|
|
2fb5e56123 | ||
|
|
95c9e3014a | ||
|
|
b331ead5bf | ||
|
|
3d45dd58b8 | ||
|
|
b484f40c31 | ||
|
|
a3464b7c11 | ||
|
|
7ed4923441 | ||
|
|
835b0d8823 | ||
|
|
2a64925a67 | ||
|
|
e5da9fc10a | ||
|
|
f3d179ff99 | ||
|
|
230846f6dd | ||
|
|
04b2c1d422 | ||
|
|
fd4650b540 | ||
|
|
4b023c157a | ||
|
|
bc1e4a5a10 | ||
|
|
d8a9548cb2 | ||
|
|
b886985d63 | ||
|
|
34b3dc9b47 | ||
|
|
82806ea254 | ||
|
|
e9b28fe29c | ||
|
|
f5dbfbae84 | ||
|
|
ed97964fbe | ||
|
|
c329da5d25 | ||
|
|
c5fd7244dd | ||
|
|
5b0ae2dff3 | ||
|
|
605756de7f | ||
|
|
d5dc2cd22c | ||
|
|
a821a185e4 | ||
|
|
2f79ba1abf | ||
|
|
19a2a02f8e | ||
|
|
f830cf7d15 | ||
|
|
f8f8defb42 | ||
|
|
2db1d61718 | ||
|
|
421414df03 | ||
|
|
ed06a70f7f | ||
|
|
a1b42e3f5e | ||
|
|
89f139d3b0 | ||
|
|
bbce669cea | ||
|
|
8b2fe60467 | ||
|
|
e49aafcf57 | ||
|
|
e586468a4e | ||
|
|
92f986787b | ||
|
|
dbfeaabb16 | ||
|
|
c7a606c4a3 | ||
|
|
1b4b5c4a88 | ||
|
|
1ecca4b8e8 | ||
|
|
cf757f7c89 | ||
|
|
b6315d1c9b | ||
|
|
9108abc287 | ||
|
|
3cad348509 | ||
|
|
a3a60dd4e7 | ||
|
|
66a48f2131 | ||
|
|
1225d0307b | ||
|
|
0f99eeb29f | ||
|
|
aea7498779 | ||
|
|
c4b7426ec1 | ||
|
|
d57ffd3646 | ||
|
|
250d803c31 | ||
|
|
4ea6d477ec | ||
|
|
63f2cc9fe9 | ||
|
|
52ec64359c | ||
|
|
f153896de5 | ||
|
|
5f12a05aa3 | ||
|
|
aba3ea97cd | ||
|
|
88029643d0 | ||
|
|
31da7331fe | ||
|
|
577340bb9f | ||
|
|
cf4a2c3bfc | ||
|
|
b5dd397459 | ||
|
|
f78d4f1a56 | ||
|
|
a88b37788e | ||
|
|
70dc46892a | ||
|
|
9c970e1910 | ||
|
|
e058cccfc1 | ||
|
|
bcc1337d8c | ||
|
|
274f3aa727 | ||
|
|
33507acca5 | ||
|
|
03d2a11e27 | ||
|
|
6ebb2c80e0 | ||
|
|
941bdd57a3 | ||
|
|
e9c646e7dd | ||
|
|
873763473f | ||
|
|
52463124be | ||
|
|
b219d491b9 | ||
|
|
b7ee45e13c | ||
|
|
7068d4a201 | ||
|
|
24a21ca2e1 | ||
|
|
c1dc4efc3b | ||
|
|
0eb1498fa8 | ||
|
|
dfce358a5b | ||
|
|
7401ef12fb | ||
|
|
3fe94e5b37 | ||
|
|
62a9f2137c | ||
|
|
cd789db6f2 | ||
|
|
741b816136 | ||
|
|
7a167cd0c1 | ||
|
|
f1f4e6f478 | ||
|
|
a5138d2724 | ||
|
|
e10e4dbe10 | ||
|
|
96434e4899 | ||
|
|
83cdc9476d | ||
|
|
3b5972ed4a | ||
|
|
1f985ede74 | ||
|
|
5d0a7599a9 | ||
|
|
16ec4608ac | ||
|
|
36947fc45a | ||
|
|
064a16c7b2 | ||
|
|
66f850e5b7 | ||
|
|
d73c638526 | ||
|
|
ff29e85724 | ||
|
|
0062ae6218 | ||
|
|
033858e13d | ||
|
|
cf58b7ef16 | ||
|
|
6155d91e7a | ||
|
|
4f545f9c6b | ||
|
|
72f6e823f9 | ||
|
|
7b98592282 | ||
|
|
e115fdc6d6 | ||
|
|
cbcd462d46 | ||
|
|
97107dc440 | ||
|
|
0eb500cef5 | ||
|
|
57b22c8b64 | ||
|
|
3165710b77 | ||
|
|
912f17d278 | ||
|
|
ee7032f069 | ||
|
|
84bb91d762 | ||
|
|
05f6cf54f0 | ||
|
|
7b58930456 | ||
|
|
13c3c4012e | ||
|
|
1250c43a39 | ||
|
|
1652802641 | ||
|
|
d62a739cca | ||
|
|
9df57a2263 | ||
|
|
080105f79f | ||
|
|
9b4d71205b | ||
|
|
a08e3925b1 | ||
|
|
87ba08d1d0 |
No files matched your search
@@ -1,11 +0,0 @@
|
||||
If you think you've found a bug in PHP3, you can report it on the bug
|
||||
reporting page at:
|
||||
http://www.php.net/
|
||||
|
||||
Current Known Bugs:
|
||||
|
||||
* split() function doesn't return regex errors nicely
|
||||
* Preprocessed scripts don't work with require() and define()
|
||||
* unset() doesn't actually erase the variables it just marks them as uninitialized
|
||||
* Some parts in the language core prevent more than 256 arguments in function
|
||||
calls from being possible
|
||||
@@ -1,624 +0,0 @@
|
||||
Noticeable Changes between PHP/FI 2.0 and PHP 3.0
|
||||
=================================================
|
||||
|
||||
This file was designed to be viewed with a tab size of 4 characters.
|
||||
|
||||
This file is divided into 4 sections:
|
||||
1. Downwards incompatible language changes. This section includes all of
|
||||
the changes in the core language which may require people to modify
|
||||
their scripts before using them with PHP 3.0. It does NOT list
|
||||
changes made in the behavior of specific functions.
|
||||
2. New language features. This section includes all of the new additions
|
||||
to the core language, that may be used to enhance scripts designed for
|
||||
PHP 3.0. Likewise, it does not include a listing of new functions.
|
||||
3. Structural changes not directly effecting the end user. The core
|
||||
of PHP 3.0 is a complete rewrite. As such, many issues effecting
|
||||
PHP/FI 2.0 were addressed and vastly improved in this version,
|
||||
resulting in a much more stable and efficient implementation. This
|
||||
section lists these changes in design.
|
||||
4. Other changes that don't fit in any of the above categories.
|
||||
|
||||
Please remember that PHP 3.0's core is a complete rewrite, and thus,
|
||||
there may be other undocumented incompatibilities we haven't thought
|
||||
of ourselves. If you think you've found a incompatibility (or a new
|
||||
feature) which is not listed here, please mail us at
|
||||
php-dev@php.iquest.net.
|
||||
|
||||
|
||||
|
||||
- Zeev
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
Downwards incompatible language changes
|
||||
=======================================
|
||||
|
||||
[1] The close-PHP tag has changed from > to ?>
|
||||
|
||||
This means that instead of writing:
|
||||
|
||||
<?echo $title;>
|
||||
|
||||
You should write:
|
||||
|
||||
<?echo $title;?>
|
||||
|
||||
PHP3 also includes support for a longer-form start tag that is
|
||||
XML-compliant:
|
||||
|
||||
<?php echo $title;?>
|
||||
|
||||
The ability to use the short start tag ('<?') can be turned on and
|
||||
off using the short_tags() function. Whether it is enabled or not by
|
||||
default is a compile-time option (normally set to enabled by default).
|
||||
|
||||
|
||||
[2] Semicolons in if/elseif/else must be replaced with colons.
|
||||
|
||||
For example, the equivalent of:
|
||||
|
||||
if (expr);
|
||||
statements
|
||||
...
|
||||
elseif (expr);
|
||||
statements
|
||||
...
|
||||
else;
|
||||
statements
|
||||
endif;
|
||||
|
||||
in PHP 3.0 would be:
|
||||
|
||||
if (expr):
|
||||
statements
|
||||
...
|
||||
elseif (expr):
|
||||
statements
|
||||
...
|
||||
else:
|
||||
statements
|
||||
endif;
|
||||
|
||||
Note that the endif is followed by a semicolon and not a colon even in
|
||||
PHP 3.0, which marks the end of the entire IF sentence.
|
||||
|
||||
Also note that the implementation of the colon-mode and curly-braces
|
||||
mode in PHP 3.0 is identical, one isn't buggier than the other (note
|
||||
that I'm not saying they're not buggy, though :)
|
||||
|
||||
|
||||
[3] Semicolons in while loops must also be replaced with colons.
|
||||
|
||||
For example, the equivalent of:
|
||||
|
||||
while (expr);
|
||||
statements
|
||||
...
|
||||
endwhile;
|
||||
|
||||
in PHP 3.0 would be:
|
||||
|
||||
while (expr):
|
||||
statements
|
||||
...
|
||||
endwhile;
|
||||
|
||||
Note that the endwhile is followed by a semicolon and not a colon even
|
||||
in PHP 3.0, which marks the end of the WHILE sentence. As with the IF
|
||||
statement, the implementation of the colon-mode and curly-braces mode
|
||||
in PHP 3.0 is identical, one isn't buggier than the other.
|
||||
|
||||
Also note that failing to change the semicolon to a colon can result in
|
||||
scripts that get stuck in the while loop because the loop-condition never
|
||||
changes.
|
||||
|
||||
|
||||
[4] $foo[0] is no longer identical to $foo.
|
||||
|
||||
In PHP/FI 2.0, a side-effect of the implementation caused $foo[0] to be
|
||||
identical to $foo. This is not the case in PHP 3.0.
|
||||
|
||||
|
||||
[5] Expressions determine their types differently.
|
||||
|
||||
The way expressions are evaluated has changed radically in PHP 3.0.
|
||||
Expressions are no longer given the type of the left argument, but are
|
||||
assigned types taking both types into account, and regardless of which
|
||||
is on the left side and which is on the right side. On simple scripts
|
||||
that should probably not effect you, but if you've relied on this fact
|
||||
(even without realizing you do) it may change the way your scripts work.
|
||||
Consider the next example:
|
||||
|
||||
$a[0]=5;
|
||||
$a[1]=7;
|
||||
|
||||
$key = key($a);
|
||||
while ("" != $key) {
|
||||
echo "$key\n";
|
||||
next($a);
|
||||
}
|
||||
|
||||
|
||||
In PHP/FI 2.0, this would display both of $a's indices. In PHP 3.0, it
|
||||
wouldn't display anything. The reason is that in PHP/FI 2.0, because the
|
||||
left argument's type was string, a string comparison was made, and indeed
|
||||
"" does not equal "0", and the loop went through. In PHP 3.0, when a
|
||||
string is compared with an integer, an integer comparison is made (the
|
||||
string is converted to an integer). This results in comparing atoi("")
|
||||
which is 0, and $key which is also 0, and since 0==0, the loop doesn't
|
||||
go through even once. The fix for this is simple, by replacing the
|
||||
while statement with:
|
||||
|
||||
while ("" != stringval($key)) {
|
||||
|
||||
This would first convert the integer 0 to a string "0", and then
|
||||
compare "" and "0", which are not equal, and the loop would go through
|
||||
as expected. As mentioned later, casting operators are supported in
|
||||
PHP 3.0 for a quicker and more readable way of changing variables'
|
||||
types. For example, you could use:
|
||||
|
||||
while ("" != (string)$key) {
|
||||
|
||||
|
||||
[6] The structure of error messages has changed.
|
||||
|
||||
Although the error messages are usually more accurate, you won't be shown
|
||||
the actual line of text and actual place in which the error occured.
|
||||
You'll be supplied with the line number in which the error has occured,
|
||||
though.
|
||||
|
||||
|
||||
[7] The format string argument to echo is no longer supported.
|
||||
|
||||
Use printf(format,arg1,arg2,arg3,...) instead (unlimited arguments).
|
||||
|
||||
|
||||
[8] The use of read-mode $array[] is no longer supported.
|
||||
|
||||
That is, you cannot traverse an array by having a loop that does $data =
|
||||
$array[]. Use current() and next() instead. Also, $array1[] = $array2
|
||||
does not append the values of $array2 to $array1, but appends $array2
|
||||
as the last entry of $array1 (see the multidimensional array support).
|
||||
|
||||
|
||||
[9] Apache versions older than 1.2 are not supported anymore.
|
||||
|
||||
The apache module requires apache 1.2 or later (1.3-beta is supported).
|
||||
|
||||
|
||||
[10] Indirect references inside quoted strings
|
||||
|
||||
PHP2-style indirect reference inside quoted strings is no longer
|
||||
supported. That is, if $foo="bar", and $bar="abc", in PHP2,
|
||||
"$$foo" would print out "abc". In PHP3, this would print
|
||||
"$bar" (the contents of $foo is replaced with "bar").
|
||||
To use indirect reference in PHP3 inside quoted strings, you should use
|
||||
the new notation: "${$foo}". The standard $$foo notation will work
|
||||
outside of the quoted string.
|
||||
|
||||
[11]
|
||||
Some functions have changed names, are missing, or have been deprecated
|
||||
by other functions
|
||||
|
||||
As a whole new rewrite, written by many more people and supporting many
|
||||
more APIs than it's predecessor, there's a good chance some of the functions
|
||||
you're used to from PHP/FI 2 aren't available in release 3, or have changed
|
||||
names. Many functions that do exist behave a bit differently, mainly
|
||||
because they return different values for errors (false) but also for other
|
||||
reasons. We can't list all of these functions here, simply because drawing
|
||||
a full comparison between the function sets of the two versions is way too
|
||||
much work. If a converted PHP/FI 2 script doesn't work for you, nothing
|
||||
can replace the good old human eye going over the code, doublechecking
|
||||
with the online manual that each function still does what you expected it
|
||||
to do.
|
||||
|
||||
[12] Other incompatibilities.
|
||||
|
||||
It's not too unlikely that other documented behavior of PHP2 has changed
|
||||
in this release. If you think you've found an example, please mail
|
||||
us at php-dev@php.iquest.net. Even if you've found an undocumented
|
||||
feature of PHP2 that stopped working in PHP3, we'd like to know about it
|
||||
(although it's more than likely that it will not be supported).
|
||||
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
|
||||
New Language Features
|
||||
=====================
|
||||
|
||||
[1] Expressions
|
||||
|
||||
PHP 3.0 includes a rich implementation of expressions, much more advanced
|
||||
than this of 2.0. Just about any complex C-like or perl-like expression
|
||||
would work. Support was added for assignment operators (+=, -=, *= etc),
|
||||
pre and post increment/decerement (e.g. $i++, ++$i) and the questionmark
|
||||
operator ( (expr?expr:expr) ). Every assignment is now an expression
|
||||
with a value, which means stuff like $a = $b = $c = $d = 0; would work.
|
||||
It is difficult to describe the power of expressions within a few lines
|
||||
of text, but if you're familiar with them, you probably get the picture.
|
||||
|
||||
|
||||
[2] for loops are now supported.
|
||||
|
||||
for loops were fairly difficult to implement (in fact, we didn't find
|
||||
any parallel interpreter that supports for loops anywhere (no, perl is
|
||||
not an interpreter)). The bottom line is that for loops work, and are
|
||||
around 5% slower than comparable while loops (that may vary), but often
|
||||
they're much nicer.
|
||||
|
||||
The syntax is identical to the one of C:
|
||||
|
||||
for (expr; expr; expr) statement;
|
||||
|
||||
or
|
||||
|
||||
for (expr; expr; expr) { statements ... }
|
||||
|
||||
The first expression is executed the first time the loop is encountered,
|
||||
the loop is run as long as the second expression is evaluated as TRUE,
|
||||
and after each iteration, the 3rd expression is evaluated.
|
||||
|
||||
Colon-mode FOR loops are also supported:
|
||||
for (expr; expr; expr):
|
||||
statements
|
||||
...
|
||||
endfor;
|
||||
|
||||
|
||||
[3] do..while(expr) loops are now supported.
|
||||
|
||||
Like with its C parallel, the statements inside a do..while loop are
|
||||
run once the first time the loop is encountered, and then as long as
|
||||
the expression evaluates as true.
|
||||
|
||||
For example:
|
||||
|
||||
do {
|
||||
statements;
|
||||
} while ($i++ < $max);
|
||||
|
||||
|
||||
[4] break and continue statements are now supported inside loops.
|
||||
|
||||
You can break out of loops, or continue to the next iteration of the
|
||||
loop using these statements. A special feature of PHP is the ability
|
||||
to specify an expression argument to break or continue, which specifies
|
||||
how many loops you want to break out from or continue to. For example:
|
||||
|
||||
for ($i=0; $i<10; $i++) {
|
||||
for ($j=0; $j<10; $j++) {
|
||||
if ($j>5)
|
||||
break;
|
||||
if ($i>5)
|
||||
break 2;
|
||||
}
|
||||
}
|
||||
|
||||
The first break statement would end the inner loop every time $j is
|
||||
greater than 5. The second break statement would end both the inner
|
||||
and outer loop when $i is greater than 5.
|
||||
|
||||
Note: For this matter, switch statements are considered as loops. So
|
||||
if you write "break 2;" inside a switch statement, you would be asking
|
||||
to break out of the switch, and the innermost loop in which is nested.
|
||||
|
||||
|
||||
[5] Switched to C-style declaration of functions.
|
||||
|
||||
Here's a pretty useless function which makes a good example:
|
||||
|
||||
function concat($str1,$str2)
|
||||
{
|
||||
return $str1.$str2;
|
||||
}
|
||||
|
||||
NOTE: The old style function definition is still supported, to
|
||||
allow easier upgrading from PHP/FI 2.0 scripts. Simply
|
||||
change 'function' to 'old_function' for these functions.
|
||||
|
||||
|
||||
[6] OOP support
|
||||
|
||||
Classes and inheritance are supported to a limited extent in PHP 3.0.
|
||||
Here's how to declare a simple class:
|
||||
|
||||
class simple_class {
|
||||
var $property1,$property2;
|
||||
var $property3=5;
|
||||
|
||||
function display() {
|
||||
printf("p1=%d, p2=%d, p3=%d\n",
|
||||
$this->property1,
|
||||
$this->property2,
|
||||
$this->property3);
|
||||
}
|
||||
function init($p1,$p2) {
|
||||
$this->property1 = $p1;
|
||||
$this->property2 = $p2;
|
||||
}
|
||||
};
|
||||
|
||||
Here's how to create an object of that class:
|
||||
|
||||
$obj = new simple_class;
|
||||
|
||||
At this point, $obj is an object with 2 uninitialized variables, 1
|
||||
initialized variable, and 2 member functions. No protection is made on
|
||||
the internals of the object, and using its properties is simple:
|
||||
|
||||
$obj->property1 = 7;
|
||||
|
||||
would assign 7 to $property1 inside $obj. Calling member functions is
|
||||
also simple:
|
||||
|
||||
$obj->display()
|
||||
|
||||
would run the display() member function of $obj. Note that the
|
||||
implementation of display() uses the special variable $this, which is
|
||||
replaced with the object the function is called on.
|
||||
|
||||
Inheritance is pretty simple too:
|
||||
|
||||
class complex_class extends simple_class {
|
||||
var $property4="test";
|
||||
|
||||
function display() {
|
||||
printf("p1=%d, p2=%d, p3=%d, p4=%d\n",
|
||||
$this->property1,
|
||||
$this->property2,
|
||||
$this->property3,
|
||||
$this->property4);
|
||||
}
|
||||
}
|
||||
|
||||
Basically, the class complex_class inherits everything from its parent,
|
||||
simple_class, except properties or member functions which override the
|
||||
ones in the parent. In this example, since we supply an alternative
|
||||
display() function, it would be used with complex_class objects instead
|
||||
of the display() function that was declared in simple_class. On the other
|
||||
hand, since we don't supply an alternative init() function, complex_class
|
||||
objects would have the same init() function as simple_class objects do.
|
||||
|
||||
As with expressions, it's impossible to teach OOP in a few lines, and
|
||||
personally I'm unclear as to how useful this would be in day to day
|
||||
scripting. If you like this, play with this until you figure it out :)
|
||||
|
||||
Objects can reside in arrays, and can contain arrays. However,
|
||||
a limitation of the current implementation doesn't allow an object
|
||||
to contain an array of objects (actually, this is allowed, but
|
||||
there's no way to address the properties of such an object directly,
|
||||
but only indirectly). For example, assuming $a[3] is an object,
|
||||
$a[3]->b[2] is an object as well, you can't address the properties
|
||||
of $a[3]->b[2] (i.e. you can't write $a[3]->b[2]->foo = "bar", for
|
||||
instance).
|
||||
|
||||
|
||||
[7] Function pointers are now supported.
|
||||
|
||||
A simple illustrative example:
|
||||
|
||||
$func_ptr = "time";
|
||||
$current_time = $func_ptr();
|
||||
|
||||
is identical to
|
||||
|
||||
$current_time = time();
|
||||
|
||||
|
||||
[8] Indirect references are much more powerful.
|
||||
|
||||
For example, one can use the dollar operator an infinite amount of times:
|
||||
|
||||
$a = "b";
|
||||
$b = "c";
|
||||
$c = "d";
|
||||
$d = "e";
|
||||
$e = "Testing\n";
|
||||
|
||||
echo $$$$$a;
|
||||
|
||||
Would display $e's content, which is "Testing\n".
|
||||
|
||||
In addition, one can use complex expressions to generate variable names
|
||||
using a perl-like notation:
|
||||
|
||||
$i="123";
|
||||
${"test".$i} = 5;
|
||||
|
||||
would assign 5 to $test123.
|
||||
|
||||
[9] A string concatenation operator was added, '+' no longer concatenates strings.
|
||||
|
||||
A perl-like string concatenation operator was added, the '.' operator.
|
||||
It converts both of its arguments to strings, and concatenates them.
|
||||
For example:
|
||||
|
||||
$result = "abcd".5;
|
||||
|
||||
assigns "abcd5" to result. Note that under PHP 3.0, the '+' operator
|
||||
no longer performs concatenation if its arguments are strings. Use
|
||||
the '.' operator instead.
|
||||
|
||||
[10] Supports passing function arguments by references instead of by value.
|
||||
|
||||
Support for passing function arguments by reference instead of by value
|
||||
has been added. This doesn't result in having to change the function
|
||||
implementations in any way, but, when calling the function, you can
|
||||
decide on whether the variable you supply would actually be changed by
|
||||
the function, or a copy of it.
|
||||
|
||||
Example:
|
||||
|
||||
function inc($arg)
|
||||
{
|
||||
$arg++;
|
||||
}
|
||||
|
||||
$i=0;
|
||||
inc($i); # here $i in the outer scope wouldn't change, and remain 0
|
||||
inc(&$i); # here $i is passed by reference, and would change to 1
|
||||
|
||||
|
||||
[11] Support for multidimensional arrays.
|
||||
|
||||
(Or as Andi calls them, 'hyperdimensional variables'.)
|
||||
|
||||
The easiest way to define this support of PHP 3.0 is inductive -
|
||||
arrays can contain any type of variables, including other arrays.
|
||||
A simple example:
|
||||
|
||||
$a[0]=5;
|
||||
$a[1]["testing"]=17;
|
||||
$b["foo"]=$a;
|
||||
|
||||
Ok, so it may be not so simple. Play with it, it's pretty powerful.
|
||||
|
||||
|
||||
[12] Array initialization is now supported.
|
||||
|
||||
For example, let's say you want to initialize a lookup table to convert
|
||||
number to month names:
|
||||
|
||||
$months = array("January", "February", "March",
|
||||
"April", "May", "June", "July", "August",
|
||||
"September", "October", "November", "December");
|
||||
|
||||
would assign $months[0] to be January, $months[1] to be February, etc.
|
||||
Alternately, you may want the count to start at '1' instead of 0.
|
||||
You can do so easily:
|
||||
|
||||
$months = array(1=>"January", "February", "March",
|
||||
"April", "May", "June", "July", "August",
|
||||
"September", "October", "November", "December");
|
||||
|
||||
Also, you can specify an index for every entry, not just the first one:
|
||||
|
||||
$first_names = array("Doe"=>"John", "Gates"=>"William",
|
||||
"Clinton"=>"Bill" });
|
||||
|
||||
would assign $first_names["Doe"]="John", etc.
|
||||
|
||||
|
||||
[13] Perl style lists now supported.
|
||||
|
||||
Multiple values from arrays may now be assigned into several
|
||||
variables using one assignment. For example:
|
||||
|
||||
$str = "johndoe:x:555:555:Doe, John:/home/johndoe:/bin/tcsh";
|
||||
|
||||
list($username,$passwd,$uid,$gid,$realname,$homedir,$shell) =
|
||||
explode(":",$str);
|
||||
|
||||
Would assign 'johndoe' into $username, 'x' into $passwd, etc.
|
||||
|
||||
|
||||
[14] Colons are supported in 'case' and 'default' statements.
|
||||
|
||||
For example:
|
||||
|
||||
switch($value) {
|
||||
case 'A':
|
||||
statement;
|
||||
break;
|
||||
case 'B':
|
||||
statement;
|
||||
break;
|
||||
case 'C':
|
||||
statement;
|
||||
/* fall-through */
|
||||
default:
|
||||
statement;
|
||||
}
|
||||
|
||||
Semicolons are still supported, but when writing new scripts, they
|
||||
should be phased out in favour of colons.
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
|
||||
Non Language Related New Features
|
||||
=================================
|
||||
|
||||
[1] Persistent resource lists.
|
||||
|
||||
In plain english this means that there's now an easy way of writing the
|
||||
SQL drivers so that they don't open and close the SQL link every time,
|
||||
but instead open it the first time it's required, and then use it on
|
||||
every later hit. As of PHP 3.0a1, only the MySQL, mSQL and PostgresSQL
|
||||
drivers have been changed (rewritten) to take advantage of this option.
|
||||
To use it, use mysql_pconnect() instead of mysql_connect() (or the
|
||||
equivalents for the two other databases).
|
||||
|
||||
|
||||
[2] Configuration file.
|
||||
|
||||
PHP now has its own configuration file, and many compile-time options
|
||||
of PHP2 are now configurable at runtime.
|
||||
|
||||
|
||||
[3] Syntax Highlighting.
|
||||
|
||||
A syntax highlighter has been built into PHP 3.0, which means PHP 3.0 can
|
||||
display your code, syntax highlighted, instead of executing it.
|
||||
There are currently two ways to use the syntax highlighter. One is to
|
||||
use the show_source() statement. This statement is identical to the
|
||||
include() statement, except instead of executing the file, it displays
|
||||
its source syntax highlighted.
|
||||
The second way is possible only when running as an apache module, and is
|
||||
to define a special extension for PHP 3.0 source files (e.g. .php3s)
|
||||
and instruct apache to automatically syntax highlight them.
|
||||
|
||||
|
||||
[4] Loadable modules.
|
||||
|
||||
This would have a huge impact on the Windows version, and would probably
|
||||
be used in the UNIX environment as well. One can now add PHP internal
|
||||
functions in runtime by loading a dynamic module. This is known to work
|
||||
under Solaris, Linux and Win32 at this time, but would be ported to any
|
||||
other capable platform if an incompatability is found.
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
|
||||
Other Interesting Issues
|
||||
========================
|
||||
|
||||
|
||||
[1] Improved performance.
|
||||
|
||||
The performance of PHP 3.0 is much better than the one of PHP/FI 2.0.
|
||||
Memory consumption has been dramatically reduced in many cases, due
|
||||
to the use of an internal memory manager, instead of apache's pools.
|
||||
Speedwise, PHP 3.0 is somewhere between 2 and 3 times faster than
|
||||
PHP/FI 2.0.
|
||||
|
||||
|
||||
[2] More reliable parser.
|
||||
|
||||
After PHP 3.0 is well tested, it'll be pretty safe to say that it's
|
||||
more reliable than PHP/FI 2.0 is. While PHP/FI 2.0 performed well on
|
||||
simple, and fairly complex scripts, a fundamental design difference
|
||||
from PHP 3.0 makes it more prone to errors. In PHP 3.0, obscure parser
|
||||
problems are much less likely.
|
||||
|
||||
|
||||
[3] Improved C API.
|
||||
|
||||
If you're a C coder, adding functionality to PHP was never easier.
|
||||
A pretty well documented API is available (apidoc.txt), and you no longer
|
||||
have to touch the parser or scanner code when adding your function.
|
||||
Also, it's more complicated to 'go wrong' when implementing a PHP3
|
||||
function than it was in PHP2 (no stack to maintain) - but of course,
|
||||
you can mess up here too :)
|
||||
|
||||
|
||||
[4] Name change.
|
||||
|
||||
PHP/FI 2.0 was renamed to PHP 3.0, and the meaning has changed from
|
||||
'Personal Home Pages / Forms Interpreter' to 'PHP: Hypertext Preprocessor'.
|
||||
'Personal' home pages was an understatement for PHP/FI 2.0, and is
|
||||
definitely an understatement for PHP 3.0.
|
||||
@@ -1,339 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
675 Mass Ave, Cambridge, MA 02139, USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
Appendix: How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) 19yy <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) 19yy name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
@@ -1,176 +1,3 @@
|
||||
PHP Version 3.0 Development Team
|
||||
For the list of people who've put work into PHP 4.0, please see
|
||||
http://www.php.net/version4/credits.php
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
Core Developers
|
||||
===============
|
||||
|
||||
Rasmus Lerdorf (rasmus@lerdorf.on.ca)
|
||||
|
||||
* Original language definition and implementation
|
||||
* CGI loader and many internal functions
|
||||
* Apache module support
|
||||
* SNMP module
|
||||
* Original mSQL, MySQL and Sybase modules
|
||||
* Oracle module work
|
||||
|
||||
|
||||
Andi Gutmans (andi@php.net) and Zeev Suraski (zeev@php.net)
|
||||
|
||||
* New language definition and implementation
|
||||
* Internal functions API design
|
||||
* General hash table implementation for symbol tables, arrays and objects
|
||||
* Memory manager
|
||||
* Token cache manager
|
||||
* A lot of internal functions (including hebrev :) and migration from PHP 2.0
|
||||
* Syntax highlighting mode
|
||||
* Configuration file parser
|
||||
* New persistent/multilink MySQL, PosgresSQL, Sybase and mSQL modules
|
||||
* Win32 COM support
|
||||
|
||||
|
||||
Stig Bakken (ssb@guardian.no)
|
||||
|
||||
* Oracle support
|
||||
* configure/install script work
|
||||
* sprintf reimplementation
|
||||
* XML support
|
||||
* SGML documentation framework
|
||||
|
||||
|
||||
Shane Caraveo (shane@caraveo.com)
|
||||
|
||||
* Porting to Visual C++
|
||||
* Generalization to support different server APIs
|
||||
* Work on ISAPI and NSAPI APIs
|
||||
|
||||
|
||||
Jim Winstead (jimw@php.net)
|
||||
|
||||
* Lots of PHP2 -> PHP3 porting
|
||||
* dBase support
|
||||
* URL parsing functions
|
||||
* Makefile work
|
||||
* Regex rewrite
|
||||
* Win32 work
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
Major Contributors
|
||||
==================
|
||||
|
||||
* Jouni Ahto (jah@cultnet.fi)
|
||||
Postgres, Informix
|
||||
|
||||
* Alex Belits (abelits@phobos.illtel.denver.co.us)
|
||||
fhttpd support
|
||||
|
||||
* Bjørn Borud (borud@guardian.no)
|
||||
soundex code and lots of enthusiasm
|
||||
|
||||
* Christian Cartus (chc@idgruppe.de)
|
||||
Informix Universal Server support
|
||||
|
||||
* John Ellson (ellson@lucent.com)
|
||||
Freetype support
|
||||
|
||||
* Dean Gaudet (dgaudet@arctic.org)
|
||||
Apache module debugging + helpful hints along the way
|
||||
|
||||
* Mitch Golden (mgolden@interport.net)
|
||||
Oracle testing and bug fixes
|
||||
|
||||
* Danny Heijl (Danny.Heijl@cevi.be)
|
||||
Informix SE support
|
||||
|
||||
* Mark Henderson (mark@togglemedia.com)
|
||||
Various odds and ends
|
||||
|
||||
* Jaakko Hyvätti (jaakko@hyvatti.iki.fi)
|
||||
Prototype cop, regular expression code fixes, CGI security issues
|
||||
|
||||
* Amitay Isaacs (amitay@w-o-i.com)
|
||||
LDAP
|
||||
|
||||
* Andreas Karajannis (Andreas.Karajannis@gmd.de)
|
||||
Adabas D, ODBC, Oracle
|
||||
|
||||
* Igor Kovalenko (owl@infomarket.ru)
|
||||
QNX support issues
|
||||
|
||||
* Richard Lynch (lynch@lscorp.com)
|
||||
Documentation
|
||||
|
||||
* Tom May (tom@go2net.com)
|
||||
Sybase-CT work
|
||||
|
||||
* Muhammad A Muquit (MA_Muquit@fccc.ed)
|
||||
Original Sybase module
|
||||
|
||||
* Mark Musone (musone@edgeglobal.com)
|
||||
IMAP
|
||||
|
||||
* Jeroen van der Most (jvdmost@digiface.nl)
|
||||
Solid
|
||||
|
||||
* Chad Robinson (chadr@brttech.com)
|
||||
Documentation, FilePro
|
||||
|
||||
* Lachlan Roche (lr@www.wwi.com.au)
|
||||
MD5
|
||||
|
||||
* Stefan Roehrich (sr@linux.de)
|
||||
zlib
|
||||
|
||||
* Nikolay P. Romanyuk (mag@redcom.ru)
|
||||
Velocis support
|
||||
|
||||
* Brian Schaffner (brian@tool.net)
|
||||
ODBC support, PHP3 API testing
|
||||
|
||||
* Egon Schmid (eschmid@delos.lf.net)
|
||||
Documentation
|
||||
|
||||
* (sopwith@redhat.com)
|
||||
Solid
|
||||
|
||||
* Colin Viebrock (cmv@privateworld.com)
|
||||
Website graphic design and layout, PHP logo
|
||||
|
||||
* Eric Warnke (ericw@albany.edu)
|
||||
LDAP
|
||||
|
||||
* Lars Torben Wilson (torben@netmill.com)
|
||||
Documentation
|
||||
|
||||
* Uwe Steinmann (Uwe.Steinmann@fernuni-hagen.de)
|
||||
Hyperwave, PDF, Acrobat FDF Toolkit
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
Beta Testers
|
||||
------------
|
||||
|
||||
* Niklas Saers (berenmls@saers.com)
|
||||
FreeBSD/x86
|
||||
|
||||
* Chuck Hagenbuch <chuck@osmos.ml.org>
|
||||
Linux/x86 glibc2, MySQL, mod_ssl
|
||||
|
||||
* Sascha Schumann (sas@schell.de)
|
||||
FreeBSD/x86, PostgreSQL, IMAP, gdttf
|
||||
|
||||
* Jim Jagielski (jim@jagunet.com)
|
||||
A/UX, FreeBSD/x86
|
||||
|
||||
* Jouni Ahto (jah@cultnet.fi)
|
||||
Debian Linux 2.0
|
||||
|
||||
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
Andi Gutmans and Zeev Suraski would like to thank Professor Michael Rodeh for
|
||||
his positive input during the initial development of the interpreter.
|
||||
@@ -1,54 +0,0 @@
|
||||
The core of PHP 3.0 is considered to be stable at this time. However, some of
|
||||
the modules that are bundled with it are still undergoing development, or
|
||||
contain known bugs. The purpose of this file is to document the status of
|
||||
each module (extension). Patches to unstable modules will be available through
|
||||
the CVS, and through periodic maintenance releases.
|
||||
|
||||
Stability scale:
|
||||
Rock solid - We believe it's safe to base a production site on it.
|
||||
Stable - It should be safe to base a production site on it.
|
||||
Isn't rated as rock-solid because it contained problems
|
||||
in the not-so-far past, or doesn't have enough users
|
||||
to test it to know it's rock solid.
|
||||
Beta - This module probably contains bugs, sometimes even known
|
||||
bugs. You can give it a try and there's a good chance
|
||||
it'll work fine, but it might not be a good idea to base
|
||||
a production site on it.
|
||||
Alpha - This module is in initial development steps. Don't trust
|
||||
it, play with it at your own risk.
|
||||
Deprecated - This module is only available for downwards compatability,
|
||||
and will not be supported in any way. The code quality
|
||||
is usually around the Beta status.
|
||||
|
||||
The standard disclaimers apply, that is, if a rock-solid module blows up on
|
||||
you and ruins your site, nobody in the PHP development team is responsible.
|
||||
We'll probably try to help, though.
|
||||
|
||||
|
||||
Extension Name Status Comments
|
||||
-----------------------------------------------------------------------------
|
||||
DBM Rock Solid That relies on a working DBM library.
|
||||
The flatfile support is probably not
|
||||
as stable.
|
||||
MySQL Rock Solid
|
||||
mSQL Rock Solid
|
||||
Sybase DB Stable
|
||||
Sybase CT Stable
|
||||
BC Math Rock Solid Arbitary precision math library
|
||||
Postgres SQL Stable Postgres 6.2 and earlier is stable,
|
||||
but problems were reported with 6.3
|
||||
Debugger Beta
|
||||
Unified ODBC Beta
|
||||
Solid Deprecated Replaced by Unified ODBC
|
||||
iODBC Deprecated Replaced by Unified ODBC
|
||||
Adabas Deprecated Replaced by Unified ODBC
|
||||
LDAP Stable Lightweight Directory Access Protocol.
|
||||
dBase
|
||||
FilePro
|
||||
Oracle Beta Not tested thoroughly enough.
|
||||
IMAP Beta Bundled in the dl/ directory
|
||||
SNMP Stable Very solid, but also very limited.
|
||||
Only supports GET and WALK requests.
|
||||
Raima Velocis Beta If use with Unified ODBC, replaced
|
||||
by Unified ODBC
|
||||
Raima Velocis Alpha If use without Unified ODBC
|
||||
@@ -1,57 +1,141 @@
|
||||
Installation Instructions for PHP3
|
||||
----------------------------------
|
||||
Installation Instructions for PHP 4.0
|
||||
-------------------------------------
|
||||
|
||||
For the impatient here is a quick set of steps that will build PHP3
|
||||
as an Apache module for Apache 1.3.0 with MySQL support. A more verbose
|
||||
explanation follows.
|
||||
For the impatient here is a quick set of steps that will build PHP as
|
||||
first a dynamic Apache module (DSO) for Apache 1.3.x with MySQL support
|
||||
and then a static module. A more verbose explanation follows.
|
||||
|
||||
Note! Only install either the static module or the dynamic one. Do not
|
||||
install both.
|
||||
|
||||
If you want both PHP 3 and 4 modules in the same Apache server, check the
|
||||
bottom of this file for instructions.
|
||||
|
||||
|
||||
QUICK INSTALL
|
||||
QUICK INSTALL (DSO)
|
||||
|
||||
gunzip apache_1.3.x.tar.gz
|
||||
tar xvf apache_1.3.x.tar
|
||||
gunzip php-3.0.x.tar.gz
|
||||
tar xvf php-3.0.x.tar
|
||||
cd apache_1.3.x
|
||||
./configure --prefix=/www
|
||||
cd ../php-3.0.x
|
||||
./configure --with-mysql --with-apache=../apache_1.3.x --enable-track-vars
|
||||
make
|
||||
make install
|
||||
cd ../apache_1.3.x
|
||||
./configure --prefix=/www --activate-module=src/modules/php3/libphp3.a
|
||||
(The above line is correct! Yes, we know libphp3.a does not exist at this
|
||||
For this to work your Apache httpd must have mod_so enabled.
|
||||
Check using httpd -l. You should see something like:
|
||||
|
||||
Compiled-in modules:
|
||||
http_core.c
|
||||
mod_so.c
|
||||
|
||||
Chances are you will see a lot more modules than these two. That's ok,
|
||||
as long as mod_so.c shows up you can proceed with the following steps:
|
||||
|
||||
$ gunzip -c php-4.0.x.tar.gz | tar xf -
|
||||
$ cd php-4.0.x
|
||||
$ ./configure --with-mysql --with-apxs
|
||||
$ make
|
||||
$ make install
|
||||
|
||||
If you get an error telling you that the apxs script could not be found,
|
||||
look for it on your system and if you find it, provide the full path to it
|
||||
as: --with-apxs=/path/to/apxs
|
||||
|
||||
The only thing left to do is to edit your httpd.conf file and make sure the
|
||||
PHP 4 mime type is there and uncommented. You need a line that looks like
|
||||
this:
|
||||
|
||||
AddType application/x-httpd-php .php
|
||||
|
||||
Then restart your server (apachectl restart) and you should be able to
|
||||
serve up PHP files now. Make a test file called test.php and put some
|
||||
PHP tags in it. Like <?phpinfo()?>, for example.
|
||||
|
||||
|
||||
QUICK INSTALL (Static)
|
||||
|
||||
$ gunzip -c apache_1.3.x.tar.gz | tar xf -
|
||||
$ cd apache_1.3.x
|
||||
$ ./configure
|
||||
$ cd ..
|
||||
|
||||
$ gunzip -c php-4.0.x.tar.gz | tar xf -
|
||||
$ cd php-4.0.x
|
||||
$ ./configure --with-mysql --with-apache=../apache_1.3.x --enable-track-vars
|
||||
$ make
|
||||
$ make install
|
||||
|
||||
$ cd ../apache_1.3.x
|
||||
$ ./configure --prefix=/www --activate-module=src/modules/php4/libphp4.a
|
||||
(The above line is correct! Yes, we know libphp4.a does not exist at this
|
||||
stage. It isn't supposed to. It will be created.)
|
||||
make
|
||||
(you should now have an httpd binary which you can copy to your Apache bin dir)
|
||||
cd ../php-3.0.x
|
||||
cp php3.ini-dist /usr/local/lib/php3.ini
|
||||
You can edit /usr/local/lib/php3.ini file to set PHP options.
|
||||
cd ../php-4.0.x
|
||||
cp php.ini-dist /usr/local/lib/php.ini
|
||||
You can edit /usr/local/lib/php.ini file to set PHP options.
|
||||
Edit your httpd.conf or srm.conf file and add:
|
||||
AddType application/x-httpd-php3 .php3
|
||||
AddType application/x-httpd-php .php
|
||||
|
||||
|
||||
VERBOSE INSTALL
|
||||
|
||||
Installing PHP3 can be done in four simple steps:
|
||||
Chances are you are reading this because the quick install steps above
|
||||
did not work for you. If this is the case, congratulations, you are
|
||||
among the elite few that actually reads documentation. It really is
|
||||
not a difficult install and once you have done it once you will fly
|
||||
through it.
|
||||
|
||||
Installing PHP can be done in four simple steps:
|
||||
|
||||
1. Unpack your distribution file.
|
||||
|
||||
You will have downloaded a file named something like php3xn.tar.gz.
|
||||
Unzip this file with a command like: gunzip php3xn.tar.gz
|
||||
You will have downloaded a file named something like php-4.0.x.tar.gz.
|
||||
Unzip this file with a command like: gunzip php-4.0.x.tar.gz
|
||||
|
||||
Next you have to untar it with: tar -xvf php3xn.tar
|
||||
Next you have to untar it with: tar -xvf php-4.0.x.tar
|
||||
|
||||
This will create a php-3.0.x directory. cd into this new directory.
|
||||
This will create a php-4.0.x directory. cd into this new directory.
|
||||
|
||||
2. Configure PHP3.
|
||||
2a. Configure PHP (Dynamic Module) - Skip to 2b if you wish to build
|
||||
a static module
|
||||
|
||||
You now have to choose the options you would like. There are quite
|
||||
a few of them. To see a list, type: ./configure --help
|
||||
|
||||
You can also use the supplied 'setup' script, which will ask you
|
||||
a series of questions and automatically run the configure script
|
||||
for you.
|
||||
The only options that you are likely to want to use are the ones in
|
||||
the last section entitled, "--enable and --with options recognized:"
|
||||
|
||||
A popular choice is to build the Apache module version. In order to
|
||||
build PHP as a dynamic module for Apache-1.3.x you have to first have
|
||||
Apache installed. Assuming Apache is already installed, make sure
|
||||
the shared object module is enabled. To check this, type: httpd -l
|
||||
You should see something like:
|
||||
|
||||
Compiled-in modules:
|
||||
http_core.c
|
||||
mod_so.c
|
||||
|
||||
You will most likely have a lot more modules than what is shown here.
|
||||
As long as mod_so.c shows up in the list, PHP should be happy.
|
||||
|
||||
Now, type: ./configure --with-mysql --with-apxs
|
||||
|
||||
If you get an error telling you that the apxs script could not be found,
|
||||
look for it on your system and if you find it, provide the full path to it
|
||||
as: --with-apxs=/path/to/apxs
|
||||
|
||||
You might also want other flags on this configure line. --with-mysql
|
||||
is just an example.
|
||||
|
||||
There are a few things that can go wrong during this configure step.
|
||||
The most common is that you have asked for an option and that the
|
||||
configure script can not find the files required to enable this
|
||||
option in PHP. Chances are you can provide the full path to the
|
||||
base directory under which the related files were installed. For
|
||||
example, if you have installed the GD library in /opt/gd which means
|
||||
that /opt/gd/include has your GD header files and /opt/gd/lib contains
|
||||
your GD library files, you would use --with-gd=/opt/gd
|
||||
|
||||
Skip to step 3 for compilation and installation instructions.
|
||||
|
||||
2b. Configure PHP (Static Module) - Skip if you performed 2a
|
||||
|
||||
You now have to choose the options you would like. There are quite
|
||||
a few of them. To see a list, type: ./configure --help
|
||||
|
||||
The only options that you are likely to want to use are the ones in
|
||||
the last section entitled, "--enable and --with options recognized:"
|
||||
@@ -78,10 +162,18 @@ Installing PHP3 can be done in four simple steps:
|
||||
Apache Configure script at least once before compiling PHP. It
|
||||
doesn't matter how you have Apache configured at this point.
|
||||
|
||||
Skip to step 3b at this point.
|
||||
|
||||
3. Compile and install the files. Simply type: make install
|
||||
|
||||
3a. Dynamic Module Installation
|
||||
|
||||
Nothing else is needed here. Proceed to step 4a.
|
||||
|
||||
3b. Static Module Installation
|
||||
|
||||
For the Apache module version this will copy the appropriate files
|
||||
to the src/modules/php3 directory in your Apache distribution if
|
||||
to the src/modules/php4 directory in your Apache distribution if
|
||||
you are using Apache 1.3.x. If you are still running Apache 1.2.x
|
||||
these files will be copied directly to the main src directory.
|
||||
|
||||
@@ -90,7 +182,7 @@ Installing PHP3 can be done in four simple steps:
|
||||
|
||||
cd apache_1.3.x
|
||||
./configure --prefix=/<path>/apache \
|
||||
--activate-module=src/modules/php3/libphp3.a
|
||||
--activate-module=src/modules/php4/libphp4.a
|
||||
make
|
||||
make install
|
||||
|
||||
@@ -103,29 +195,29 @@ Installing PHP3 can be done in four simple steps:
|
||||
|
||||
For Apache 1.3.x add:
|
||||
|
||||
AddModule modules/php3/libphp3.a
|
||||
AddModule modules/php4/libphp4.a
|
||||
|
||||
For Apache 1.3.x don't do anything else. Just add this line and then
|
||||
run "./Configure" followed by "make".
|
||||
|
||||
For Apache 1.2.x add:
|
||||
|
||||
Module php3_module mod_php3.o
|
||||
Module php4_module mod_php4.o
|
||||
|
||||
For Apache 1.2.x you will also have to look in the libphp3.module file,
|
||||
For Apache 1.2.x you will also have to look in the libphp4.module file,
|
||||
which was copied to the src directory. The EXTRA_LIBS line in the Apache
|
||||
Configuration file needs to be set to use the same libs as specified on
|
||||
the LIBS line in libphp3.module. You also need to make sure to add
|
||||
the LIBS line in libphp4.module. You also need to make sure to add
|
||||
"-L." to the beginning of the EXTRA_LIBS line.
|
||||
|
||||
So, as an example, your EXTRA_LIBS line might look like:
|
||||
|
||||
EXTRA_LIBS=-L. -lphp3 -lgdbm -ldb -L/usr/local/mysql/lib -lmysqlclient
|
||||
EXTRA_LIBS=-L. -lphp4 -lgdbm -ldb -L/usr/local/mysql/lib -lmysqlclient
|
||||
|
||||
NOTE: You should not enclose the EXTRA_LIBS line in double-quotes, as it
|
||||
is in the libphp3.module file.
|
||||
is in the libphp4.module file.
|
||||
|
||||
Also, look at the RULE_WANTHSREGEX setting in the libphp3.module file
|
||||
Also, look at the RULE_WANTHSREGEX setting in the libphp4.module file
|
||||
and set the WANTHSREGEX directive accordingly in your Configuration file.
|
||||
This last step applies to versions of Apache prior to 1.3b3.
|
||||
|
||||
@@ -137,23 +229,94 @@ Installing PHP3 can be done in four simple steps:
|
||||
somewhere. Re-edit Configuration and try again. If it goes well,
|
||||
type: make
|
||||
|
||||
4. Setting up the server.
|
||||
Assuming it compiles without errors, proceed to step 4b.
|
||||
|
||||
4a. Setting up the server. (Dynamic Module)
|
||||
|
||||
The make install command in step 3 should have done most of your
|
||||
work for you. It actually edits your httpd.conf file and tries to
|
||||
enable the dynamic PHP module. To verify this, look for a line that
|
||||
looks like this:
|
||||
|
||||
LoadModule php4_module libexec/libphp4.so
|
||||
|
||||
The actual path before the libphp4.so part might differ slightly. This
|
||||
is likely fine. If you are paranoid you can examine the output from the
|
||||
make install step to see where the libphp4.so file was actually put and
|
||||
place the full path to this file on this LoadModule line.
|
||||
|
||||
If somewhere in your httpd.conf file you have a ClearModuleList line
|
||||
then you also need this line:
|
||||
|
||||
AddModule mod_php4.c
|
||||
|
||||
And finally you need to tell Apache which file extension should trigger
|
||||
PHP. You do this by creating a special mime type and associating it
|
||||
with an extension. We suggest using:
|
||||
|
||||
AddType application/x-httpd-php .php
|
||||
|
||||
You are however free to use any extension you wish, including .html.
|
||||
|
||||
Note! If a line has a # at the beginning, then it is commented out
|
||||
and you need to remove the # for that line to take effect.
|
||||
|
||||
Once you have made these changes you should be ready to restart your
|
||||
server and try it out. Type: apachectl restart
|
||||
|
||||
The create a test file named test.php in your web tree somewhere and
|
||||
put some test PHP tags in it. <?phpinfo()?> is a good first test.
|
||||
This tag tells PHP to do a braindump and tells you all sorts of things
|
||||
about itself.
|
||||
|
||||
4b. Setting up the server. (Static Module)
|
||||
|
||||
You should now have a new httpd binary. Shut down your existing server,
|
||||
if you have one, and copy this new binary overtop of it. Perhaps make
|
||||
a backup of your previous one first. Then edit your conf/srm.conf file
|
||||
a backup of your previous one first. Then edit your conf/httpd.conf file
|
||||
and add the line:
|
||||
|
||||
AddType application/x-httpd-php3 .php3
|
||||
AddType application/x-httpd-php .php
|
||||
|
||||
There is also an interesting feature which can be quite instructive and
|
||||
helpful while debugging. That is the option of having colour syntax
|
||||
highlighting. To enable this, add the following line:
|
||||
|
||||
AddType application/x-httpd-php3-source .phps
|
||||
AddType application/x-httpd-php-source .phps
|
||||
|
||||
Any file ending in .phps will now be displayed with full colour syntax
|
||||
highlighting instead of being executed.
|
||||
|
||||
When you are finished making changes to your srm.conf file, you can
|
||||
start up your server.
|
||||
When you are finished making changes to your httpd.conf file, you can
|
||||
start up your server. Note that on some older server setups, the
|
||||
AddType lines are in the conf/srm.conf file instead of conf/httpd.conf.
|
||||
|
||||
Note! If a line has a # at the beginning, then it is commented out
|
||||
and you need to remove the # for that line to take effect.
|
||||
|
||||
|
||||
USING PHP3 AND PHP4 AS CONCURRENT APACHE MODULES
|
||||
|
||||
Recent operating systems provide the ability to perform versioning and
|
||||
scoping. This features make it possible to let PHP3 and PHP4 run as
|
||||
concurrent modules in one Apache server.
|
||||
|
||||
This feature is known to work on the following platforms:
|
||||
|
||||
- Linux with recent binutils (binutils 2.9.1.0.25 tested)
|
||||
- Solaris 2.5 or better
|
||||
- FreeBSD (3.2, 4.0 tested)
|
||||
|
||||
To enable it, configure PHP3 and PHP4 to use APXS (--with-apxs) and the
|
||||
necessary link extensions (--enable-versioning). Otherwise, all standard
|
||||
installations instructions apply. For example:
|
||||
|
||||
$ ./configure \
|
||||
--with-apxs=/apache/bin/apxs \
|
||||
--enable-versioning \
|
||||
--with-mysql \
|
||||
--enable-track-vars
|
||||
|
||||
If this also works on your platform or if you know a way to do it, please
|
||||
report it to our bug database at http://bugs.php.net
|
||||
|
||||
@@ -1,64 +1,70 @@
|
||||
--------------------------------------------------------------------
|
||||
Copyright (c) 1998 The PHP Development Team. All rights reserved.
|
||||
--------------------------------------------------------------------
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
--------------------------------------------------------------------
|
||||
The PHP License, version 2.01
|
||||
Copyright (c) 1999, 2000 The PHP Group. All rights reserved.
|
||||
--------------------------------------------------------------------
|
||||
|
||||
1. Commercial redistribution of larger works derived from, or
|
||||
works which bundle PHP, requires written permission from the
|
||||
PHP Development Team. You may charge a fee for the physical
|
||||
act of transferring a copy, and must make it clear that the
|
||||
fee being charged is for the distribution, and not for the
|
||||
software itself. You may, at your option, offer warranty
|
||||
protection in exchange for a fee.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, is permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
2. Redistributions of source code must retain the above copyright
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
3. Redistributions in binary form must reproduce the above
|
||||
2. Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials provided
|
||||
with the distribution.
|
||||
|
||||
4. All advertising materials mentioning features or use of this
|
||||
software must display the following acknowledgment:
|
||||
"This product includes software written by the PHP Development
|
||||
Team"
|
||||
3. The name "PHP" must not be used to endorse or promote products
|
||||
derived from this software without prior permission from the
|
||||
PHP Group. This does not apply to add-on libraries or tools
|
||||
that work in conjunction with PHP. In such a case the PHP
|
||||
name may be used to indicate that the product supports PHP.
|
||||
|
||||
5. The name "PHP" must not be used to endorse or promote products
|
||||
derived from this software without prior written permission
|
||||
from the PHP Development Team. This does not apply to add-on
|
||||
libraries or tools that work in conjunction with PHP. In such
|
||||
a case the PHP name may be used to indicate that the product
|
||||
supports PHP.
|
||||
|
||||
6. Redistributions of any form whatsoever must retain the following
|
||||
4. The PHP Group may publish revised and/or new versions of the
|
||||
license from time to time. Each version will be given a
|
||||
distinguishing version number.
|
||||
Once covered code has been published under a particular version
|
||||
of the license, you may always continue to use it under the
|
||||
terms of that version. You may also choose to use such covered
|
||||
code under the terms of any subsequent version of the license
|
||||
published by the PHP Group. No one other than the PHP Group has
|
||||
the right to modify the terms applicable to covered code created
|
||||
under this License.
|
||||
|
||||
5. Redistributions of any form whatsoever must retain the following
|
||||
acknowledgment:
|
||||
"This product includes software written by the PHP Development
|
||||
Team".
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND
|
||||
ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP
|
||||
DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
"This product includes PHP, freely available from
|
||||
http://www.php.net/".
|
||||
|
||||
--------------------------------------------------------------------
|
||||
6. Permission to freely distribute and use Zend as an integrated
|
||||
part of PHP is granted, under the conditions of version 0.92
|
||||
of the Zend License.
|
||||
The license is bundled with the Zend engine, and is available
|
||||
at http://www.zend.com/license/0_92.txt, or by contacting
|
||||
license@zend.com.
|
||||
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals on behalf of the PHP Development Team.
|
||||
|
||||
The PHP Development Team can be contacted via Email at core@php.net.
|
||||
|
||||
For more information on the PHP Development Team and the PHP
|
||||
project, please see <http://www.php.net>.
|
||||
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND
|
||||
ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP
|
||||
DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
--------------------------------------------------------------------
|
||||
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals on behalf of the PHP Group.
|
||||
|
||||
The PHP Group can be contacted via Email at group@php.net.
|
||||
|
||||
For more information on the PHP Group and the PHP project,
|
||||
please see <http://www.php.net>.
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
List of PHP maintainers
|
||||
=======================
|
||||
|
||||
Status legend
|
||||
-------------
|
||||
Supported: Someone is actually paid to look after this.
|
||||
Maintained: Someone actually looks after it.
|
||||
Odd Fixes: It has a maintainer but they don't have time to do
|
||||
much other than throw the odd patch in. See below..
|
||||
Orphan: No current maintainer [but maybe you could take the
|
||||
role as you write your new code].
|
||||
Obsolete: Old code. Something tagged obsolete generally means
|
||||
it has been replaced by a better system and you
|
||||
should be using that.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: apache
|
||||
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: cybercash
|
||||
PRIMARY MAINTAINER: Evan Klinger <evan715@sirius.com>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: dba
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: fdf
|
||||
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: gd
|
||||
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: hyperwave
|
||||
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: informix
|
||||
PRIMARY MAINTAINER: Danny Heijl <Danny.Heijl@cevi.be>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: java
|
||||
PRIMARY MAINTAINER: Sam Ruby <rubys@us.ibm.com>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: ldap
|
||||
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
|
||||
STATUS: Odd Fixes
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: mcrypt
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: mhash
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: mssql
|
||||
PRIMARY MAINTAINER: Frank M. Kromann <fmk@swwwing.com>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: oci8
|
||||
PRIMARY MAINTAINER: Thies C. Arntzen <thies@digicol.de>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: oracle
|
||||
PRIMARY MAINTAINER: Thies C. Arntzen <thies@digicol.de>
|
||||
STATUS: Maintained
|
||||
COMMENT: Using the new OCI8 driver is encouraged where possible.
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: pcre
|
||||
PRIMARY MAINTAINER: Andrei Zmievski <andrei@ispi.net>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: pdf
|
||||
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: session
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: snmp
|
||||
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
|
||||
STATUS: Odd Fixes
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: wddx
|
||||
PRIMARY MAINTAINER: Andrei Zmievski <andrei@ispi.net>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: xml
|
||||
PRIMARY MAINTAINER: Thies C. Arntzen <thies@digicol.de>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
EXTENSION: zlib
|
||||
PRIMARY MAINTAINER: Stefan Roehrich <sr@linux.de>
|
||||
STATUS: Maintained
|
||||
--------------------------------------------------------------------------------
|
||||
@@ -0,0 +1,22 @@
|
||||
Module Status
|
||||
------ ------
|
||||
MySQL Working
|
||||
COM Working
|
||||
WDDX Working
|
||||
PCRE Working
|
||||
DBA Working
|
||||
mcrypt Working
|
||||
mhash Working
|
||||
dbase Working
|
||||
aspell Working
|
||||
imap Working
|
||||
ldap Working
|
||||
oci8 Working
|
||||
oracle Working
|
||||
iptc Working
|
||||
informix Working
|
||||
zlib Working
|
||||
sysvshm Working
|
||||
odbc Working (except for persistent connections)
|
||||
MS SQL Working (tested on phpts and isapi versions)
|
||||
snmp Working
|
||||
+41
-174
@@ -1,190 +1,57 @@
|
||||
# +----------------------------------------------------------------------+
|
||||
# | PHP HTML Embedded Scripting Language Version 4.0 |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Copyright (c) 1997-1999 PHP Development Team (See Credits file) |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | This program is free software; you can redistribute it and/or modify |
|
||||
# | it under the terms of one of the following licenses: |
|
||||
# | |
|
||||
# | A) the GNU General Public License as published by the Free Software |
|
||||
# | Foundation; either version 2 of the License, or (at your option) |
|
||||
# | any later version. |
|
||||
# | |
|
||||
# | B) the PHP License as published by the PHP Development Team and |
|
||||
# | included in the distribution in the file: LICENSE |
|
||||
# | |
|
||||
# | This program is distributed in the hope that it will be useful, |
|
||||
# | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
||||
# | GNU General Public License for more details. |
|
||||
# | |
|
||||
# | You should have received a copy of both licenses referred to here. |
|
||||
# | If you did not, or have any questions about PHP licensing, please |
|
||||
# | contact core@php.net. |
|
||||
# +----------------------------------------------------------------------+
|
||||
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
DEPTH = .
|
||||
topsrcdir = @topsrcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
bindir = @bindir@
|
||||
ZEND_DIR = $(srcdir)/Zend
|
||||
SUBDIRS = Zend ext sapi $(TSRM_DIR) $(REGEX_DIR) . $(PEAR_DIR)
|
||||
|
||||
ZEND_DIR = $(srcdir)/libzend
|
||||
SUBDIRS=$(srcdir)/libzend ext @TSRM_DIR@
|
||||
LTLIBRARY_NAME = libphp4.la
|
||||
|
||||
CC = @CC@
|
||||
AR = ar rc
|
||||
BINNAME = @BINNAME@
|
||||
INSTALL_IT = @INSTALL_IT@
|
||||
EXTRA_LIBS = @EXTRA_LIBS@
|
||||
EXT_LIBS = @EXT_LIBS@
|
||||
INCLUDES = @INCLUDES@
|
||||
INCLUDE = -I$(srcdir) -I. -I$(ZEND_DIR) -I$(srcdir)/TSRM $(INCLUDES)
|
||||
PROF_CFLAGS =
|
||||
CFLAGS_SHLIB = @CFLAGS_SHLIB@
|
||||
LDFLAGS_SHLIB = @LDFLAGS_SHLIB@
|
||||
LDFLAGS_SHLIB_EXPORT = @LDFLAGS_SHLIB_EXPORT@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CFLAGS = @CFLAGS@ $(CFLAGS_SHLIB) $(CPPFLAGS) $(INCLUDE) @DEBUG_CFLAGS@ @STRONGHOLD@ $(PROF_CFLAGS)
|
||||
LDFLAGS = @LDFLAGS@ $(LDFLAGS_SHLIB) $(LDFLAGS_SHLIB_EXPORT) -L$(ZEND_DIR)
|
||||
REGCFLAGS = $(CFLAGS)
|
||||
RANLIB = @RANLIB@
|
||||
YACC = @YACC@
|
||||
MAINT = @MAINT@
|
||||
APXS = @APXS@
|
||||
APXS_LDFLAGS = $(EXTRA_LIBS) $(LIBS)
|
||||
WARNING_LEVEL = @WARNING_LEVEL@
|
||||
LTLIBRARY_SOURCES = \
|
||||
main.c internal_functions.c snprintf.c php_sprintf.c \
|
||||
configuration-parser.c configuration-scanner.c \
|
||||
safe_mode.c fopen-wrappers.c php_realpath.c alloca.c \
|
||||
php_ini.c SAPI.c rfc1867.c dlist.c php_content_types.c strlcpy.c \
|
||||
strlcat.c mergesort.c reentrancy.c php_variables.c php_ticks.c
|
||||
|
||||
SOURCE = main.c internal_functions.c snprintf.c php3_sprintf.c \
|
||||
configuration-parser.c configuration-scanner.c request_info.c \
|
||||
safe_mode.c fopen-wrappers.c php3_realpath.c alloca.c output.c \
|
||||
php_ini.c SAPI.c cgi_main.c
|
||||
OBJS = main.o internal_functions.o snprintf.o php3_sprintf.o \
|
||||
configuration-parser.o configuration-scanner.o request_info.o \
|
||||
safe_mode.o fopen-wrappers.o php3_realpath.o alloca.o output.o \
|
||||
php_ini.o SAPI.o cgi_main.o
|
||||
LTLIBRARY_DEPENDENCIES = \
|
||||
Zend/libZend.la \
|
||||
sapi/$(PHP_SAPI)/libsapi.la \
|
||||
$(REGEX_LIB) \
|
||||
$(EXT_LTLIBS) \
|
||||
$(TSRM_LIB)
|
||||
|
||||
PHPLIBS = -L@top_srcdir@/libzend -lzend -Lext -lphpext
|
||||
LIBS = $(PHPLIBS) $(EXTRA_LIBS) @LIBS@
|
||||
LTLIBRARY_LDFLAGS = -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS)
|
||||
LTLIBRARY_LIBADD = $(LTLIBRARY_DEPENDENCIES) $(EXTRA_LIBS)
|
||||
|
||||
all: $(BINNAME)
|
||||
PROGRAM_NAME = $(PHP_PROGRAM)
|
||||
PROGRAM_SOURCES = stub.c
|
||||
PROGRAM_LDADD = libphp4.la
|
||||
PROGRAM_LDFLAGS = -export-dynamic
|
||||
PROGRAM_DEPENDENCIES = $(PROGRAM_LDADD)
|
||||
|
||||
all-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-depend-recursive:
|
||||
@set fnord $(MAKEFLAGS); amf=$$2; \
|
||||
for subdir in $(SUBDIRS); do \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
(cd $$subdir && $(MAKE) $$target) || fail=yes; \
|
||||
done && test -z "$$fail"
|
||||
targets = $(LTLIBRARY_NAME) $(PROGRAM_NAME)
|
||||
|
||||
# CGI binary or fhttpd module
|
||||
php: all-recursive $(OBJS) @REGEX_LIB@ @FHTTPD_LIB@ @TSRM_LIB@
|
||||
$(CC) $(CFLAGS) -o $(BINNAME) $(LDFLAGS) $(OBJS) $(LIBS)
|
||||
install_targets = install-local install-modules
|
||||
|
||||
# Apache modules
|
||||
libphp3.a libmodphp3.a: all-recursive $(OBJS)
|
||||
$(AR) $@.tmp $(OBJS)
|
||||
$(srcdir)/scripts/armerge $@ $@.tmp ext/libphpext.a $(srcdir)/libzend/libzend.a @TSRM_LIB@
|
||||
@rm -f $@.tmp
|
||||
$(RANLIB) $(BINNAME)
|
||||
include $(topsrcdir)/build/rules.mk
|
||||
include $(topsrcdir)/build/library.mk
|
||||
include $(topsrcdir)/build/program.mk
|
||||
|
||||
# Apache modules
|
||||
libmodphp3-so.a: all-recursive $(OBJS)
|
||||
$(AR) $@.tmp $(OBJS)
|
||||
$(srcdir)/scripts/armerge $@ $@.tmp ext/libphpext.a libzend/libzend.a @TSRM_LIB@
|
||||
@rm -f $@.tmp
|
||||
$(RANLIB) libmodphp3-so.a
|
||||
|
||||
# Apache 1.3 shared module
|
||||
libphp3.so: $(srcdir)/mod_php3.c libmodphp3-so.a
|
||||
$(APXS) -c -o libphp3.so $(APXS_LDFLAGS) mod_php3.c libmodphp3-so.a
|
||||
|
||||
regex/libregex.a:
|
||||
(cd regex; $(MAKE) lib)
|
||||
|
||||
configuration-parser.h configuration-parser.c: $(srcdir)/configuration-parser.y
|
||||
bison -p cfg -v -d $(srcdir)/configuration-parser.y -o configuration-parser.c
|
||||
|
||||
configuration-scanner.o: configuration-scanner.c
|
||||
$(CC) $(CFLAGS) -w$(WARNING_LEVEL) -c configuration-scanner.c
|
||||
|
||||
configuration-scanner.c: $(srcdir)/configuration-scanner.l
|
||||
flex -Pcfg -oconfiguration-scanner.c -i $(srcdir)/configuration-scanner.l
|
||||
|
||||
clean: clean-recursive
|
||||
-rm -f libphp3.a libmodphp3.a php *.o
|
||||
-rm -f test/php.desc test/php.in test/php.out test/php.test
|
||||
-rm -f test/a.tmp test/b.tmp test/test.dbm*
|
||||
|
||||
distclean: clean distclean-recursive
|
||||
-rm -f *-parser.[ch] *-scanner.c *.output
|
||||
-rm -f config.status config.cache config.log
|
||||
-rm -f Makefile Makefile.depend php_config.h build-defs.h
|
||||
-rm -f libphp3.module stamp-h
|
||||
-rm -f regex/*.o regex/*.a regex/*.ih
|
||||
-rm -f doc/checkdoc doc/funcparse doc/version.ent
|
||||
-rm -f do-conf test/test.log
|
||||
-rm -f doc/Makefile regex/Makefile
|
||||
|
||||
maintainer-clean-depend: maintainer-clean-depend-recursive
|
||||
|
||||
bench: $(BINNAME)
|
||||
./$(BINNAME) -c. tests/bench.phtml
|
||||
|
||||
# can't use a single rule for this because 'test' is a directory
|
||||
test: regression
|
||||
regression check: $(BINNAME)
|
||||
cd test && ./testall
|
||||
|
||||
config.status: configure
|
||||
./config.status --recheck
|
||||
|
||||
build-defs.h php_config.h: stamp-h
|
||||
stamp-h: php_config.h.in config.status
|
||||
CONFIG_FILES='build-defs.h stamp-h' ./config.status
|
||||
|
||||
Makefile: Makefile.in config.status
|
||||
CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
|
||||
|
||||
#
|
||||
# You must use '--enable-maintainer-mode' with configure to enable
|
||||
# these rules, which requires autoconf be installed.
|
||||
#
|
||||
configure: @MAINT@ configure.in aclocal.m4
|
||||
cd $(srcdir) && autoconf
|
||||
|
||||
php_config.h.in: @MAINT@ stamp-h.in
|
||||
stamp-h.in: configure.in aclocal.m4 acconfig.h
|
||||
cd ${srcdir} && autoheader && touch ${srcdir}/stamp-h.in
|
||||
|
||||
install: $(BINNAME)
|
||||
install-local:
|
||||
@$(LIBTOOL) --silent --mode=install cp libphp4.la $(phptempdir)/libphp4.la >/dev/null 2>&1
|
||||
-@$(mkinstalldirs) $(bindir)
|
||||
$(INSTALL_IT)
|
||||
|
||||
indent: clean
|
||||
indent -v -kr -cli4 -ts4 \
|
||||
-T pval -T HashTable -T Bucket -T Token -T TokenCache -T TokenCacheManager \
|
||||
-T switch_expr -T internal_function -T control_structure_data \
|
||||
-T MemoryHashTable -T MemoryBucket \
|
||||
-T pvalue_value -T Stack *.c *.h
|
||||
rm -f *~
|
||||
configuration-parser.h configuration-parser.c: configuration-parser.y
|
||||
$(YACC) -p cfg -v -d $< -o configuration-parser.c
|
||||
|
||||
.c.o:
|
||||
@rm -f $@
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
@bn=`echo $@ | sed -e 's#functions/##'`; test -f $@ || \
|
||||
(test "$@" != "$$bn" && test -f "$$bn" && mv $$bn $@)
|
||||
configuration-scanner.c: configuration-scanner.l
|
||||
$(LEX) -Pcfg -o$@ -i $<
|
||||
|
||||
parser-scanner: configuration-parser.c configuration-scanner.c
|
||||
internal_functions.c: internal_functions.c.in config.status
|
||||
CONFIG_FILES= CONFIG_HEADERS= ./config.status
|
||||
|
||||
depend: parser-scanner
|
||||
$(CC) $(CFLAGS) -MM $(SOURCE) | perl -pe 's|regex/regex.h||;' > Makefile.depend
|
||||
$(CC) $(CFLAGS) -MM $(FUNCTIONS_SOURCE) | perl -pe 's|^(.+\.o)|functions/$$1|; s|regex/regex.h||;' >> Makefile.depend
|
||||
|
||||
# Local Variables:
|
||||
# tab-width: 4
|
||||
# End:
|
||||
.NOEXPORT:
|
||||
@@ -0,0 +1,544 @@
|
||||
PHP 4.0 NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
|
||||
27 March 2000, Version 4.0 Release Candidate 1
|
||||
- Fixed a data corruption bug in mysql_result(), if used in table.fieldname
|
||||
mode (Zeev)
|
||||
- Fixed a crash problem in func_num_args(), func_get_arg() and func_get_args()
|
||||
when used as function arguments (Andi)
|
||||
- Added get_class_methods(string classname) function. (Andrei)
|
||||
- Don't default to iso-8859-1 since this confuses some browsers (Rasmus)
|
||||
- stristr() no longer modifies it's arguments. (Thies)
|
||||
- Make it possible to specify both a port and a socket in
|
||||
mysql_[p]connect (Rasmus)
|
||||
- Added --disable-pic for disabling generating PIC for shared objects
|
||||
on platforms which support it (i.e. Linux) (Sascha)
|
||||
- serialize()/unserialize() now call __sleep() and __wakeup() when
|
||||
working on objects. (Thies)
|
||||
- renamed to_string() method to __string_value() for consistency.
|
||||
(Thies, Zend library)
|
||||
- Fixed a bug in the third argument to define()
|
||||
- Added is_numeric() that returns true if the argument is a number
|
||||
or a numeric string. (Andrei)
|
||||
- domxml now supports libxml 2.0 Beta and drops support for older versions,
|
||||
due to massive changes in libxml
|
||||
- fixed possible crash in unserialize() if serialized data was
|
||||
corrupted. (Thies)
|
||||
- Changed $HTTP_STATE_VARS to $HTTP_SESSION_VARS. Use only the latter
|
||||
version now! (Andrei)
|
||||
- Add GD-JPEG Support (Rasmus)
|
||||
- Prevent from loading dynamic PHP modules which were compiled with different
|
||||
debug and thread safety modes than PHP, which resulted in a crash (Andi)
|
||||
- connection_aborted() and friends work again. (Thies)
|
||||
- Added include_once() and require_once() functionality (Andi, Zend library)
|
||||
- Removed support for pdflib < 3.0 (Uwe)
|
||||
- Added auto-registration of everything in $HTTP_SESSION_VARS[] if
|
||||
register_globals is turned off. (Andrei)
|
||||
- Cleaned up extension namespace (Stig)
|
||||
- OCINLogon() sessions are now closed again. (Thies)
|
||||
- Added ip2long() and long2ip(),
|
||||
courtesy of Faisal Nasim <faisal@nasim.org> (Andrei)
|
||||
- Added ftruncate() and fstat(),
|
||||
courtesy of Faisal Nasim <faisal@nasim.org> (Andrei)
|
||||
- Added parse_ini_file(). Currently implemented in non thread safe version
|
||||
of PHP, and currently lacks section support (Zeev)
|
||||
- "none" is now equivalent with "" in Apache config directives (Stig)
|
||||
- OCINLogon no longer crashes. (Thies)
|
||||
- Fix comparisons of (string) "nan" with (string) "nan". (Thies, Zend library)
|
||||
- Switched back to the old $HTTP_*_VARS[] behavior - $HTTP_GET_VARS["foo"]
|
||||
and $foo are no longer references to each other, but separate variables
|
||||
like they were prior to PHP 4.0 Beta 4 (Zeev)
|
||||
- Fixed Sybase-DB compilation (Zeev)
|
||||
- Fixed a (fairly common) situation where error_reporting values would not be
|
||||
properly restored after a call to error_reporting(), in between requests (Zeev)
|
||||
- The various $HTTP_*_VARS[] are now protected, and cannot be manipulated by
|
||||
user input (Zeev)
|
||||
- Added ini_set() as an alias to ini_alter() (Zeev)
|
||||
- The string None is now recognized as a keyword by the php.ini processor, and
|
||||
can be used to denote an empty string (Zeev)
|
||||
- Added get_class_vars(string class_name) and get_object_vars(object obj)
|
||||
functions. (Andrei, Zend library)
|
||||
- Add pdf_set_parameter(), pdf_skew(), pdf_show_boxed() (Uwe)
|
||||
- Fixed comparison of (string) "inf" with (string) "inf", which was erroneously
|
||||
returning false (Zeev)
|
||||
- Implemented default_charset and default_mimetype config directives (Stig)
|
||||
- Ported T1lib support from PHP3. (Jouni)
|
||||
- Fixed -DEAPI inheritance from APXS. (Sascha)
|
||||
- Fixed possible crash in module-shutdown. (Thies)
|
||||
- Fixed safe_mode_protected_env_vars INI directive (Zeev)
|
||||
- Fixed getrusage() (Sascha)
|
||||
- Fixed OCI8 crash when returning cursors from stored-procedures. (Thies)
|
||||
|
||||
21 February 2000 Version 4.0 Beta 4 patch level 1
|
||||
- Fixed crash when magic_quotes were switched off. (Thies)
|
||||
- Support for pdflib 2.30 (Uwe)
|
||||
|
||||
20 February 2000, Version 4.0 Beta 4
|
||||
- Introduced $HTTP_POST_FILES[], that contains information about files uploaded
|
||||
through HTTP upload (Zeev)
|
||||
- Made PHP work under Microsoft Personal Web Server, under both Windows NT
|
||||
workstation and Windows 95 (Zeev)
|
||||
- Made multipart/form-data content obey to the variables_order directive (Zeev)
|
||||
- Updated the browscap module to work with PHP 4.0 (Zeev)
|
||||
- Recover gracefully in ISAPI after the client prematurely presses STOP (Andi)
|
||||
- Fix bug in unset() on array offsets which are referenced more than once
|
||||
(Andi, Zend library)
|
||||
- Improved ISAPI module - it should no longer be necessary to set PHP as
|
||||
an ISAPI filter, only as an ISAPI extension, unless you wish to perform
|
||||
authentication using PHP. This didn't yet get enough testing, but it
|
||||
should work (Zeev)
|
||||
- Fixed RFC1867 file upload under Windows (Zeev)
|
||||
- Initital support for pdflib 2.20 (Uwe)
|
||||
- Added PostgreSQL support for DB (Rui Hirokawa <louis@cityfujisawa.ne.jp>)
|
||||
- Re-introduced "none" for disabling auto_prepend/append_file (Stig)
|
||||
- Added DB/storage (Stig, PEAR)
|
||||
- Introduced DB warnings (Stig, PEAR)
|
||||
- Fix overrun in strip_tags (Stas)
|
||||
- Fixed crash in strip_tags() and related functions. (Thies)
|
||||
- Workaround for bogus POST-Data from IE/Mac. (Thies)
|
||||
Patch by Alain Malek <alain@virtua.ch>
|
||||
- Finished the server abstraction layer; All of the PHP code is now shared
|
||||
across different servers (Apache, CGI, IIS, etc.), except for thin
|
||||
interface modules (Zeev)
|
||||
- Added NULL-support in gettype(). (Thies)
|
||||
- base64_decode() will decode POST data correct. (Thies)
|
||||
Patch submitted by: Turadg Aleahmad <turadg@wise.berkeley.edu>
|
||||
- Much more work on domxml. Build xml tree, create xml doc works (Uwe)
|
||||
- Made foreach() work on objects. (Thies, Zend library)
|
||||
- Added domxml extension based on libxml, still little functionality (Uwe)
|
||||
- Fixed memory corruption in fgetss(), strip_tags() and gzgetss() (Zeev)
|
||||
- Updated calendar dynamic library to work with PHP 4. (Evan)
|
||||
- Added strncmp() function, courtesy of Walter. (Andrei)
|
||||
- Made the output of var_dump() more informative. (Thies)
|
||||
- Fixed some OCIBindByName() problems. (Thies)
|
||||
- Protect the ISAPI module against exceptions. Stack overflows in scripts are
|
||||
now nicely detected and handled (Zeev)
|
||||
- Fixed possible buffer-overflow in base64_decode. (Thies)
|
||||
- Fixed possible buffer-overflow in setcookie(). (Thies)
|
||||
- Fixed signal() bug that could cause the Apache master process to
|
||||
die. (Thies)
|
||||
- Added session_set_cookie_params() function. (Andrei)
|
||||
- If header information is sent after output has already been sent, the warning
|
||||
message will now state the filename and line number at which the first output
|
||||
was made (Zeev)
|
||||
- Added the XML Expat library to the standard PHP source distribution thanks
|
||||
to its author James Clark (Andi & Zeev)
|
||||
- Added XML support to the default Win32 build (Andi & Zeev)
|
||||
- Added socket_get_status() function. Renamed:
|
||||
set_socket_timeout() -> socket_set_timeout()
|
||||
set_socket_blocking() -> socket_set_blocking(). (Andrei)
|
||||
- Added realpath() function. (Andrei)
|
||||
- mktime interprets years in the range 0-70 now as 2000-2070. You can
|
||||
continue to specify the complete year (i.e. 1920) (Sascha)
|
||||
- Added the ability to control the environment variables the user is allowed
|
||||
to change in Safe Mode, using INI directives (Zeev)
|
||||
- Fixed a crash bug in strtr() working on large input strings (Zeev)
|
||||
- Ora_GetColumn()/Ora_FetchInto() now return NULL for NULL-Columns. (Thies)
|
||||
- OCI8 now supports binding of NULL-values. Module cleanups. (Thies)
|
||||
- Added ability to set timeout on socket read operations through
|
||||
set_socket_timeout() function. (Andrei)
|
||||
- Added implicit_flush INI directive (Zeev)
|
||||
- Added implicit_flush() to control whether flush() should be called
|
||||
implicitly after any output (Zeev)
|
||||
- Fixed a crash in pfsockopen() (Zeev)
|
||||
- Fixed a possible crash in phpinfo() (Zeev)
|
||||
- Added register_argc_argv INI directive, to allow to selectively disable
|
||||
the declaration of the $argv and $argc variables for increased
|
||||
performance (Zeev)
|
||||
- Added $HTTP_ENV_VARS[] and $HTTP_SERVER_VARS[] support, which similarly
|
||||
to $HTTP_GET_VARS[], contain environment and server variables. Setting
|
||||
register_globals to Off will now also prevent registration of the
|
||||
environment and server variables into the global scope (Zeev)
|
||||
- Renamed gpc_globals INI directive to register_globals (Zeev)
|
||||
- Introduced variables_order that deprecates gpc_order, and allows control
|
||||
over the server and environment variables, in addition to GET/POST/Cookies
|
||||
(Zeev)
|
||||
- new function cpdf_set_document_limits() (Uwe)
|
||||
- Applied safe-mode patch to popen(). (Patch by Kristian Köhntopp)
|
||||
- str_repeat() now returns correct length. (Thies)
|
||||
- Don't assume libz and libpng are installed for the GD checks (Rasmus)
|
||||
- Implemented support for <boolean> and <null> types according
|
||||
to WDDX version 1.0 (Andrei)
|
||||
- Made var_dump()/serialize()/unserialize() NULL aware. (Thies)
|
||||
- Added new NULL constant (Zeev, Zend library)
|
||||
- Fixed -c support in the standalone CGI binary (Zeev)
|
||||
- Increased PHP's performance by 5-15% using a new memory cache (Andi & Zeev,
|
||||
Zend library)
|
||||
- Improved the php.ini reader to support constants and bitwise operators (Zeev)
|
||||
- Fixed strrev() to no longer modify arg1. (Thies)
|
||||
- Fixed buffer overruns in iptcembed(). (Thies)
|
||||
- Fixed a bug in ODBC error reporting (Zeev)
|
||||
- Added PHP_Logo_GUID() and Zend_Logo_GUID() functions, that return the GUIDs
|
||||
of the PHP and Zend logos used in phpinfo() (Zeev)
|
||||
- Added GNU Pth support (Sascha, TSRM library)
|
||||
- Removed select(), fd_set() and fd_isset() - will be reimplemented soon! (Thies)
|
||||
- Improved Win32 performance significantly by using different mutexes (Zeev,
|
||||
TSRM library)
|
||||
- Made quotemeta() and preg_quote() binary-safe. (Andrei)
|
||||
- Added UDP support in fsockopen(). (Evan)
|
||||
- Added --disable-pear option (Andrei)
|
||||
- Renamed libzend repository to Zend (Zeev)
|
||||
- Added support for thttpd (Sascha)
|
||||
- Added session.cache_limiter and cache_expire options (Sascha)
|
||||
- Restored the PHP_VERSION and PHP_OS constants (Zeev)
|
||||
- Added get_loaded_extensions(), extension_loaded(), and
|
||||
get_extension_funcs() functions. (Andrei)
|
||||
- Added date/time stamping to PHP error log file. (Andrei, Joey)
|
||||
- Added is_subclass_of() function (Andrei, Zend library)
|
||||
- Implemented count_chars(). (Thies)
|
||||
- Added class_exists() function (Andrei, Zend library)
|
||||
- Made strspn() and strcspn() binary-safe. (Andrei)
|
||||
- Added array_multisort() function. (Andrei)
|
||||
- Made pageinfo.c thread-safe (Sascha)
|
||||
- Made implode() binary-safe (Andrei)
|
||||
- Made strstr(), stristr(), and ucwords() binary-safe() (Andrei)
|
||||
- Made strtoupper(), strtolower(), substr_replace() binary-safe. (Andrei)
|
||||
- Fix a crash in the Apache syntax highlighting mode (Zeev)
|
||||
- Report all ODBC error's not just the one on the top of the stack (lurcher)
|
||||
- OCI8 now returns NULL values in LONG columns correct. (Thies)
|
||||
- Added support for a C-like assert() function. (Thies)
|
||||
- Added CyberCash support. (Evan)
|
||||
- Made explode() binary-safe. (Thies)
|
||||
- Made strpos() binary-safe. (Thies)
|
||||
- Added XML_Set_Object() function, now you can use the XML-Parser from
|
||||
within an object. (Thies)
|
||||
- Session vars are now decoded into $HTTP_STATE_VARS[] array and the
|
||||
globals, depending on track_vars and gpc_globals settings (Andrei)
|
||||
- Added get_used_files() function - returns a hash mapping the use()'d files
|
||||
to their full path (Zeev)
|
||||
- PHP 4 scripts will now obey the max_execution_time setting and actually
|
||||
time out (Rasmus)
|
||||
- Added configure command to phpinfo() output (Stig)
|
||||
- Added optional socket path to the mysql_?connect() functions (Rasmus)
|
||||
- Made mysql and gd work as shared extensions again (Stig)
|
||||
- Make the global GET/POST/Cookie variables and their $HTTP_*_VARS[] counterparts
|
||||
be references to each other (Zeev)
|
||||
- Added support for the 'use' keyword - behaves like 'require', but will not
|
||||
use the same file more than once (Andi & Zeev, Zend library)
|
||||
- Added check to see if a persistent connection is still valid with the
|
||||
ODBC interface before reusing (nick@easysoft.com)
|
||||
- Added DBMaker support (patch by Pax Tsai <paxtsai@lion.syscom.com.tw>)
|
||||
- Renamed "PECL" to "PEAR" (PHP Extension and Add-on Repository) (Stig)
|
||||
- buildconf now uses build.mk (Stig)
|
||||
- Disable symlinks to urls (Rasmus)
|
||||
- Informix driver now reflects version of ESQL/C used (Danny)
|
||||
- Modified session_register() to take variable number of arguments (Andrei)
|
||||
- Fixed file descriptor leak in thread safe mode (Zeev, Zend library)
|
||||
- Added select(), fd_set() and fd_isset() (Evan)
|
||||
- cpdf support has been ported from php3, needs ClibPDF 2.x (Uwe)
|
||||
- Fixed a leak when using automatic output buffering (Zeev)
|
||||
- Introduced PECL - PHP Extension and Code Library
|
||||
(prounounced "pickle") (Stig)
|
||||
- Fixed inconsistencies in the implementation of here-docs (Andi & Zeev, Zend
|
||||
library)
|
||||
- Fixed a problem with constant class-member initializations (Andi & Zeev,
|
||||
Zend library)
|
||||
- Fixed float-compare in min(),max(),a[r]sort(),[r]sort() (Thies)
|
||||
- Implemented get_html_translation_table() function (Thies)
|
||||
- Implemented array_flip() function. Returns input-array with key, value
|
||||
flipped (Thies)
|
||||
- Added Berkeley DB3 support in DBA (Sascha)
|
||||
- Implemented 2-Arg version of strtr($str,$translation_array). This can be used
|
||||
to revert what htmlspecialchars() did (Thies)
|
||||
- Fixed mem-overwrite in XML_Parse_Into_Struct (Thies)
|
||||
- Added substr_replace() function (Andrei)
|
||||
|
||||
November 16 1999, Version 4.0 Beta 3
|
||||
- ucfirst()/ucwords() no longer modify arg1 (Thies)
|
||||
- Fixed strtr() not to modify arg1 (Thies)
|
||||
- Added Win32 build files for Informix driver and make it
|
||||
compile with ZTS (danny)
|
||||
- Added tmpfile() function (Stig)
|
||||
- Upgraded regex library to alpha3.8 (Sascha)
|
||||
- Fixed selecting nested-tables in OCI8. (Thies)
|
||||
- RFC-854 fix for internal FTP-Code. Commands have to end in "\r\n" (Thies)
|
||||
- Fix OpenLink ODBC support (Stig)
|
||||
- min(),max(),a[r]sort(),[r]sort(),k[r]sort() now work consistent with the
|
||||
language-core. (Thies)
|
||||
- tempnam() now uses mkstemp() if available (Stig)
|
||||
- serialize() and var_dump() now honor the precision as set in php.ini
|
||||
for doubles. (Thies)
|
||||
- Improved the Win32 COM module to support [out] parameters (Boris Wedl)
|
||||
- Fixed garbage returned at the end of certain Sybase-Columns (Thies)
|
||||
Patch submitted by: neal@wanlink.com
|
||||
- Added Microsoft SQL Server module for Win32 (Frank)
|
||||
- Added support for forcing a variable number of internal function arguments
|
||||
by reference. (Andi & Zeev, Zend library)
|
||||
- Implemented getprotoby{name,number} (Evan)
|
||||
- Added array_pad() function. (Andrei)
|
||||
- Added new getservby{name,port} functions. (Evan)
|
||||
- Added session.cookie_path and session.cookie_domain (Sascha)
|
||||
- Continue processing PHP_INI_SYSTEM knownDirectives after extension=
|
||||
(Sam Ruby)
|
||||
- Enable IBM DB2 support - Tested against DB2 6.1 UDB on Linux (Rasmus)
|
||||
- Added new str_repeat() function. (Andrei)
|
||||
- Output-Buffering system is now Thread-Safe. (Thies)
|
||||
- implemented OCI8 $lob->WriteToFile() function - very useful for streaming
|
||||
large amounts of LOB-Data without to need of a huge buffer. (Thies)
|
||||
- Added session.use_cookies option (Sascha)
|
||||
- Added getcwd() function. (Thies)
|
||||
- XML_Parse_Into_Struct no longer eats data. (Thies)
|
||||
- Fixed parse_url('-') crash. (Thies)
|
||||
- added === operator support. (Andi & Thies, Zend library)
|
||||
- unserialize() now gives a notice when passed invalid data. (Thies)
|
||||
- Fixed shuffle() so that it no longer breaks on Solaris. (Andrei)
|
||||
- Added is_resource(), is_bool() functions. (Thies)
|
||||
- Cleaned up File-Module (Thies)
|
||||
- Upgraded math-funtions to use new Zend function API (Thies)
|
||||
- Fixed zombie problem in shell_exec() and $a = `some_command`
|
||||
constructs. (Thies)
|
||||
- Thies introduced ZEND_FETCH_RESOURCE2 (Danny).
|
||||
- Added Informix driver to list of maintained extensions. (Danny).
|
||||
- Informix driver : Changed ifx.ec to use the new high-performance
|
||||
ZEND API. (Danny)
|
||||
- IXF_LIBDIR environment variable specifies alternate Informix library
|
||||
path for configure (Danny).
|
||||
- Fixed gmmktime() so that the following should always be true:
|
||||
gmmktime([args]) == mktime([args]) + date('Z', mktime([args])) (Jouni)
|
||||
- setlocale doesn't anymore screw up things if you forgot to change it back
|
||||
to the original settings. (Jouni)
|
||||
- Switched to new system where ChangeLog is automagically updated from commit
|
||||
messages. NEWS file is now the place for public announcements. (Andrei)
|
||||
- Fixed refcount problem in XML module. (Thies)
|
||||
- Fixed crash in HTTP_RAW_POST_DATA handling (Thies)
|
||||
- You can use resources as array-indices again (Thies, Zend library)
|
||||
- Fixed pg_fetch_array() with three arguments (Sascha)
|
||||
Patch submitted by: brian@soda.berkeley.edu
|
||||
- Upgraded a lot internal functions to use new Zend function API (Thies)
|
||||
- fdf support ported; not completely tested with latest version 4.0 for
|
||||
glibc (Uwe)
|
||||
- OCI8 connections are now kept open as long as they are referenced (Thies)
|
||||
- Cleaned up Directory-Module (Thies)
|
||||
- Small fix in Ora_Close (Thies)
|
||||
- Ported range() and shuffle() from PHP 3 to PHP 4 (Andrei)
|
||||
- Fixed header("HTTP/..."); behaviour (Sascha)
|
||||
- Improved UNIX build system. Now utilizes libtool (Sascha)
|
||||
- Upgrade some more internal functions to use new Zend function API. (Thies,
|
||||
Zend library)
|
||||
- Fixed backwards incompatibility with ereg() (Thies)
|
||||
- Updated Zend garbage collection with a much more thorough method.
|
||||
(Andi, Zend library)
|
||||
- Added the ability to use variable references in the array() construct.
|
||||
For example, array("foo" => &$foo). (Andi, Zend library)
|
||||
- Added array_reverse() function (Andrei)
|
||||
- Some more XML fixes/cleanups (Thies)
|
||||
- Updated preg_replace() so that if any argument passed in is an array
|
||||
it will make a copy of each entry before converting it to string so that
|
||||
the original is intact. If the subject is an array then it will preserve
|
||||
the keys in the output as well (Andrei)
|
||||
- Updated OCI8 to use the new high-performance Zend function API. (Thies)
|
||||
- Configure speedup (Stig)
|
||||
- Fixed LOB/Persistent-Connection related OCI8-Crash (Thies)
|
||||
- Generalized server-API build procedure on UNIX (Stig)
|
||||
- Added '--disable-rpath' option (Sascha)
|
||||
- Added AOLserver SAPI module (Sascha)
|
||||
- Fixed XML Callbacks. (Thies)
|
||||
- Updated ODBC to use the new high-performance Zend function API (kara)
|
||||
- Updated zlib to use the new high-performance Zend function API. (Stefan)
|
||||
- Updated preg_split() to allow returning only non-empty pieces (Andrei)
|
||||
- Updated PCRE to use the new high-performance Zend function API (Andrei)
|
||||
- Updated session, dba, mhash, mcrypt, sysvshm, sysvsem, gettext modules to use
|
||||
the new high-performance Zend function API (Sascha)
|
||||
- Extended var_dump to handle resource type somewhat (Andrei)
|
||||
- Updated WDDX to use the new high-performance Zend function API (Andrei)
|
||||
- Updated XML to use the new high-performance Zend function API. (Thies)
|
||||
- Updated Oracle to use the new high-performance Zend function API. (Thies)
|
||||
- Improved the performance of the MySQL module significantly by using the new
|
||||
high-performance Zend function API. (Zeev)
|
||||
- Add support for the Easysoft ODBC-ODCB Bridge (martin@easysoft.com)
|
||||
- Fix bug in odbc_setoption, getParameter call incorrect (martin@easysoft.com)
|
||||
- Ora_Fetch_Into now resets the returned array in all cases (Thies)
|
||||
- Fixed NULL-Column problem in Oracle-Driver (Thies)
|
||||
- Added extra metadata functions to ODBC, SQLTables etc (nick@easysoft.com)
|
||||
- Fixed SEGV in mcal make_event_object() and
|
||||
typo in mcal_list_alarms() (Andrew Skalski)
|
||||
- Fixed Ora_PLogon (Thies)
|
||||
- Resourcified Oracle (Thies)
|
||||
- Implemented object serialization/deserialization in WDDX (Andrei)
|
||||
- Added krsort() function (Thies)
|
||||
- Added func_num_args(), func_get_arg() and func_get_args() for standard
|
||||
access to variable number of arguments functions (Zeev)
|
||||
- Added FTP support (Andrew Skalski)
|
||||
- Added optional allowable_tags arguments to strip_tags(), gzgetss() and
|
||||
fgetss() to allow you to specify a string of tags that are not to be
|
||||
stripped (Rasmus)
|
||||
- Upgraded var_dump() to take multiple arguments (Andrei)
|
||||
- Resourcified XML (Thies)
|
||||
- Fixed a memory leak in the Apache per-directory directives handler (Zeev)
|
||||
- Added array_count_values() function. (Thies)
|
||||
- snmp, pgsql, mysql and gd modules can be built as dynamically loaded
|
||||
modules (Greg)
|
||||
- OCI8 fix for fetching empty LOBs (Thies)
|
||||
- Added user-level callbacks for session module (Sascha)
|
||||
- Added support for unknown POST content types (Zeev)
|
||||
- Added "wddx" serialization handler for session module (Sascha)
|
||||
(automatically enabled, if you compile with --with-wddx)
|
||||
- Fixed unserializing objects (Thies)
|
||||
- PHP 4.0 now serializes Objects as 'O' (not understood by PHP 3.0), but
|
||||
unserializes PHP 3.0 serialized objects as expected. (Thies)
|
||||
- Made serialize/unserialize work on classes. If the class is known at
|
||||
unserialize() time, you'll get back a fully working object! (Thies)
|
||||
- Reworked preg_* functions according to the new PCRE API, which also made
|
||||
them behave much more like Perl ones (Andrei)
|
||||
- Made it possible to specify external location of PCRE library (Andrei)
|
||||
- Updated bundled PCRE library to version 2.08 (Andrei)
|
||||
- count()/is_array/is_object... speedups. (Thies)
|
||||
- OCI8 supports appending and positioning when saving LOBs (Thies)
|
||||
- Added metaphone support (Thies)
|
||||
- OCI8 doesn't use define callbacks any longer. (Thies)
|
||||
- OCI8 Driver now supports LOBs like PHP 3.0. (Thies)
|
||||
- var_dump now dumps the properties of an object (Thies)
|
||||
- Rewrote the GET/POST/Cookie data reader to support multi-dimensional
|
||||
arrays! (Zeev)
|
||||
- Renamed allow_builtin_links to expose_php (defaults to On). This directive
|
||||
tells PHP whether it may expose its existence to the outside world, e.g.
|
||||
by adding itself to the Web server header (Zeev)
|
||||
- Added support for transparent session id propagation (Sascha)
|
||||
- Made WDDX serialize object properties properly (Andrei)
|
||||
- Fixed WDDX mem leak when undefined variable is passed in
|
||||
for serialization (Andrei)
|
||||
- Added session_unset() function (Andrei)
|
||||
- Fixed double session globals shutdown crash (Andrei)
|
||||
- Fixed crash related to ignore_user_abort ini entry (Andrei)
|
||||
- Added support for external entropy sources for session id creation
|
||||
(on Unices /dev/random and /dev/urandom) (Sascha)
|
||||
- Added gpc_globals variable directive to php.ini. By default it is On, but
|
||||
if it is set to Off, GET, POST and Cookie variables will not be inserted
|
||||
to the global scope. Mostly makes sense when coupled with track_vars (Zeev)
|
||||
- Added versioning support for shared library (Sascha)
|
||||
This allows concurrent use of PHP 3.0 and PHP 4.0 as Apache modules. See
|
||||
the end of the INSTALL file for more information.
|
||||
- Added second parameter to array_keys which specifies search value
|
||||
for which the key should be returned (Andrei)
|
||||
- Resourcified Informix driver (Danny)
|
||||
- New resource handling for odbc, renamed to php_odbc.[ch]
|
||||
- Make set_time_limit() work on Unix (Rasmus)
|
||||
- Added connection handling support (Rasmus)
|
||||
- Improved the Sybase-CT module to make use of resources (Zeev)
|
||||
- Improved the mSQL module to make use of resources (Zeev)
|
||||
- Changed mysql_query() and mysql_db_query() to return false in case of saving
|
||||
the result set data fails (Zeev)
|
||||
- Improved the resource mechanism - resources were not getting freed as soon
|
||||
as they could (Zeev)
|
||||
- Added shared memory module for session data storage (Sascha)
|
||||
- Fixed session.auto_start (Sascha)
|
||||
- Fixed several problems with output buffering and HEAD requests (Zeev)
|
||||
- Fixed HTTP Status code issue with ISAPI module (Zeev)
|
||||
- Fixed a problem that prevented $GLOBALS from working properly (Zeev, Zend
|
||||
library)
|
||||
- Ported newest GetImageSize (Thies)
|
||||
- Added session compile support in Win32 (Andi)
|
||||
- Added -d switch to the CGI binary that allows overriding php.ini values
|
||||
from the command line (Zeev)
|
||||
- Fixed a crash that would occur if wddx_deserialize did not receive
|
||||
a valid packet (Andrei)
|
||||
- Fixed a bugglet when redefining a class at run-time (Andi, Zend library)
|
||||
- Fixed sem_get() on AIX (Sascha)
|
||||
- Fixed fopen() to work with URL's in Win32 (Andi & Zeev)
|
||||
- Fixed include_path for Win32 (Andi, Zend library)
|
||||
- Fixed bug in ISAPI header sending function (Charles)
|
||||
- Fixed memory leak when using undefined values (Andi & Zeev, Zend library)
|
||||
- Added output_buffering directive to php.ini, to enable output buffering
|
||||
for all PHP scripts - default is off (Zeev).
|
||||
- Fixed some more class inheritance issues (Zeev, Zend library)
|
||||
- Fixed Apache build wrt to shared modules on FreeBSD/Linux (Sascha)
|
||||
- Added session.extern_referer_chk which checks whether session ids were
|
||||
referred to by an external site and eliminates them (Sascha)
|
||||
- Improved session id generation (Sascha)
|
||||
- Improved speed of uniqid() by using the combined LCG and removing
|
||||
the extra usleep() (Sascha)
|
||||
- Introduced general combined linear congruential generator (Sascha)
|
||||
- Made ldap_close back into an alias for ldap_unbind (Andrei)
|
||||
- OciFetchInto now resets the returned array in all cases (Thies)
|
||||
- Fixed mysql_errno() to work with recent versions of MySQL (Zeev)
|
||||
- Fixed a problem with define() and boolean values (Zeev)
|
||||
- Fixed inclusion of gd/freetype functions (Sascha)
|
||||
- Fixed persistency of MHASH_* constants (Sascha)
|
||||
- Oracle is now ZTS-Safe (Thies)
|
||||
- Fixed flushing of cached information to disk in DBA's DB2 module (Sascha)
|
||||
- OCI8 is now ZTS-Safe (Thies)
|
||||
- Fixed is_writeable/is_writable problem; they are both defined now (Andrei)
|
||||
- Imported PHP 3.0 diskfreespace() function (Thies)
|
||||
- Fixed thread-safety issues in the MySQL module (Zeev)
|
||||
- Fixed thread-safe support for dynamic modules (Zeev)
|
||||
- Fixed Sybase CT build process (Zeev)
|
||||
|
||||
August 9 1999, Version 4.0 Beta 2
|
||||
- Fixed a problem when sending HTTP/1.x header lines using header() (Zeev)
|
||||
- Win32 builds now include the ODBC module built-in (Zeev)
|
||||
- Fixed SYSV-SHM interface (Thies).
|
||||
- Updated hyperwave module, made it thread safe
|
||||
- Updated pdflib module, version 0.6 of pdflib no longer supported
|
||||
- Updated fdf module
|
||||
- Built-in phpinfo() links are now turned off by default. They can be turned
|
||||
on using the allow_builtin_links INI directive (Zeev)
|
||||
- Changed phpinfo() to list modules that have no info function (Zeev)
|
||||
- Modified array_walk() function so that the userland callback is passed
|
||||
a key and possible user data in addition to the value (Andrei)
|
||||
- Fixed ldap_search(), ldap_read() and ldap_list() (Zeev)
|
||||
- Fixed Apache information in phpinfo() (sam@breakfree.com)
|
||||
- Improved register_shutdown_function() - you may now supply arguments that
|
||||
will be passed to the shutdown function (Zeev)
|
||||
- Improved call_user_func() and call_user_method() - they now support passing
|
||||
arguments by reference (Zeev)
|
||||
- Fixed usort() and uksort() (Zeev)
|
||||
- Fixed md5() in the Apache module (Thies)
|
||||
- Introduced build process for dynamic modules (Stig)
|
||||
- Improved ISAPI module to supprt large server variables (Zeev)
|
||||
- Imported PHP 3.0 fixes for problem with PHP as a dynamic module and Redhat
|
||||
libc2.1 in zlib module (Stefan)
|
||||
- Fixed sybase_fetch_object() (Zeev)
|
||||
- Made the IMAP module work with PHP 4.0 (Zeev)
|
||||
- Fixed a problem with include()/require() of URLs (Sascha, Zeev)
|
||||
- Fixed a bug in implode() that caused it to corrupt its arguments (Zeev)
|
||||
- Added get_class($obj), get_parent_class($obj) and method_exists($obj,"name")
|
||||
(Andi & Zeev)
|
||||
- Fixed various inheritance problems (Andi & Zeev, Zend library)
|
||||
- Children now inherit their parent's constructor, if they do not supply a
|
||||
constructor of their own.
|
||||
- Fixed runtime inheritance of classes (parent methods/properties were
|
||||
overriding their children) (Zeev, Zend library)
|
||||
- Fixed backwards incompatibility with the "new" operator (Andi, Zend library)
|
||||
- Fixed bugs in uksort() and ksort() sort ordering (Andrei)
|
||||
- Fixed a memory leak when using assignment-op operators with lvalue of type
|
||||
string (Zeev, Zend library)
|
||||
- Fixed a problem in inheritance from classes that are defined in include()d
|
||||
files (Zeev, Zend library)
|
||||
- Fixed a problem with the PHP error handler that could result in a crash
|
||||
on certain operating systems (Zeev)
|
||||
- Apache php_flag values only recognized 'On' (case sensitive) - changed
|
||||
to case insensitive (Zeev)
|
||||
- Fixed a memory leak with switch statement containing return statements
|
||||
(Andi & Zeev, Zend library)
|
||||
- Fixed a crash problem in switch statements that had a string offset
|
||||
as a conditional (Andi & Zeev, Zend library)
|
||||
- Imported PHP 3.0 fixes for rand() and mt_rand() (Rasmus)
|
||||
- Added function entries for strip_tags() and similar_text() (Andrei)
|
||||
- Fixed a bug in WDDX that would cause a crash if a number was passed in
|
||||
instead of a variable name (Andrei)
|
||||
- Ported strtotime() function from PHP 3.0 (Andrei)
|
||||
- Merged in gdttf stuff from PHP 3.0 (Sascha)
|
||||
- buildconf now checks your installation (Stig)
|
||||
- XML module now built dynamically with --with-xml=shared (Stig)
|
||||
- Added a check for freetype.h - fixed build on RedHat 6.0 (Zeev)
|
||||
- Fixed array_walk() to work in PHP 4.0 (Andrei)
|
||||
- Ported all remaining date() format options from PHP 3.0 (Andrei)
|
||||
- $php_errormsg now works (Andrei)
|
||||
- Added locale support for Perl Compatible Regexp functions (Andrei)
|
||||
- Informix module ported (Danny)
|
||||
- Removed --with-shared-apache (Sascha)
|
||||
- Added patch for reverse lookup table in base64_decode (Sascha)
|
||||
Submitted by bfranklin@dct.com
|
||||
- Merged in PHP 3.0 version of str_replace (Sascha)
|
||||
- Added DBA module (Sascha)
|
||||
- Added session id detection within REQUEST_URI (Sascha)
|
||||
- Merged in HP-UX/ANSI compatibility switch from PHP 3.0 (Sascha)
|
||||
- Fixed rpath handling for utilitites built during Apache build (Sascha)
|
||||
- Added missing E_ error level constants (Zeev, Zend library)
|
||||
- Fixed a bug in sending multiple HTTP Cookies under Apache (Zeev)
|
||||
- Fixed implicit connect on the MySQL, mSQL, PostgreSQL and Sybase
|
||||
modules (Zeev)
|
||||
- Gave PHP 4.0's SNMP extension all the functionality of PHP 3.0.12 (SteveL)
|
||||
|
||||
July 19 1999, Version 4.0 Beta 1
|
||||
- First public beta of PHP 4.0
|
||||
@@ -0,0 +1,17 @@
|
||||
How to install PHP with the BCMath arbitrary precision math library?
|
||||
--------------------------------------------------------------------
|
||||
|
||||
Due to license restrictions, the BC math library can no longer be distributed
|
||||
along with PHP. The BC math library is distributed under the restrictive
|
||||
GNU Public License, and PHP is no longer distributed under that license, but
|
||||
under a less restrictive license, the PHP License.
|
||||
|
||||
If you want to enable BC math support (recommended), all you have to do is
|
||||
simply download http://www.php.net/extra/number4.tar.gz, and untar it on the
|
||||
top level php4 directory.
|
||||
|
||||
A typical way of doing this would be (assuming that you have lynx):
|
||||
cd ~/php4
|
||||
lynx -dump -source http://www.php.net/extra/number4.tar.gz | gzip -d | tar xvf -
|
||||
|
||||
The PHP Group
|
||||
@@ -0,0 +1,102 @@
|
||||
This is the first file you should be reading after you get your CVS account.
|
||||
We'll assume you're basically familiar with CVS, but feel free to post
|
||||
your questions on the mailing list.
|
||||
|
||||
PHP is developed through the efforts of a large number of people.
|
||||
Collaboration is a Good Thing(tm), and CVS lets us do this. Thus, following
|
||||
some basic rules with regards to CVS usage will:
|
||||
|
||||
a. Make everybody happier, especially those responsible for maintaining
|
||||
the CVS itself.
|
||||
b. Keep the changes consistently well documented and easily trackable.
|
||||
c. Prevent some of those 'Oops' moments.
|
||||
d. Increase the general level of good will on planet Earth.
|
||||
|
||||
|
||||
Having said that, here are the organizational rules:
|
||||
|
||||
1. Respect other people working on the project.
|
||||
|
||||
2. Discuss any significant changes on the list before committing.
|
||||
|
||||
3. Look at MAINTANERS file to see who is the primary maintainer of
|
||||
the code you want to contribute to.
|
||||
|
||||
4. If you "strongly disagree" about something another person did, don't
|
||||
start fighting publicly - take it up in private email.
|
||||
|
||||
5. If you don't know how to do something, ask first!
|
||||
|
||||
6. Test your changes before committing them. We mean it. Really.
|
||||
|
||||
|
||||
The next few rules are more of a technical nature.
|
||||
|
||||
1. DO NOT TOUCH ChangeLog! It is automagically updated from the commit
|
||||
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.
|
||||
|
||||
3. Do not commit multiple file and dump all messages in one commit. If you
|
||||
modified several unrelated files, commit each group separately and
|
||||
provide a nice commit message for each one. See example below.
|
||||
|
||||
4. Do write your commit message in such a way that it makes sense even
|
||||
without the corresponding diff. One should be able to look at it, and
|
||||
immediately know what was modified. Definitely include the function name
|
||||
in the message as shown below.
|
||||
|
||||
5. In your commit messages, keep each line shorter than 80 characters. And
|
||||
try to align your lines vertically, if they wrap. It looks bad otherwise.
|
||||
|
||||
6. If you modified a function that is callable from PHP, prepend PHP to
|
||||
the function name as shown below.
|
||||
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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
|
||||
a memory leak in php_trim(). Don't commit both of these at once. Commit them
|
||||
separately and try to make sure your commit messages look something like the
|
||||
following.
|
||||
|
||||
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!
|
||||
@- Memory leak in trim() function has finally been fixed. (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.
|
||||
|
||||
If you don't see your messages in ChangeLog and NEWS 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.
|
||||
|
||||
You can use LXR (http://lxr.php.net/) and Bonsai (http://bonsai.php.net/)
|
||||
to look at PHP CVS repository in various ways.
|
||||
|
||||
To receive daily updates to ChangeLog and NEWS, send an empty message to
|
||||
php-cvs-daily-subscribe@lists.php.net.
|
||||
|
||||
Happy hacking,
|
||||
|
||||
PHP Team
|
||||
@@ -1,59 +0,0 @@
|
||||
Windows 95/NT Specific Notes on Compilation
|
||||
|
||||
Windows compilation has only been tested with Microsoft Visual C++
|
||||
Version 5 Standard Edition. The PHP executable has only had limited
|
||||
testing under Windows 95. SAFE MODE and any User or Group functionality
|
||||
has not been ported/tested.
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
Compiling PHP with MSVC5
|
||||
|
||||
There are three msvc workspaces provided with this distribution. The one
|
||||
most people will use is php3.dsw. This contains project files for two
|
||||
versions on PHP, one with mySQL compiled internaly, and one without (both
|
||||
have ODBC internaly compiled). It also contains all the modules.
|
||||
|
||||
The next workspace is php3extras.dsw. This project contains the converter
|
||||
and a program called phpwatch, which is a simple program to watch debugger
|
||||
output under windows. The 'socket' program is also available from the php
|
||||
site, which is a better alternative to phpwatch.
|
||||
|
||||
The third workspace is php3sapi.dsw. These projects are experimental and
|
||||
will probably not compile most of the time. It contains preliminary work
|
||||
on the server api's for windows.
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
Base Configuration and Configuration Issues
|
||||
|
||||
*The base configuration for the windows php version contains odbc
|
||||
support. Support for other database modules will be provided as external dll files.
|
||||
*ODBC can be used to connect to many of the databases previously
|
||||
supported by php (though they can still be compiled in if you have
|
||||
the libraries!)
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
Makefiles
|
||||
|
||||
Be sure to edit any windows makefile and change the include directories
|
||||
to be appropriate for your system.
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
CGI Version
|
||||
|
||||
The makefile for the cgi version of php is located in the win32
|
||||
subdirectory of the php source tree. This make file is specificaly
|
||||
for Visual C++ V5.
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
ISAPI/NSAPI/WSAPI/Apache Versions
|
||||
|
||||
These versions are not yet working. They are located in the php3sapi.dsw
|
||||
workspace.
|
||||
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
Other Libraries
|
||||
|
||||
See the php faq at php.net for information on where to obtain the various
|
||||
libraries needed to compile some modules.
|
||||
|
||||
@@ -1,100 +1,94 @@
|
||||
$Id$
|
||||
Things to do or at least think about doing in the future. Name in
|
||||
parenthesis means that person has taken on this project.
|
||||
|
||||
+----
|
||||
| * -- to be done
|
||||
| ? -- to be done sometime if possible
|
||||
| P -- in progress (name should appear in parentheses after task)
|
||||
| D -- delayed until later date (specify in parentheses after task)
|
||||
| U -- done, untested
|
||||
| V -- done
|
||||
+----
|
||||
Zend
|
||||
----
|
||||
* allow foreach ($array as $k => &$val) syntax. right now we can not
|
||||
traverse an array without copying each element.
|
||||
* look al replacing c-lib call tolower().
|
||||
|
||||
Configuration Issues
|
||||
--------------------
|
||||
* properly detect dbm routines when they're in libc
|
||||
* add the appropriate #define magic for memmove and friends (see
|
||||
GNU autoconf info pages for details)
|
||||
* make it possible to disable support for some extensions (gd, dbm)
|
||||
* make it possible to build selected extensions so they are
|
||||
dynamically-loadable
|
||||
global
|
||||
------
|
||||
* make sure all source files have the "right" copyright.
|
||||
* the following modules still use PHP3_TLS_*() macros (and thereby don't
|
||||
work in ZTS mode): ext/dav/dav.c, ext/db/db.c, ext/gd/gd.c, ext/ldap/ldap.c
|
||||
* let every module (source-file) have it's own module & function_entry
|
||||
block. Right now the math functions are in math.c but the corresponding
|
||||
function-entries are in basic_functions.
|
||||
* make sure that all ZTS globals get destructed. Most ts_allocate_id()
|
||||
calls should have a dtor entry.
|
||||
* activate all extensions by default that don't rely on external
|
||||
dependices. (eg ftp)
|
||||
* --enable-all in configure. (--enable-shared=max ...)
|
||||
* make configure print out a summary when it's done (like XEmacs)
|
||||
* replace standard functions which work on static data with
|
||||
reentrant-save functions
|
||||
* there is only one current directory per process; to make
|
||||
chdir() etc. thread-safe, we must introduce a per-thread
|
||||
current directory
|
||||
* on some platforms unimplemented function will just do nothing (eg symlink)
|
||||
they should print a warning or be not even defined!
|
||||
* banish the legacy of php3_ prefixes
|
||||
* implement javadoc based function docs template system
|
||||
* use thread-safe resolver functions (either require BIND 8 or adns)
|
||||
* check for incorrect *_r (time related) on HPSUX
|
||||
* provide optional IPv6 support
|
||||
* make SAPI conform to CGI/1.1. Currently, all SAPI modules
|
||||
define REMOTE_ADDR etc. themselves and reach only various level
|
||||
of compliance.
|
||||
|
||||
Core Language Issues
|
||||
--------------------
|
||||
* go through PHP2's php.h and see how each special #define might be
|
||||
applied/supported in PHP3
|
||||
* move Treatdata() to language-scanner.lex where hash_environment()
|
||||
is called including a decision about priority of variables and moving
|
||||
Treatdata() to use hash_add() instead of hash_update() for insertions
|
||||
to the symbol table.
|
||||
* go through FIXME and XXX lines (egrep 'FIXME|XXX' *.[ch])
|
||||
* make lexer and parser thread-safe
|
||||
* verify that binary strings are handled correctly
|
||||
V don't evaluate truth expressions more than once
|
||||
V make unset() work on arrays (tricky)
|
||||
|
||||
Core Functions
|
||||
--------------
|
||||
* go through all file functions and make sure they are opened in binary
|
||||
mode in win32 if needed (ie copy)
|
||||
* go through all functions and look at PHP_SAFE_MODE issues
|
||||
* have a look at return codes of fsockopen() function - we should
|
||||
probably RETURN_FALSE and then set an error code somewhere (Rasmus)
|
||||
* go through FIXME and XXX lines (egrep 'FIXME|XXX' functions/*.[ch])
|
||||
* add user-level flock() implementation to let people lock and unlock files
|
||||
* add "'" modifier to sprintf to group thousands by comma
|
||||
* Add an improved eval() that doesn't "leak"
|
||||
? sorting of objects with a user-defined comparison function (like Perl)
|
||||
(this shouldn't be expected before 3.1, if at all).
|
||||
|
||||
|
||||
Extensions
|
||||
----------
|
||||
* add version strings for all extensions
|
||||
* Oracle persistent connections
|
||||
U gd support for windows
|
||||
* Illustra support (APIS)
|
||||
? CQL++ support (http://www.cql.com/)
|
||||
? GNU SQL support (does anybody actually use this?)
|
||||
? DB2 support (http://www.sleepycat.com/)
|
||||
? Shore support (http://www.cs.wisc.edu/shore/)
|
||||
? PGP Interface (use PGPlib?)
|
||||
? more Perl-like regex handling?
|
||||
|
||||
Server Support
|
||||
--------------
|
||||
P ISAPI (Shane)
|
||||
* process cookies
|
||||
* blocking functions
|
||||
* make sure it's Microsoft-clean so it can be used with other ISAPI
|
||||
implementations
|
||||
* WSAPI
|
||||
* NSAPI
|
||||
* process cookies
|
||||
* check POST method handling code
|
||||
* use Netscape memory allocation inside emalloc() and company
|
||||
* FastCGI support - see http://fastcgi.idle.com/
|
||||
|
||||
Win32 Specific
|
||||
--------------
|
||||
* implement some kind of syslog->file log support for win95.
|
||||
* change all file open/read/write functions from c library to win32
|
||||
api file functions. The win32 api functions handle both disk files
|
||||
and network files. This will allow include and require to use http
|
||||
or ftp files as the unix version does, and do away with my
|
||||
workaround to support this. (3.1?)
|
||||
* implement symlinks via windows shell links (shortcuts). This will
|
||||
work only at the script level and is not a c language level port.
|
||||
|
||||
Testing
|
||||
-------
|
||||
* truss/strace a typical PHP request and see if there are some system
|
||||
calls that could be optimized out
|
||||
* verify that regression tests exist for all core functions
|
||||
|
||||
Miscellaneous
|
||||
documentation
|
||||
-------------
|
||||
* remove hard-coded compilation options
|
||||
? locale issues - funny things happen in PHP2 when the locale is set to
|
||||
use , instead of . as the decimal seperator. ie. 1.5+1.5 = 1
|
||||
? SSI->PHP3 conversion script
|
||||
? SQL-based access logging (start with examples/log-*.php3)
|
||||
* add remarks in the documentation which functions are not implemented on win32.
|
||||
* add remarks in the documentation which functions are not binary-safe.
|
||||
|
||||
ext/pcre
|
||||
--------
|
||||
* use/support latest pcre v3.1.
|
||||
|
||||
ext/wddx
|
||||
--------
|
||||
* See if we can support the remaining datatypes:
|
||||
dateTime
|
||||
binary
|
||||
recordset
|
||||
|
||||
http://www.wddx.org/WDDX_SDK_10a/7__References/WDDX_DTD.htm
|
||||
|
||||
* implement wddx_packet_as_javascript(). (Andrei)
|
||||
|
||||
ext/dav
|
||||
--------
|
||||
* rewrite
|
||||
|
||||
ext/oci8
|
||||
--------
|
||||
* all OCIFetch*() functions should return 0 for no more data and false on error.
|
||||
|
||||
ext/snmp
|
||||
--------
|
||||
* port to latest UCD-SNMP 4.1 (even doesn't compile)
|
||||
|
||||
ext/standard
|
||||
------------
|
||||
* add a version number to data serialized via serialize().
|
||||
* array_add(), array_rand() (Andrei)
|
||||
* implement pathinfo()
|
||||
* possibly modify parsing of GPC data to automatically create arrays if
|
||||
variable name is seen more than once.
|
||||
* implement regex-cache for url-functions.
|
||||
* strpad() (Andrei)
|
||||
* stri_replace() (Andrei)
|
||||
* comparing arrays semantically (like Python) (Andrei)
|
||||
* move socket related functions to fsock.c
|
||||
* NOT binary safe:
|
||||
strtok()
|
||||
basename()
|
||||
dirname()
|
||||
strrpos()
|
||||
strrchr()
|
||||
strip_tags()
|
||||
|
||||
other cool stuff
|
||||
----------------
|
||||
* PVM extension
|
||||
@@ -1,4 +1,5 @@
|
||||
|
||||
|
||||
This is the ChangeLog from PHP3 as of Apr 12 1999.
|
||||
|
||||
Entries should be removed from this file, if you transfer changes
|
||||
@@ -14,10 +15,6 @@ over to PHP4.
|
||||
- PUT method support (mlemos@acm.org)
|
||||
- Fix parameter count problem in odbc_setoption()
|
||||
- Really fix implode() this time. The fix in 3.0.7 was bogus
|
||||
- Added more option to the date() function: (Colin Viebrock)
|
||||
'g' - hour, 12-hour format, no leading zeros
|
||||
'G' - hour, 24-hour format, no leading zeros
|
||||
'n' - month, numeric, no leading zeros
|
||||
- Make fgetss() slightly smarter
|
||||
- Add strip_tags() which uses the fgetss state-machine but acts on a string
|
||||
|
||||
@@ -38,12 +35,6 @@ March 1 1999, Version 3.0.7
|
||||
variables.
|
||||
- Clean up apxs build
|
||||
- Add INSTALL.REDHAT file to walk RedHat users through the install
|
||||
- Added optional second argument to mysql_fetch_array(); MYSQL_ASSOC will
|
||||
cause the resulting array to contain the associative indices only,
|
||||
MYSQL_NUM will cause the array to contain the numeric indices only (like
|
||||
mysql_fetch_row()) and MYSQL_BOTH would cause them both to be defined
|
||||
(default).
|
||||
- Backport the Zend debugging memory manager into the PHP 3.0.x tree.
|
||||
- Add function_exists() function.
|
||||
- Add another version of WDDX module
|
||||
(we need to pick a single implementation here)
|
||||
@@ -79,8 +70,6 @@ March 1 1999, Version 3.0.7
|
||||
- Fix bug in pdf_close() function
|
||||
- Add WDDX support (see http://www.wddx.org for more info)
|
||||
- Add similar_text() function
|
||||
- Constructors of parent classes weren't accessible to derived classes (as
|
||||
of 3.0.6). Fixed.
|
||||
- Introduce simple regex compilation cache
|
||||
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
## process this file with automake to produce Makefile.am
|
||||
AUTOMAKE_OPTIONS=foreign
|
||||
lib_LIBRARIES=libtsrm.a
|
||||
libtsrm_a_SOURCES = TSRM.c
|
||||
noinst_LTLIBRARIES=libtsrm.la
|
||||
libtsrm_la_SOURCES = TSRM.c
|
||||
+84
-20
@@ -34,8 +34,8 @@ struct _tsrm_tls_entry {
|
||||
|
||||
typedef struct {
|
||||
size_t size;
|
||||
void (*ctor)(void *resource);
|
||||
void (*dtor)(void *resource);
|
||||
ts_allocate_ctor ctor;
|
||||
ts_allocate_dtor dtor;
|
||||
} tsrm_resource_type;
|
||||
|
||||
|
||||
@@ -51,14 +51,22 @@ static int resource_types_table_size;
|
||||
|
||||
static MUTEX_T tsmm_mutex; /* thread-safe memory manager mutex */
|
||||
|
||||
/* New thread handlers */
|
||||
static void (*tsrm_new_thread_begin_handler)();
|
||||
static void (*tsrm_new_thread_end_handler)();
|
||||
|
||||
/* Debug support */
|
||||
static int tsrm_debug(const char *format, ...);
|
||||
static int tsrm_debug_status;
|
||||
|
||||
|
||||
/* Startup TSRM (call once for the entire process) */
|
||||
TSRM_FUNC int tsrm_startup(int expected_threads, int expected_resources, int debug_status)
|
||||
TSRM_API int tsrm_startup(int expected_threads, int expected_resources, int debug_status)
|
||||
{
|
||||
#if defined(GNUPTH)
|
||||
pth_init();
|
||||
#endif
|
||||
|
||||
tsrm_tls_table_size = expected_threads;
|
||||
tsrm_tls_table = (tsrm_tls_entry **) calloc(tsrm_tls_table_size, sizeof(tsrm_tls_entry *));
|
||||
if (!tsrm_tls_table) {
|
||||
@@ -75,6 +83,8 @@ TSRM_FUNC int tsrm_startup(int expected_threads, int expected_resources, int deb
|
||||
|
||||
tsmm_mutex = tsrm_mutex_alloc();
|
||||
|
||||
tsrm_new_thread_begin_handler = tsrm_new_thread_end_handler = NULL;
|
||||
|
||||
tsrm_debug_status = debug_status;
|
||||
|
||||
tsrm_debug("Started up TSRM, %d expected threads, %d expected resources\n", expected_threads, expected_resources);
|
||||
@@ -83,7 +93,7 @@ TSRM_FUNC int tsrm_startup(int expected_threads, int expected_resources, int deb
|
||||
|
||||
|
||||
/* Shutdown TSRM (call once for the entire process) */
|
||||
TSRM_FUNC void tsrm_shutdown()
|
||||
TSRM_API void tsrm_shutdown(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -110,11 +120,14 @@ TSRM_FUNC void tsrm_shutdown()
|
||||
}
|
||||
tsrm_mutex_free(tsmm_mutex);
|
||||
tsrm_debug("Shutdown TSRM\n");
|
||||
#if defined(GNUPTH)
|
||||
pth_kill();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/* allocates a new thread-safe-resource id */
|
||||
TSRM_FUNC ts_rsrc_id ts_allocate_id(size_t size, void (*ctor)(void *resource), void (*dtor)(void *resource))
|
||||
TSRM_API ts_rsrc_id ts_allocate_id(size_t size, ts_allocate_ctor ctor, ts_allocate_dtor dtor)
|
||||
{
|
||||
ts_rsrc_id new_id;
|
||||
int i;
|
||||
@@ -175,12 +188,21 @@ static void allocate_new_resource(tsrm_tls_entry **thread_resources_ptr, THREAD_
|
||||
(*thread_resources_ptr)->count = id_count;
|
||||
(*thread_resources_ptr)->thread_id = thread_id;
|
||||
(*thread_resources_ptr)->next = NULL;
|
||||
|
||||
tsrm_mutex_unlock(tsmm_mutex);
|
||||
|
||||
if (tsrm_new_thread_begin_handler) {
|
||||
tsrm_new_thread_begin_handler(thread_id);
|
||||
}
|
||||
for (i=0; i<id_count; i++) {
|
||||
(*thread_resources_ptr)->storage[i] = (void *) malloc(resource_types_table[i].size);
|
||||
if (resource_types_table[i].ctor) {
|
||||
resource_types_table[i].ctor((*thread_resources_ptr)->storage[i]);
|
||||
}
|
||||
}
|
||||
if (tsrm_new_thread_end_handler) {
|
||||
tsrm_new_thread_end_handler(thread_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -200,7 +222,8 @@ void *ts_resource(ts_rsrc_id id)
|
||||
|
||||
if (!thread_resources) {
|
||||
allocate_new_resource(&tsrm_tls_table[hash_value], thread_id);
|
||||
thread_resources = tsrm_tls_table[hash_value];
|
||||
return ts_resource(id);
|
||||
/* thread_resources = tsrm_tls_table[hash_value]; */
|
||||
} else {
|
||||
do {
|
||||
if (thread_resources->thread_id == thread_id) {
|
||||
@@ -210,8 +233,11 @@ void *ts_resource(ts_rsrc_id id)
|
||||
thread_resources = thread_resources->next;
|
||||
} else {
|
||||
allocate_new_resource(&thread_resources->next, thread_id);
|
||||
thread_resources = thread_resources->next;
|
||||
break;
|
||||
return ts_resource(id);
|
||||
/*
|
||||
* thread_resources = thread_resources->next;
|
||||
* break;
|
||||
*/
|
||||
}
|
||||
} while (thread_resources);
|
||||
}
|
||||
@@ -226,7 +252,7 @@ void *ts_resource(ts_rsrc_id id)
|
||||
|
||||
|
||||
/* frees all resources allocated for the current thread */
|
||||
void ts_free_thread()
|
||||
void ts_free_thread(void)
|
||||
{
|
||||
THREAD_T thread_id = tsrm_thread_id();
|
||||
int hash_value;
|
||||
@@ -278,10 +304,12 @@ void ts_free_id(ts_rsrc_id id)
|
||||
*/
|
||||
|
||||
/* Obtain the current thread id */
|
||||
TSRM_FUNC THREAD_T tsrm_thread_id(void)
|
||||
TSRM_API THREAD_T tsrm_thread_id(void)
|
||||
{
|
||||
#ifdef WIN32
|
||||
return GetCurrentThreadId();
|
||||
#elif defined(GNUPTH)
|
||||
return pth_self();
|
||||
#elif defined(PTHREADS)
|
||||
return pthread_self();
|
||||
#elif defined(NSAPI)
|
||||
@@ -293,12 +321,16 @@ TSRM_FUNC THREAD_T tsrm_thread_id(void)
|
||||
|
||||
|
||||
/* Allocate a mutex */
|
||||
TSRM_FUNC MUTEX_T tsrm_mutex_alloc( void )
|
||||
TSRM_API MUTEX_T tsrm_mutex_alloc( void )
|
||||
{
|
||||
MUTEX_T mutexp;
|
||||
|
||||
#ifdef WIN32
|
||||
mutexp = CreateMutex(NULL,FALSE,NULL);
|
||||
mutexp = malloc(sizeof(CRITICAL_SECTION));
|
||||
InitializeCriticalSection(mutexp);
|
||||
#elif defined(GNUPTH)
|
||||
mutexp = (MUTEX_T) malloc(sizeof(*mutexp));
|
||||
pth_mutex_init(mutexp);
|
||||
#elif defined(PTHREADS)
|
||||
mutexp = (pthread_mutex_t *)malloc(sizeof(pthread_mutex_t));
|
||||
pthread_mutex_init(mutexp,NULL);
|
||||
@@ -315,12 +347,15 @@ TSRM_FUNC MUTEX_T tsrm_mutex_alloc( void )
|
||||
|
||||
|
||||
/* Free a mutex */
|
||||
TSRM_FUNC void tsrm_mutex_free( MUTEX_T mutexp )
|
||||
TSRM_API void tsrm_mutex_free( MUTEX_T mutexp )
|
||||
{
|
||||
if (mutexp) {
|
||||
#ifdef WIN32
|
||||
CloseHandle(mutexp);
|
||||
DeleteCriticalSection(mutexp);
|
||||
#elif defined(GNUPTH)
|
||||
free(mutexp);
|
||||
#elif defined(PTHREADS)
|
||||
pthread_mutex_destroy(mutexp);
|
||||
free(mutexp);
|
||||
#elif defined(NSAPI)
|
||||
crit_terminate(mutexp);
|
||||
@@ -335,11 +370,16 @@ TSRM_FUNC void tsrm_mutex_free( MUTEX_T mutexp )
|
||||
|
||||
|
||||
/* Lock a mutex */
|
||||
TSRM_FUNC int tsrm_mutex_lock( MUTEX_T mutexp )
|
||||
TSRM_API int tsrm_mutex_lock( MUTEX_T mutexp )
|
||||
{
|
||||
//tsrm_debug("Mutex locked thread: %ld\n",tsrm_thread_id());
|
||||
#if 0
|
||||
tsrm_debug("Mutex locked thread: %ld\n",tsrm_thread_id());
|
||||
#endif
|
||||
#ifdef WIN32
|
||||
return WaitForSingleObject(mutexp,1000);
|
||||
EnterCriticalSection(mutexp);
|
||||
return 1;
|
||||
#elif defined(GNUPTH)
|
||||
return pth_mutex_acquire(mutexp, 0, NULL);
|
||||
#elif defined(PTHREADS)
|
||||
return pthread_mutex_lock(mutexp);
|
||||
#elif defined(NSAPI)
|
||||
@@ -351,11 +391,16 @@ TSRM_FUNC int tsrm_mutex_lock( MUTEX_T mutexp )
|
||||
|
||||
|
||||
/* Unlock a mutex */
|
||||
TSRM_FUNC int tsrm_mutex_unlock( MUTEX_T mutexp )
|
||||
TSRM_API int tsrm_mutex_unlock( MUTEX_T mutexp )
|
||||
{
|
||||
//tsrm_debug("Mutex unlocked thread: %ld\n",tsrm_thread_id());
|
||||
#if 0
|
||||
tsrm_debug("Mutex unlocked thread: %ld\n",tsrm_thread_id());
|
||||
#endif
|
||||
#ifdef WIN32
|
||||
return ReleaseMutex(mutexp);
|
||||
LeaveCriticalSection(mutexp);
|
||||
return 1;
|
||||
#elif defined(GNUPTH)
|
||||
return pth_mutex_release(mutexp);
|
||||
#elif defined(PTHREADS)
|
||||
return pthread_mutex_unlock(mutexp);
|
||||
#elif defined(NSAPI)
|
||||
@@ -366,6 +411,25 @@ TSRM_FUNC int tsrm_mutex_unlock( MUTEX_T mutexp )
|
||||
}
|
||||
|
||||
|
||||
TSRM_API void *tsrm_set_new_thread_begin_handler(void (*new_thread_begin_handler)(THREAD_T thread_id))
|
||||
{
|
||||
void *retval = (void *) tsrm_new_thread_begin_handler;
|
||||
|
||||
tsrm_new_thread_begin_handler = new_thread_begin_handler;
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
TSRM_API void *tsrm_set_new_thread_end_handler(void (*new_thread_end_handler)(THREAD_T thread_id))
|
||||
{
|
||||
void *retval = (void *) tsrm_new_thread_end_handler;
|
||||
|
||||
tsrm_new_thread_end_handler = new_thread_end_handler;
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Debug support
|
||||
*/
|
||||
|
||||
@@ -19,6 +19,7 @@ CFG=TSRM - Win32 Debug_TS
|
||||
!MESSAGE
|
||||
!MESSAGE "TSRM - Win32 Debug_TS" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "TSRM - Win32 Release_TS" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "TSRM - Win32 Release_TS_inline" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
@@ -74,12 +75,36 @@ LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "TSRM - Win32 Release_TS_inline"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "TSRM___Win32_Release_TS_inline"
|
||||
# PROP BASE Intermediate_Dir "TSRM___Win32_Release_TS_inline"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_TS_inline"
|
||||
# PROP Intermediate_Dir "Release_TS_inline"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "TSRM_EXPORTS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "TSRM_EXPORTS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x40d /d "NDEBUG"
|
||||
# ADD RSC /l 0x40d /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "TSRM - Win32 Debug_TS"
|
||||
# Name "TSRM - Win32 Release_TS"
|
||||
# Name "TSRM - Win32 Release_TS_inline"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
|
||||
+35
-22
@@ -18,11 +18,17 @@
|
||||
#define _TSRM_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# undef PACKAGE
|
||||
# undef VERSION
|
||||
# include "tsrm_config.h"
|
||||
# undef PACKAGE
|
||||
# undef VERSION
|
||||
#endif
|
||||
|
||||
#if WIN32||WINNT
|
||||
# include <windows.h>
|
||||
#elif defined(GNUPTH)
|
||||
# include <pth.h>
|
||||
#elif defined(PTHREADS)
|
||||
# include <pthread.h>
|
||||
#endif
|
||||
@@ -40,18 +46,13 @@ typedef int ts_rsrc_id;
|
||||
#endif
|
||||
|
||||
|
||||
/* Define TSRM_FUNC */
|
||||
#ifdef __cplusplus
|
||||
#define TSRM_FUNC extern "C" TSRM_API
|
||||
#else
|
||||
#define TSRM_FUNC TSRM_API
|
||||
#endif
|
||||
|
||||
|
||||
/* Define THREAD_T and MUTEX_T */
|
||||
#if defined(WIN32)
|
||||
# define THREAD_T DWORD
|
||||
# define MUTEX_T void *
|
||||
# define MUTEX_T CRITICAL_SECTION *
|
||||
#elif defined(GNUPTH)
|
||||
# define THREAD_T pth_t
|
||||
# define MUTEX_T pth_mutex_t *
|
||||
#elif defined(PTHREADS)
|
||||
# define THREAD_T pthread_t
|
||||
# define MUTEX_T pthread_mutex_t *
|
||||
@@ -63,35 +64,47 @@ typedef int ts_rsrc_id;
|
||||
# define MUTEX_T PISync *
|
||||
#endif
|
||||
|
||||
typedef void (*ts_allocate_ctor)(void *);
|
||||
typedef void (*ts_allocate_dtor)(void *);
|
||||
|
||||
#define THREAD_HASH_OF(thr,ts) thr%ts
|
||||
#define THREAD_HASH_OF(thr,ts) (unsigned long)thr%(unsigned long)ts
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* startup/shutdown */
|
||||
TSRM_FUNC int tsrm_startup(int expected_threads, int expected_resources, int debug_status);
|
||||
TSRM_FUNC void tsrm_shutdown();
|
||||
TSRM_API int tsrm_startup(int expected_threads, int expected_resources, int debug_status);
|
||||
TSRM_API void tsrm_shutdown(void);
|
||||
|
||||
/* allocates a new thread-safe-resource id */
|
||||
TSRM_FUNC ts_rsrc_id ts_allocate_id(size_t size, void (*ctor)(void *resource), void (*dtor)(void *resource));
|
||||
TSRM_API ts_rsrc_id ts_allocate_id(size_t size, ts_allocate_ctor ctor, ts_allocate_dtor dtor);
|
||||
|
||||
/* fetches the requested resource for the current thread */
|
||||
TSRM_FUNC void *ts_resource(ts_rsrc_id id);
|
||||
TSRM_API void *ts_resource(ts_rsrc_id id);
|
||||
|
||||
/* frees all resources allocated for the current thread */
|
||||
TSRM_FUNC void ts_free_thread();
|
||||
TSRM_API void ts_free_thread(void);
|
||||
|
||||
/* deallocates all occurrences of a given id */
|
||||
TSRM_FUNC void ts_free_id(ts_rsrc_id id);
|
||||
TSRM_API void ts_free_id(ts_rsrc_id id);
|
||||
|
||||
|
||||
/* Debug support */
|
||||
TSRM_FUNC void tsrm_debug_set(int status);
|
||||
TSRM_API void tsrm_debug_set(int status);
|
||||
|
||||
/* utility functions */
|
||||
TSRM_FUNC THREAD_T tsrm_thread_id(void);
|
||||
TSRM_FUNC MUTEX_T tsrm_mutex_alloc(void);
|
||||
TSRM_FUNC void tsrm_mutex_free(MUTEX_T mutexp);
|
||||
TSRM_FUNC int tsrm_mutex_lock(MUTEX_T mutexp);
|
||||
TSRM_FUNC int tsrm_mutex_unlock(MUTEX_T mutexp);
|
||||
TSRM_API THREAD_T tsrm_thread_id(void);
|
||||
TSRM_API MUTEX_T tsrm_mutex_alloc(void);
|
||||
TSRM_API void tsrm_mutex_free(MUTEX_T mutexp);
|
||||
TSRM_API int tsrm_mutex_lock(MUTEX_T mutexp);
|
||||
TSRM_API int tsrm_mutex_unlock(MUTEX_T mutexp);
|
||||
|
||||
TSRM_API void *tsrm_set_new_thread_begin_handler(void (*new_thread_begin_handler)(THREAD_T thread_id));
|
||||
TSRM_API void *tsrm_set_new_thread_end_handler(void (*new_thread_end_handler)(THREAD_T thread_id));
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _TSRM_H */
|
||||
@@ -1,7 +1 @@
|
||||
#undef PTHREADS
|
||||
|
||||
#ifdef DEFINE_TSRM_VERSION
|
||||
# undef PACKAGE
|
||||
# undef VERSION
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
|
||||
AC_DEFUN(AM_SET_LIBTOOL_VARIABLE,[
|
||||
LIBTOOL='$(SHELL) $(top_builddir)/libtool $1'
|
||||
])
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
# Makefile to generate build tools
|
||||
#
|
||||
# Standard usage:
|
||||
# make -f build.mk
|
||||
#
|
||||
# Written by Sascha Schumann
|
||||
#
|
||||
# $Id$
|
||||
|
||||
|
||||
LT_TARGETS = ltmain.sh ltconfig
|
||||
|
||||
config_h_in = tsrm_config.h.in
|
||||
|
||||
makefile_am_files = Makefile.am
|
||||
makefile_in_files = $(makefile_am_files:.am=.in)
|
||||
makefile_files = $(makefile_am_files:e.am=e)
|
||||
|
||||
targets = $(makefile_in_files) $(LT_TARGETS) configure $(config_h_in)
|
||||
|
||||
all: $(targets)
|
||||
|
||||
clean:
|
||||
rm -f $(targets)
|
||||
|
||||
$(LT_TARGETS):
|
||||
rm -f $(LT_TARGETS)
|
||||
libtoolize --automake $(AMFLAGS) -f
|
||||
|
||||
$(makefile_in_files): $(makefile_am_files)
|
||||
automake -a -i $(AMFLAGS) $(makefile_files)
|
||||
|
||||
aclocal.m4: configure.in acinclude.m4
|
||||
aclocal
|
||||
|
||||
$(config_h_in): configure.in acconfig.h
|
||||
# explicitly remove target since autoheader does not seem to work
|
||||
# correctly otherwise (timestamps are not updated)
|
||||
@rm -f $@
|
||||
autoheader
|
||||
|
||||
configure: aclocal.m4 configure.in
|
||||
autoconf
|
||||
+14
-5
@@ -1,24 +1,33 @@
|
||||
#!/bin/sh
|
||||
|
||||
case "$1" in
|
||||
--copy)
|
||||
automake_flags=--copy
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
|
||||
libtoolize --force --automake $automake_flags
|
||||
|
||||
mv aclocal.m4 aclocal.m4.old 2>/dev/null
|
||||
aclocal
|
||||
if cmp aclocal.m4.old aclocal.m4 > /dev/null 2>&1; then
|
||||
echo keeping ${1}aclocal.m4
|
||||
echo "buildconf: keeping ${1}aclocal.m4"
|
||||
mv aclocal.m4.old aclocal.m4
|
||||
else
|
||||
echo created or modified ${1}aclocal.m4
|
||||
echo "buildconf: created or modified ${1}aclocal.m4"
|
||||
fi
|
||||
|
||||
autoheader
|
||||
|
||||
automake --add-missing --include-deps
|
||||
automake --add-missing --include-deps $automake_flags
|
||||
|
||||
mv configure configure.old 2>/dev/null
|
||||
autoconf
|
||||
if cmp configure.old configure > /dev/null 2>&1; then
|
||||
echo keeping ${1}configure
|
||||
echo "buildconf: keeping ${1}configure"
|
||||
mv configure.old configure
|
||||
else
|
||||
echo created or modified ${1}configure
|
||||
echo "buildconf: created or modified ${1}configure"
|
||||
fi
|
||||
|
||||
+9
-12
@@ -7,18 +7,15 @@ AC_INIT(TSRM.c)
|
||||
AM_INIT_AUTOMAKE(TSRM, 1.0)
|
||||
AM_CONFIG_HEADER(tsrm_config.h)
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_CC_C_O
|
||||
AC_PROG_RANLIB
|
||||
sinclude(tsrm.m4)
|
||||
|
||||
TSRM_BASIC_CHECKS
|
||||
|
||||
AM_PROG_LIBTOOL
|
||||
if test "$enable_debug" != "yes"; then
|
||||
AM_SET_LIBTOOL_VARIABLE([--silent])
|
||||
fi
|
||||
|
||||
AC_CHECK_LIB(pthread, pthread_create, [
|
||||
AC_DEFINE(PTHREADS)
|
||||
LIBS="$LIBS -lpthread"
|
||||
],[
|
||||
AC_MSG_ERROR(You need pthreads to build TSRM.)
|
||||
])
|
||||
|
||||
AC_CHECK_HEADERS(stdarg.h)
|
||||
TSRM_PTHREAD
|
||||
|
||||
AC_OUTPUT(Makefile)
|
||||
|
||||
+130
@@ -0,0 +1,130 @@
|
||||
dnl Copyright (c) 1999, 2000 Sascha Schumann. All rights reserved.
|
||||
dnl
|
||||
dnl Redistribution and use in source and binary forms, with or without
|
||||
dnl modification, are permitted provided that the following conditions
|
||||
dnl are met:
|
||||
dnl
|
||||
dnl 1. Redistributions of source code must retain the above copyright
|
||||
dnl notice, this list of conditions and the following disclaimer.
|
||||
dnl
|
||||
dnl 2. Redistributions in binary form must reproduce the above copyright
|
||||
dnl notice, this list of conditions and the following disclaimer in
|
||||
dnl the documentation and/or other materials provided with the
|
||||
dnl distribution.
|
||||
dnl
|
||||
dnl THIS SOFTWARE IS PROVIDED BY SASCHA SCHUMANN ``AS IS'' AND ANY
|
||||
dnl EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
dnl PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SASCHA SCHUMANN OR
|
||||
dnl HIS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
dnl SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
dnl NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
dnl LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
dnl HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
dnl STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
dnl ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
dnl OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
dnl
|
||||
dnl PTHREADS_FLAGS
|
||||
dnl
|
||||
dnl Set some magic defines to achieve POSIX threads conformance
|
||||
dnl
|
||||
AC_DEFUN(PTHREADS_FLAGS,[
|
||||
if test -z "$host_alias"; then
|
||||
AC_MSG_ERROR(host_alias is not set. Make sure to run config.guess)
|
||||
fi
|
||||
case "$host_alias" in
|
||||
*solaris*)
|
||||
PTHREAD_FLAGS="-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT";;
|
||||
*freebsd*)
|
||||
PTHREAD_FLAGS="-D_REENTRANT -D_THREAD_SAFE";;
|
||||
*linux*)
|
||||
PTHREAD_FLAGS="-D_REENTRANT";;
|
||||
*aix*)
|
||||
PTHREAD_FLAGS="-D_THREAD_SAFE";;
|
||||
*irix*)
|
||||
PTHREAD_FLAGS="-D_POSIX_THREAD_SAFE_FUNCTIONS";;
|
||||
esac
|
||||
|
||||
if test -n "$PTHREAD_FLAGS"; then
|
||||
CPPFLAGS="$CPPFLAGS $PTHREAD_FLAGS"
|
||||
fi
|
||||
|
||||
])dnl
|
||||
dnl
|
||||
dnl PTHREADS_CHECK_COMPILE
|
||||
dnl
|
||||
dnl Check whether the current setup can use POSIX threads calls
|
||||
dnl
|
||||
AC_DEFUN(PTHREADS_CHECK_COMPILE, [
|
||||
AC_TRY_RUN( [
|
||||
#include <pthread.h>
|
||||
|
||||
void *thread_routine(void *data) {
|
||||
return data;
|
||||
}
|
||||
|
||||
int main() {
|
||||
pthread_t thd;
|
||||
int data = 1;
|
||||
return pthread_create(&thd, NULL, thread_routine, &data);
|
||||
} ], [
|
||||
pthreads_working="yes"
|
||||
], [
|
||||
pthreads_working="no"
|
||||
], pthreads_working="no" ) ] )dnl
|
||||
dnl
|
||||
dnl PTHREADS_CHECK()
|
||||
dnl
|
||||
dnl Try to find a way to enable POSIX threads
|
||||
dnl
|
||||
AC_DEFUN(PTHREADS_CHECK,[
|
||||
if test -n "$ac_cv_pthreads_lib"; then
|
||||
LIBS="$LIBS -l$ac_cv_pthreads_lib"
|
||||
fi
|
||||
|
||||
if test -n "$ac_cv_pthreads_cflags"; then
|
||||
CFLAGS="$CFLAGS $ac_cv_pthreads_cflags"
|
||||
fi
|
||||
|
||||
PTHREADS_CHECK_COMPILE
|
||||
|
||||
AC_CACHE_CHECK(for pthreads_cflags,ac_cv_pthreads_cflags,[
|
||||
ac_cv_pthreads_cflags=""
|
||||
if test "$pthreads_working" != "yes"; then
|
||||
for flag in -pthreads -pthread -mthreads; do
|
||||
ac_save="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $flag"
|
||||
PTHREADS_CHECK_COMPILE
|
||||
if test "$pthreads_working" = "yes"; then
|
||||
ac_cv_pthreads_cflags="$flag"
|
||||
break
|
||||
fi
|
||||
CFLAGS="$ac_save"
|
||||
done
|
||||
fi
|
||||
])
|
||||
|
||||
AC_CACHE_CHECK(for pthreads_lib, ac_cv_pthreads_lib,[
|
||||
ac_cv_pthreads_lib=""
|
||||
if test "$pthreads_working" != "yes"; then
|
||||
for lib in pthread pthreads c_r; do
|
||||
ac_save="$LIBS"
|
||||
LIBS="$LIBS -l$lib"
|
||||
PTHREADS_CHECK_COMPILE
|
||||
if test "$pthreads_working" = "yes"; then
|
||||
ac_cv_pthreads_lib="$lib"
|
||||
break
|
||||
fi
|
||||
LIBS="$ac_save"
|
||||
done
|
||||
fi
|
||||
])
|
||||
|
||||
if test "$pthreads_working" = "yes"; then
|
||||
threads_result="POSIX Threads found"
|
||||
else
|
||||
threads_result="POSIX Threads not found"
|
||||
fi
|
||||
])dnl
|
||||
@@ -0,0 +1,98 @@
|
||||
|
||||
dnl TSRM_CHECK_GCC_ARG(ARG, ACTION-IF-FOUND, ACTION-IF-NOT_FOUND)
|
||||
AC_DEFUN(TSRM_CHECK_GCC_ARG,[
|
||||
gcc_arg_name=[ac_cv_gcc_arg]translit($1,A-Z-,a-z_)
|
||||
AC_CACHE_CHECK([whether $CC supports $1], [ac_cv_gcc_arg]translit($1,A-Z-,a-z_), [
|
||||
echo 'void somefunc() { };' > conftest.c
|
||||
cmd='$CC $1 -c conftest.c'
|
||||
if eval $cmd 2>&1 | egrep -e $1 >/dev/null ; then
|
||||
ac_result=no
|
||||
else
|
||||
ac_result=yes
|
||||
fi
|
||||
eval $gcc_arg_name=$ac_result
|
||||
rm -f conftest.*
|
||||
])
|
||||
if eval test "\$$gcc_arg_name" = "yes"; then
|
||||
$2
|
||||
else
|
||||
:
|
||||
$3
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN(TSRM_BASIC_CHECKS,[
|
||||
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
dnl AC_REQUIRE([AM_PROG_CC_STDC])dnl
|
||||
AC_REQUIRE([AC_PROG_CC_C_O])dnl
|
||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||
|
||||
AC_CHECK_HEADERS(stdarg.h)
|
||||
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN(TSRM_CHECK_PTH,[
|
||||
|
||||
AC_MSG_CHECKING(for GNU Pth)
|
||||
PTH_PREFIX="`$1 --prefix`"
|
||||
if test -z "$PTH_PREFIX"; then
|
||||
AC_MSG_RESULT(Please check your Pth installation)
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS `$1 --cflags`"
|
||||
LDFLAGS="$LDFLAGS `$1 --ldflags`"
|
||||
LIBS="$LIBS `$1 --libs`"
|
||||
|
||||
AC_DEFINE(GNUPTH, 1, [Whether you use GNU Pth])
|
||||
AC_MSG_RESULT(yes - installed in $PTH_PREFIX)
|
||||
|
||||
])
|
||||
|
||||
sinclude(threads.m4)
|
||||
sinclude(TSRM/threads.m4)
|
||||
|
||||
AC_DEFUN(TSRM_CHECK_PTHREADS,[
|
||||
|
||||
PTHREADS_CHECK
|
||||
|
||||
if test "$pthreads_working" != "yes"; then
|
||||
AC_MSG_ERROR(Your system seems to lack POSIX threads.)
|
||||
fi
|
||||
|
||||
AC_DEFINE(PTHREADS, 1, Whether to use Pthreads)
|
||||
|
||||
AC_MSG_CHECKING(for POSIX threads)
|
||||
AC_MSG_RESULT(yes)
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN(TSRM_OTHER_CHECKS,[
|
||||
|
||||
dnl For the thread implementations, we always use --with-*
|
||||
dnl to maintain consistency
|
||||
|
||||
AC_ARG_WITH(tsrm-pth,
|
||||
[ --with-tsrm-pth[=pth-config] Use GNU Pth.],[
|
||||
TSRM_PTH=$withval
|
||||
],[
|
||||
TSRM_PTH=no
|
||||
])
|
||||
|
||||
AC_ARG_WITH(tsrm-pthreads,
|
||||
[ --with-tsrm-pthreads Use POSIX threads (default)],[
|
||||
TSRM_PTHREADS=$withval
|
||||
],[
|
||||
TSRM_PTHREADS=yes
|
||||
])
|
||||
|
||||
test "$TSRM_PTH" = "yes" && TSRM_PTH=pth-config
|
||||
|
||||
if test "$TSRM_PTH" != "no"; then
|
||||
TSRM_CHECK_PTH($TSRM_PTH)
|
||||
elif test "$TSRM_PTHREADS" != "no"; then
|
||||
TSRM_CHECK_PTHREADS
|
||||
fi
|
||||
|
||||
])
|
||||
@@ -1,17 +0,0 @@
|
||||
- Persistant per-process scripting
|
||||
|
||||
Apache 1.3 has added things that makes this much easier than before.
|
||||
The module structure now contains a child_init hook and a child_exit
|
||||
hook where you can register functions to be called when an httpd
|
||||
process starts up and when one shuts down (due to MaxRequestsPerChild
|
||||
or a Kill). The only real trick now is to come up with some sort of
|
||||
syntax for specifying what to do from the child_init call and the
|
||||
child_exit call.
|
||||
|
||||
One idea is to be able to add a <PHP>...</PHP> block to the Apache
|
||||
httpd.conf file which would somehow define a series of PHP statements
|
||||
to be executed from the child_* calls. One for startup and another
|
||||
block for shutdown. These blocks would work with the per-process
|
||||
memory pool, so any variables initialized here would have a lifespan
|
||||
equal to that of the httpd process. Basically request-spanning
|
||||
global variables.
|
||||
@@ -1,55 +0,0 @@
|
||||
V Do yystype_ptr and hash pointers the right way - use the hash
|
||||
pointer and the bucket pointer, instead of a pointer to the data.
|
||||
Allows for a real unset() among other things.
|
||||
V Improve performance of simple variable lookups
|
||||
* Improve string performance by using smarter memory allocation methods
|
||||
- Improve preprocessor (handle require() efficiently), possibly handle
|
||||
automatic preprocessing for sites based on timestamp
|
||||
V Use a reference count mechanism to prevent unnecessary duplication of data.
|
||||
* Write and stabilize a complete persistent data API. Feature wishlist:
|
||||
- memory manager using shared memory
|
||||
- process-global symbol table
|
||||
- make api inter-thread capable for win32 and some far off future where unix
|
||||
version will be multithreaded
|
||||
V Handle out of memory (inside emalloc()?)
|
||||
* Try to figure out a way to declare *real* global variables
|
||||
* Improve the reading of configuration variables into php3_ini (generalize)
|
||||
Make it possible to implement config_get("configuration_variable") and
|
||||
config_set("configuration_variable","value") that'll work with *php3_ini*,
|
||||
not the configuration hash!
|
||||
* Bundle some nice classes (like Bjørn's graphing class)
|
||||
* Bundle some database abstraction classes
|
||||
* Distribute binaries
|
||||
* Clean up API and modules to make .so modules portable across CGI and server
|
||||
binaries
|
||||
* dbm cleanup (don't arbitrarily pick, and support multiple concurrent formats)
|
||||
* start system defines so that we can move away from the standard c lib on
|
||||
windows to the win32 lib. (file functions primarily)
|
||||
* COM implementation so php can be used as an asp language (cant find any docs
|
||||
on how this is done though)
|
||||
* Clean up the file structure so the top-level directory isn't such a mess.
|
||||
* Bring the module concept to maturity: use libtool and make it
|
||||
possible to decide at compile time whether you want to compile a
|
||||
module statically or dynamically. Remove the distinction between
|
||||
the stuff currently in dl/ and functions/.
|
||||
* a way of letting each module specify its options, so ini file options and
|
||||
Apache directives can be set up from the same specification.
|
||||
V Make it possible to declare smarter user functions: (done in 3.0)
|
||||
- Optional parameters
|
||||
- Parameters that are forced/prefered by reference
|
||||
* Make object parsing more general, and allow nested arrays/objects with
|
||||
unlimited levels.
|
||||
V Make it possible to copy references of variables.
|
||||
* data tainting (like perl -T)
|
||||
* multi-dimensional array support in GET/POST/COOKIE handling code
|
||||
* Persistent functions and classes
|
||||
* odbc_fetch_assoc
|
||||
* Add env handling to gpc_order
|
||||
* Populate track_vars regardless of gpc_order
|
||||
* a real exec() function
|
||||
* Support passing arguments to functions by name (e.g. foo(arg1 => "bar", arg2 => "foobar"))
|
||||
* Add an optional setting to destroy persistent resources if a PHP script terminates
|
||||
abnormally
|
||||
V COM automation support for Win32
|
||||
? Add a setting for making function names case sensitive
|
||||
* stat() files before feeding them to flex - it doesn't handle special files very well
|
||||
+109
-30
@@ -1,37 +1,116 @@
|
||||
Zend Temporary License
|
||||
======================
|
||||
---------------------------------------------------------------------------
|
||||
The Zend License, version 0.92
|
||||
Copyright (C) 1999-2000 Zend Technologies Ltd.
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
This is a temporary license, that is in effect until the final Zend license
|
||||
is available.
|
||||
The Zend scripting engine library is a product of Zend Technologies Ltd.
|
||||
It may be used and/or distributed under the terms of the Q Public
|
||||
License (QPL) version 1.0, enclosed below.
|
||||
|
||||
* The final license will include the ability to distribute Zend freely,
|
||||
as a part of PHP (in both compiled and source code formats). It may
|
||||
(and probably will) allow to redistribute Zend under other circumstances
|
||||
as well, but at the very least, it'll be freely distributed as a part
|
||||
of PHP.
|
||||
For more information about Zend please visit http://www.zend.com/
|
||||
For license related questions please mail license@zend.com
|
||||
|
||||
* The source code in the Zend engine is the property of Andi Gutmans and
|
||||
Zeev Suraski. Parts of this code are based on source code taken from
|
||||
PHP 3.0, which may include several patches and enhancements that weren't
|
||||
made by us (Andi&Zeev). If you're the author of such a patch and you're
|
||||
not willing to give up ownership over your patch to us, please contact
|
||||
us as soon as possible, so we can remove it. We're doing this so that
|
||||
we'd be eligible to sell the Zend engine for uses other than PHP, most
|
||||
notably - as an embedded part of possible commercial products that we'd
|
||||
have.
|
||||
===========================================================================
|
||||
|
||||
* Patches submitted to the Zend CVS automatically fall under this license,
|
||||
and by submitting them you're implicitly giving up your ownership over
|
||||
this patch to us.
|
||||
THE Q PUBLIC LICENSE
|
||||
version 1.0
|
||||
|
||||
* Until further notice, Zend is in a status of a closed beta test. That means
|
||||
that only people that were explicitly given the right to access the Zend
|
||||
CVS repository are allowed to use it. If you're reading this file and you
|
||||
weren't explicitly given the right to access the Zend CVS repository from
|
||||
either Andi Gutmans or Zeev Suraski - you're not supposed to have it - please
|
||||
erase the Zend files from your system. When the closed beta period finishes,
|
||||
the Zend CVS tree will be open for the public (in read-only mode, of course).
|
||||
Copyright (C) 1999 Troll Tech AS, Norway.
|
||||
Everyone is permitted to copy and
|
||||
distribute this license document.
|
||||
|
||||
The intent of this license is to establish freedom to share and change the
|
||||
software regulated by this license under the open source model.
|
||||
|
||||
This license applies to any software containing a notice placed by the
|
||||
copyright holder saying that it may be distributed under the terms of
|
||||
the Q Public License version 1.0. Such software is herein referred to as
|
||||
the Software. This license covers modification and distribution of the
|
||||
Software, use of third-party application programs based on the Software,
|
||||
and development of free software which uses the Software.
|
||||
|
||||
Granted Rights
|
||||
|
||||
1. You are granted the non-exclusive rights set forth in this license
|
||||
provided you agree to and comply with any and all conditions in this
|
||||
license. Whole or partial distribution of the Software, or software
|
||||
items that link with the Software, in any form signifies acceptance of
|
||||
this license.
|
||||
|
||||
2. You may copy and distribute the Software in unmodified form provided
|
||||
that the entire package, including - but not restricted to - copyright,
|
||||
trademark notices and disclaimers, as released by the initial developer
|
||||
of the Software, is distributed.
|
||||
|
||||
3. You may make modifications to the Software and distribute your
|
||||
modifications, in a form that is separate from the Software, such as
|
||||
patches. The following restrictions apply to modifications:
|
||||
|
||||
a. Modifications must not alter or remove any copyright notices in
|
||||
the Software.
|
||||
|
||||
b. When modifications to the Software are released under this
|
||||
license, a non-exclusive royalty-free right is granted to the
|
||||
initial developer of the Software to distribute your modification
|
||||
in future versions of the Software provided such versions remain
|
||||
available under these terms in addition to any other license(s) of
|
||||
the initial developer.
|
||||
|
||||
4. You may distribute machine-executable forms of the Software or
|
||||
machine-executable forms of modified versions of the Software, provided
|
||||
that you meet these restrictions:
|
||||
|
||||
a. You must include this license document in the distribution.
|
||||
|
||||
b. You must ensure that all recipients of the machine-executable forms
|
||||
are also able to receive the complete machine-readable source code
|
||||
to the distributed Software, including all modifications, without
|
||||
any charge beyond the costs of data transfer, and place prominent
|
||||
notices in the distribution explaining this.
|
||||
|
||||
c. You must ensure that all modifications included in the
|
||||
machine-executable forms are available under the terms of this
|
||||
license.
|
||||
|
||||
5. You may use the original or modified versions of the Software to
|
||||
compile, link and run application programs legally developed by you
|
||||
or by others.
|
||||
|
||||
6. You may develop application programs, reusable components and other
|
||||
software items that link with the original or modified versions of the
|
||||
Software. These items, when distributed, are subject to the following
|
||||
requirements:
|
||||
|
||||
a. You must ensure that all recipients of machine-executable forms of
|
||||
these items are also able to receive and use the complete
|
||||
machine-readable source code to the items without any charge
|
||||
beyond the costs of data transfer.
|
||||
|
||||
b. You must explicitly license all recipients of your items to use
|
||||
and re-distribute original and modified versions of the items in
|
||||
both machine-executable and source code forms. The recipients must
|
||||
be able to do so without any charges whatsoever, and they must be
|
||||
able to re-distribute to anyone they choose.
|
||||
|
||||
|
||||
Any questions regarding Zend or this license should be addressed via Email to
|
||||
zend@zend.com.
|
||||
c. If the items are not available to the general public, and the
|
||||
initial developer of the Software requests a copy of the items,
|
||||
then you must supply one.
|
||||
|
||||
Limitations of Liability
|
||||
|
||||
In no event shall the initial developers or copyright holders be liable
|
||||
for any damages whatsoever, including - but not restricted to - lost
|
||||
revenue or profits or other direct, indirect, special, incidental or
|
||||
consequential damages, even if they have been advised of the possibility
|
||||
of such damages, except to the extent invariable law, if any, provides
|
||||
otherwise.
|
||||
|
||||
No Warranty
|
||||
|
||||
The Software and this license document are provided AS IS with NO WARRANTY
|
||||
OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS
|
||||
FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
===========================================================================
|
||||
+28
-13
@@ -1,26 +1,41 @@
|
||||
## Process this file with automake to produce Makefile.in -*- makefile -*-
|
||||
|
||||
#CLEANFILES = zend-parser.c zend-parser.h zend-scanner.c zend-parser.output
|
||||
|
||||
AUTOMAKE_OPTIONS=foreign
|
||||
noinst_LIBRARIES=libzend.a
|
||||
libzend_a_SOURCES=\
|
||||
zend-parser.y zend-scanner.l \
|
||||
zend_alloc.c zend_compile.c zend_constants.c \
|
||||
EXTRA_LTLIBRARIES=libZend_cc.la libZend_c.la
|
||||
noinst_LTLIBRARIES=$(ZEND_SCANNER) libZend.la
|
||||
|
||||
libZend_cc_la_SOURCES=zend-scanner-cc.cc
|
||||
libZend_c_la_SOURCES=zend-scanner.c
|
||||
|
||||
libZend_la_SOURCES=\
|
||||
zend-parser.y \
|
||||
zend_alloc.c zend_compile.c zend_constants.c zend_dynamic_array.c \
|
||||
zend_execute.c zend_execute_API.c zend_highlight.c zend_llist.c \
|
||||
zend_opcode.c zend_operators.c zend_ptr_stack.c zend_stack.c \
|
||||
zend_variables.c zend.c zend_API.c zend_extensions.c zend_hash.c \
|
||||
zend_list.c zend_indent.c
|
||||
zend_list.c zend_indent.c zend_builtin_functions.c zend_sprintf.c
|
||||
|
||||
libZend_la_LIBADD = $(ZEND_SCANNER)
|
||||
libZend_la_LDFLAGS = @EXTRA_LIBS@
|
||||
libZend_la_DEPENDENCIES = $(ZEND_SCANNER)
|
||||
|
||||
# automake isn't too clever about "non-standard" use of lex and yacc
|
||||
|
||||
zend-scanner.c: zend-scanner.l
|
||||
$(LEX) -Pzend -ozend-scanner.c -i zend-scanner.l
|
||||
zend-scanner.l: zend-parser.h
|
||||
|
||||
zend-scanner.cc: zend-scanner.l
|
||||
$(LEX) -+ -Sflex.skl -Pzend -ozend-scanner.cc -i zend-scanner.l
|
||||
zend-scanner.c: zend-scanner.l
|
||||
$(LEX) -Pzend -o$@ -i $(srcdir)/zend-scanner.l
|
||||
|
||||
zend-scanner-cc.cc: zend-scanner.l
|
||||
$(LEX) -+ -B -i -S$(srcdir)/flex.skl -Pzend -o$@ $(srcdir)/zend-scanner.l
|
||||
|
||||
zend-parser.h: zend-parser.c
|
||||
zend-parser.c: zend-parser.y
|
||||
$(YACC) -p zend -v -d zend-parser.y -o zend-parser.c
|
||||
|
||||
clean:
|
||||
-rm -f zend-parser.c zend-parser.h zend-scanner.c zend-parser.output
|
||||
$(YACC) -p zend -v -d $(srcdir)/zend-parser.y -o zend-parser.c
|
||||
|
||||
depend:
|
||||
|
||||
zend_execute.lo: $(srcdir)/zend_execute.c
|
||||
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(INLINE_CFLAGS) -c $(srcdir)/zend_execute.c
|
||||
+1
-1
@@ -84,7 +84,7 @@ shamelessly lying about it. Here's why:
|
||||
|
||||
* static variable initializers only accept scalar values
|
||||
(in PHP 3.0 they accepted any valid expression). The impact
|
||||
should be somewhere in between void and non existant, since
|
||||
should be somewhere in between void and non existent, since
|
||||
initializing a static variable with anything but a simple
|
||||
static value makes no sense at all.
|
||||
|
||||
|
||||
+432
-363
@@ -1,363 +1,432 @@
|
||||
# Microsoft Developer Studio Project File - Name="libzend" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
CFG=libzend - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "libzend.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "libzend.mak" CFG="libzend - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "libzend - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "libzend - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "libzend - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDebug" /D "_MBCS" /D "_LIB" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug" /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "WIN32" /D "_MBCS" /D ZEND_DEBUG=0 /FR /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x40d /d "NDebug"
|
||||
# ADD RSC /l 0x40d /d "NDebug"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "libzend - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_Debug" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_Debug" /D "_LIB" /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D ZEND_DEBUG=1 /FR /YX /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x40d /d "_Debug"
|
||||
# ADD RSC /l 0x40d /d "_Debug"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "libzend - Win32 Release"
|
||||
# Name "libzend - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend-parser.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend-scanner.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_alloc.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_API.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_compile.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_constants.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_execute.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_execute_API.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_extensions.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_hash.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_highlight.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_indent.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_list.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_llist.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_opcode.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_operators.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ptr_stack.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_sprintf.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_stack.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_variables.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\config.w32.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\FlexLexer.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\modules.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend-parser.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend-scanner.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_alloc.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_API.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_compile.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_constants.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_errors.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_execute.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_extensions.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_globals.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_hash.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_highlight.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_indent.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_list.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_llist.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_operators.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ptr_stack.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_stack.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_variables.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Parsers"
|
||||
|
||||
# PROP Default_Filter "y"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend-parser.y"
|
||||
|
||||
!IF "$(CFG)" == "libzend - Win32 Release"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend-parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend-parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p zend zend-parser.y
|
||||
|
||||
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "libzend - Win32 Debug"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend-parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend-parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p zend zend-parser.y
|
||||
|
||||
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Scanners"
|
||||
|
||||
# PROP Default_Filter "l"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend-scanner.l"
|
||||
|
||||
!IF "$(CFG)" == "libzend - Win32 Release"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend-scanner.l"
|
||||
|
||||
"zend-scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -i -Pzend -ozend-scanner.c zend-scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "libzend - Win32 Debug"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend-scanner.l"
|
||||
|
||||
"zend-scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -i -Pzend -ozend-scanner.c zend-scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Text Files"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ZEND_BUGS
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ZEND_CHANGES
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ZEND_TODO
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resources"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend.ico
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
# Microsoft Developer Studio Project File - Name="Zend" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
CFG=Zend - Win32 Release_inline
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Zend.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Zend.mak" CFG="Zend - Win32 Release_inline"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "Zend - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Zend - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Zend - Win32 Release_inline" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "Zend - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDebug" /D "_MBCS" /D "_LIB" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug" /D "_LIB" /D "Zend_EXPORTS" /D ZEND_DEBUG=0 /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /FR /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x40d /d "NDebug"
|
||||
# ADD RSC /l 0x40d /d "NDebug"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_Debug" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_Debug" /D "_LIB" /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D ZEND_DEBUG=1 /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x40d /d "_Debug"
|
||||
# ADD RSC /l 0x40d /d "_Debug"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Output_Dir "Zend___Win32_Release_inline"
|
||||
# PROP BASE Intermediate_Dir "Zend___Win32_Release_inline"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Output_Dir "Release_inline"
|
||||
# PROP Intermediate_Dir "Release_inline"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug" /D "_LIB" /D "Zend_EXPORTS" /D ZEND_DEBUG=0 /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /FR /FD /c
|
||||
# SUBTRACT BASE CPP /YX
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug" /D "_LIB" /D "Zend_EXPORTS" /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D ZEND_DEBUG=0 /D "ZEND_WIN32_FORCE_INLINE" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /FR /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x40d /d "NDebug"
|
||||
# ADD RSC /l 0x40d /d "NDebug"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "Zend - Win32 Release"
|
||||
# Name "Zend - Win32 Debug"
|
||||
# Name "Zend - Win32 Release_inline"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend-parser.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend-scanner.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_alloc.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_API.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_builtin_functions.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_compile.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_constants.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_execute.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_execute_API.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_extensions.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_hash.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_highlight.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_indent.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_list.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_llist.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_opcode.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_operators.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ptr_stack.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_sprintf.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_stack.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_variables.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\FlexLexer.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\modules.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend-parser.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend-scanner.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_alloc.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_API.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_builtin_functions.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_compile.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_config.w32.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_constants.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_errors.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_execute.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_extensions.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_fast_cache.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_globals.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_hash.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_highlight.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_indent.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_list.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_llist.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_operators.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ptr_stack.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_stack.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_variables.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Parsers"
|
||||
|
||||
# PROP Default_Filter "y"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend-parser.y"
|
||||
|
||||
!IF "$(CFG)" == "Zend - Win32 Release"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend-parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
if not "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p zend zend-parser.y \
|
||||
if "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p zend zend-parser.y \
|
||||
|
||||
|
||||
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend-parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
if not "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p zend zend-parser.y \
|
||||
if "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p zend zend-parser.y \
|
||||
|
||||
|
||||
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend-parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
if not "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p zend zend-parser.y \
|
||||
if "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p zend zend-parser.y \
|
||||
|
||||
|
||||
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Scanners"
|
||||
|
||||
# PROP Default_Filter "l"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend-scanner.l"
|
||||
|
||||
!IF "$(CFG)" == "Zend - Win32 Release"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend-scanner.l"
|
||||
|
||||
"zend-scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -i -Pzend -ozend-scanner.c zend-scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend-scanner.l"
|
||||
|
||||
"zend-scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -i -Pzend -ozend-scanner.c zend-scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend-scanner.l"
|
||||
|
||||
"zend-scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -i -Pzend -ozend-scanner.c zend-scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Text Files"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ZEND_BUGS
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ZEND_CHANGES
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ZEND_TODO
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resources"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend.ico
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
+223
@@ -0,0 +1,223 @@
|
||||
|
||||
AC_DEFUN(LIBZEND_BISON_CHECK,[
|
||||
|
||||
if test "$YACC" != "bison -y"; then
|
||||
AC_MSG_WARN(You will need bison if you want to regenerate the Zend parser.)
|
||||
else
|
||||
AC_MSG_CHECKING(bison version)
|
||||
set `bison --version| sed -e 's/^GNU Bison version //' -e 's/\./ /'`
|
||||
if test "${1}" = "1" -a "${2}" -lt "25"; then
|
||||
AC_MSG_WARN(You will need bison 1.25 if you want to regenerate the Zend parser (found ${1}.${2}).)
|
||||
fi
|
||||
AC_MSG_RESULT(${1}.${2} (ok))
|
||||
fi
|
||||
|
||||
])
|
||||
|
||||
AC_DEFUN(LIBZEND_BASIC_CHECKS,[
|
||||
|
||||
AC_REQUIRE([AC_PROG_YACC])
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_PROG_CC_C_O])
|
||||
AC_REQUIRE([AM_PROG_LEX])
|
||||
AC_REQUIRE([AC_HEADER_STDC])
|
||||
|
||||
LIBZEND_BISON_CHECK
|
||||
|
||||
dnl Ugly hack to get around a problem with gcc on AIX.
|
||||
if test "$CC" = "gcc" -a "$ac_cv_prog_cc_g" = "yes" -a \
|
||||
"`uname -sv`" = "AIX 4"; then
|
||||
CFLAGS=`echo $CFLAGS | sed -e 's/-g//'`
|
||||
fi
|
||||
|
||||
dnl Hack to work around a Mac OS X cpp problem
|
||||
dnl Known versions needing this workaround are 5.3 and 5.4
|
||||
if test "$ac_cv_prog_gcc" = "yes" -a "`uname -s`" = "Rhapsody"; then
|
||||
CPPFLAGS="$CPPFLAGS -traditional-cpp"
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADERS(
|
||||
limits.h \
|
||||
malloc.h \
|
||||
string.h \
|
||||
unistd.h \
|
||||
stdarg.h \
|
||||
sys/types.h \
|
||||
signal.h \
|
||||
unix.h \
|
||||
dlfcn.h)
|
||||
|
||||
AC_TYPE_SIZE_T
|
||||
AC_TYPE_SIGNAL
|
||||
|
||||
AC_CHECK_LIB(c, dlopen, [
|
||||
# fake it
|
||||
AC_DEFINE(HAVE_LIBDL) ], [
|
||||
AC_CHECK_LIB(dl, dlopen, [
|
||||
LIBS="-ldl $LIBS"
|
||||
AC_DEFINE(HAVE_LIBDL) ], []) ])
|
||||
|
||||
|
||||
dnl This is required for QNX and may be some BSD derived systems
|
||||
AC_CHECK_TYPE( uint, unsigned int )
|
||||
AC_CHECK_TYPE( ulong, unsigned long )
|
||||
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_FUNC_VPRINTF
|
||||
AC_FUNC_MEMCMP
|
||||
AC_FUNC_ALLOCA
|
||||
AC_CHECK_FUNCS(memcpy strdup getpid kill strtod strtol)
|
||||
AC_ZEND_BROKEN_SPRINTF
|
||||
|
||||
AC_SUBST(ZEND_SCANNER)
|
||||
|
||||
])
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
AC_DEFUN(LIBZEND_ENABLE_DEBUG,[
|
||||
|
||||
AC_ARG_ENABLE(debug,
|
||||
[ --disable-debug Compile without debugging symbols],[
|
||||
ZEND_DEBUG=$enableval
|
||||
],[
|
||||
ZEND_DEBUG=yes
|
||||
])
|
||||
|
||||
])
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
AC_DEFUN(LIBZEND_OTHER_CHECKS,[
|
||||
|
||||
AC_ARG_ENABLE(experimental-zts,
|
||||
[ --enable-experimental-zts This will most likely break your build],[
|
||||
ZEND_EXPERIMENTAL_ZTS=$enableval
|
||||
],[
|
||||
ZEND_EXPERIMENTAL_ZTS=no
|
||||
])
|
||||
|
||||
AC_ARG_ENABLE(inline-optimization,
|
||||
[ --enable-inline-optimization If you have much memory and are using
|
||||
gcc, you might try this.],[
|
||||
ZEND_INLINE_OPTIMIZATION=$enableval
|
||||
],[
|
||||
ZEND_INLINE_OPTIMIZATION=no
|
||||
])
|
||||
|
||||
AC_ARG_ENABLE(memory-limit,
|
||||
[ --enable-memory-limit Compile with memory limit support. ], [
|
||||
ZEND_MEMORY_LIMIT=$enableval
|
||||
],[
|
||||
ZEND_MEMORY_LIMIT=no
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING(whether to enable experimental ZTS)
|
||||
AC_MSG_RESULT($ZEND_EXPERIMENTAL_ZTS)
|
||||
|
||||
AC_MSG_CHECKING(whether to enable inline optimization for GCC)
|
||||
AC_MSG_RESULT($ZEND_INLINE_OPTIMIZATION)
|
||||
|
||||
AC_MSG_CHECKING(whether to enable a memory limit)
|
||||
AC_MSG_RESULT($ZEND_MEMORY_LIMIT)
|
||||
|
||||
AC_MSG_CHECKING(whether to enable Zend debugging)
|
||||
AC_MSG_RESULT($ZEND_DEBUG)
|
||||
|
||||
if test "$ZEND_DEBUG" = "yes"; then
|
||||
AC_DEFINE(ZEND_DEBUG,1)
|
||||
echo " $CFLAGS" | grep ' -g' >/dev/null || DEBUG_CFLAGS="-g"
|
||||
test -n "$GCC" && DEBUG_CFLAGS="$DEBUG_CFLAGS -Wall"
|
||||
test -n "$GCC" && test "$USE_MAINTAINER_MODE" = "yes" && \
|
||||
DEBUG_CFLAGS="$DEBUG_CFLAGS -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations"
|
||||
else
|
||||
AC_DEFINE(ZEND_DEBUG,0)
|
||||
fi
|
||||
|
||||
test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS"
|
||||
|
||||
if test "$ZEND_EXPERIMENTAL_ZTS" = "yes"; then
|
||||
AC_DEFINE(ZTS)
|
||||
ZEND_SCANNER_TYPE=cc
|
||||
CPPFLAGS="$CPPFLAGS -I../TSRM"
|
||||
LIBZEND_CPLUSPLUS_CHECKS
|
||||
else
|
||||
ZEND_SCANNER_TYPE=c
|
||||
fi
|
||||
|
||||
ZEND_SCANNER="libZend_${ZEND_SCANNER_TYPE}.la"
|
||||
|
||||
if test "$ZEND_MEMORY_LIMIT" = "yes"; then
|
||||
AC_DEFINE(MEMORY_LIMIT, 1, [Memory limit])
|
||||
else
|
||||
AC_DEFINE(MEMORY_LIMIT, 0, [Memory limit])
|
||||
fi
|
||||
|
||||
changequote({,})
|
||||
if test -n "$GCC" && test "$ZEND_INLINE_OPTIMIZATION" != "yes"; then
|
||||
INLINE_CFLAGS=`echo $ac_n "$CFLAGS $ac_c" | sed s/-O[0-9]*//`
|
||||
else
|
||||
INLINE_CFLAGS="$CFLAGS"
|
||||
fi
|
||||
changequote([,])
|
||||
|
||||
AC_C_INLINE
|
||||
|
||||
AC_SUBST(INLINE_CFLAGS)
|
||||
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN(LIBZEND_CPLUSPLUS_CHECKS,[
|
||||
|
||||
dnl extra check to avoid C++ preprocessor testing if in non-ZTS mode
|
||||
|
||||
if test "$ZEND_EXPERIMENTAL_ZTS" = "yes"; then
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CXXCPP
|
||||
AC_LANG_CPLUSPLUS
|
||||
AC_CHECK_HEADER(stdiostream.h, [ AC_DEFINE(HAVE_STDIOSTREAM_H, [], Whether you have stdiostream.h) ])
|
||||
|
||||
AC_CHECK_LIB(C, cin)
|
||||
AC_CHECK_LIB(g++, cin)
|
||||
AC_CHECK_LIB(stdc++, cin)
|
||||
dnl Digital Unix 4.0
|
||||
AC_CHECK_LIB(cxx, cin)
|
||||
AC_CHECK_LIB(cxxstd, __array_delete)
|
||||
|
||||
AC_CACHE_CHECK(for class istdiostream,ac_cv_class_istdiostream,[
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <fstream.h>
|
||||
#include <stdiostream.h>
|
||||
],[
|
||||
istdiostream *foo = new istdiostream((FILE *) 0);
|
||||
],[
|
||||
ac_cv_class_istdiostream=yes
|
||||
],[
|
||||
ac_cv_class_istdiostream=no
|
||||
])
|
||||
])
|
||||
if test "$ac_cv_class_istdiostream" = "yes"; then
|
||||
AC_DEFINE(HAVE_CLASS_ISTDIOSTREAM, 1, [Whether you have class istdiostream])
|
||||
fi
|
||||
AC_LANG_C
|
||||
fi
|
||||
])
|
||||
|
||||
+16
-16
@@ -4,7 +4,7 @@
|
||||
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
|
||||
".\zend_alloc.h"\
|
||||
".\zend_compile.h"\
|
||||
".\config.w32.h"\
|
||||
".\zend_config.w32.h"\
|
||||
".\zend_execute.h"\
|
||||
".\zend_llist.h"\
|
||||
".\zend_ptr_stack.h"\
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
.\alloca.c : \
|
||||
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
|
||||
".\config.w32.h"\
|
||||
".\zend_config.w32.h"\
|
||||
".\zend.h"\
|
||||
".\zend_errors.h"\
|
||||
".\zend_hash.h"\
|
||||
@@ -27,7 +27,7 @@
|
||||
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
|
||||
".\zend_alloc.h"\
|
||||
".\zend_compile.h"\
|
||||
".\config.w32.h"\
|
||||
".\zend_config.w32.h"\
|
||||
".\zend_execute.h"\
|
||||
".\zend_llist.h"\
|
||||
".\modules.h"\
|
||||
@@ -46,7 +46,7 @@
|
||||
.\zend_constants.c : \
|
||||
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
|
||||
".\zend_alloc.h"\
|
||||
".\config.w32.h"\
|
||||
".\zend_config.w32.h"\
|
||||
".\zend_constants.h"\
|
||||
".\zend_operators.h"\
|
||||
".\zend_variables.h"\
|
||||
@@ -59,7 +59,7 @@
|
||||
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
|
||||
".\zend_alloc.h"\
|
||||
".\zend_compile.h"\
|
||||
".\config.w32.h"\
|
||||
".\zend_config.w32.h"\
|
||||
".\zend_constants.h"\
|
||||
".\zend_execute.h"\
|
||||
".\zend_llist.h"\
|
||||
@@ -80,7 +80,7 @@
|
||||
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
|
||||
".\zend_alloc.h"\
|
||||
".\zend_compile.h"\
|
||||
".\config.w32.h"\
|
||||
".\zend_config.w32.h"\
|
||||
".\zend_execute.h"\
|
||||
".\zend_highlight.h"\
|
||||
".\zend_llist.h"\
|
||||
@@ -96,7 +96,7 @@
|
||||
.\zend_llist.c : \
|
||||
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
|
||||
".\zend_alloc.h"\
|
||||
".\config.w32.h"\
|
||||
".\zend_config.w32.h"\
|
||||
".\zend_llist.h"\
|
||||
".\zend.h"\
|
||||
".\zend_errors.h"\
|
||||
@@ -107,7 +107,7 @@
|
||||
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
|
||||
".\zend_alloc.h"\
|
||||
".\zend_compile.h"\
|
||||
".\config.w32.h"\
|
||||
".\zend_config.w32.h"\
|
||||
".\zend_execute.h"\
|
||||
".\zend_llist.h"\
|
||||
".\modules.h"\
|
||||
@@ -127,7 +127,7 @@
|
||||
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
|
||||
".\zend_alloc.h"\
|
||||
".\zend_compile.h"\
|
||||
".\config.w32.h"\
|
||||
".\zend_config.w32.h"\
|
||||
".\zend_execute.h"\
|
||||
".\zend_llist.h"\
|
||||
".\zend_operators.h"\
|
||||
@@ -143,7 +143,7 @@
|
||||
.\zend_ptr_stack.c : \
|
||||
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
|
||||
".\zend_alloc.h"\
|
||||
".\config.w32.h"\
|
||||
".\zend_config.w32.h"\
|
||||
".\zend_ptr_stack.h"\
|
||||
".\zend.h"\
|
||||
".\zend_errors.h"\
|
||||
@@ -153,7 +153,7 @@
|
||||
.\zend_stack.c : \
|
||||
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
|
||||
".\zend_alloc.h"\
|
||||
".\config.w32.h"\
|
||||
".\zend_config.w32.h"\
|
||||
".\zend_stack.h"\
|
||||
".\zend.h"\
|
||||
".\zend_errors.h"\
|
||||
@@ -164,7 +164,7 @@
|
||||
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
|
||||
".\zend_alloc.h"\
|
||||
".\zend_compile.h"\
|
||||
".\config.w32.h"\
|
||||
".\zend_config.w32.h"\
|
||||
".\zend_constants.h"\
|
||||
".\zend_execute.h"\
|
||||
".\zend_llist.h"\
|
||||
@@ -184,7 +184,7 @@
|
||||
.\zend.c : \
|
||||
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
|
||||
".\zend_alloc.h"\
|
||||
".\config.w32.h"\
|
||||
".\zend_config.w32.h"\
|
||||
".\zend_operators.h"\
|
||||
".\zend_variables.h"\
|
||||
".\zend.h"\
|
||||
@@ -196,7 +196,7 @@
|
||||
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
|
||||
".\zend_alloc.h"\
|
||||
".\zend_compile.h"\
|
||||
".\config.w32.h"\
|
||||
".\zend_config.w32.h"\
|
||||
".\zend_constants.h"\
|
||||
".\zend_execute.h"\
|
||||
".\zend_llist.h"\
|
||||
@@ -216,7 +216,7 @@
|
||||
|
||||
.\zend_hash.c : \
|
||||
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
|
||||
".\config.w32.h"\
|
||||
".\zend_config.w32.h"\
|
||||
".\zend.h"\
|
||||
".\zend_errors.h"\
|
||||
".\zend_hash.h"\
|
||||
@@ -225,7 +225,7 @@
|
||||
.\zend_ini.c : \
|
||||
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
|
||||
".\zend_alloc.h"\
|
||||
".\config.w32.h"\
|
||||
".\zend_config.w32.h"\
|
||||
".\zend.h"\
|
||||
".\zend_errors.h"\
|
||||
".\zend_hash.h"\
|
||||
|
||||
@@ -1,363 +1,448 @@
|
||||
# Microsoft Developer Studio Project File - Name="libzendts" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
CFG=libzendts - Win32 Debug_TS
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "libzendts.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "libzendts.mak" CFG="libzendts - Win32 Debug_TS"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "libzendts - Win32 Release_TS" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "libzendts - Win32 Debug_TS" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "libzendts - Win32 Release_TS"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Output_Dir "Release_TS"
|
||||
# PROP BASE Intermediate_Dir "Release_TS"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Output_Dir "Release_TS"
|
||||
# PROP Intermediate_Dir "Release_TS"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDebug_TS" /D "_MBCS" /D "_LIB" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "WIN32" /D "_MBCS" /D ZEND_DEBUG=0 /FR /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x40d /d "NDebug_TS"
|
||||
# ADD RSC /l 0x40d /d "NDebug_TS"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "libzendts - Win32 Debug_TS"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Output_Dir "Debug_TS"
|
||||
# PROP BASE Intermediate_Dir "Debug_TS"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Output_Dir "Debug_TS"
|
||||
# PROP Intermediate_Dir "Debug_TS"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_Debug_TS" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_Debug_TS" /D "_LIB" /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D "ZTS" /D ZEND_DEBUG=1 /FR /YX /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x40d /d "_Debug_TS"
|
||||
# ADD RSC /l 0x40d /d "_Debug_TS"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "libzendts - Win32 Release_TS"
|
||||
# Name "libzendts - Win32 Debug_TS"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend-parser.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend-scanner.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_alloc.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_API.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_compile.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_constants.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_execute.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_execute_API.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_extensions.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_hash.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_highlight.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_indent.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_list.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_llist.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_opcode.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_operators.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ptr_stack.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_sprintf.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_stack.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_variables.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\config.w32.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\FlexLexer.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\modules.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend-parser.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend-scanner.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_alloc.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_API.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_compile.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_constants.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_errors.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_execute.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_extensions.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_globals.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_hash.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_highlight.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_indent.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_list.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_llist.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_operators.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ptr_stack.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_stack.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_variables.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Parsers"
|
||||
|
||||
# PROP Default_Filter "y"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend-parser.y"
|
||||
|
||||
!IF "$(CFG)" == "libzendts - Win32 Release_TS"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend-parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend-parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p zend zend-parser.y
|
||||
|
||||
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "libzendts - Win32 Debug_TS"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend-parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend-parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p zend zend-parser.y
|
||||
|
||||
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Scanners"
|
||||
|
||||
# PROP Default_Filter "l"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend-scanner.l"
|
||||
|
||||
!IF "$(CFG)" == "libzendts - Win32 Release_TS"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend-scanner.l"
|
||||
|
||||
"zend-scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -+ -i -Sflex.skl -Pzend -ozend-scanner.cpp zend-scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "libzendts - Win32 Debug_TS"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend-scanner.l"
|
||||
|
||||
"zend-scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -+ -i -Sflex.skl -Pzend -ozend-scanner.cpp zend-scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Text Files"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ZEND_BUGS
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ZEND_CHANGES
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ZEND_TODO
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resources"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend.ico
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
# Microsoft Developer Studio Project File - Name="ZendTS" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
CFG=ZendTS - Win32 Release_TS_inline
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "ZendTS.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "ZendTS.mak" CFG="ZendTS - Win32 Release_TS_inline"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "ZendTS - Win32 Release_TS" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "ZendTS - Win32 Debug_TS" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "ZendTS - Win32 Release_TS_inline" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Output_Dir "Release_TS"
|
||||
# PROP BASE Intermediate_Dir "Release_TS"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Output_Dir "Release_TS"
|
||||
# PROP Intermediate_Dir "Release_TS"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDebug_TS" /D "_MBCS" /D "_LIB" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D ZEND_DEBUG=0 /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /D "PHP_WIN32" /FR /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x40d /d "NDebug_TS"
|
||||
# ADD RSC /l 0x40d /d "NDebug_TS"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Output_Dir "Debug_TS"
|
||||
# PROP BASE Intermediate_Dir "Debug_TS"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Output_Dir "Debug_TS"
|
||||
# PROP Intermediate_Dir "Debug_TS"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_Debug_TS" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_Debug_TS" /D "_LIB" /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D ZEND_DEBUG=1 /D "ZEND_WIN32" /D "ZTS" /D "WIN32" /D "_MBCS" /D "PHP_WIN32" /FR /YX /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x40d /d "_Debug_TS"
|
||||
# ADD RSC /l 0x40d /d "_Debug_TS"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Output_Dir "ZendTS___Win32_Release_TS_inline"
|
||||
# PROP BASE Intermediate_Dir "ZendTS___Win32_Release_TS_inline"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Output_Dir "Release_TS_inline"
|
||||
# PROP Intermediate_Dir "Release_TS_inline"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "WIN32" /D "_MBCS" /D ZEND_DEBUG=0 /FR /FD /c
|
||||
# SUBTRACT BASE CPP /YX
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D ZEND_DEBUG=0 /D "ZTS" /D "ZEND_WIN32" /D "ZEND_WIN32_FORCE_INLINE" /D "WIN32" /D "_MBCS" /D "PHP_WIN32" /FR /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x40d /d "NDebug_TS"
|
||||
# ADD RSC /l 0x40d /d "NDebug_TS"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "ZendTS - Win32 Release_TS"
|
||||
# Name "ZendTS - Win32 Debug_TS"
|
||||
# Name "ZendTS - Win32 Release_TS_inline"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend-parser.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend-scanner.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_alloc.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_API.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_builtin_functions.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_compile.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_constants.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_dynamic_array.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_execute.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_execute_API.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_extensions.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_hash.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_highlight.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_indent.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_list.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_llist.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_opcode.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_operators.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ptr_stack.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_sprintf.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_stack.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_variables.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\FlexLexer.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\modules.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend-parser.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend-scanner.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_alloc.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_API.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_builtin_functions.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_compile.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_config.w32.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_constants.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_dynamic_array.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_errors.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_execute.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_execute_locks.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_extensions.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_fast_cache.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_globals.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_globals_macros.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_hash.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_highlight.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_indent.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_list.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_llist.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_operators.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ptr_stack.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_stack.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_variables.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Parsers"
|
||||
|
||||
# PROP Default_Filter "y"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend-parser.y"
|
||||
|
||||
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend-parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
if not "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p zend zend-parser.y \
|
||||
if "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p zend zend-parser.y \
|
||||
|
||||
|
||||
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend-parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
if not "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p zend zend-parser.y \
|
||||
if "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p zend zend-parser.y \
|
||||
|
||||
|
||||
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend-parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
if not "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p zend zend-parser.y \
|
||||
if "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p zend zend-parser.y \
|
||||
|
||||
|
||||
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Scanners"
|
||||
|
||||
# PROP Default_Filter "l"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend-scanner.l"
|
||||
|
||||
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend-scanner.l"
|
||||
|
||||
"zend-scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -+ -i -Sflex.skl -Pzend -ozend-scanner.cpp zend-scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend-scanner.l"
|
||||
|
||||
"zend-scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -+ -B -i -Sflex.skl -Pzend -ozend-scanner.cpp zend-scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend-scanner.l"
|
||||
|
||||
"zend-scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -+ -i -Sflex.skl -Pzend -ozend-scanner.cpp zend-scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Text Files"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\LICENSE
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ZEND_BUGS
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ZEND_CHANGES
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resources"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend.ico
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
+38
-22
@@ -1,3 +1,7 @@
|
||||
#define ZEND_API
|
||||
|
||||
@TOP@
|
||||
|
||||
/* This is the default configuration file to read */
|
||||
#define USE_CONFIG_FILE 1
|
||||
|
||||
@@ -11,19 +15,6 @@
|
||||
/* define ulong by configure if it is missed (most probably is) */
|
||||
#undef ulong
|
||||
|
||||
/* type check for in_addr_t */
|
||||
#undef in_addr_t
|
||||
|
||||
/* Define if you have dirent.h but opendir() resides in libc rather than in libdir */
|
||||
/* This will cause HAVE_DIRENT_H defined twice sometimes, but it should be problem */
|
||||
#define HAVE_DIRENT_H 0
|
||||
|
||||
/* Define if you have struct flock */
|
||||
#define HAVE_STRUCT_FLOCK 0
|
||||
|
||||
/* Define if you have the resolv library (-lresolv). */
|
||||
#define HAVE_LIBRESOLV 0
|
||||
|
||||
/* Undefine if you want stricter XML/SGML compliance by default */
|
||||
/* (this disables "<?expression?>" by default) */
|
||||
#define T_DEFAULT_SHORT_OPEN_TAG 1
|
||||
@@ -32,19 +23,44 @@
|
||||
#define REGEX 0
|
||||
#define HSREGEX 0
|
||||
|
||||
/* Define if you have libdl (used for dynamic linking) */
|
||||
#define HAVE_LIBDL 0
|
||||
|
||||
#undef ZEND_DEBUG
|
||||
|
||||
/* Define if you want to enable bc style precision math support */
|
||||
#define WITH_BCMATH 0
|
||||
|
||||
/* Define if you want to enable memory limit support */
|
||||
#define MEMORY_LIMIT 0
|
||||
|
||||
/* Define if you have broken sprintf function like SunOS 4 */
|
||||
#define BROKEN_SPRINTF 0
|
||||
|
||||
/* Define to compile Zend thread safe */
|
||||
#undef ZTS
|
||||
|
||||
#undef HAVE_LIBDL
|
||||
|
||||
@BOTTOM@
|
||||
|
||||
#ifdef HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#else
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
/* Define if you have stdiostream.h */
|
||||
#undef HAVE_STDIOSTREAM_H
|
||||
|
||||
#if ZEND_BROKEN_SPRINTF
|
||||
int zend_sprintf(char *buffer, const char *format, ...);
|
||||
#else
|
||||
# define zend_sprintf sprintf
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
*/
|
||||
+20
-11
@@ -5,16 +5,25 @@ dnl This file contains local autoconf functions.
|
||||
dnl
|
||||
dnl Check for broken sprintf()
|
||||
dnl
|
||||
AC_DEFUN(AC_BROKEN_SPRINTF,[
|
||||
AC_MSG_CHECKING([for broken sprintf])
|
||||
AC_TRY_RUN([main() { char buf[20]; exit (sprintf(buf,"testing 123")!=11); }],[
|
||||
AC_DEFINE(BROKEN_SPRINTF,0)
|
||||
AC_MSG_RESULT(ok)
|
||||
],[
|
||||
AC_DEFINE(BROKEN_SPRINTF,1)
|
||||
AC_MSG_RESULT(broken)
|
||||
],[
|
||||
AC_DEFINE(BROKEN_SPRINTF,0)
|
||||
AC_MSG_RESULT(cannot check, guessing ok)
|
||||
AC_DEFUN(AC_ZEND_BROKEN_SPRINTF,[
|
||||
AC_CACHE_CHECK(whether sprintf is broken, ac_cv_broken_sprintf,[
|
||||
AC_TRY_RUN([main() {char buf[20];exit(sprintf(buf,"testing 123")!=11); }],[
|
||||
ac_cv_broken_sprintf=no
|
||||
],[
|
||||
ac_cv_broken_sprintf=yes
|
||||
],[
|
||||
ac_cv_broken_sprintf=no
|
||||
])
|
||||
])
|
||||
if test "$ac_cv_broken_sprintf" = "yes"; then
|
||||
ac_result=1
|
||||
else
|
||||
ac_result=0
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(ZEND_BROKEN_SPRINTF, $ac_result, [Whether sprintf is broken])
|
||||
])
|
||||
|
||||
AC_DEFUN(AM_SET_LIBTOOL_VARIABLE,[
|
||||
LIBTOOL='$(SHELL) $(top_builddir)/libtool $1'
|
||||
])
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
# Makefile to generate build tools
|
||||
#
|
||||
# Standard usage:
|
||||
# make -f build.mk
|
||||
#
|
||||
# Written by Sascha Schumann
|
||||
#
|
||||
# $Id$
|
||||
|
||||
|
||||
LT_TARGETS = ltmain.sh ltconfig
|
||||
|
||||
config_h_in = zend_config.h.in
|
||||
|
||||
makefile_am_files = Makefile.am
|
||||
makefile_in_files = $(makefile_am_files:.am=.in)
|
||||
makefile_files = $(makefile_am_files:e.am=e)
|
||||
|
||||
targets = $(makefile_in_files) $(LT_TARGETS) configure $(config_h_in)
|
||||
|
||||
all: $(targets)
|
||||
|
||||
clean:
|
||||
rm -f $(targets)
|
||||
|
||||
$(LT_TARGETS):
|
||||
rm -f $(LT_TARGETS)
|
||||
libtoolize --automake $(AMFLAGS) -f
|
||||
|
||||
$(makefile_in_files): $(makefile_am_files)
|
||||
automake -a -i $(AMFLAGS) $(makefile_files)
|
||||
|
||||
aclocal.m4: configure.in acinclude.m4
|
||||
aclocal
|
||||
|
||||
$(config_h_in): configure.in acconfig.h
|
||||
# explicitly remove target since autoheader does not seem to work
|
||||
# correctly otherwise (timestamps are not updated)
|
||||
@rm -f $@
|
||||
autoheader
|
||||
|
||||
configure: aclocal.m4 configure.in
|
||||
autoconf
|
||||
+14
-5
@@ -1,24 +1,33 @@
|
||||
#!/bin/sh
|
||||
|
||||
case "$1" in
|
||||
--copy)
|
||||
automake_flags=--copy
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
|
||||
libtoolize --force --automake $automake_flags
|
||||
|
||||
mv aclocal.m4 aclocal.m4.old 2>/dev/null
|
||||
aclocal
|
||||
if cmp aclocal.m4.old aclocal.m4 > /dev/null 2>&1; then
|
||||
echo keeping ${1}aclocal.m4
|
||||
echo "buildconf: keeping ${1}aclocal.m4"
|
||||
mv aclocal.m4.old aclocal.m4
|
||||
else
|
||||
echo created or modified ${1}aclocal.m4
|
||||
echo "buildconf: created or modified ${1}aclocal.m4"
|
||||
fi
|
||||
|
||||
autoheader
|
||||
|
||||
automake --add-missing --include-deps
|
||||
automake --add-missing --include-deps $automake_flags
|
||||
|
||||
mv configure configure.old 2>/dev/null
|
||||
autoconf
|
||||
if cmp configure.old configure > /dev/null 2>&1; then
|
||||
echo keeping ${1}configure
|
||||
echo "buildconf: keeping ${1}configure"
|
||||
mv configure.old configure
|
||||
else
|
||||
echo created or modified ${1}configure
|
||||
echo "buildconf: created or modified ${1}configure"
|
||||
fi
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
#ifndef _CONFIG_UNIX_H
|
||||
#define _CONFIG_UNIX_H
|
||||
|
||||
#define ZEND_API
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#else
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_LIBDL
|
||||
# include <dlfcn.h>
|
||||
# define DL_LOAD(libname) dlopen(libname, RTLD_NOW)
|
||||
# define DL_UNLOAD dlclose
|
||||
# define DL_FETCH_SYMBOL dlsym
|
||||
# define DL_HANDLE void *
|
||||
# define ZEND_EXTENSIONS_SUPPORT 1
|
||||
#else
|
||||
# define ZEND_EXTENSIONS_SUPPORT 0
|
||||
#endif
|
||||
|
||||
#if BROKEN_SPRINTF
|
||||
int zend_sprintf(char *buffer, const char *format, ...);
|
||||
#else
|
||||
# define zend_sprintf sprintf
|
||||
#endif
|
||||
|
||||
#if ZEND_DEBUG
|
||||
# define inline
|
||||
#endif
|
||||
|
||||
#endif /* _CONFIG_UNIX_H */
|
||||
@@ -1,38 +0,0 @@
|
||||
#ifndef _ZEND_CONFIG_W32_H
|
||||
#define _ZEND_CONFIG_W32_H
|
||||
|
||||
|
||||
#include <string.h>
|
||||
#include <windows.h>
|
||||
|
||||
typedef unsigned long ulong;
|
||||
typedef unsigned int uint;
|
||||
|
||||
#define HAVE_ALLOCA 1
|
||||
#include <malloc.h>
|
||||
|
||||
#define HAVE_DIRENT_H 0
|
||||
|
||||
#ifdef inline
|
||||
#undef inline
|
||||
#endif
|
||||
|
||||
#define zend_sprintf sprintf
|
||||
|
||||
/* Visual C++ doesn't really work with inline for C */
|
||||
#define inline
|
||||
|
||||
|
||||
#define DL_LOAD(libname) LoadLibrary(libname)
|
||||
#define DL_FETCH_SYMBOL GetProcAddress
|
||||
#define DL_UNLOAD FreeLibrary
|
||||
#define DL_HANDLE HMODULE
|
||||
#define ZEND_EXTENSIONS_SUPPORT 1
|
||||
|
||||
#ifdef LIBZEND_EXPORTS
|
||||
# define ZEND_API __declspec(dllexport)
|
||||
#else
|
||||
# define ZEND_API __declspec(dllimport)
|
||||
#endif
|
||||
|
||||
#endif /* _ZEND_CONFIG_W32_H */
|
||||
+15
-116
@@ -6,32 +6,21 @@ AM_INIT_AUTOMAKE(zend, 0.80A)
|
||||
AM_CONFIG_HEADER(zend_config.h)
|
||||
AM_SANITY_CHECK
|
||||
AM_MAINTAINER_MODE
|
||||
AC_PROG_CC
|
||||
AM_PROG_LEX
|
||||
AM_PROG_CC_STDC
|
||||
ZEND_VERSION=$VERSION
|
||||
|
||||
dnl We want this one before the checks, so the checks can modify CFLAGS.
|
||||
test -z "$CFLAGS" && auto_cflags=1
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_YACC
|
||||
if test "$YACC" != "bison -y"; then
|
||||
AC_MSG_WARN(You will need bison if you want to regenerate the Zend parser.)
|
||||
else
|
||||
AC_MSG_CHECKING(bison version)
|
||||
set `bison --version| sed -e 's/^GNU Bison version //' -e 's/\./ /'`
|
||||
if test "$1" = "1" -a "$2" -lt "25"; then
|
||||
AC_MSG_WARN(You will need bison 1.25 if you want to regenerate the Zend parser (found $1.$2).)
|
||||
fi
|
||||
AC_MSG_RESULT($1.$2 (ok))
|
||||
fi
|
||||
AC_PROG_CC
|
||||
AC_PROG_RANLIB
|
||||
AC_PROG_CC_C_O
|
||||
AM_PROG_LEX
|
||||
sinclude(Zend.m4)
|
||||
|
||||
dnl Ugly hack to get around a problem with gcc on AIX.
|
||||
if test "$CC" = "gcc" -a "$ac_cv_prog_cc_g" = "yes" -a \
|
||||
"`uname -sv`" = "AIX 4"; then
|
||||
CFLAGS=`echo $CFLAGS | sed -e 's/-g//'`
|
||||
LIBZEND_BASIC_CHECKS
|
||||
|
||||
AM_PROG_LIBTOOL
|
||||
if test "$enable_debug" != "yes"; then
|
||||
AM_SET_LIBTOOL_VARIABLE([--silent])
|
||||
fi
|
||||
|
||||
dnl
|
||||
@@ -43,103 +32,13 @@ if test -d /usr/pkg/include -a -d /usr/pkg/lib ; then
|
||||
LDFLAGS="$LDFLAGS -L/usr/pkg/lib"
|
||||
fi
|
||||
|
||||
AC_CHECK_LIB(c, dlopen, [
|
||||
# fake it
|
||||
AC_DEFINE(HAVE_LIBDL) ], [
|
||||
AC_CHECK_LIB(dl, dlopen, [
|
||||
LIBS="-ldl $LIBS"
|
||||
AC_DEFINE(HAVE_LIBDL) ], []) ])
|
||||
|
||||
dnl The sin may be in a library which need not be specifed
|
||||
dnl as well as res_search resides in libsocket
|
||||
AC_CHECK_LIB(c, sin, [:], [
|
||||
AC_CHECK_LIB(m, sin) ])
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
|
||||
dnl In QNX opendir resides in libc but dirent.h is still required
|
||||
if test "`uname -s 2>/dev/null`" != "QNX"; then
|
||||
AC_HEADER_DIRENT
|
||||
else
|
||||
AC_CHECK_HEADERS(dirent.h)
|
||||
fi
|
||||
dnl QNX requires unix.h to allow functions in libunix to work properly
|
||||
AC_CHECK_HEADERS(fcntl.h unistd.h crypt.h sys/file.h memory.h pwd.h grp.h sys/socket.h sys/wait.h syslog.h string.h sys/varargs.h stdarg.h sys/resource.h sys/time.h signal.h netinet/in.h dlfcn.h limits.h sys/types.h sys/statvfs.h sys/statfs.h unix.h db.h ndbm.h)
|
||||
|
||||
dnl Checks for types
|
||||
AC_TYPE_SIZE_T
|
||||
|
||||
dnl This is required for QNX and may be some BSD derived systems
|
||||
AC_CHECK_TYPE( uint, unsigned int )
|
||||
AC_CHECK_TYPE( ulong, unsigned long )
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_FUNC_VPRINTF
|
||||
AC_CHECK_FUNCS(memcpy memmove strdup strerror strcasecmp strstr flock lockf putenv tempnam usleep setlocale gettimeofday setvbuf srand48 lrand48 srandom random link symlink regcomp getlogin cuserid vsnprintf snprintf gcvt utime crypt setitimer rint unsetenv strftime setsockopt tzset statvfs statfs inet_aton)
|
||||
AC_FUNC_UTIME_NULL
|
||||
AC_FUNC_ALLOCA
|
||||
AC_BROKEN_SPRINTF
|
||||
AC_REPLACE_FUNCS(getopt)
|
||||
|
||||
AC_MSG_CHECKING(whether to include debugging symbols)
|
||||
AC_ARG_ENABLE(debug,
|
||||
[ --enable-debug Compile with debugging symbols],
|
||||
[
|
||||
if test "$enableval" = "yes"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(ZEND_DEBUG,1)
|
||||
DEBUG_CFLAGS="-g"
|
||||
test -n "$GCC" && DEBUG_CFLAGS="$DEBUG_CFLAGS -Wall"
|
||||
test -n "$GCC" && test "$USE_MAINTAINER_MODE" = "yes" && \
|
||||
DEBUG_CFLAGS="$DEBUG_CFLAGS -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations"
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
AC_DEFINE(ZEND_DEBUG,0)
|
||||
DEBUG_CFLAGS=""
|
||||
fi
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
AC_DEFINE(ZEND_DEBUG,0)
|
||||
DEBUG_CFLAGS=""
|
||||
])
|
||||
AC_SUBST(DEBUG_CFLAGS)
|
||||
|
||||
|
||||
AC_MSG_CHECKING(whether to enable a memory limit)
|
||||
AC_ARG_ENABLE(memory-limit,
|
||||
[ --enable-memory-limit Compile with memory limit support. ],
|
||||
[
|
||||
if test "$enableval" = "yes"; then
|
||||
AC_DEFINE(MEMORY_LIMIT, 1)
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_DEFINE(MEMORY_LIMIT, 0)
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
],[
|
||||
AC_DEFINE(MEMORY_LIMIT, 0)
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
|
||||
AC_MSG_CHECKING(whether to build Zend thread-safe)
|
||||
AC_ARG_ENABLE(thread-safety,
|
||||
[ --enable-thread-safety Whether to build Zend thread-safe.],[
|
||||
AC_DEFINE(ZTS)
|
||||
AC_MSG_RESULT(yes)
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
AC_SUBST(TSRM_DIR)
|
||||
AC_SUBST(TSRM_LIB)
|
||||
|
||||
AC_SUBST(CFLAGS_SHLIB)
|
||||
AC_SUBST(LDFLAGS_SHLIB)
|
||||
AC_SUBST(LDFLAGS_SHLIB_EXPORT)
|
||||
|
||||
AC_OUTPUT(Makefile, [], [])
|
||||
LIBZEND_ENABLE_DEBUG
|
||||
LIBZEND_OTHER_CHECKS
|
||||
|
||||
EXTRA_LIBS="$LIBS"
|
||||
LIBS=""
|
||||
AC_SUBST(EXTRA_LIBS)
|
||||
AC_OUTPUT(Makefile)
|
||||
|
||||
# Local Variables:
|
||||
# tab-width: 4
|
||||
|
||||
+168
-102
@@ -3,12 +3,15 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
@@ -24,23 +27,27 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "zend_compile.h"
|
||||
#include "zend.h"
|
||||
#include "zend_list.h"
|
||||
#include "zend_globals.h"
|
||||
#include "zend_API.h"
|
||||
#include "zend_variables.h"
|
||||
#include "zend_operators.h"
|
||||
|
||||
|
||||
#define YYERROR_VERBOSE
|
||||
#define YYSTYPE znode
|
||||
#ifdef ZTS
|
||||
# define YYPARSE_PARAM compiler_globals
|
||||
# define YYLEX_PARAM compiler_globals
|
||||
#endif
|
||||
|
||||
|
||||
%}
|
||||
|
||||
%pure_parser
|
||||
%expect 4
|
||||
%expect 7
|
||||
|
||||
%left T_INCLUDE T_EVAL
|
||||
%left T_INCLUDE T_INCLUDE_ONCE T_EVAL
|
||||
%left ','
|
||||
%left T_LOGICAL_OR
|
||||
%left T_LOGICAL_XOR
|
||||
@@ -53,12 +60,12 @@
|
||||
%left '|'
|
||||
%left '^'
|
||||
%left '&'
|
||||
%nonassoc T_IS_EQUAL T_IS_NOT_EQUAL
|
||||
%nonassoc T_IS_EQUAL T_IS_NOT_EQUAL T_IS_IDENTICAL
|
||||
%nonassoc '<' T_IS_SMALLER_OR_EQUAL '>' T_IS_GREATER_OR_EQUAL
|
||||
%left T_SL T_SR
|
||||
%left '+' '-' '.'
|
||||
%left '*' '/' '%'
|
||||
%right '!' '~' T_INC T_DEC T_INT_CAST T_DOUBLE_CAST T_STRING_CAST T_ARRAY_CAST T_OBJECT_CAST '@'
|
||||
%right '!' '~' T_INC T_DEC T_INT_CAST T_DOUBLE_CAST T_STRING_CAST T_ARRAY_CAST T_OBJECT_CAST T_BOOL_CAST T_UNSET_CAST '@'
|
||||
%right '['
|
||||
%nonassoc T_NEW
|
||||
%token T_EXIT
|
||||
@@ -85,6 +92,8 @@
|
||||
%token T_ENDFOR
|
||||
%token T_FOREACH
|
||||
%token T_ENDFOREACH
|
||||
%token T_DECLARE
|
||||
%token T_ENDDECLARE
|
||||
%token T_AS
|
||||
%token T_SWITCH
|
||||
%token T_ENDSWITCH
|
||||
@@ -97,6 +106,8 @@
|
||||
%token T_CONST
|
||||
%token T_RETURN
|
||||
%token T_REQUIRE
|
||||
%token T_REQUIRE_ONCE
|
||||
%token T_USE
|
||||
%token T_GLOBAL
|
||||
%token T_STATIC
|
||||
%token T_VAR
|
||||
@@ -117,7 +128,8 @@
|
||||
%token T_OPEN_TAG_WITH_ECHO
|
||||
%token T_CLOSE_TAG
|
||||
%token T_WHITESPACE
|
||||
%token T_HEREDOC
|
||||
%token T_START_HEREDOC
|
||||
%token T_END_HEREDOC
|
||||
%token T_DOLLAR_OPEN_CURLY_BRACES
|
||||
%token T_CURLY_OPEN
|
||||
%token T_PAAMAYIM_NEKUDOTAYIM
|
||||
@@ -125,8 +137,12 @@
|
||||
|
||||
%% /* Rules */
|
||||
|
||||
start:
|
||||
top_statement_list
|
||||
;
|
||||
|
||||
top_statement_list:
|
||||
top_statement_list { do_extended_info(CLS_C); } top_statement { ELS_FETCH(); HANDLE_INTERACTIVE(); }
|
||||
top_statement_list { do_extended_info(CLS_C); } top_statement { HANDLE_INTERACTIVE(); }
|
||||
| /* empty */
|
||||
;
|
||||
|
||||
@@ -138,7 +154,7 @@ top_statement:
|
||||
|
||||
|
||||
inner_statement_list:
|
||||
inner_statement_list { do_extended_info(CLS_C); } inner_statement { ELS_FETCH(); HANDLE_INTERACTIVE(); }
|
||||
inner_statement_list { do_extended_info(CLS_C); } inner_statement { HANDLE_INTERACTIVE(); }
|
||||
| /* empty */
|
||||
;
|
||||
|
||||
@@ -150,11 +166,16 @@ inner_statement:
|
||||
|
||||
|
||||
statement:
|
||||
unticked_statement { do_ticks(CLS_C); }
|
||||
;
|
||||
|
||||
|
||||
unticked_statement:
|
||||
'{' inner_statement_list '}'
|
||||
| T_IF '(' expr ')' { do_if_cond(&$3, &$4 CLS_CC); } statement { do_if_after_statement(&$4, 1 CLS_CC); } elseif_list else_single { do_if_end(CLS_C); }
|
||||
| T_IF '(' expr ')' ':' { do_if_cond(&$3, &$4 CLS_CC); } inner_statement_list { do_if_after_statement(&$4, 1 CLS_CC); } new_elseif_list new_else_single T_ENDIF ';' { do_if_end(CLS_C); }
|
||||
| T_WHILE '(' { $1.u.opline_num = get_next_op_number(CG(active_op_array)); } expr ')' { do_while_cond(&$4, &$5 CLS_CC); } while_statement { do_while_end(&$1, &$5 CLS_CC); }
|
||||
| T_DO { $1.u.opline_num = get_next_op_number(CG(active_op_array)); do_do_while_begin(CLS_C); } statement T_WHILE '(' expr ')' ';' { do_do_while_end(&$1, &$6 CLS_CC); }
|
||||
| T_DO { $1.u.opline_num = get_next_op_number(CG(active_op_array)); do_do_while_begin(CLS_C); } statement T_WHILE '(' { $5.u.opline_num = get_next_op_number(CG(active_op_array)); } expr ')' ';' { do_do_while_end(&$1, &$5, &$7 CLS_CC); }
|
||||
| T_FOR
|
||||
'('
|
||||
for_expr
|
||||
@@ -169,25 +190,39 @@ statement:
|
||||
| T_BREAK expr ';' { do_brk_cont(ZEND_BRK, &$2 CLS_CC); }
|
||||
| T_CONTINUE ';' { do_brk_cont(ZEND_CONT, NULL CLS_CC); }
|
||||
| T_CONTINUE expr ';' { do_brk_cont(ZEND_CONT, &$2 CLS_CC); }
|
||||
| T_RETURN ';' { do_return(NULL CLS_CC); }
|
||||
| T_RETURN expr ';' { do_return(&$2 CLS_CC); }
|
||||
| T_RETURN ';' { do_return(NULL, 0 CLS_CC); }
|
||||
| T_RETURN expr_without_variable ';' { do_return(&$2, 0 CLS_CC); }
|
||||
| T_RETURN cvar ';' { do_return(&$2, 1 CLS_CC); }
|
||||
| T_GLOBAL global_var_list
|
||||
| T_STATIC static_var_list
|
||||
| T_ECHO echo_expr_list ';'
|
||||
| T_INLINE_HTML { do_echo(&$1 CLS_CC); }
|
||||
| expr ';' { do_free(&$1 CLS_CC); }
|
||||
| T_REQUIRE T_CONSTANT_ENCAPSED_STRING ';' { require_filename($2.u.constant.value.str.val CLS_CC); zval_dtor(&$2.u.constant); }
|
||||
| T_REQUIRE '(' T_CONSTANT_ENCAPSED_STRING ')' ';' { require_filename($3.u.constant.value.str.val CLS_CC); zval_dtor(&$3.u.constant); }
|
||||
| T_UNSET '(' r_cvar ')' ';' { do_unset(&$3 CLS_CC); }
|
||||
| T_REQUIRE expr ';' { do_require(&$2, 0 CLS_CC); }
|
||||
| T_REQUIRE_ONCE use_filename ';' { do_require(&$2, 1 CLS_CC); }
|
||||
| T_USE use_filename ';' { use_filename($2.u.constant.value.str.val, $2.u.constant.value.str.len CLS_CC); zval_dtor(&$2.u.constant); }
|
||||
| T_UNSET '(' cvar ')' ';' { do_end_variable_parse(BP_VAR_UNSET, 0 CLS_CC); do_unset(&$3 CLS_CC); }
|
||||
| T_FOREACH '(' expr T_AS { do_foreach_begin(&$1, &$3, &$2, &$4 CLS_CC); } w_cvar foreach_optional_arg ')' { do_foreach_cont(&$6, &$7, &$4 CLS_CC); } foreach_statement { do_foreach_end(&$1, &$2 CLS_CC); }
|
||||
| T_DECLARE { do_declare_begin(CLS_C); } '(' declare_list ')' declare_statement { do_declare_end(CLS_C); }
|
||||
| ';' /* empty statement */
|
||||
;
|
||||
|
||||
|
||||
use_filename:
|
||||
T_CONSTANT_ENCAPSED_STRING { $$ = $1; }
|
||||
| '(' T_CONSTANT_ENCAPSED_STRING ')' { $$ = $2; }
|
||||
;
|
||||
|
||||
|
||||
declaration_statement:
|
||||
T_FUNCTION { $1.u.opline_num = CG(zend_lineno); } T_STRING { do_begin_function_declaration(&$1, &$3, 0 CLS_CC); }
|
||||
unticked_declaration_statement { do_ticks(CLS_C); }
|
||||
;
|
||||
|
||||
|
||||
unticked_declaration_statement:
|
||||
T_FUNCTION { $1.u.opline_num = CG(zend_lineno); } is_reference T_STRING { do_begin_function_declaration(&$1, &$4, 0, $3.op_type CLS_CC); }
|
||||
'(' parameter_list ')' '{' inner_statement_list '}' { do_end_function_declaration(&$1 CLS_CC); }
|
||||
| T_OLD_FUNCTION { $1.u.opline_num = CG(zend_lineno); } T_STRING { do_begin_function_declaration(&$1, &$3, 0 CLS_CC); }
|
||||
| T_OLD_FUNCTION { $1.u.opline_num = CG(zend_lineno); } is_reference T_STRING { do_begin_function_declaration(&$1, &$4, 0, $3.op_type CLS_CC); }
|
||||
parameter_list '(' inner_statement_list ')' ';' { do_end_function_declaration(&$1 CLS_CC); }
|
||||
| T_CLASS T_STRING { do_begin_class_declaration(&$2, NULL CLS_CC); } '{' class_statement_list '}' { do_end_class_declaration(CLS_C); }
|
||||
| T_CLASS T_STRING T_EXTENDS T_STRING { do_begin_class_declaration(&$2, &$4 CLS_CC); } '{' class_statement_list '}' { do_end_class_declaration(CLS_C); }
|
||||
@@ -212,6 +247,18 @@ foreach_statement:
|
||||
;
|
||||
|
||||
|
||||
declare_statement:
|
||||
statement
|
||||
| ':' inner_statement_list T_ENDDECLARE ';'
|
||||
;
|
||||
|
||||
|
||||
declare_list:
|
||||
T_STRING '=' static_scalar { do_declare_stmt(&$1, &$3 CLS_CC); }
|
||||
| declare_list ',' T_STRING '=' static_scalar { do_declare_stmt(&$3, &$5 CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
switch_case_list:
|
||||
'{' case_list '}' { $$ = $2; }
|
||||
| '{' ';' case_list '}' { $$ = $3; }
|
||||
@@ -273,16 +320,14 @@ parameter_list:
|
||||
|
||||
|
||||
non_empty_parameter_list:
|
||||
T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$1, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; $$.u.constant.refcount=1; $$.u.constant.is_ref=0; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
|
||||
| '&' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$2, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; $$.u.constant.refcount=1; $$.u.constant.is_ref=0; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_FORCE CLS_CC); }
|
||||
| T_CONST T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$2, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; $$.u.constant.refcount=1; $$.u.constant.is_ref=0; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
|
||||
| T_VARIABLE '=' static_scalar { znode tmp; fetch_simple_variable(&tmp, &$1, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; $$.u.constant.refcount=1; $$.u.constant.is_ref=0; do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, &$3, BYREF_NONE CLS_CC); }
|
||||
| T_VARIABLE '=' T_UNSET { znode tmp; fetch_simple_variable(&tmp, &$1, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; $$.u.constant.refcount=1; $$.u.constant.is_ref=0; do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
|
||||
T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$1, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; INIT_PZVAL(&$$.u.constant); do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
|
||||
| '&' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$2, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; INIT_PZVAL(&$$.u.constant); do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_FORCE CLS_CC); }
|
||||
| T_CONST T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$2, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; INIT_PZVAL(&$$.u.constant); do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
|
||||
| T_VARIABLE '=' static_scalar { znode tmp; fetch_simple_variable(&tmp, &$1, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; INIT_PZVAL(&$$.u.constant); do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, &$3, BYREF_NONE CLS_CC); }
|
||||
| non_empty_parameter_list ',' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$3, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
|
||||
| non_empty_parameter_list ',' '&' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$4, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_FORCE CLS_CC); }
|
||||
| non_empty_parameter_list ',' T_CONST T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$4, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
|
||||
| non_empty_parameter_list ',' T_VARIABLE '=' static_scalar { znode tmp; fetch_simple_variable(&tmp, &$3, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, &$5, BYREF_NONE CLS_CC); }
|
||||
| non_empty_parameter_list ',' T_VARIABLE '=' T_UNSET { znode tmp; fetch_simple_variable(&tmp, &$3, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
@@ -331,13 +376,16 @@ class_statement_list:
|
||||
|
||||
class_statement:
|
||||
T_VAR class_variable_decleration ';'
|
||||
| T_FUNCTION { $1.u.opline_num = CG(zend_lineno); } T_STRING { do_begin_function_declaration(&$1, &$3, 1 CLS_CC); } '('
|
||||
| T_FUNCTION { $1.u.opline_num = CG(zend_lineno); } is_reference T_STRING { do_begin_function_declaration(&$1, &$4, 1, $3.op_type CLS_CC); } '('
|
||||
parameter_list ')' '{' inner_statement_list '}' { do_end_function_declaration(&$1 CLS_CC); }
|
||||
| T_OLD_FUNCTION { $1.u.opline_num = CG(zend_lineno); } T_STRING { do_begin_function_declaration(&$1, &$3, 1 CLS_CC); }
|
||||
| T_OLD_FUNCTION { $1.u.opline_num = CG(zend_lineno); } is_reference T_STRING { do_begin_function_declaration(&$1, &$4, 1, $3.op_type CLS_CC); }
|
||||
parameter_list '(' inner_statement_list ')' ';' { do_end_function_declaration(&$1 CLS_CC); }
|
||||
|
||||
;
|
||||
|
||||
is_reference:
|
||||
/* empty */ { $$.op_type = ZEND_RETURN_VAL; }
|
||||
| '&' { $$.op_type = ZEND_RETURN_REF; }
|
||||
|
||||
class_variable_decleration:
|
||||
class_variable_decleration ',' T_VARIABLE { do_declare_property(&$3, NULL CLS_CC); }
|
||||
@@ -346,9 +394,8 @@ class_variable_decleration:
|
||||
| T_VARIABLE '=' static_scalar { do_declare_property(&$1, &$3 CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
|
||||
echo_expr_list:
|
||||
/* empty */
|
||||
| echo_expr_list ',' expr { do_echo(&$3 CLS_CC); }
|
||||
| expr { do_echo(&$1 CLS_CC); }
|
||||
;
|
||||
@@ -356,27 +403,32 @@ echo_expr_list:
|
||||
|
||||
for_expr:
|
||||
/* empty */ { $$.op_type = IS_CONST; $$.u.constant.type = IS_BOOL; $$.u.constant.value.lval = 1; }
|
||||
| for_expr ',' expr { $$ = $3; }
|
||||
| non_empty_for_expr { $$ = $1; }
|
||||
;
|
||||
|
||||
non_empty_for_expr:
|
||||
non_empty_for_expr ',' { do_free(&$1 CLS_CC); } expr { $$ = $4; }
|
||||
| expr { $$ = $1; }
|
||||
;
|
||||
|
||||
|
||||
expr_without_variable:
|
||||
T_LIST '(' { do_list_init(); } assignment_list ')' '=' expr { do_list_end(&$$, &$7 CLS_CC); }
|
||||
| w_cvar '=' expr { do_assign(&$$, &$1, &$3 CLS_CC); }
|
||||
| w_cvar '=' '&' w_cvar { do_assign_ref(&$$, &$1, &$4 CLS_CC); }
|
||||
| w_cvar '=' T_NEW class_name { do_extended_fcall_begin(CLS_C); do_begin_new_object(&$2, &$1, &$3, &$4 CLS_CC); } ctor_arguments { do_end_new_object(&$4, &$3, &$6 CLS_CC); do_extended_fcall_end(CLS_C); $$ = $2;}
|
||||
| rw_cvar T_PLUS_EQUAL expr { do_binary_assign_op(ZEND_ASSIGN_ADD, &$$, &$1, &$3 CLS_CC); }
|
||||
| rw_cvar T_MINUS_EQUAL expr { do_binary_assign_op(ZEND_ASSIGN_SUB, &$$, &$1, &$3 CLS_CC); }
|
||||
| rw_cvar T_MUL_EQUAL expr { do_binary_assign_op(ZEND_ASSIGN_MUL, &$$, &$1, &$3 CLS_CC); }
|
||||
| rw_cvar T_DIV_EQUAL expr { do_binary_assign_op(ZEND_ASSIGN_DIV, &$$, &$1, &$3 CLS_CC); }
|
||||
| rw_cvar T_CONCAT_EQUAL expr { do_binary_assign_op(ZEND_ASSIGN_CONCAT, &$$, &$1, &$3 CLS_CC); }
|
||||
| rw_cvar T_MOD_EQUAL expr { do_binary_assign_op(ZEND_ASSIGN_MOD, &$$, &$1, &$3 CLS_CC); }
|
||||
| rw_cvar T_AND_EQUAL expr { do_binary_assign_op(ZEND_ASSIGN_BW_AND, &$$, &$1, &$3 CLS_CC); }
|
||||
| rw_cvar T_OR_EQUAL expr { do_binary_assign_op(ZEND_ASSIGN_BW_OR, &$$, &$1, &$3 CLS_CC); }
|
||||
| rw_cvar XT_OR_EQUAL expr { do_binary_assign_op(ZEND_ASSIGN_BW_XOR, &$$, &$1, &$3 CLS_CC); }
|
||||
| rw_cvar T_SL_EQUAL expr { do_binary_assign_op(ZEND_ASSIGN_SL, &$$, &$1, &$3 CLS_CC); }
|
||||
| rw_cvar T_SR_EQUAL expr { do_binary_assign_op(ZEND_ASSIGN_SR, &$$, &$1, &$3 CLS_CC); }
|
||||
T_LIST '(' { do_list_init(CLS_C); } assignment_list ')' '=' expr { do_list_end(&$$, &$7 CLS_CC); }
|
||||
| cvar '=' expr { do_end_variable_parse(BP_VAR_W, 0 CLS_CC); do_assign(&$$, &$1, &$3 CLS_CC); }
|
||||
| cvar '=' '&' w_cvar { do_end_variable_parse(BP_VAR_W, 0 CLS_CC); do_assign_ref(&$$, &$1, &$4 CLS_CC); }
|
||||
| cvar '=' '&' function_call { do_end_variable_parse(BP_VAR_W, 0 CLS_CC); do_assign_ref(&$$, &$1, &$4 CLS_CC); }
|
||||
| T_NEW class_name { do_extended_fcall_begin(CLS_C); do_begin_new_object(&$1, &$2 CLS_CC); } ctor_arguments { do_end_new_object(&$$, &$2, &$1, &$4 CLS_CC); do_extended_fcall_end(CLS_C);}
|
||||
| cvar T_PLUS_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_ADD, &$$, &$1, &$3 CLS_CC); }
|
||||
| cvar T_MINUS_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_SUB, &$$, &$1, &$3 CLS_CC); }
|
||||
| cvar T_MUL_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_MUL, &$$, &$1, &$3 CLS_CC); }
|
||||
| cvar T_DIV_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_DIV, &$$, &$1, &$3 CLS_CC); }
|
||||
| cvar T_CONCAT_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_CONCAT, &$$, &$1, &$3 CLS_CC); }
|
||||
| cvar T_MOD_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_MOD, &$$, &$1, &$3 CLS_CC); }
|
||||
| cvar T_AND_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_BW_AND, &$$, &$1, &$3 CLS_CC); }
|
||||
| cvar T_OR_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_BW_OR, &$$, &$1, &$3 CLS_CC); }
|
||||
| cvar XT_OR_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_BW_XOR, &$$, &$1, &$3 CLS_CC); }
|
||||
| cvar T_SL_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_SL, &$$, &$1, &$3 CLS_CC); }
|
||||
| cvar T_SR_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_SR, &$$, &$1, &$3 CLS_CC); }
|
||||
| rw_cvar T_INC { do_post_incdec(&$$, &$1, ZEND_POST_INC CLS_CC); }
|
||||
| T_INC rw_cvar { do_pre_incdec(&$$, &$2, ZEND_PRE_INC CLS_CC); }
|
||||
| rw_cvar T_DEC { do_post_incdec(&$$, &$1, ZEND_POST_DEC CLS_CC); }
|
||||
@@ -397,10 +449,11 @@ expr_without_variable:
|
||||
| expr '%' expr { do_binary_op(ZEND_MOD,&$$,&$1,&$3 CLS_CC); }
|
||||
| expr T_SL expr { do_binary_op(ZEND_SL, &$$, &$1, &$3 CLS_CC); }
|
||||
| expr T_SR expr { do_binary_op(ZEND_SR, &$$, &$1, &$3 CLS_CC); }
|
||||
| '+' expr { $1.u.constant.value.lval=0; $1.u.constant.type=IS_LONG; $1.op_type = IS_CONST; $1.u.constant.refcount=1; do_binary_op(ZEND_ADD, &$$, &$1, &$2 CLS_CC); }
|
||||
| '-' expr { $1.u.constant.value.lval=0; $1.u.constant.type=IS_LONG; $1.op_type = IS_CONST; $1.u.constant.refcount=1; do_binary_op(ZEND_SUB, &$$, &$1, &$2 CLS_CC); }
|
||||
| '+' expr { $1.u.constant.value.lval=0; $1.u.constant.type=IS_LONG; $1.op_type = IS_CONST; INIT_PZVAL(&$1.u.constant); do_binary_op(ZEND_ADD, &$$, &$1, &$2 CLS_CC); }
|
||||
| '-' expr { $1.u.constant.value.lval=0; $1.u.constant.type=IS_LONG; $1.op_type = IS_CONST; INIT_PZVAL(&$1.u.constant); do_binary_op(ZEND_SUB, &$$, &$1, &$2 CLS_CC); }
|
||||
| '!' expr { do_unary_op(ZEND_BOOL_NOT, &$$, &$2 CLS_CC); }
|
||||
| '~' expr { do_unary_op(ZEND_BW_NOT, &$$, &$2 CLS_CC); }
|
||||
| expr T_IS_IDENTICAL expr { do_binary_op(ZEND_IS_IDENTICAL, &$$, &$1, &$3 CLS_CC); }
|
||||
| expr T_IS_EQUAL expr { do_binary_op(ZEND_IS_EQUAL, &$$, &$1, &$3 CLS_CC); }
|
||||
| expr T_IS_NOT_EQUAL expr { do_binary_op(ZEND_IS_NOT_EQUAL, &$$, &$1, &$3 CLS_CC); }
|
||||
| expr '<' expr { do_binary_op(ZEND_IS_SMALLER, &$$, &$1, &$3 CLS_CC); }
|
||||
@@ -411,21 +464,15 @@ expr_without_variable:
|
||||
| expr '?' { do_begin_qm_op(&$1, &$2 CLS_CC); }
|
||||
expr ':' { do_qm_true(&$4, &$2, &$5 CLS_CC); }
|
||||
expr { do_qm_false(&$$, &$7, &$2, &$5 CLS_CC); }
|
||||
| T_STRING '(' { do_extended_fcall_begin(CLS_C); do_begin_function_call(&$1 CLS_CC); }
|
||||
function_call_parameter_list
|
||||
')' { do_end_function_call(&$1, &$$, &$4, 0 CLS_CC); do_extended_fcall_end(CLS_C); }
|
||||
| r_cvar '(' { do_extended_fcall_begin(CLS_C); do_begin_dynamic_function_call(&$1 CLS_CC); }
|
||||
function_call_parameter_list
|
||||
')' { do_end_function_call(&$1, &$$, &$4, 0 CLS_CC); do_extended_fcall_end(CLS_C);}
|
||||
| T_STRING T_PAAMAYIM_NEKUDOTAYIM T_STRING '(' { do_extended_fcall_begin(CLS_C); do_begin_class_member_function_call(&$1, &$3 CLS_CC); }
|
||||
function_call_parameter_list
|
||||
')' { do_end_function_call(&$3, &$$, &$6, 1 CLS_CC); do_extended_fcall_end(CLS_C);}
|
||||
| function_call { $$ = $1; }
|
||||
| internal_functions_in_yacc { $$ = $1; }
|
||||
| T_INT_CAST expr { do_cast(&$$, &$2, IS_LONG CLS_CC); }
|
||||
| T_DOUBLE_CAST expr { do_cast(&$$, &$2, IS_DOUBLE CLS_CC); }
|
||||
| T_STRING_CAST expr { do_cast(&$$, &$2, IS_STRING CLS_CC); }
|
||||
| T_ARRAY_CAST expr { do_cast(&$$, &$2, IS_ARRAY CLS_CC); }
|
||||
| T_OBJECT_CAST expr { do_cast(&$$, &$2, IS_OBJECT CLS_CC); }
|
||||
| T_BOOL_CAST expr { do_cast(&$$, &$2, IS_BOOL CLS_CC); }
|
||||
| T_UNSET_CAST expr { do_cast(&$$, &$2, IS_NULL CLS_CC); }
|
||||
| T_EXIT exit_expr { do_exit(&$$, &$2 CLS_CC); }
|
||||
| '@' { do_begin_silence(&$1 CLS_CC); } expr { do_end_silence(&$1 CLS_CC); $$ = $3; }
|
||||
| scalar { $$ = $1; }
|
||||
@@ -435,6 +482,19 @@ expr_without_variable:
|
||||
;
|
||||
|
||||
|
||||
function_call:
|
||||
T_STRING '(' { do_extended_fcall_begin(CLS_C); $2.u.opline_num = do_begin_function_call(&$1 CLS_CC); }
|
||||
function_call_parameter_list
|
||||
')' { do_end_function_call(&$1, &$$, &$4, 0, $2.u.opline_num CLS_CC); do_extended_fcall_end(CLS_C); }
|
||||
| r_cvar '(' { do_extended_fcall_begin(CLS_C); do_begin_dynamic_function_call(&$1 CLS_CC); }
|
||||
function_call_parameter_list
|
||||
')' { do_end_function_call(&$1, &$$, &$4, 0, 1 CLS_CC); do_extended_fcall_end(CLS_C);}
|
||||
| T_STRING T_PAAMAYIM_NEKUDOTAYIM T_STRING '(' { do_extended_fcall_begin(CLS_C); do_begin_class_member_function_call(&$1, &$3 CLS_CC); }
|
||||
function_call_parameter_list
|
||||
')' { do_end_function_call(&$3, &$$, &$6, 1, 1 CLS_CC); do_extended_fcall_end(CLS_C);}
|
||||
;
|
||||
|
||||
|
||||
exit_expr:
|
||||
/* empty */ { $$.op_type = IS_UNUSED; }
|
||||
| '(' ')' { $$.op_type = IS_UNUSED; }
|
||||
@@ -479,21 +539,25 @@ scalar:
|
||||
| common_scalar { $$ = $1; }
|
||||
| '"' encaps_list '"' { $$ = $2; }
|
||||
| '\'' encaps_list '\'' { $$ = $2; }
|
||||
| T_HEREDOC encaps_list T_HEREDOC { $$ = $2; do_end_heredoc(CLS_C); }
|
||||
| T_START_HEREDOC encaps_list T_END_HEREDOC { $$ = $2; do_end_heredoc(CLS_C); }
|
||||
;
|
||||
|
||||
|
||||
static_array_pair_list:
|
||||
/* empty */ { $$.op_type = IS_CONST; $$.u.constant.refcount=1; $$.u.constant.is_ref=0; array_init(&$$.u.constant); }
|
||||
| non_empty_static_array_pair_list { $$ = $1; }
|
||||
/* empty */ { $$.op_type = IS_CONST; INIT_PZVAL(&$$.u.constant); array_init(&$$.u.constant); }
|
||||
| non_empty_static_array_pair_list possible_comma { $$ = $1; }
|
||||
;
|
||||
|
||||
possible_comma:
|
||||
/* empty */
|
||||
| ','
|
||||
;
|
||||
|
||||
non_empty_static_array_pair_list:
|
||||
non_empty_static_array_pair_list ',' static_scalar T_DOUBLE_ARROW static_scalar { do_add_static_array_element(&$$, &$3, &$5); }
|
||||
| non_empty_static_array_pair_list ',' static_scalar { do_add_static_array_element(&$$, &$3, NULL); }
|
||||
| static_scalar T_DOUBLE_ARROW static_scalar { $$.op_type = IS_CONST; $$.u.constant.refcount=1; $$.u.constant.is_ref=0; array_init(&$$.u.constant); do_add_static_array_element(&$$, &$1, &$3); }
|
||||
| static_scalar { $$.op_type = IS_CONST; $$.u.constant.refcount=1; $$.u.constant.is_ref=0; array_init(&$$.u.constant); do_add_static_array_element(&$$, &$1, NULL); }
|
||||
| non_empty_static_array_pair_list ',' static_scalar { do_add_static_array_element(&$$, NULL, &$3); }
|
||||
| static_scalar T_DOUBLE_ARROW static_scalar { $$.op_type = IS_CONST; INIT_PZVAL(&$$.u.constant); array_init(&$$.u.constant); do_add_static_array_element(&$$, &$1, &$3); }
|
||||
| static_scalar { $$.op_type = IS_CONST; INIT_PZVAL(&$$.u.constant); array_init(&$$.u.constant); do_add_static_array_element(&$$, NULL, &$1); }
|
||||
;
|
||||
|
||||
expr:
|
||||
@@ -501,20 +565,26 @@ expr:
|
||||
| expr_without_variable { $$ = $1; }
|
||||
;
|
||||
|
||||
/*
|
||||
w_expr:
|
||||
w_cvar { $$ = $1; }
|
||||
| expr_without_variable { $$ = $1; }
|
||||
;
|
||||
*/
|
||||
|
||||
|
||||
r_cvar:
|
||||
cvar { do_end_variable_parse(BP_VAR_R CLS_CC); $$ = $1; }
|
||||
cvar { do_end_variable_parse(BP_VAR_R, 0 CLS_CC); $$ = $1; }
|
||||
;
|
||||
|
||||
|
||||
w_cvar:
|
||||
cvar { do_end_variable_parse(BP_VAR_W CLS_CC); $$ = $1; }
|
||||
cvar { do_end_variable_parse(BP_VAR_W, 0 CLS_CC); $$ = $1; }
|
||||
;
|
||||
|
||||
|
||||
rw_cvar:
|
||||
cvar { do_end_variable_parse(BP_VAR_RW CLS_CC); $$ = $1; }
|
||||
cvar { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); $$ = $1; }
|
||||
;
|
||||
|
||||
|
||||
@@ -531,8 +601,9 @@ cvar_without_objects:
|
||||
|
||||
|
||||
reference_variable:
|
||||
dim_list ']' { $$ = $1; }
|
||||
| compound_variable { do_fetch_globals(&$1 CLS_CC); do_begin_variable_parse(CLS_C); fetch_simple_variable(&$$, &$1, 1 CLS_CC); }
|
||||
reference_variable '[' dim_offset ']' { fetch_array_dim(&$$, &$1, &$3 CLS_CC); }
|
||||
| reference_variable '{' expr '}' { fetch_string_offset(&$$, &$1, &$3 CLS_CC); }
|
||||
| compound_variable { do_fetch_globals(&$1 CLS_CC); do_begin_variable_parse(CLS_C); fetch_simple_variable(&$$, &$1, 1 CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
@@ -541,39 +612,30 @@ compound_variable:
|
||||
| '$' '{' expr '}' { $$ = $3; }
|
||||
;
|
||||
|
||||
|
||||
dim_list:
|
||||
dim_list ']' '[' dim_offset { fetch_array_dim(&$$, &$1, &$4 CLS_CC); }
|
||||
| compound_variable { do_fetch_globals(&$1 CLS_CC); do_begin_variable_parse(CLS_C); } '[' dim_offset { fetch_array_begin(&$$, &$1, &$4 CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
dim_offset:
|
||||
/* empty */ { $$.op_type = IS_UNUSED; }
|
||||
| expr { $$ = $1; }
|
||||
;
|
||||
|
||||
|
||||
ref_list:
|
||||
object_property { $$ = $1; }
|
||||
| ref_list T_OBJECT_OPERATOR { do_push_object(&$1 CLS_CC); } object_property { $$ = $4; }
|
||||
;
|
||||
|
||||
object_property:
|
||||
scalar_object_property { znode tmp_znode; do_pop_object(&tmp_znode CLS_CC); do_fetch_property(&$$, &tmp_znode, &$1 CLS_CC); }
|
||||
| object_dim_list ']' { $$ = $1; }
|
||||
object_dim_list { $$ = $1; }
|
||||
| cvar_without_objects { do_end_variable_parse(BP_VAR_R, 0 CLS_CC); } { znode tmp_znode; do_pop_object(&tmp_znode CLS_CC); do_fetch_property(&$$, &tmp_znode, &$1 CLS_CC);}
|
||||
;
|
||||
|
||||
scalar_object_property:
|
||||
T_STRING { $$ = $1; }
|
||||
| '{' expr '}' { $$ = $2; }
|
||||
| cvar_without_objects { do_end_variable_parse(BP_VAR_R CLS_CC); $$ = $1; }
|
||||
;
|
||||
|
||||
|
||||
object_dim_list:
|
||||
object_dim_list ']' '[' dim_offset { fetch_array_dim(&$$, &$1, &$4 CLS_CC); }
|
||||
| T_STRING { znode tmp_znode, res; do_pop_object(&tmp_znode CLS_CC); do_fetch_property(&res, &tmp_znode, &$1 CLS_CC); $1 = res; } '[' dim_offset { fetch_array_dim(&$$, &$1, &$4 CLS_CC); }
|
||||
object_dim_list '[' dim_offset ']' { fetch_array_dim(&$$, &$1, &$3 CLS_CC); }
|
||||
| object_dim_list '{' expr '}' { fetch_string_offset(&$$, &$1, &$3 CLS_CC); }
|
||||
| variable_name { znode tmp_znode; do_pop_object(&tmp_znode CLS_CC); do_fetch_property(&$$, &tmp_znode, &$1 CLS_CC);}
|
||||
;
|
||||
|
||||
variable_name:
|
||||
T_STRING { $$ = $1; }
|
||||
| '{' expr '}' { $$ = $2; }
|
||||
;
|
||||
|
||||
|
||||
@@ -589,32 +651,35 @@ assignment_list:
|
||||
|
||||
|
||||
assignment_list_element:
|
||||
w_cvar { do_add_list_element(&$1 CLS_CC); }
|
||||
cvar { do_add_list_element(&$1 CLS_CC); }
|
||||
| T_LIST '(' { do_new_list_begin(CLS_C); } assignment_list ')' { do_new_list_end(CLS_C); }
|
||||
| /* empty */ { do_add_list_element(NULL CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
array_pair_list:
|
||||
/* empty */ { do_init_array(&$$, NULL, NULL CLS_CC); }
|
||||
| non_empty_array_pair_list { $$ = $1; }
|
||||
/* empty */ { do_init_array(&$$, NULL, NULL, 0 CLS_CC); }
|
||||
| non_empty_array_pair_list possible_comma { $$ = $1; }
|
||||
;
|
||||
|
||||
non_empty_array_pair_list:
|
||||
non_empty_array_pair_list ',' expr T_DOUBLE_ARROW expr { do_add_array_element(&$$, &$5, &$3 CLS_CC); }
|
||||
| non_empty_array_pair_list ',' expr { do_add_array_element(&$$, &$3, NULL CLS_CC); }
|
||||
| expr T_DOUBLE_ARROW expr { do_init_array(&$$, &$3, &$1 CLS_CC); }
|
||||
| expr { do_init_array(&$$, &$1, NULL CLS_CC); }
|
||||
non_empty_array_pair_list ',' expr T_DOUBLE_ARROW expr { do_add_array_element(&$$, &$5, &$3, 0 CLS_CC); }
|
||||
| non_empty_array_pair_list ',' expr { do_add_array_element(&$$, &$3, NULL, 0 CLS_CC); }
|
||||
| expr T_DOUBLE_ARROW expr { do_init_array(&$$, &$3, &$1, 0 CLS_CC); }
|
||||
| expr { do_init_array(&$$, &$1, NULL, 0 CLS_CC); }
|
||||
| non_empty_array_pair_list ',' expr T_DOUBLE_ARROW '&' w_cvar { do_add_array_element(&$$, &$6, &$3, 1 CLS_CC); }
|
||||
| non_empty_array_pair_list ',' '&' w_cvar { do_add_array_element(&$$, &$4, NULL, 1 CLS_CC); }
|
||||
| expr T_DOUBLE_ARROW '&' w_cvar { do_init_array(&$$, &$4, &$1, 1 CLS_CC); }
|
||||
| '&' w_cvar { do_init_array(&$$, &$2, NULL, 1 CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
encaps_list:
|
||||
encaps_list encaps_var { do_end_variable_parse(BP_VAR_R CLS_CC); do_add_variable(&$$, &$1, &$2 CLS_CC); }
|
||||
encaps_list encaps_var { do_end_variable_parse(BP_VAR_R, 0 CLS_CC); do_add_variable(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list T_STRING { do_add_string(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list T_NUM_STRING { do_add_string(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list T_ENCAPSED_AND_WHITESPACE { do_add_string(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list T_CHARACTER { do_add_char(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list T_BAD_CHARACTER { do_add_char(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list T_BAD_CHARACTER { do_add_string(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list '[' { $2.u.constant.value.chval = '['; do_add_char(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list ']' { $2.u.constant.value.chval = ']'; do_add_char(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list '{' { $2.u.constant.value.chval = '{'; do_add_char(&$$, &$1, &$2 CLS_CC); }
|
||||
@@ -631,7 +696,7 @@ encaps_var:
|
||||
| T_VARIABLE '[' { do_begin_variable_parse(CLS_C); } encaps_var_offset ']' { do_fetch_globals(&$1 CLS_CC); fetch_array_begin(&$$, &$1, &$4 CLS_CC); }
|
||||
| T_VARIABLE T_OBJECT_OPERATOR T_STRING { do_begin_variable_parse(CLS_C); fetch_simple_variable(&$2, &$1, 1 CLS_CC); do_fetch_property(&$$, &$2, &$3 CLS_CC); }
|
||||
| T_DOLLAR_OPEN_CURLY_BRACES expr '}' { do_begin_variable_parse(CLS_C); fetch_simple_variable(&$$, &$2, 1 CLS_CC); }
|
||||
| T_DOLLAR_OPEN_CURLY_BRACES T_STRING '[' expr ']' '}' { do_begin_variable_parse(CLS_C); fetch_array_begin(&$$, &$2, &$4 CLS_CC); }
|
||||
| T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '[' expr ']' '}' { do_begin_variable_parse(CLS_C); fetch_array_begin(&$$, &$2, &$4 CLS_CC); }
|
||||
| T_CURLY_OPEN cvar '}' { $$ = $2; }
|
||||
;
|
||||
|
||||
@@ -646,7 +711,8 @@ encaps_var_offset:
|
||||
internal_functions_in_yacc:
|
||||
T_ISSET '(' cvar ')' { do_isset_or_isempty(ZEND_ISSET, &$$, &$3 CLS_CC); }
|
||||
| T_EMPTY '(' cvar ')' { do_isset_or_isempty(ZEND_ISEMPTY, &$$, &$3 CLS_CC); }
|
||||
| T_INCLUDE expr { do_include_or_eval(ZEND_INCLUDE, &$$, &$2 CLS_CC); }
|
||||
| T_INCLUDE expr { do_include_or_eval(ZEND_INCLUDE, &$$, &$2 CLS_CC); }
|
||||
| T_INCLUDE_ONCE expr { do_include_or_eval(ZEND_INCLUDE_ONCE, &$$, &$2 CLS_CC); }
|
||||
| T_EVAL '(' expr ')' { do_include_or_eval(ZEND_EVAL, &$$, &$3 CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
+17
-7
@@ -2,18 +2,22 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _LANGUAGE_SCANNER_H
|
||||
#define _LANGUAGE_SCANNER_H
|
||||
|
||||
@@ -30,7 +34,7 @@ public:
|
||||
|
||||
|
||||
#ifndef ZTS
|
||||
typedef struct {
|
||||
typedef struct _zend_lex_state {
|
||||
YY_BUFFER_STATE buffer_state;
|
||||
int state;
|
||||
uint return_offset;
|
||||
@@ -39,10 +43,16 @@ typedef struct {
|
||||
char *filename;
|
||||
} zend_lex_state;
|
||||
#else
|
||||
typedef struct {
|
||||
typedef struct _zend_lex_state {
|
||||
ZendFlexLexer *ZFL;
|
||||
istream *input_file;
|
||||
} zend_lex_state;
|
||||
#endif
|
||||
|
||||
void zend_fatal_scanner_error(char *);
|
||||
inline void restore_lexical_state(zend_lex_state * CLS_DC);
|
||||
BEGIN_EXTERN_C()
|
||||
int zend_compare_file_handles(zend_file_handle *fh1, zend_file_handle *fh2);
|
||||
END_EXTERN_C()
|
||||
|
||||
#endif
|
||||
+297
-84
@@ -4,12 +4,15 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zen license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
@@ -30,24 +33,15 @@
|
||||
|
||||
%{
|
||||
|
||||
#if WIN32|WINNT
|
||||
#ifdef ZEND_WIN32
|
||||
#include <winsock.h>
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef ZTS
|
||||
#include <fstream.h>
|
||||
# if WIN32||WINNT
|
||||
# include <strstrea.h>
|
||||
# else
|
||||
# include <strstream.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include "zend.h"
|
||||
#include "zend_alloc.h"
|
||||
#include "zend-parser.h"
|
||||
#include "zend_compile.h"
|
||||
#include "zend-scanner.h"
|
||||
#include "zend_highlight.h"
|
||||
@@ -55,12 +49,27 @@
|
||||
#include "zend_variables.h"
|
||||
#include "zend_operators.h"
|
||||
|
||||
#if HAVE_STDARG_H
|
||||
#include <stdarg.h>
|
||||
#ifdef ZTS
|
||||
# include <fstream.h>
|
||||
# ifdef HAVE_STDIOSTR_H
|
||||
# include <stdiostr.h>
|
||||
# endif
|
||||
# ifdef HAVE_STDIOSTREAM_H
|
||||
# include <stdiostream.h>
|
||||
# endif
|
||||
# ifdef ZEND_WIN32
|
||||
# include <strstrea.h>
|
||||
# else
|
||||
# include <strstream.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#ifdef HAVE_STDARG_H
|
||||
# include <stdarg.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef ZTS
|
||||
@@ -76,6 +85,16 @@
|
||||
# define MY_INPUT input
|
||||
#endif
|
||||
|
||||
#if defined(ZTS) && !defined(HAVE_CLASS_ISTDIOSTREAM)
|
||||
class istdiostream : public istream
|
||||
{
|
||||
private:
|
||||
stdiobuf _file;
|
||||
public:
|
||||
istdiostream (FILE* __f) : istream(), _file(__f) { init(&_file); }
|
||||
};
|
||||
#endif
|
||||
|
||||
#define YY_FATAL_ERROR zend_fatal_scanner_error
|
||||
|
||||
#define HANDLE_NEWLINES(s,l) \
|
||||
@@ -131,7 +150,7 @@ static inline void save_lexical_state(zend_lex_state *lex_state CLS_DC)
|
||||
lex_state->in = yyin;
|
||||
lex_state->lineno = CG(zend_lineno);
|
||||
lex_state->state = YYSTATE;
|
||||
lex_state->filename = zend_get_compiled_filename();
|
||||
lex_state->filename = zend_get_compiled_filename(CLS_C);
|
||||
#else
|
||||
lex_state->ZFL = CG(ZFL);
|
||||
#endif
|
||||
@@ -162,48 +181,89 @@ inline void restore_lexical_state(zend_lex_state *lex_state CLS_DC)
|
||||
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
ZEND_API void zend_close_file_handle(zend_file_handle *file_handle)
|
||||
|
||||
|
||||
ZEND_API void zend_open_file_dtor(zend_file_handle *fh)
|
||||
{
|
||||
switch (file_handle->type) {
|
||||
case ZEND_HANDLE_FILENAME:
|
||||
break;
|
||||
case ZEND_HANDLE_FD:
|
||||
close(file_handle->handle.fd);
|
||||
break;
|
||||
switch (fh->type) {
|
||||
case ZEND_HANDLE_FP:
|
||||
if (file_handle->handle.fp != stdin) {
|
||||
fclose(file_handle->handle.fp);
|
||||
}
|
||||
fclose(fh->handle.fp);
|
||||
break;
|
||||
case ZEND_HANDLE_FILENAME:
|
||||
/* We're only supposed to get here when destructing the used_files hash,
|
||||
* which doesn't really contain open files, but references to their names/paths
|
||||
*/
|
||||
break;
|
||||
#ifdef ZTS
|
||||
case ZEND_HANDLE_ISTREAM:
|
||||
if (file_handle->handle.is != &cin) {
|
||||
delete file_handle->handle.is;
|
||||
}
|
||||
case ZEND_HANDLE_FSTREAM:
|
||||
delete ((ifstream *) fh->handle.is);
|
||||
break;
|
||||
case ZEND_HANDLE_STDIOSTREAM:
|
||||
istdiostream *pstdiostream = (istdiostream *) fh->handle.is;
|
||||
|
||||
fclose(pstdiostream->rdbuf()->stdiofile());
|
||||
delete pstdiostream;
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
if (fh->opened_path) {
|
||||
free(fh->opened_path);
|
||||
}
|
||||
if (fh->free_filename && fh->filename) {
|
||||
efree(fh->filename);
|
||||
}
|
||||
}
|
||||
|
||||
ZEND_API inline int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
|
||||
|
||||
int zend_compare_file_handles(zend_file_handle *fh1, zend_file_handle *fh2)
|
||||
{
|
||||
if (fh1->type != fh2->type) {
|
||||
return 0;
|
||||
}
|
||||
switch (fh1->type) {
|
||||
case ZEND_HANDLE_FP:
|
||||
return fh1->handle.fp==fh2->handle.fp;
|
||||
break;
|
||||
#ifdef ZTS
|
||||
case ZEND_HANDLE_FSTREAM:
|
||||
case ZEND_HANDLE_STDIOSTREAM:
|
||||
return fh1->handle.is==fh2->handle.is;
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zend_close_file_handle(zend_file_handle *file_handle CLS_DC)
|
||||
{
|
||||
zend_llist_del_element(&CG(open_files), file_handle, (int (*)(void *, void *)) zend_compare_file_handles);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
|
||||
{
|
||||
#ifndef ZTS
|
||||
switch (file_handle->type) {
|
||||
case ZEND_HANDLE_FILENAME:
|
||||
file_handle->handle.fp = zend_fopen(file_handle->filename);
|
||||
file_handle->handle.fp = zend_fopen(file_handle->filename, &file_handle->opened_path);
|
||||
break;
|
||||
case ZEND_HANDLE_FD:
|
||||
file_handle->opened_path = NULL;
|
||||
file_handle->handle.fp = fdopen(file_handle->handle.fd, "r");
|
||||
break;
|
||||
case ZEND_HANDLE_FP:
|
||||
file_handle->opened_path = NULL;
|
||||
file_handle->handle.fp = file_handle->handle.fp;
|
||||
break;
|
||||
}
|
||||
if (!file_handle->handle.fp) {
|
||||
return FAILURE;
|
||||
}
|
||||
file_handle->type = ZEND_HANDLE_FP;
|
||||
|
||||
file_handle->type = ZEND_HANDLE_FP;
|
||||
if (file_handle->handle.fp != stdin) {
|
||||
zend_llist_add_element(&CG(open_files), file_handle);
|
||||
}
|
||||
/* Reset the scanner for scanning the new file */
|
||||
yyin = file_handle->handle.fp;
|
||||
yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE));
|
||||
@@ -211,17 +271,30 @@ ZEND_API inline int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
|
||||
#else
|
||||
switch (file_handle->type) {
|
||||
case ZEND_HANDLE_FD:
|
||||
file_handle->opened_path = NULL;
|
||||
file_handle->handle.is = new ifstream(file_handle->handle.fd);
|
||||
file_handle->type = ZEND_HANDLE_FSTREAM;
|
||||
break;
|
||||
case ZEND_HANDLE_FILENAME:
|
||||
file_handle->handle.is = new ifstream(file_handle->filename, ios::nocreate|ios::in|ios::binary);
|
||||
break;
|
||||
{
|
||||
file_handle->handle.fp = zend_fopen(file_handle->filename, &file_handle->opened_path);
|
||||
if (!file_handle->handle.fp) {
|
||||
return FAILURE;
|
||||
}
|
||||
file_handle->handle.is = new istdiostream(file_handle->handle.fp);
|
||||
file_handle->type = ZEND_HANDLE_STDIOSTREAM;
|
||||
break;
|
||||
}
|
||||
case ZEND_HANDLE_FP:
|
||||
file_handle->opened_path = NULL;
|
||||
if (file_handle->handle.fp==stdin) {
|
||||
file_handle->handle.is = (ifstream *) &cin;
|
||||
file_handle->handle.is = &cin;
|
||||
} else {
|
||||
fclose(file_handle->handle.fp);
|
||||
file_handle->handle.is = new ifstream(file_handle->filename, ios::nocreate|ios::in|ios::binary);
|
||||
if (!file_handle->handle.fp) {
|
||||
return FAILURE;
|
||||
}
|
||||
file_handle->handle.is = new istdiostream(file_handle->handle.fp);
|
||||
file_handle->type = ZEND_HANDLE_STDIOSTREAM;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -229,7 +302,9 @@ ZEND_API inline int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
|
||||
delete file_handle->handle.is;
|
||||
return FAILURE;
|
||||
}
|
||||
file_handle->type = ZEND_HANDLE_ISTREAM;
|
||||
if (file_handle->handle.is != &cin) {
|
||||
zend_llist_add_element(&CG(open_files), file_handle);
|
||||
}
|
||||
|
||||
CG(ZFL) = new ZendFlexLexer;
|
||||
CG(ZFL)->switch_streams(file_handle->handle.is, &cout);
|
||||
@@ -259,55 +334,82 @@ ZEND_API zend_op_array *v_compile_files(int mark_as_ref CLS_DC, int file_count,
|
||||
zend_op_array *op_array = (zend_op_array *) emalloc(sizeof(zend_op_array));
|
||||
zend_op_array *original_active_op_array = CG(active_op_array);
|
||||
zend_op_array *retval=NULL;
|
||||
zend_file_handle *file_handle;
|
||||
int i;
|
||||
int compiler_result;
|
||||
int compiled_files=0;
|
||||
int last_file=0;
|
||||
znode retval_znode;
|
||||
zend_bool original_in_compilation = CG(in_compilation);
|
||||
zend_file_handle **file_handles = (zend_file_handle **) do_alloca(file_count * sizeof(zend_file_handle *));
|
||||
|
||||
retval_znode.op_type = IS_CONST;
|
||||
retval_znode.u.constant.type = IS_LONG;
|
||||
retval_znode.u.constant.value.lval = 1;
|
||||
retval_znode.u.constant.is_ref = 0;
|
||||
retval_znode.u.constant.refcount = 1;
|
||||
|
||||
init_op_array(op_array, INITIAL_OP_ARRAY_SIZE);
|
||||
save_lexical_state(&original_lex_state CLS_CC);
|
||||
|
||||
retval = op_array; /* success oriented */
|
||||
|
||||
for (i=0; i<file_count; i++) {
|
||||
file_handle = va_arg(files, zend_file_handle *);
|
||||
if (!file_handle) {
|
||||
file_handles[i] = va_arg(files, zend_file_handle *);
|
||||
if (file_handles[i]) {
|
||||
last_file = i;
|
||||
}
|
||||
}
|
||||
|
||||
for (i=0; i<file_count; i++) {
|
||||
if (!file_handles[i]) {
|
||||
continue;
|
||||
}
|
||||
if (open_file_for_scanning(file_handle CLS_CC)==FAILURE) {
|
||||
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, file_handle->filename);
|
||||
|
||||
destroy_op_array(op_array);
|
||||
efree(op_array);
|
||||
retval = NULL;
|
||||
break;
|
||||
if (open_file_for_scanning(file_handles[i] CLS_CC)==FAILURE) {
|
||||
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, file_handles[i]->filename);
|
||||
} else {
|
||||
CG(in_compilation) = 1;
|
||||
CG(active_op_array) = op_array;
|
||||
compiler_result = zendparse(CLS_C);
|
||||
zend_close_file_handle(file_handle);
|
||||
zend_close_file_handle(file_handles[i] CLS_CC);
|
||||
if (i == last_file) {
|
||||
do_return(&retval_znode, 0 CLS_CC);
|
||||
}
|
||||
restore_lexical_state(&original_lex_state CLS_CC);
|
||||
CG(active_op_array) = original_active_op_array;
|
||||
CG(in_compilation) = original_in_compilation;
|
||||
if (compiler_result==1) { /* parser error */
|
||||
CG(unclean_shutdown) = 1;
|
||||
retval = NULL;
|
||||
break;
|
||||
}
|
||||
compiled_files++;
|
||||
}
|
||||
}
|
||||
|
||||
if (retval) {
|
||||
pass_two(op_array);
|
||||
if (mark_as_ref) {
|
||||
pass_include_eval(op_array);
|
||||
if (compiled_files>0) {
|
||||
CG(active_op_array) = original_active_op_array;
|
||||
pass_two(op_array);
|
||||
if (mark_as_ref) {
|
||||
pass_include_eval(op_array);
|
||||
}
|
||||
} else {
|
||||
CG(active_op_array) = original_active_op_array;
|
||||
destroy_op_array(op_array);
|
||||
efree(op_array);
|
||||
retval = NULL;
|
||||
}
|
||||
}
|
||||
free_alloca(file_handles);
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
zend_op_array *compile_filename(zval *filename CLS_DC)
|
||||
zend_op_array *compile_filename(int mode, zval *filename CLS_DC ELS_DC)
|
||||
{
|
||||
zend_file_handle file_handle;
|
||||
zval tmp;
|
||||
zend_op_array *retval;
|
||||
int error_reporting=0;
|
||||
|
||||
if (filename->type != IS_STRING) {
|
||||
tmp = *filename;
|
||||
@@ -316,8 +418,28 @@ zend_op_array *compile_filename(zval *filename CLS_DC)
|
||||
filename = &tmp;
|
||||
}
|
||||
file_handle.filename = filename->value.str.val;
|
||||
file_handle.free_filename = 0;
|
||||
file_handle.type = ZEND_HANDLE_FILENAME;
|
||||
file_handle.opened_path = NULL;
|
||||
|
||||
|
||||
if (mode==ZEND_REQUIRE) {
|
||||
/* We don't want to hear about inclusion failures; If we fail,
|
||||
* we'll generate a require failure
|
||||
*/
|
||||
error_reporting = EG(error_reporting);
|
||||
EG(error_reporting) = 0;
|
||||
}
|
||||
retval = zend_compile_files(1 CLS_CC, 1, &file_handle);
|
||||
|
||||
if (mode==ZEND_REQUIRE) {
|
||||
EG(error_reporting) = error_reporting;
|
||||
if (!retval) {
|
||||
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, filename->value.str.val);
|
||||
zend_bailout();
|
||||
}
|
||||
}
|
||||
|
||||
if (filename==&tmp) {
|
||||
zval_dtor(&tmp);
|
||||
}
|
||||
@@ -329,7 +451,7 @@ static inline int prepare_string_for_scanning(zval *str CLS_DC)
|
||||
{
|
||||
#ifndef ZTS
|
||||
/* enforce two trailing NULLs for flex... */
|
||||
str->value.str.val = (char *) erealloc(str->value.str.val,str->value.str.len+2);
|
||||
STR_REALLOC(str->value.str.val, str->value.str.len+2);
|
||||
|
||||
str->value.str.val[str->value.str.len+1]=0;
|
||||
|
||||
@@ -353,11 +475,15 @@ zend_op_array *compile_string(zval *source_string CLS_DC)
|
||||
zend_op_array *retval;
|
||||
zval tmp;
|
||||
int compiler_result;
|
||||
zend_bool original_in_compilation = CG(in_compilation);
|
||||
|
||||
if (source_string->value.str.len==0) {
|
||||
efree(op_array);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
CG(in_compilation) = 1;
|
||||
|
||||
tmp = *source_string;
|
||||
zval_copy_ctor(&tmp);
|
||||
convert_to_string(&tmp);
|
||||
@@ -379,30 +505,34 @@ zend_op_array *compile_string(zval *source_string CLS_DC)
|
||||
#endif
|
||||
compiler_result = zendparse(CLS_C);
|
||||
restore_lexical_state(&original_lex_state CLS_CC);
|
||||
CG(active_op_array) = original_active_op_array;
|
||||
|
||||
if (compiler_result==1) {
|
||||
CG(active_op_array) = original_active_op_array;
|
||||
CG(unclean_shutdown)=1;
|
||||
retval = NULL;
|
||||
} else {
|
||||
do_return(NULL, 0 CLS_CC);
|
||||
CG(active_op_array) = original_active_op_array;
|
||||
pass_two(op_array);
|
||||
pass_include_eval(op_array);
|
||||
retval = op_array;
|
||||
}
|
||||
}
|
||||
zval_dtor(&tmp);
|
||||
CG(in_compilation) = original_in_compilation;
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
int require_filename(char *filename CLS_DC)
|
||||
int require_filename(char *filename, zend_bool unique CLS_DC)
|
||||
{
|
||||
zend_file_handle file_handle;
|
||||
|
||||
file_handle.type = ZEND_HANDLE_FILENAME;
|
||||
file_handle.filename = filename;
|
||||
if (require_file(&file_handle CLS_CC)==FAILURE) {
|
||||
file_handle.free_filename = 0;
|
||||
if (require_file(&file_handle, unique CLS_CC)==FAILURE) {
|
||||
zend_bailout();
|
||||
return FAILURE; /* will never get here */
|
||||
}
|
||||
@@ -410,7 +540,27 @@ int require_filename(char *filename CLS_DC)
|
||||
}
|
||||
|
||||
|
||||
int require_file(zend_file_handle *file_handle CLS_DC)
|
||||
int use_filename(char *filename, uint filename_length CLS_DC)
|
||||
{
|
||||
zend_file_handle file_handle;
|
||||
|
||||
file_handle.filename = (char *) emalloc(filename_length + zend_uv.import_use_extension_length);
|
||||
memcpy(file_handle.filename, filename, filename_length);
|
||||
memcpy(file_handle.filename+filename_length, zend_uv.import_use_extension, zend_uv.import_use_extension_length);
|
||||
file_handle.filename[filename_length+zend_uv.import_use_extension_length] = 0;
|
||||
file_handle.free_filename = 1;
|
||||
|
||||
file_handle.type = ZEND_HANDLE_FILENAME;
|
||||
if (require_file(&file_handle, 1 CLS_CC)==FAILURE) {
|
||||
efree(file_handle.filename);
|
||||
zend_bailout();
|
||||
return FAILURE; /* will never get here */
|
||||
}
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
int require_file(zend_file_handle *file_handle, zend_bool unique CLS_DC)
|
||||
{
|
||||
zend_lex_state original_lex_state;
|
||||
int compiler_result;
|
||||
@@ -420,8 +570,28 @@ int require_file(zend_file_handle *file_handle CLS_DC)
|
||||
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, file_handle->filename);
|
||||
return FAILURE;
|
||||
}
|
||||
if (file_handle->opened_path) {
|
||||
if (unique) {
|
||||
zend_file_handle *pfh;
|
||||
|
||||
if (zend_hash_add(&CG(used_files), file_handle->opened_path, strlen(file_handle->opened_path)+1, file_handle, sizeof(zend_file_handle), (void **) &pfh)==FAILURE) {
|
||||
zend_close_file_handle(file_handle CLS_CC);
|
||||
restore_lexical_state(&original_lex_state CLS_CC);
|
||||
return SUCCESS;
|
||||
} else {
|
||||
/* pfh is a copy we only save for get_used_files() */
|
||||
pfh->type = ZEND_HANDLE_FILENAME;
|
||||
if (pfh->filename) {
|
||||
pfh->filename = estrdup(pfh->filename);
|
||||
}
|
||||
if (pfh->opened_path) {
|
||||
pfh->opened_path = strdup(pfh->opened_path);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
compiler_result = zendparse(CLS_C);
|
||||
zend_close_file_handle(file_handle);
|
||||
zend_close_file_handle(file_handle CLS_CC);
|
||||
restore_lexical_state(&original_lex_state CLS_CC);
|
||||
if (compiler_result==1) {
|
||||
zend_bailout();
|
||||
@@ -438,13 +608,15 @@ int highlight_file(char *filename, zend_syntax_highlighter_ini *syntax_highlight
|
||||
|
||||
file_handle.type = ZEND_HANDLE_FILENAME;
|
||||
file_handle.filename = filename;
|
||||
file_handle.free_filename = 0;
|
||||
file_handle.opened_path = NULL;
|
||||
save_lexical_state(&original_lex_state CLS_CC);
|
||||
if (open_file_for_scanning(&file_handle CLS_CC)==FAILURE) {
|
||||
zend_message_dispatcher(ZMSG_FAILED_HIGHLIGHT_FOPEN, filename);
|
||||
return FAILURE;
|
||||
}
|
||||
zend_highlight(syntax_highlighter_ini);
|
||||
zend_close_file_handle(&file_handle);
|
||||
zend_close_file_handle(&file_handle CLS_CC);
|
||||
restore_lexical_state(&original_lex_state CLS_CC);
|
||||
return SUCCESS;
|
||||
}
|
||||
@@ -514,7 +686,7 @@ int yyFlexLexer::yylex()
|
||||
|
||||
|
||||
/* redefine YY_INPUT to handle urls for win32*/
|
||||
#if 0 /*WIN32|WINNT*/
|
||||
#if 0 /*defined(ZEND_WIN32)*/
|
||||
#define YY_INPUT(buf,result,max_size) \
|
||||
if ( yyin->_tmpfname != "url" ){ \
|
||||
if ( yy_current_buffer->yy_is_interactive ) \
|
||||
@@ -638,6 +810,14 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
|
||||
return T_ENDFOREACH;
|
||||
}
|
||||
|
||||
<ST_IN_SCRIPTING>"declare" {
|
||||
return T_DECLARE;
|
||||
}
|
||||
|
||||
<ST_IN_SCRIPTING>"enddeclare" {
|
||||
return T_ENDDECLARE;
|
||||
}
|
||||
|
||||
<ST_IN_SCRIPTING>"as" {
|
||||
return T_AS;
|
||||
}
|
||||
@@ -733,6 +913,14 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
|
||||
return T_OBJECT_CAST;
|
||||
}
|
||||
|
||||
<ST_IN_SCRIPTING>"("{TABS_AND_SPACES}("bool"|"boolean"){TABS_AND_SPACES}")" {
|
||||
return T_BOOL_CAST;
|
||||
}
|
||||
|
||||
<ST_IN_SCRIPTING>"("{TABS_AND_SPACES}("unset"){TABS_AND_SPACES}")" {
|
||||
return T_UNSET_CAST;
|
||||
}
|
||||
|
||||
<ST_IN_SCRIPTING>"eval" {
|
||||
return T_EVAL;
|
||||
}
|
||||
@@ -741,10 +929,22 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
|
||||
return T_INCLUDE;
|
||||
}
|
||||
|
||||
<ST_IN_SCRIPTING>"include_once" {
|
||||
return T_INCLUDE_ONCE;
|
||||
}
|
||||
|
||||
<ST_IN_SCRIPTING>"require" {
|
||||
return T_REQUIRE;
|
||||
}
|
||||
|
||||
<ST_IN_SCRIPTING>"require_once" {
|
||||
return T_REQUIRE_ONCE;
|
||||
}
|
||||
|
||||
<ST_IN_SCRIPTING>"use" {
|
||||
return T_USE;
|
||||
}
|
||||
|
||||
<ST_IN_SCRIPTING>"global" {
|
||||
return T_GLOBAL;
|
||||
}
|
||||
@@ -785,6 +985,10 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
|
||||
return T_DEC;
|
||||
}
|
||||
|
||||
<ST_IN_SCRIPTING>"===" {
|
||||
return T_IS_IDENTICAL;
|
||||
}
|
||||
|
||||
<ST_IN_SCRIPTING>"==" {
|
||||
return T_IS_EQUAL;
|
||||
}
|
||||
@@ -951,8 +1155,11 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
|
||||
}
|
||||
|
||||
<ST_IN_SCRIPTING>"__FILE__" {
|
||||
char *filename = zend_get_compiled_filename();
|
||||
char *filename = zend_get_compiled_filename(CLS_C);
|
||||
|
||||
if (!filename) {
|
||||
filename = "";
|
||||
}
|
||||
zendlval->value.str.len = strlen(filename);
|
||||
zendlval->value.str.val = estrndup(filename,zendlval->value.str.len);
|
||||
zendlval->type = IS_STRING;
|
||||
@@ -985,8 +1192,9 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
|
||||
}
|
||||
|
||||
|
||||
<INITIAL>"<%=" {
|
||||
if (CG(asp_tags)) {
|
||||
<INITIAL>"<%="|"<?=" {
|
||||
if ((yytext[1]=='%' && CG(asp_tags))
|
||||
|| (yytext[1]=='?' && CG(short_tags))) {
|
||||
zendlval->value.str.val = yytext; /* no copying - intentional */
|
||||
zendlval->value.str.len = yyleng;
|
||||
zendlval->type = IS_STRING;
|
||||
@@ -1032,7 +1240,7 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
|
||||
return T_PHP_TRACK_VARS;
|
||||
}
|
||||
|
||||
<ST_IN_SCRIPTING,ST_DOUBLE_QUOTES,ST_HEREDOC>"$"{LABEL} {
|
||||
<ST_IN_SCRIPTING,ST_DOUBLE_QUOTES,ST_HEREDOC,ST_BACKQUOTE>"$"{LABEL} {
|
||||
zendlval->value.str.val = (char *)estrndup(yytext+1, yyleng-1);
|
||||
zendlval->value.str.len = yyleng-1;
|
||||
zendlval->type = IS_STRING;
|
||||
@@ -1071,17 +1279,18 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
|
||||
}
|
||||
|
||||
<ST_IN_SCRIPTING>"/*" {
|
||||
CG(comment_start_line) = CG(zend_lineno);
|
||||
BEGIN(ST_COMMENT);
|
||||
yymore();
|
||||
}
|
||||
|
||||
|
||||
<ST_COMMENT>[^*]+ {
|
||||
HANDLE_NEWLINES(yytext, yyleng);
|
||||
yymore();
|
||||
}
|
||||
|
||||
<ST_COMMENT>"*/" {
|
||||
HANDLE_NEWLINES(yytext, yyleng);
|
||||
BEGIN(ST_IN_SCRIPTING);
|
||||
return T_COMMENT;
|
||||
}
|
||||
@@ -1244,6 +1453,7 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
|
||||
|
||||
<ST_IN_SCRIPTING>"<<<"{TABS_AND_SPACES}{LABEL}("\r")?"\n" {
|
||||
char *s;
|
||||
CG(zend_lineno)++;
|
||||
CG(heredoc_len) = yyleng-3-1-(yytext[yyleng-2]=='\r'?1:0);
|
||||
s = yytext+3;
|
||||
while ((*s == ' ') || (*s == '\t')) {
|
||||
@@ -1252,7 +1462,7 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
|
||||
}
|
||||
CG(heredoc) = estrndup(s, CG(heredoc_len));
|
||||
BEGIN(ST_HEREDOC);
|
||||
return T_HEREDOC;
|
||||
return T_START_HEREDOC;
|
||||
}
|
||||
|
||||
|
||||
@@ -1272,6 +1482,7 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
|
||||
int label_len;
|
||||
unsigned char unput_semicolon;
|
||||
|
||||
CG(zend_lineno)++;
|
||||
if (yytext[yyleng-2]=='\r') {
|
||||
label_len = yyleng-2;
|
||||
} else {
|
||||
@@ -1286,6 +1497,8 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
|
||||
}
|
||||
|
||||
if (label_len==CG(heredoc_len) && !memcmp(yytext, CG(heredoc), label_len)) {
|
||||
zendlval->value.str.val = estrndup(yytext, yyleng); /* unput destroys yytext */
|
||||
zendlval->value.str.len = yyleng;
|
||||
if (unput_semicolon) {
|
||||
unput(';');
|
||||
}
|
||||
@@ -1293,7 +1506,7 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
|
||||
CG(heredoc)=NULL;
|
||||
CG(heredoc_len)=0;
|
||||
BEGIN(ST_IN_SCRIPTING);
|
||||
return T_HEREDOC;
|
||||
return T_END_HEREDOC;
|
||||
} else {
|
||||
zendlval->value.str.val = (char *)estrndup(yytext, yyleng);
|
||||
zendlval->value.str.len = yyleng;
|
||||
@@ -1392,7 +1605,7 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
|
||||
return T_CHARACTER;
|
||||
}
|
||||
|
||||
<ST_DOUBLE_QUOTES,ST_BACKQUOTE>"\\". {
|
||||
<ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC>"\\". {
|
||||
switch (yytext[1]) {
|
||||
case 'n':
|
||||
zendlval->value.chval='\n';
|
||||
@@ -1423,12 +1636,6 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
|
||||
}
|
||||
|
||||
|
||||
<ST_HEREDOC>"\\$"|"\\{" {
|
||||
zendlval->value.chval = yytext[1];
|
||||
return T_CHARACTER;
|
||||
}
|
||||
|
||||
|
||||
<ST_HEREDOC>["'`]+ {
|
||||
zendlval->value.str.val = (char *) estrndup(yytext, yyleng);
|
||||
zendlval->value.str.len = yyleng;
|
||||
@@ -1459,7 +1666,13 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
|
||||
return 0;
|
||||
}
|
||||
|
||||
<ST_COMMENT><<EOF>> {
|
||||
zend_error(E_COMPILE_WARNING,"Unterminated comment starting line %d", CG(comment_start_line));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
<ST_IN_SCRIPTING,INITIAL,ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_SINGLE_QUOTE>. {
|
||||
|
||||
<ST_IN_SCRIPTING,INITIAL,ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_SINGLE_QUOTE,ST_HEREDOC>. {
|
||||
zend_error(E_COMPILE_WARNING,"Unexpected character in input: '%c' (ASCII=%d) state=%d",yytext[0],yytext[0],YYSTATE);
|
||||
}
|
||||
+203
-78
@@ -2,12 +2,15 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
@@ -16,47 +19,55 @@
|
||||
|
||||
|
||||
#include "zend.h"
|
||||
#include "zend_operators.h"
|
||||
#include "zend_variables.h"
|
||||
#include "zend_extensions.h"
|
||||
#include "modules.h"
|
||||
#include "zend_constants.h"
|
||||
#include "zend_list.h"
|
||||
#include "zend_API.h"
|
||||
#include "zend_builtin_functions.h"
|
||||
|
||||
#ifdef ZTS
|
||||
# define GLOBAL_FUNCTION_TABLE global_function_table
|
||||
# define GLOBAL_CLASS_TABLE global_class_table
|
||||
# define GLOBAL_CONSTANTS_TABLE global_constants_table
|
||||
#else
|
||||
# define GLOBAL_FUNCTION_TABLE CG(function_table)
|
||||
# define GLOBAL_CLASS_TABLE CG(class_table)
|
||||
# define GLOBAL_CONSTANTS_TABLE CG(zend_constants)
|
||||
#endif
|
||||
|
||||
/* true multithread-shared globals */
|
||||
zend_class_entry standard_class;
|
||||
ZEND_API zend_class_entry zend_standard_class_def;
|
||||
ZEND_API int (*zend_printf)(const char *format, ...);
|
||||
ZEND_API int (*zend_write)(const char *str, uint str_length);
|
||||
ZEND_API zend_write_func_t zend_write;
|
||||
ZEND_API void (*zend_error)(int type, const char *format, ...);
|
||||
void (*zend_message_dispatcher)(long message, void *data);
|
||||
FILE *(*zend_fopen)(const char *filename);
|
||||
void (*zend_block_interruptions)();
|
||||
void (*zend_unblock_interruptions)();
|
||||
ZEND_API FILE *(*zend_fopen)(const char *filename, char **opened_path);
|
||||
ZEND_API void (*zend_block_interruptions)(void);
|
||||
ZEND_API void (*zend_unblock_interruptions)(void);
|
||||
ZEND_API void (*zend_ticks_function)(int ticks);
|
||||
static void (*zend_message_dispatcher_p)(long message, void *data);
|
||||
static int (*zend_get_ini_entry_p)(char *name, uint name_length, zval *contents);
|
||||
|
||||
#ifdef ZTS
|
||||
ZEND_API int compiler_globals_id;
|
||||
ZEND_API int executor_globals_id;
|
||||
int alloc_globals_id;
|
||||
ZEND_API int alloc_globals_id;
|
||||
HashTable *global_function_table;
|
||||
HashTable *global_class_table;
|
||||
HashTable *global_constants_table;
|
||||
#endif
|
||||
|
||||
zend_utility_values zend_uv;
|
||||
|
||||
ZEND_API zval zval_used_for_init; /* True global variable */
|
||||
|
||||
/* version information */
|
||||
static char *zend_version_info;
|
||||
static uint zend_version_info_length;
|
||||
#define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski\n"
|
||||
#define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998-2000 Zend Technologies Ltd.\n"
|
||||
|
||||
|
||||
#define PRINT_PVAL_INDENT 4
|
||||
#define PRINT_ZVAL_INDENT 4
|
||||
|
||||
static void print_hash(HashTable *ht, int indent)
|
||||
{
|
||||
@@ -69,7 +80,7 @@ static void print_hash(HashTable *ht, int indent)
|
||||
ZEND_PUTS(" ");
|
||||
}
|
||||
ZEND_PUTS("(\n");
|
||||
indent += PRINT_PVAL_INDENT;
|
||||
indent += PRINT_ZVAL_INDENT;
|
||||
zend_hash_internal_pointer_reset(ht);
|
||||
while (zend_hash_get_current_data(ht, (void **) &tmp) == SUCCESS) {
|
||||
for (i=0; i<indent; i++) {
|
||||
@@ -79,17 +90,18 @@ static void print_hash(HashTable *ht, int indent)
|
||||
switch (zend_hash_get_current_key(ht, &string_key, &num_key)) {
|
||||
case HASH_KEY_IS_STRING:
|
||||
ZEND_PUTS(string_key);
|
||||
efree(string_key);
|
||||
break;
|
||||
case HASH_KEY_IS_LONG:
|
||||
zend_printf("%ld",num_key);
|
||||
break;
|
||||
}
|
||||
ZEND_PUTS("] => ");
|
||||
zend_print_zval_r(*tmp, indent+PRINT_PVAL_INDENT);
|
||||
zend_print_zval_r(*tmp, indent+PRINT_ZVAL_INDENT);
|
||||
ZEND_PUTS("\n");
|
||||
zend_hash_move_forward(ht);
|
||||
}
|
||||
indent -= PRINT_PVAL_INDENT;
|
||||
indent -= PRINT_ZVAL_INDENT;
|
||||
for (i=0; i<indent; i++) {
|
||||
ZEND_PUTS(" ");
|
||||
}
|
||||
@@ -97,45 +109,92 @@ static void print_hash(HashTable *ht, int indent)
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_copy)
|
||||
{
|
||||
if (expr->type==IS_STRING) {
|
||||
*use_copy = 0;
|
||||
return;
|
||||
}
|
||||
switch (expr->type) {
|
||||
case IS_NULL:
|
||||
expr_copy->value.str.len = 0;
|
||||
expr_copy->value.str.val = empty_string;
|
||||
break;
|
||||
case IS_BOOL:
|
||||
if (expr->value.lval) {
|
||||
expr_copy->value.str.len = 1;
|
||||
expr_copy->value.str.val = estrndup("1", 1);
|
||||
} else {
|
||||
expr_copy->value.str.len = 0;
|
||||
expr_copy->value.str.val = empty_string;
|
||||
}
|
||||
break;
|
||||
case IS_RESOURCE:
|
||||
expr_copy->value.str.val = (char *) emalloc(sizeof("Resource id #")-1 + MAX_LENGTH_OF_LONG);
|
||||
expr_copy->value.str.len = sprintf(expr_copy->value.str.val, "Resource id #%ld", expr->value.lval);
|
||||
break;
|
||||
case IS_ARRAY:
|
||||
expr_copy->value.str.len = sizeof("Array")-1;
|
||||
expr_copy->value.str.val = estrndup("Array", expr_copy->value.str.len);
|
||||
break;
|
||||
case IS_OBJECT: {
|
||||
zval function_name;
|
||||
ZVAL_STRING(&function_name,"__string_value",1);
|
||||
|
||||
if (call_user_function(NULL, expr, &function_name, expr_copy, 0, NULL)==FAILURE) {
|
||||
expr_copy->value.str.len = sizeof("Object")-1;
|
||||
expr_copy->value.str.val = estrndup("Object", expr_copy->value.str.len);
|
||||
}
|
||||
efree(function_name.value.str.val);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
*expr_copy = *expr;
|
||||
zval_copy_ctor(expr_copy);
|
||||
convert_to_string(expr_copy);
|
||||
break;
|
||||
}
|
||||
expr_copy->type = IS_STRING;
|
||||
*use_copy = 1;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int zend_print_zval(zval *expr, int indent)
|
||||
{
|
||||
zval expr_copy;
|
||||
int destroy=0;
|
||||
return zend_print_zval_ex(zend_write, expr, indent);
|
||||
}
|
||||
|
||||
if (expr->type != IS_STRING) {
|
||||
if (expr->type == IS_BOOL) {
|
||||
if (expr->value.lval) {
|
||||
expr_copy.value.str.val = estrndup("true",4);
|
||||
expr_copy.value.str.len = 4;
|
||||
} else {
|
||||
expr_copy.value.str.val = estrndup("false",5);
|
||||
expr_copy.value.str.len = 5;
|
||||
}
|
||||
expr_copy.type = IS_STRING;
|
||||
} else if (expr->type == IS_RESOURCE) {
|
||||
expr_copy.value.str.val = (char *) emalloc(sizeof("Resource id #")-1 + MAX_LENGTH_OF_LONG);
|
||||
expr_copy.value.str.len = sprintf(expr_copy.value.str.val, "Resource id #%ld", expr->value.lval);
|
||||
expr_copy.type = IS_STRING;
|
||||
} else {
|
||||
expr_copy = *expr;
|
||||
zval_copy_ctor(&expr_copy);
|
||||
convert_to_string(&expr_copy);
|
||||
}
|
||||
|
||||
ZEND_API int zend_print_zval_ex(zend_write_func_t write_func, zval *expr, int indent)
|
||||
{
|
||||
zval expr_copy;
|
||||
int use_copy;
|
||||
|
||||
zend_make_printable_zval(expr, &expr_copy, &use_copy);
|
||||
if (use_copy) {
|
||||
expr = &expr_copy;
|
||||
destroy=1;
|
||||
}
|
||||
if (expr->value.str.len==0) { /* optimize away empty strings */
|
||||
if (use_copy) {
|
||||
zval_dtor(expr);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
ZEND_WRITE(expr->value.str.val,expr->value.str.len);
|
||||
if (destroy) {
|
||||
write_func(expr->value.str.val,expr->value.str.len);
|
||||
if (use_copy) {
|
||||
zval_dtor(expr);
|
||||
}
|
||||
return expr->value.str.len;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zend_print_zval_r(zval *expr, int indent)
|
||||
ZEND_API void zend_print_zval_r(zval *expr, int indent)
|
||||
{
|
||||
zend_print_zval_r_ex(zend_write, expr, indent);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval *expr, int indent)
|
||||
{
|
||||
switch(expr->type) {
|
||||
case IS_ARRAY:
|
||||
@@ -153,26 +212,29 @@ ZEND_API void zend_print_zval_r(zval *expr, int indent)
|
||||
}
|
||||
|
||||
|
||||
static FILE *zend_fopen_wrapper(const char *filename)
|
||||
static FILE *zend_fopen_wrapper(const char *filename, char **opened_path)
|
||||
{
|
||||
if (opened_path) {
|
||||
*opened_path = strdup(filename);
|
||||
}
|
||||
return fopen(filename, "r");
|
||||
}
|
||||
|
||||
|
||||
static void register_standard_class()
|
||||
static void register_standard_class(void)
|
||||
{
|
||||
standard_class.type = ZEND_INTERNAL_CLASS;
|
||||
standard_class.name_length = sizeof("stdClass") - 1;
|
||||
standard_class.name = zend_strndup("stdClass", standard_class.name_length);
|
||||
standard_class.parent = NULL;
|
||||
zend_hash_init(&standard_class.default_properties, 0, NULL, PVAL_PTR_DTOR, 1);
|
||||
zend_hash_init(&standard_class.function_table, 0, NULL, (void (*)(void *)) destroy_zend_function, 1);
|
||||
standard_class.handle_function_call = NULL;
|
||||
standard_class.handle_property_get = NULL;
|
||||
standard_class.handle_property_set = NULL;
|
||||
standard_class.refcount = (int *) malloc(sizeof(int));
|
||||
*standard_class.refcount = 1;
|
||||
zend_hash_add(GLOBAL_CLASS_TABLE, "stdClass", sizeof("stdClass"), &standard_class, sizeof(zend_class_entry), NULL);
|
||||
zend_standard_class_def.type = ZEND_INTERNAL_CLASS;
|
||||
zend_standard_class_def.name_length = sizeof("stdClass") - 1;
|
||||
zend_standard_class_def.name = zend_strndup("stdClass", zend_standard_class_def.name_length);
|
||||
zend_standard_class_def.parent = NULL;
|
||||
zend_hash_init(&zend_standard_class_def.default_properties, 0, NULL, ZVAL_PTR_DTOR, 1);
|
||||
zend_hash_init(&zend_standard_class_def.function_table, 0, NULL, ZEND_FUNCTION_DTOR, 1);
|
||||
zend_standard_class_def.handle_function_call = NULL;
|
||||
zend_standard_class_def.handle_property_get = NULL;
|
||||
zend_standard_class_def.handle_property_set = NULL;
|
||||
zend_standard_class_def.refcount = (int *) malloc(sizeof(int));
|
||||
*zend_standard_class_def.refcount = 1;
|
||||
zend_hash_add(GLOBAL_CLASS_TABLE, "stdclass", sizeof("stdclass"), &zend_standard_class_def, sizeof(zend_class_entry), NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -183,12 +245,14 @@ static void compiler_globals_ctor(zend_compiler_globals *compiler_globals)
|
||||
zend_class_entry tmp_class;
|
||||
|
||||
compiler_globals->function_table = (HashTable *) malloc(sizeof(HashTable));
|
||||
zend_hash_init(compiler_globals->function_table, 100, NULL, (void (*)(void *)) destroy_zend_function, 1);
|
||||
zend_hash_init(compiler_globals->function_table, 100, NULL, ZEND_FUNCTION_DTOR, 1);
|
||||
zend_hash_copy(compiler_globals->function_table, global_function_table, NULL, &tmp_func, sizeof(zend_function));
|
||||
|
||||
compiler_globals->class_table = (HashTable *) malloc(sizeof(HashTable));
|
||||
zend_hash_init(compiler_globals->class_table, 10, NULL, (void (*)(void *)) destroy_zend_class, 1);
|
||||
zend_hash_copy(compiler_globals->class_table, global_class_table, zend_class_add_ref, &tmp_class, sizeof(zend_class_entry));
|
||||
zend_hash_init(compiler_globals->class_table, 10, NULL, ZEND_CLASS_DTOR, 1);
|
||||
zend_hash_copy(compiler_globals->class_table, global_class_table, (copy_ctor_func_t) zend_class_add_ref, &tmp_class, sizeof(zend_class_entry));
|
||||
|
||||
compiler_globals->extended_info = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -207,7 +271,10 @@ static void compiler_globals_dtor(zend_compiler_globals *compiler_globals)
|
||||
|
||||
static void executor_globals_ctor(zend_executor_globals *executor_globals)
|
||||
{
|
||||
zend_startup_constants(ELS_C);
|
||||
if (global_constants_table) {
|
||||
zend_startup_constants(ELS_C);
|
||||
zend_copy_constants(executor_globals->zend_constants, global_constants_table);
|
||||
}
|
||||
init_resource_plist(ELS_C);
|
||||
}
|
||||
|
||||
@@ -215,40 +282,43 @@ static void executor_globals_ctor(zend_executor_globals *executor_globals)
|
||||
static void executor_globals_dtor(zend_executor_globals *executor_globals)
|
||||
{
|
||||
zend_shutdown_constants(ELS_C);
|
||||
destroy_resource_plist();
|
||||
destroy_resource_plist(ELS_C);
|
||||
}
|
||||
|
||||
|
||||
static void alloc_globals_ctor(zend_alloc_globals *alloc_globals)
|
||||
{
|
||||
start_memory_manager();
|
||||
start_memory_manager(ALS_C);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
int zend_startup(zend_utility_functions *utility_functions, char **extensions)
|
||||
int zend_startup(zend_utility_functions *utility_functions, char **extensions, int start_builtin_functions)
|
||||
{
|
||||
#ifdef ZTS
|
||||
zend_compiler_globals *compiler_globals;
|
||||
zend_executor_globals *executor_globals;
|
||||
|
||||
alloc_globals_id = ts_allocate_id(sizeof(zend_alloc_globals), alloc_globals_ctor, NULL);
|
||||
alloc_globals_id = ts_allocate_id(sizeof(zend_alloc_globals), (ts_allocate_ctor) alloc_globals_ctor, NULL);
|
||||
#else
|
||||
start_memory_manager(ALS_C);
|
||||
#endif
|
||||
|
||||
start_memory_manager();
|
||||
|
||||
/* Set up utility functions and values */
|
||||
zend_error = utility_functions->error_function;
|
||||
zend_printf = utility_functions->printf_function;
|
||||
zend_write = utility_functions->write_function;
|
||||
zend_write = (zend_write_func_t) utility_functions->write_function;
|
||||
zend_fopen = utility_functions->fopen_function;
|
||||
if (!zend_fopen) {
|
||||
zend_fopen = zend_fopen_wrapper;
|
||||
}
|
||||
zend_message_dispatcher = utility_functions->message_handler;
|
||||
zend_message_dispatcher_p = utility_functions->message_handler;
|
||||
zend_block_interruptions = utility_functions->block_interruptions;
|
||||
zend_unblock_interruptions = utility_functions->unblock_interruptions;
|
||||
zend_get_ini_entry_p = utility_functions->get_ini_entry;
|
||||
zend_ticks_function = utility_functions->ticks_function;
|
||||
|
||||
zend_compile_files = compile_files;
|
||||
zend_execute = execute;
|
||||
|
||||
@@ -258,19 +328,21 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions)
|
||||
zend_version_info = strdup(ZEND_CORE_VERSION_INFO);
|
||||
zend_version_info_length = sizeof(ZEND_CORE_VERSION_INFO)-1;
|
||||
|
||||
/* Prepare data structures */
|
||||
#ifndef ZTS
|
||||
zend_startup_constants(ELS_C);
|
||||
#endif
|
||||
GLOBAL_FUNCTION_TABLE = (HashTable *) malloc(sizeof(HashTable));
|
||||
GLOBAL_CLASS_TABLE = (HashTable *) malloc(sizeof(HashTable));
|
||||
zend_hash_init(GLOBAL_FUNCTION_TABLE, 100, NULL, (void (*)(void *)) destroy_zend_function, 1);
|
||||
zend_hash_init(GLOBAL_CLASS_TABLE, 10, NULL, (void (*)(void *)) destroy_zend_class, 1);
|
||||
zend_hash_init(GLOBAL_FUNCTION_TABLE, 100, NULL, ZEND_FUNCTION_DTOR, 1);
|
||||
zend_hash_init(GLOBAL_CLASS_TABLE, 10, NULL, ZEND_CLASS_DTOR, 1);
|
||||
register_standard_class();
|
||||
zend_hash_init(&module_registry, 50, NULL, (void (*)(void *)) module_destructor, 1);
|
||||
zend_hash_init(&module_registry, 50, NULL, ZEND_MODULE_DTOR, 1);
|
||||
zend_hash_init(&list_destructors, 50, NULL, NULL, 1);
|
||||
|
||||
/* This zval can be used to initialize allocate zval's to an uninit'ed value */
|
||||
zval_used_for_init.is_ref = 0;
|
||||
zval_used_for_init.refcount = 1;
|
||||
zval_used_for_init.type = IS_NULL;
|
||||
|
||||
#ifdef ZTS
|
||||
global_constants_table = NULL;
|
||||
compiler_globals_id = ts_allocate_id(sizeof(zend_compiler_globals), (void (*)(void *)) compiler_globals_ctor, (void (*)(void *)) compiler_globals_dtor);
|
||||
executor_globals_id = ts_allocate_id(sizeof(zend_executor_globals), (void (*)(void *)) executor_globals_ctor, (void (*)(void *)) executor_globals_dtor);
|
||||
compiler_globals = ts_resource(compiler_globals_id);
|
||||
@@ -278,12 +350,21 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions)
|
||||
compiler_globals_dtor(compiler_globals);
|
||||
compiler_globals->function_table = GLOBAL_FUNCTION_TABLE;
|
||||
compiler_globals->class_table = GLOBAL_CLASS_TABLE;
|
||||
zend_startup_constants(executor_globals);
|
||||
GLOBAL_CONSTANTS_TABLE = EG(zend_constants);
|
||||
#else
|
||||
zend_startup_constants();
|
||||
#endif
|
||||
zend_register_standard_constants(ELS_C);
|
||||
|
||||
#ifndef ZTS
|
||||
init_resource_plist(ELS_C);
|
||||
#endif
|
||||
|
||||
if (start_builtin_functions) {
|
||||
zend_startup_builtin_functions();
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@@ -302,7 +383,7 @@ void zend_shutdown()
|
||||
zend_shutdown_extensions();
|
||||
free(zend_version_info);
|
||||
#ifndef ZTS
|
||||
zend_shutdown_constants(ELS_C);
|
||||
zend_shutdown_constants();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -310,6 +391,7 @@ void zend_shutdown()
|
||||
void zend_set_utility_values(zend_utility_values *utility_values)
|
||||
{
|
||||
zend_uv = *utility_values;
|
||||
zend_uv.import_use_extension_length = strlen(zend_uv.import_use_extension);
|
||||
}
|
||||
|
||||
|
||||
@@ -358,3 +440,46 @@ ZEND_API char *get_zend_version()
|
||||
{
|
||||
return zend_version_info;
|
||||
}
|
||||
|
||||
|
||||
void zend_activate(CLS_D ELS_DC)
|
||||
{
|
||||
init_compiler(CLS_C ELS_CC);
|
||||
init_executor(CLS_C ELS_CC);
|
||||
startup_scanner(CLS_C);
|
||||
}
|
||||
|
||||
|
||||
void zend_activate_modules()
|
||||
{
|
||||
zend_hash_apply(&module_registry, (int (*)(void *)) module_registry_request_startup);
|
||||
}
|
||||
|
||||
|
||||
void zend_deactivate(CLS_D ELS_DC)
|
||||
{
|
||||
zend_hash_apply(&module_registry, (int (*)(void *)) module_registry_cleanup);
|
||||
shutdown_scanner(CLS_C);
|
||||
shutdown_executor(ELS_C);
|
||||
shutdown_compiler(CLS_C);
|
||||
}
|
||||
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
ZEND_API void zend_message_dispatcher(long message, void *data)
|
||||
{
|
||||
if (zend_message_dispatcher_p) {
|
||||
zend_message_dispatcher_p(message, data);
|
||||
}
|
||||
}
|
||||
END_EXTERN_C()
|
||||
|
||||
|
||||
ZEND_API int zend_get_ini_entry(char *name, uint name_length, zval *contents)
|
||||
{
|
||||
if (zend_get_ini_entry_p) {
|
||||
return zend_get_ini_entry_p(name, name_length, contents);
|
||||
} else {
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
+250
-55
@@ -2,23 +2,26 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _ZEND_H
|
||||
#define _ZEND_H
|
||||
|
||||
#define ZEND_VERSION "0.80A"
|
||||
|
||||
#define ZEND_VERSION "0.92"
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define BEGIN_EXTERN_C() extern "C" {
|
||||
@@ -28,36 +31,118 @@
|
||||
#define END_EXTERN_C()
|
||||
#endif
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/*
|
||||
* general definitions
|
||||
*/
|
||||
|
||||
#if WINNT||WIN32
|
||||
#include "config.w32.h"
|
||||
#ifdef ZEND_WIN32
|
||||
# include "zend_config.w32.h"
|
||||
#else
|
||||
#include "zend_config.h"
|
||||
#include "config.unix.h"
|
||||
# include "zend_config.h"
|
||||
#endif
|
||||
|
||||
/* all HAVE_XXX test have to be after the include of zend_config above */
|
||||
|
||||
#ifdef HAVE_UNIX_H
|
||||
# include <unix.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDARG_H
|
||||
# include <stdarg.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DLFCN_H
|
||||
# include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_LIBDL)
|
||||
|
||||
# ifndef RTLD_LAZY
|
||||
# define RTLD_LAZY 1 /* Solaris 1, FreeBSD's (2.1.7.1 and older) */
|
||||
# endif
|
||||
|
||||
# ifndef RTLD_GLOBAL
|
||||
# define RTLD_GLOBAL 0
|
||||
# endif
|
||||
|
||||
# define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL)
|
||||
# define DL_UNLOAD dlclose
|
||||
# define DL_FETCH_SYMBOL dlsym
|
||||
# define DL_HANDLE void *
|
||||
# define ZEND_EXTENSIONS_SUPPORT 1
|
||||
#elif defined(ZEND_WIN32)
|
||||
# define DL_LOAD(libname) LoadLibrary(libname)
|
||||
# define DL_FETCH_SYMBOL GetProcAddress
|
||||
# define DL_UNLOAD FreeLibrary
|
||||
# define DL_HANDLE HMODULE
|
||||
# define ZEND_EXTENSIONS_SUPPORT 1
|
||||
#else
|
||||
# define DL_HANDLE void *
|
||||
# define ZEND_EXTENSIONS_SUPPORT 0
|
||||
#endif
|
||||
|
||||
#if HAVE_ALLOCA_H
|
||||
# include <alloca.h>
|
||||
#endif
|
||||
|
||||
#if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS) && defined(ZEND_WIN32))
|
||||
# define do_alloca(p) alloca(p)
|
||||
# define free_alloca(p)
|
||||
#else
|
||||
# define do_alloca(p) emalloc(p)
|
||||
# define free_alloca(p) efree(p)
|
||||
#endif
|
||||
|
||||
#if ZEND_DEBUG
|
||||
#define ZEND_FILE_LINE_D char *__zend_filename, uint __zend_lineno
|
||||
#define ZEND_FILE_LINE_DC , ZEND_FILE_LINE_D
|
||||
#define ZEND_FILE_LINE_ORIG_D char *__zend_orig_filename, uint __zend_orig_lineno
|
||||
#define ZEND_FILE_LINE_ORIG_DC , ZEND_FILE_LINE_ORIG_D
|
||||
#define ZEND_FILE_LINE_RELAY_C __zend_filename, __zend_lineno
|
||||
#define ZEND_FILE_LINE_RELAY_CC , ZEND_FILE_LINE_RELAY_C
|
||||
#define ZEND_FILE_LINE_C __FILE__, __LINE__
|
||||
#define ZEND_FILE_LINE_CC , ZEND_FILE_LINE_C
|
||||
#define ZEND_FILE_LINE_EMPTY_C NULL, 0
|
||||
#define ZEND_FILE_LINE_EMPTY_CC , ZEND_FILE_LINE_EMPTY_C
|
||||
#define ZEND_FILE_LINE_ORIG_RELAY_C __zend_orig_filename, __zend_orig_lineno
|
||||
#define ZEND_FILE_LINE_ORIG_RELAY_CC , ZEND_FILE_LINE_ORIG_RELAY_C
|
||||
#else
|
||||
#define ZEND_FILE_LINE_D
|
||||
#define ZEND_FILE_LINE_DC
|
||||
#define ZEND_FILE_LINE_ORIG_D
|
||||
#define ZEND_FILE_LINE_ORIG_DC
|
||||
#define ZEND_FILE_LINE_RELAY_C
|
||||
#define ZEND_FILE_LINE_RELAY_CC
|
||||
#define ZEND_FILE_LINE_C
|
||||
#define ZEND_FILE_LINE_CC
|
||||
#define ZEND_FILE_LINE_EMPTY_C
|
||||
#define ZEND_FILE_LINE_EMPTY_CC
|
||||
#define ZEND_FILE_LINE_ORIG_RELAY_C
|
||||
#define ZEND_FILE_LINE_ORIG_RELAY_CC
|
||||
#endif /* ZEND_DEBUG */
|
||||
|
||||
|
||||
#include "zend_errors.h"
|
||||
#include "zend_alloc.h"
|
||||
|
||||
typedef unsigned char zend_bool;
|
||||
typedef unsigned char zend_uchar;
|
||||
typedef unsigned int zend_uint;
|
||||
typedef unsigned short zend_ushort;
|
||||
|
||||
#undef SUCCESS
|
||||
#undef FAILURE
|
||||
#define SUCCESS 0
|
||||
#define FAILURE -1 /* this MUST stay a negative number, or it may effect functions! */
|
||||
#define FAILURE -1 /* this MUST stay a negative number, or it may affect functions! */
|
||||
|
||||
|
||||
#include "zend_hash.h"
|
||||
#include "zend_llist.h"
|
||||
|
||||
|
||||
#define INTERNAL_FUNCTION_PARAMETERS int ht, zval *return_value, HashTable *list, HashTable *plist
|
||||
#define INTERNAL_FUNCTION_PARAM_PASSTHRU ht, return_value, list, plist
|
||||
#define INTERNAL_FUNCTION_PARAMETERS int ht, zval *return_value, zval *this_ptr, int return_value_used ELS_DC
|
||||
#define INTERNAL_FUNCTION_PARAM_PASSTHRU ht, return_value, this_ptr, return_value_used ELS_CC
|
||||
|
||||
/*
|
||||
* zval
|
||||
@@ -65,7 +150,7 @@
|
||||
typedef struct _zval_struct zval;
|
||||
typedef struct _zend_class_entry zend_class_entry;
|
||||
|
||||
typedef union {
|
||||
typedef union _zvalue_value {
|
||||
long lval; /* long value */
|
||||
double dval; /* double value */
|
||||
struct {
|
||||
@@ -84,33 +169,35 @@ typedef union {
|
||||
struct _zval_struct {
|
||||
/* Variable information */
|
||||
zvalue_value value; /* value */
|
||||
unsigned char type; /* active type */
|
||||
unsigned char is_ref;
|
||||
short refcount;
|
||||
zend_uchar type; /* active type */
|
||||
zend_uchar is_ref;
|
||||
zend_ushort refcount;
|
||||
};
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
typedef struct _zend_function_entry {
|
||||
char *fname;
|
||||
void (*handler)(INTERNAL_FUNCTION_PARAMETERS);
|
||||
unsigned char *func_arg_types;
|
||||
} zend_function_entry;
|
||||
|
||||
|
||||
typedef struct {
|
||||
typedef struct _zend_property_reference {
|
||||
int type; /* read, write or r/w */
|
||||
zval **object;
|
||||
zval *object;
|
||||
zend_llist elements_list;
|
||||
} zend_property_reference;
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
typedef struct _zend_overloaded_element {
|
||||
int type; /* array offset or object proprety */
|
||||
zval element;
|
||||
} zend_overloaded_element;
|
||||
|
||||
/* excpt.h on Digital Unix 4.0 defines function_table */
|
||||
#undef function_table
|
||||
|
||||
struct _zend_class_entry {
|
||||
char type;
|
||||
@@ -118,9 +205,11 @@ struct _zend_class_entry {
|
||||
uint name_length;
|
||||
struct _zend_class_entry *parent;
|
||||
int *refcount;
|
||||
zend_bool constants_updated;
|
||||
|
||||
HashTable function_table;
|
||||
HashTable default_properties;
|
||||
zend_function_entry *builtin_functions;
|
||||
|
||||
/* handlers */
|
||||
void (*handle_function_call)(INTERNAL_FUNCTION_PARAMETERS, zend_property_reference *property_reference);
|
||||
@@ -130,83 +219,115 @@ struct _zend_class_entry {
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
typedef struct _zend_utility_functions {
|
||||
void (*error_function)(int type, const char *format, ...);
|
||||
int (*printf_function)(const char *format, ...);
|
||||
int (*write_function)(const char *str, uint str_length);
|
||||
FILE *(*fopen_function)(const char *filename);
|
||||
FILE *(*fopen_function)(const char *filename, char **opened_path);
|
||||
void (*message_handler)(long message, void *data);
|
||||
void (*block_interruptions)();
|
||||
void (*unblock_interruptions)();
|
||||
void (*block_interruptions)(void);
|
||||
void (*unblock_interruptions)(void);
|
||||
int (*get_ini_entry)(char *name, uint name_length, zval *contents);
|
||||
void (*ticks_function)(int ticks);
|
||||
} zend_utility_functions;
|
||||
|
||||
|
||||
typedef struct {
|
||||
unsigned char short_tags;
|
||||
unsigned char asp_tags;
|
||||
typedef struct _zend_utility_values {
|
||||
zend_bool short_tags;
|
||||
zend_bool asp_tags;
|
||||
zend_bool allow_call_time_pass_reference;
|
||||
char *import_use_extension;
|
||||
uint import_use_extension_length;
|
||||
} zend_utility_values;
|
||||
|
||||
|
||||
typedef int (*zend_write_func_t)(const char *str, uint str_length);
|
||||
|
||||
|
||||
#undef MIN
|
||||
#undef MAX
|
||||
#define MAX(a,b) (((a)>(b))?(a):(b))
|
||||
#define MIN(a,b) (((a)<(b))?(a):(b))
|
||||
#define ZEND_STRL(str) (str), (sizeof(str)-1)
|
||||
#define ZEND_STRS(str) (str), (sizeof(str)
|
||||
|
||||
|
||||
/* data types */
|
||||
#define IS_NULL 0
|
||||
#define IS_LONG 1
|
||||
#define IS_DOUBLE 2
|
||||
#define IS_STRING 3
|
||||
#define IS_ARRAY 4
|
||||
#define IS_OBJECT 5
|
||||
#define IS_BC 6 /* for parser internal use only */
|
||||
#define IS_BOOL 7
|
||||
#define IS_RESOURCE 8
|
||||
#define IS_CONSTANT 9
|
||||
#define IS_METHOD 10 /* for overloaded function calls */
|
||||
#define IS_BOOL 6
|
||||
#define IS_RESOURCE 7
|
||||
#define IS_CONSTANT 8
|
||||
|
||||
#define MAKE_STD_ZVAL(zv) \
|
||||
zv = (zval *) emalloc(sizeof(zval)); \
|
||||
zv->refcount = 1; \
|
||||
zv->is_ref = 0;
|
||||
/* Special data type to temporarily mark large numbers */
|
||||
#define FLAG_IS_BC 9 /* for parser internal use only */
|
||||
|
||||
/* overloaded elements data types */
|
||||
#define OE_IS_ARRAY (1<<0)
|
||||
#define OE_IS_OBJECT (1<<1)
|
||||
#define OE_IS_METHOD (1<<2)
|
||||
|
||||
|
||||
int zend_startup(zend_utility_functions *utility_functions, char **extensions);
|
||||
void zend_shutdown();
|
||||
/* Argument passing types */
|
||||
#define BYREF_NONE 0
|
||||
#define BYREF_FORCE 1
|
||||
#define BYREF_ALLOW 2
|
||||
#define BYREF_FORCE_REST 3
|
||||
|
||||
int zend_startup(zend_utility_functions *utility_functions, char **extensions, int start_builtin_functions);
|
||||
void zend_shutdown(void);
|
||||
|
||||
void zend_set_utility_values(zend_utility_values *utility_values);
|
||||
BEGIN_EXTERN_C()
|
||||
ZEND_API void zend_bailout();
|
||||
ZEND_API void zend_bailout(void);
|
||||
END_EXTERN_C()
|
||||
ZEND_API char *get_zend_version();
|
||||
ZEND_API char *get_zend_version(void);
|
||||
|
||||
ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_copy);
|
||||
ZEND_API int zend_print_zval(zval *expr, int indent);
|
||||
ZEND_API int zend_print_zval_ex(zend_write_func_t write_func, zval *expr, int indent);
|
||||
ZEND_API void zend_print_zval_r(zval *expr, int indent);
|
||||
ZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval *expr, int indent);
|
||||
|
||||
ZEND_API extern char *empty_string;
|
||||
ZEND_API extern char *undefined_variable_string;
|
||||
|
||||
#define STR_FREE(ptr) if (ptr && ptr!=empty_string && ptr!=undefined_variable_string) { efree(ptr); }
|
||||
#define STR_FREE(ptr) if (ptr && ptr!=empty_string) { efree(ptr); }
|
||||
#define STR_FREE_REL(ptr) if (ptr && ptr!=empty_string) { efree_rel(ptr); }
|
||||
|
||||
#define STR_REALLOC(ptr, size) \
|
||||
if (ptr!=empty_string) { \
|
||||
ptr = (char *) erealloc(ptr, size); \
|
||||
} else { \
|
||||
ptr = (char *) emalloc(size); \
|
||||
memset(ptr, 0, size); \
|
||||
}
|
||||
|
||||
/* output support */
|
||||
#define ZEND_WRITE(str, str_len) zend_write((str), (str_len))
|
||||
#define ZEND_PUTS(str) zend_write((str), strlen((str)))
|
||||
#define ZEND_PUTC(c) zend_write(&(c), 1), (c)
|
||||
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
extern ZEND_API int (*zend_printf)(const char *format, ...);
|
||||
extern ZEND_API int (*zend_write)(const char *str, uint str_length);
|
||||
extern ZEND_API zend_write_func_t zend_write;
|
||||
extern ZEND_API void (*zend_error)(int type, const char *format, ...);
|
||||
extern FILE *(*zend_fopen)(const char *filename);
|
||||
extern void (*zend_block_interruptions)();
|
||||
extern void (*zend_unblock_interruptions)();
|
||||
extern void (*zend_message_dispatcher)(long message, void *data);
|
||||
END_EXTERN_C()
|
||||
|
||||
|
||||
extern ZEND_API FILE *(*zend_fopen)(const char *filename, char **opened_path);
|
||||
extern ZEND_API void (*zend_block_interruptions)(void);
|
||||
extern ZEND_API void (*zend_unblock_interruptions)(void);
|
||||
extern ZEND_API void (*zend_ticks_function)(int ticks);
|
||||
|
||||
void zenderror(char *error);
|
||||
|
||||
extern zend_class_entry standard_class;
|
||||
extern ZEND_API zend_class_entry zend_standard_class_def;
|
||||
extern zend_utility_values zend_uv;
|
||||
extern ZEND_API zval zval_used_for_init;
|
||||
|
||||
END_EXTERN_C()
|
||||
|
||||
#define ZEND_UV(name) (zend_uv.name)
|
||||
|
||||
@@ -214,6 +335,12 @@ extern zend_utility_values zend_uv;
|
||||
#define HANDLE_BLOCK_INTERRUPTIONS() if (zend_block_interruptions) { zend_block_interruptions(); }
|
||||
#define HANDLE_UNBLOCK_INTERRUPTIONS() if (zend_unblock_interruptions) { zend_unblock_interruptions(); }
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
ZEND_API void zend_message_dispatcher(long message, void *data);
|
||||
END_EXTERN_C()
|
||||
|
||||
ZEND_API int zend_get_ini_entry(char *name, uint name_length, zval *contents);
|
||||
|
||||
|
||||
/* Messages for applications of Zend */
|
||||
#define ZMSG_ENABLE_TRACK_VARS 1L
|
||||
@@ -221,5 +348,73 @@ extern zend_utility_values zend_uv;
|
||||
#define ZMSG_FAILED_REQUIRE_FOPEN 3L
|
||||
#define ZMSG_FAILED_HIGHLIGHT_FOPEN 4L
|
||||
#define ZMSG_MEMORY_LEAK_DETECTED 5L
|
||||
#define ZMSG_MEMORY_LEAK_REPEATED 6L
|
||||
#define ZMSG_LOG_SCRIPT_NAME 7L
|
||||
|
||||
#define INIT_PZVAL(z) \
|
||||
(z)->refcount = 1; \
|
||||
(z)->is_ref = 0;
|
||||
|
||||
#define INIT_ZVAL(z) z = zval_used_for_init;
|
||||
|
||||
#define ALLOC_INIT_ZVAL(zp) \
|
||||
ALLOC_ZVAL(zp); \
|
||||
INIT_ZVAL(*zp);
|
||||
|
||||
#define MAKE_STD_ZVAL(zv) \
|
||||
ALLOC_ZVAL(zv); \
|
||||
INIT_PZVAL(zv);
|
||||
|
||||
#define PZVAL_IS_REF(z) ((z)->is_ref)
|
||||
|
||||
#define SEPARATE_ZVAL(ppzv) \
|
||||
{ \
|
||||
zval *orig_ptr = *(ppzv); \
|
||||
\
|
||||
if (orig_ptr->refcount>1) { \
|
||||
orig_ptr->refcount--; \
|
||||
ALLOC_ZVAL(*(ppzv)); \
|
||||
**(ppzv) = *orig_ptr; \
|
||||
zval_copy_ctor(*(ppzv)); \
|
||||
(*(ppzv))->refcount=1; \
|
||||
(*(ppzv))->is_ref = 0; \
|
||||
} \
|
||||
}
|
||||
|
||||
#define SEPARATE_ZVAL_IF_NOT_REF(ppzv) \
|
||||
if (!PZVAL_IS_REF(*ppzv)) { \
|
||||
SEPARATE_ZVAL(ppzv); \
|
||||
}
|
||||
|
||||
|
||||
#define COPY_PZVAL_TO_ZVAL(zv, pzv) \
|
||||
(zv) = *(pzv); \
|
||||
if ((pzv)->refcount>1) { \
|
||||
zval_copy_ctor(&(zv)); \
|
||||
(pzv)->refcount--; \
|
||||
} else { \
|
||||
FREE_ZVAL(pzv); \
|
||||
} \
|
||||
INIT_PZVAL(&(zv));
|
||||
|
||||
#define ZEND_MAX_RESERVED_RESOURCES 1
|
||||
|
||||
#ifdef ZEND_WIN32
|
||||
/* Only use this macro if you know for sure that all of the switches values
|
||||
are covered by its case statements */
|
||||
#define EMPTY_SWITCH_DEFAULT_CASE() \
|
||||
default: \
|
||||
__assume(0); \
|
||||
break;
|
||||
#else
|
||||
#define EMPTY_SWITCH_DEFAULT_CASE()
|
||||
#endif
|
||||
|
||||
#endif /* _ZEND_H */
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
*/
|
||||
+359
-209
@@ -2,28 +2,30 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#include "zend.h"
|
||||
#include "zend_variables.h"
|
||||
#include "zend_execute.h"
|
||||
#include "zend_API.h"
|
||||
#include "modules.h"
|
||||
#include "zend_constants.h"
|
||||
#include "zend_operators.h"
|
||||
|
||||
#if HAVE_STDARG_H
|
||||
#include <stdarg.h>
|
||||
#ifdef HAVE_STDARG_H
|
||||
# include <stdarg.h>
|
||||
#endif
|
||||
|
||||
/* these variables are true statics/globals, and have to be mutex'ed on every access */
|
||||
@@ -31,16 +33,15 @@ static int module_count=0;
|
||||
HashTable list_destructors, module_registry;
|
||||
|
||||
/* this function doesn't check for too many parameters */
|
||||
ZEND_API int getParameters(int ht, int param_count,...)
|
||||
ZEND_API int zend_get_parameters(int ht, int param_count, ...)
|
||||
{
|
||||
void **p;
|
||||
int arg_count;
|
||||
va_list ptr;
|
||||
zval **param, *param_ptr;
|
||||
ELS_FETCH();
|
||||
ALS_FETCH();
|
||||
|
||||
p = EG(argument_stack).top_element-1;
|
||||
p = EG(argument_stack).top_element-2;
|
||||
arg_count = (ulong) *p;
|
||||
|
||||
if (param_count>arg_count) {
|
||||
@@ -52,14 +53,13 @@ ZEND_API int getParameters(int ht, int param_count,...)
|
||||
while (param_count>0) {
|
||||
param = va_arg(ptr, zval **);
|
||||
param_ptr = *(p-param_count);
|
||||
if (!param_ptr->is_ref && param_ptr->refcount>1) {
|
||||
if (!PZVAL_IS_REF(param_ptr) && param_ptr->refcount>1) {
|
||||
zval *new_tmp;
|
||||
|
||||
new_tmp = (zval *) emalloc(sizeof(zval));
|
||||
ALLOC_ZVAL(new_tmp);
|
||||
*new_tmp = *param_ptr;
|
||||
zval_copy_ctor(new_tmp);
|
||||
new_tmp->refcount = 1;
|
||||
new_tmp->is_ref = 0;
|
||||
INIT_PZVAL(new_tmp);
|
||||
param_ptr = new_tmp;
|
||||
((zval *) *(p-param_count))->refcount--;
|
||||
*(p-param_count) = param_ptr;
|
||||
@@ -73,14 +73,14 @@ ZEND_API int getParameters(int ht, int param_count,...)
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int getParametersArray(int ht, int param_count, zval **argument_array)
|
||||
ZEND_API int zend_get_parameters_array(int ht, int param_count, zval **argument_array)
|
||||
{
|
||||
void **p;
|
||||
int arg_count;
|
||||
zval *param_ptr;
|
||||
ELS_FETCH();
|
||||
|
||||
p = EG(argument_stack).top_element-1;
|
||||
p = EG(argument_stack).top_element-2;
|
||||
arg_count = (ulong) *p;
|
||||
|
||||
if (param_count>arg_count) {
|
||||
@@ -90,14 +90,13 @@ ZEND_API int getParametersArray(int ht, int param_count, zval **argument_array)
|
||||
|
||||
while (param_count>0) {
|
||||
param_ptr = *(p-param_count);
|
||||
if (!param_ptr->is_ref && param_ptr->refcount>1) {
|
||||
if (!PZVAL_IS_REF(param_ptr) && param_ptr->refcount>1) {
|
||||
zval *new_tmp;
|
||||
|
||||
new_tmp = (zval *) emalloc(sizeof(zval));
|
||||
ALLOC_ZVAL(new_tmp);
|
||||
*new_tmp = *param_ptr;
|
||||
zval_copy_ctor(new_tmp);
|
||||
new_tmp->refcount = 1;
|
||||
new_tmp->is_ref = 0;
|
||||
INIT_PZVAL(new_tmp);
|
||||
param_ptr = new_tmp;
|
||||
((zval *) *(p-param_count))->refcount--;
|
||||
*(p-param_count) = param_ptr;
|
||||
@@ -114,7 +113,7 @@ ZEND_API int getParametersArray(int ht, int param_count, zval **argument_array)
|
||||
|
||||
/* Zend-optimized Extended functions */
|
||||
/* this function doesn't check for too many parameters */
|
||||
ZEND_API int getParametersEx(int param_count,...)
|
||||
ZEND_API int zend_get_parameters_ex(int param_count, ...)
|
||||
{
|
||||
void **p;
|
||||
int arg_count;
|
||||
@@ -122,7 +121,7 @@ ZEND_API int getParametersEx(int param_count,...)
|
||||
zval ***param;
|
||||
ELS_FETCH();
|
||||
|
||||
p = EG(argument_stack).top_element-1;
|
||||
p = EG(argument_stack).top_element-2;
|
||||
arg_count = (ulong) *p;
|
||||
|
||||
if (param_count>arg_count) {
|
||||
@@ -140,13 +139,13 @@ ZEND_API int getParametersEx(int param_count,...)
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int getParametersArrayEx(int param_count, zval ***argument_array)
|
||||
ZEND_API int zend_get_parameters_array_ex(int param_count, zval ***argument_array)
|
||||
{
|
||||
void **p;
|
||||
int arg_count;
|
||||
ELS_FETCH();
|
||||
|
||||
p = EG(argument_stack).top_element-1;
|
||||
p = EG(argument_stack).top_element-2;
|
||||
arg_count = (ulong) *p;
|
||||
|
||||
if (param_count>arg_count) {
|
||||
@@ -161,22 +160,6 @@ ZEND_API int getParametersArrayEx(int param_count, zval ***argument_array)
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int getThis(zval **this_ptr)
|
||||
{
|
||||
/* NEEDS TO BE IMPLEMENTED FOR ZEND */
|
||||
/*
|
||||
zval *data;
|
||||
|
||||
if (zend_hash_find(function_state.calling_symbol_table, "this", sizeof("this"), (void **)&data) == FAILURE) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
*this = data;
|
||||
*/
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int ParameterPassedByReference(int ht, uint n)
|
||||
{
|
||||
void **p;
|
||||
@@ -184,14 +167,14 @@ ZEND_API int ParameterPassedByReference(int ht, uint n)
|
||||
zval *arg;
|
||||
ELS_FETCH();
|
||||
|
||||
p = EG(argument_stack).elements+EG(argument_stack).top-1;
|
||||
p = EG(argument_stack).elements+EG(argument_stack).top-2;
|
||||
arg_count = (ulong) *p;
|
||||
|
||||
if (n>arg_count) {
|
||||
return FAILURE;
|
||||
}
|
||||
arg = (zval *) *(p-arg_count+n-1);
|
||||
return arg->is_ref;
|
||||
return PZVAL_IS_REF(arg);
|
||||
}
|
||||
|
||||
|
||||
@@ -201,10 +184,11 @@ ZEND_API void wrong_param_count()
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int array_init(zval *arg)
|
||||
ZEND_API inline int _array_init(zval *arg ZEND_FILE_LINE_DC)
|
||||
{
|
||||
arg->value.ht = (HashTable *) emalloc(sizeof(HashTable));
|
||||
if (!arg->value.ht || zend_hash_init(arg->value.ht, 0, NULL, PVAL_PTR_DTOR, 0)) {
|
||||
ALLOC_HASHTABLE_REL(arg->value.ht);
|
||||
|
||||
if (!arg->value.ht || zend_hash_init(arg->value.ht, 0, NULL, ZVAL_PTR_DTOR, 0)) {
|
||||
zend_error(E_CORE_ERROR, "Cannot allocate memory for array");
|
||||
return FAILURE;
|
||||
}
|
||||
@@ -213,88 +197,27 @@ ZEND_API inline int array_init(zval *arg)
|
||||
}
|
||||
|
||||
|
||||
static void zval_update_const_and_ref(zval **p)
|
||||
{
|
||||
zval_update_constant(*p);
|
||||
zval_add_ref(p);
|
||||
}
|
||||
|
||||
|
||||
|
||||
ZEND_API inline int object_init_ex(zval *arg, zend_class_entry *class_type)
|
||||
ZEND_API inline int _object_init_ex(zval *arg, zend_class_entry *class_type ZEND_FILE_LINE_DC)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
arg->value.obj.properties = (HashTable *) emalloc(sizeof(HashTable));
|
||||
zend_hash_init(arg->value.obj.properties, 0, NULL, PVAL_PTR_DTOR, 0);
|
||||
zend_hash_copy(arg->value.obj.properties, &class_type->default_properties, (void (*)(void *)) zval_update_const_and_ref, (void *) &tmp, sizeof(zval *));
|
||||
if (!class_type->constants_updated) {
|
||||
zend_hash_apply(&class_type->default_properties, (int (*)(void *)) zval_update_constant);
|
||||
class_type->constants_updated = 1;
|
||||
}
|
||||
|
||||
ALLOC_HASHTABLE_REL(arg->value.obj.properties);
|
||||
zend_hash_init(arg->value.obj.properties, 0, NULL, ZVAL_PTR_DTOR, 0);
|
||||
zend_hash_copy(arg->value.obj.properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
|
||||
arg->type = IS_OBJECT;
|
||||
arg->value.obj.ce = class_type;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int object_init(zval *arg)
|
||||
ZEND_API inline int _object_init(zval *arg ZEND_FILE_LINE_DC)
|
||||
{
|
||||
return object_init_ex(arg, &standard_class);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_assoc_long(zval *arg, char *key, long n)
|
||||
{
|
||||
zval *tmp = (zval *) emalloc(sizeof(zval));
|
||||
|
||||
tmp->type = IS_LONG;
|
||||
tmp->value.lval = n;
|
||||
tmp->refcount=1;
|
||||
tmp->is_ref=0;
|
||||
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_assoc_double(zval *arg, char *key, double d)
|
||||
{
|
||||
zval *tmp = (zval *) emalloc(sizeof(zval));
|
||||
|
||||
tmp->type = IS_DOUBLE;
|
||||
tmp->value.dval = d;
|
||||
tmp->refcount=1;
|
||||
tmp->is_ref=0;
|
||||
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_assoc_string(zval *arg, char *key, char *str, int duplicate)
|
||||
{
|
||||
zval *tmp = (zval *) emalloc(sizeof(zval));
|
||||
|
||||
tmp->type = IS_STRING;
|
||||
tmp->value.str.len = strlen(str);
|
||||
if (duplicate) {
|
||||
tmp->value.str.val = estrndup(str,tmp->value.str.len);
|
||||
} else {
|
||||
tmp->value.str.val = str;
|
||||
}
|
||||
tmp->refcount=1;
|
||||
tmp->is_ref=0;
|
||||
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_assoc_stringl(zval *arg, char *key, char *str, uint length, int duplicate)
|
||||
{
|
||||
zval *tmp = (zval *) emalloc(sizeof(zval));
|
||||
|
||||
tmp->type = IS_STRING;
|
||||
tmp->value.str.len = length;
|
||||
if (duplicate) {
|
||||
tmp->value.str.val = estrndup(str,tmp->value.str.len);
|
||||
} else {
|
||||
tmp->value.str.val = str;
|
||||
}
|
||||
tmp->refcount=1;
|
||||
tmp->is_ref=0;
|
||||
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
return _object_init_ex(arg, &zend_standard_class_def ZEND_FILE_LINE_CC);
|
||||
}
|
||||
|
||||
|
||||
@@ -305,34 +228,162 @@ ZEND_API inline int add_assoc_function(zval *arg, char *key,void (*function_ptr)
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_index_long(zval *arg, uint index, long n)
|
||||
ZEND_API inline int add_assoc_long(zval *arg, char *key, long n)
|
||||
{
|
||||
zval *tmp = (zval *) emalloc(sizeof(zval));
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_LONG;
|
||||
tmp->value.lval = n;
|
||||
tmp->refcount=1;
|
||||
tmp->is_ref=0;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_assoc_unset(zval *arg, char *key)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_NULL;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
ZEND_API inline int add_assoc_bool(zval *arg, char *key, int b)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_BOOL;
|
||||
tmp->value.lval = b;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_assoc_resource(zval *arg, char *key, int r)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_RESOURCE;
|
||||
tmp->value.lval = r;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_assoc_double(zval *arg, char *key, double d)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_DOUBLE;
|
||||
tmp->value.dval = d;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_assoc_string(zval *arg, char *key, char *str, int duplicate)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_STRING;
|
||||
tmp->value.str.len = strlen(str);
|
||||
if (duplicate) {
|
||||
tmp->value.str.val = estrndup(str,tmp->value.str.len);
|
||||
} else {
|
||||
tmp->value.str.val = str;
|
||||
}
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_assoc_stringl(zval *arg, char *key, char *str, uint length, int duplicate)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_STRING;
|
||||
tmp->value.str.len = length;
|
||||
if (duplicate) {
|
||||
tmp->value.str.val = estrndup(str,tmp->value.str.len);
|
||||
} else {
|
||||
tmp->value.str.val = str;
|
||||
}
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_index_long(zval *arg, uint index, long n)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_LONG;
|
||||
tmp->value.lval = n;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_index_unset(zval *arg, uint index)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_NULL;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_index_bool(zval *arg, uint index, int b)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_BOOL;
|
||||
tmp->value.lval = b;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_index_resource(zval *arg, uint index, int r)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_RESOURCE;
|
||||
tmp->value.lval = r;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_index_double(zval *arg, uint index, double d)
|
||||
{
|
||||
zval *tmp = (zval *) emalloc(sizeof(zval));
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_DOUBLE;
|
||||
tmp->value.dval = d;
|
||||
tmp->refcount=1;
|
||||
tmp->is_ref=0;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_index_string(zval *arg, uint index, char *str, int duplicate)
|
||||
{
|
||||
zval *tmp = (zval *) emalloc(sizeof(zval));
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_STRING;
|
||||
tmp->value.str.len = strlen(str);
|
||||
if (duplicate) {
|
||||
@@ -340,16 +391,16 @@ ZEND_API inline int add_index_string(zval *arg, uint index, char *str, int dupli
|
||||
} else {
|
||||
tmp->value.str.val = str;
|
||||
}
|
||||
tmp->refcount=1;
|
||||
tmp->is_ref=0;
|
||||
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),NULL);
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_index_stringl(zval *arg, uint index, char *str, uint length, int duplicate)
|
||||
{
|
||||
zval *tmp = (zval *) emalloc(sizeof(zval));
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_STRING;
|
||||
tmp->value.str.len = length;
|
||||
if (duplicate) {
|
||||
@@ -357,40 +408,75 @@ ZEND_API inline int add_index_stringl(zval *arg, uint index, char *str, uint len
|
||||
} else {
|
||||
tmp->value.str.val = str;
|
||||
}
|
||||
tmp->refcount=1;
|
||||
tmp->is_ref=0;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_next_index_long(zval *arg, long n)
|
||||
{
|
||||
zval *tmp = (zval *) emalloc(sizeof(zval));
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_LONG;
|
||||
tmp->value.lval = n;
|
||||
tmp->refcount=1;
|
||||
tmp->is_ref=0;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_next_index_unset(zval *arg)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_NULL;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_next_index_bool(zval *arg, int b)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_BOOL;
|
||||
tmp->value.lval = b;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_next_index_resource(zval *arg, int r)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_RESOURCE;
|
||||
tmp->value.lval = r;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_next_index_double(zval *arg, double d)
|
||||
{
|
||||
zval *tmp = (zval *) emalloc(sizeof(zval));
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_DOUBLE;
|
||||
tmp->value.dval = d;
|
||||
tmp->refcount=1;
|
||||
tmp->is_ref=0;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_next_index_string(zval *arg, char *str, int duplicate)
|
||||
{
|
||||
zval *tmp = (zval *) emalloc(sizeof(zval));
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_STRING;
|
||||
tmp->value.str.len = strlen(str);
|
||||
if (duplicate) {
|
||||
@@ -398,16 +484,16 @@ ZEND_API inline int add_next_index_string(zval *arg, char *str, int duplicate)
|
||||
} else {
|
||||
tmp->value.str.val = str;
|
||||
}
|
||||
tmp->refcount=1;
|
||||
tmp->is_ref=0;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *),NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_next_index_stringl(zval *arg, char *str, uint length, int duplicate)
|
||||
{
|
||||
zval *tmp = (zval *) emalloc(sizeof(zval));
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_STRING;
|
||||
tmp->value.str.len = length;
|
||||
if (duplicate) {
|
||||
@@ -415,16 +501,16 @@ ZEND_API inline int add_next_index_stringl(zval *arg, char *str, uint length, in
|
||||
} else {
|
||||
tmp->value.str.val = str;
|
||||
}
|
||||
tmp->refcount=1;
|
||||
tmp->is_ref=0;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *),NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_get_assoc_string(zval *arg, char *key, char *str, void **dest, int duplicate)
|
||||
{
|
||||
zval *tmp = (zval *) emalloc(sizeof(zval));
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_STRING;
|
||||
tmp->value.str.len = strlen(str);
|
||||
if (duplicate) {
|
||||
@@ -432,16 +518,16 @@ ZEND_API inline int add_get_assoc_string(zval *arg, char *key, char *str, void *
|
||||
} else {
|
||||
tmp->value.str.val = str;
|
||||
}
|
||||
tmp->refcount=1;
|
||||
tmp->is_ref=0;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), dest);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_get_assoc_stringl(zval *arg, char *key, char *str, uint length, void **dest, int duplicate)
|
||||
{
|
||||
zval *tmp = (zval *) emalloc(sizeof(zval));
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_STRING;
|
||||
tmp->value.str.len = length;
|
||||
if (duplicate) {
|
||||
@@ -449,40 +535,40 @@ ZEND_API inline int add_get_assoc_stringl(zval *arg, char *key, char *str, uint
|
||||
} else {
|
||||
tmp->value.str.val = str;
|
||||
}
|
||||
tmp->refcount=1;
|
||||
tmp->is_ref=0;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), dest);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_get_index_long(zval *arg, uint index, long l, void **dest)
|
||||
{
|
||||
zval *tmp = (zval *) emalloc(sizeof(zval));
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_LONG;
|
||||
tmp->value.lval= l;
|
||||
tmp->refcount=1;
|
||||
tmp->is_ref=0;
|
||||
tmp->value.lval = l;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),dest);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_get_index_double(zval *arg, uint index, double d, void **dest)
|
||||
{
|
||||
zval *tmp = (zval *) emalloc(sizeof(zval));
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_DOUBLE;
|
||||
tmp->value.dval= d;
|
||||
tmp->refcount=1;
|
||||
tmp->is_ref=0;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),dest);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_get_index_string(zval *arg, uint index, char *str, void **dest, int duplicate)
|
||||
{
|
||||
zval *tmp = (zval *) emalloc(sizeof(zval));
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_STRING;
|
||||
tmp->value.str.len = strlen(str);
|
||||
if (duplicate) {
|
||||
@@ -490,16 +576,16 @@ ZEND_API inline int add_get_index_string(zval *arg, uint index, char *str, void
|
||||
} else {
|
||||
tmp->value.str.val = str;
|
||||
}
|
||||
tmp->refcount=1;
|
||||
tmp->is_ref=0;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),dest);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_get_index_stringl(zval *arg, uint index, char *str, uint length, void **dest, int duplicate)
|
||||
{
|
||||
zval *tmp = (zval *) emalloc(sizeof(zval));
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_STRING;
|
||||
tmp->value.str.len = length;
|
||||
if (duplicate) {
|
||||
@@ -507,40 +593,72 @@ ZEND_API inline int add_get_index_stringl(zval *arg, uint index, char *str, uint
|
||||
} else {
|
||||
tmp->value.str.val = str;
|
||||
}
|
||||
tmp->refcount=1;
|
||||
tmp->is_ref=0;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),dest);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_property_long(zval *arg, char *key, long n)
|
||||
{
|
||||
zval *tmp = (zval *) emalloc(sizeof(zval));
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_LONG;
|
||||
tmp->value.lval = n;
|
||||
tmp->refcount=1;
|
||||
tmp->is_ref=0;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
ZEND_API inline int add_property_bool(zval *arg, char *key, int b)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_BOOL;
|
||||
tmp->value.lval = b;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
ZEND_API inline int add_property_unset(zval *arg, char *key)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_NULL;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
ZEND_API inline int add_property_resource(zval *arg, char *key, long n)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_RESOURCE;
|
||||
tmp->value.lval = n;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_property_double(zval *arg, char *key, double d)
|
||||
{
|
||||
zval *tmp = (zval *) emalloc(sizeof(zval));
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_DOUBLE;
|
||||
tmp->value.dval = d;
|
||||
tmp->refcount=1;
|
||||
tmp->is_ref=0;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_property_string(zval *arg, char *key, char *str, int duplicate)
|
||||
{
|
||||
zval *tmp = (zval *) emalloc(sizeof(zval));
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_STRING;
|
||||
tmp->value.str.len = strlen(str);
|
||||
if (duplicate) {
|
||||
@@ -548,16 +666,16 @@ ZEND_API inline int add_property_string(zval *arg, char *key, char *str, int dup
|
||||
} else {
|
||||
tmp->value.str.val = str;
|
||||
}
|
||||
tmp->refcount=1;
|
||||
tmp->is_ref=0;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_property_stringl(zval *arg, char *key, char *str, uint length, int duplicate)
|
||||
{
|
||||
zval *tmp = (zval *) emalloc(sizeof(zval));
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_STRING;
|
||||
tmp->value.str.len = length;
|
||||
if (duplicate) {
|
||||
@@ -565,18 +683,19 @@ ZEND_API inline int add_property_stringl(zval *arg, char *key, char *str, uint l
|
||||
} else {
|
||||
tmp->value.str.val = str;
|
||||
}
|
||||
tmp->refcount=1;
|
||||
tmp->is_ref=0;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
int zend_startup_module(zend_module_entry *module)
|
||||
ZEND_API int zend_startup_module(zend_module_entry *module)
|
||||
{
|
||||
if (module) {
|
||||
module->module_number = zend_next_free_module();
|
||||
if (module->module_startup_func) {
|
||||
if (module->module_startup_func(MODULE_PERSISTENT, module->module_number)==FAILURE) {
|
||||
ELS_FETCH();
|
||||
|
||||
if (module->module_startup_func(MODULE_PERSISTENT, module->module_number ELS_CC)==FAILURE) {
|
||||
zend_error(E_CORE_ERROR,"Unable to start %s module",module->name);
|
||||
return FAILURE;
|
||||
}
|
||||
@@ -609,25 +728,30 @@ ZEND_API int _register_list_destructors(void (*list_destructor)(void *), void (*
|
||||
|
||||
|
||||
/* registers all functions in *library_functions in the function hash */
|
||||
int zend_register_functions(zend_function_entry *functions)
|
||||
int zend_register_functions(zend_function_entry *functions, HashTable *function_table)
|
||||
{
|
||||
zend_function_entry *ptr = functions;
|
||||
zend_internal_function internal_function;
|
||||
zend_function function;
|
||||
zend_internal_function *internal_function = (zend_internal_function *)&function;
|
||||
int count=0,unload=0;
|
||||
HashTable *target_function_table = function_table;
|
||||
CLS_FETCH();
|
||||
|
||||
internal_function.type = ZEND_INTERNAL_FUNCTION;
|
||||
if (!target_function_table) {
|
||||
target_function_table = CG(function_table);
|
||||
}
|
||||
internal_function->type = ZEND_INTERNAL_FUNCTION;
|
||||
|
||||
while (ptr->fname) {
|
||||
internal_function.handler = ptr->handler;
|
||||
internal_function.arg_types = ptr->func_arg_types;
|
||||
internal_function.function_name = ptr->fname;
|
||||
if (!internal_function.handler) {
|
||||
internal_function->handler = ptr->handler;
|
||||
internal_function->arg_types = ptr->func_arg_types;
|
||||
internal_function->function_name = ptr->fname;
|
||||
if (!internal_function->handler) {
|
||||
zend_error(E_CORE_WARNING,"Null function defined as active function");
|
||||
zend_unregister_functions(functions,count);
|
||||
zend_unregister_functions(functions, count, target_function_table);
|
||||
return FAILURE;
|
||||
}
|
||||
if (zend_hash_add(CG(function_table), ptr->fname, strlen(ptr->fname)+1, &internal_function, sizeof(zend_internal_function), NULL) == FAILURE) {
|
||||
if (zend_hash_add(target_function_table, ptr->fname, strlen(ptr->fname)+1, &function, sizeof(zend_function), NULL) == FAILURE) {
|
||||
unload=1;
|
||||
break;
|
||||
}
|
||||
@@ -636,12 +760,12 @@ int zend_register_functions(zend_function_entry *functions)
|
||||
}
|
||||
if (unload) { /* before unloading, display all remaining bad function in the module */
|
||||
while (ptr->fname) {
|
||||
if (zend_hash_exists(CG(function_table), ptr->fname, strlen(ptr->fname)+1)) {
|
||||
zend_error(E_CORE_WARNING,"Module load failed - duplicate function name - %s",ptr->fname);
|
||||
if (zend_hash_exists(target_function_table, ptr->fname, strlen(ptr->fname)+1)) {
|
||||
zend_error(E_CORE_WARNING, "Function registration failed - duplicate name - %s",ptr->fname);
|
||||
}
|
||||
ptr++;
|
||||
}
|
||||
zend_unregister_functions(functions,count);
|
||||
zend_unregister_functions(functions, count, target_function_table);
|
||||
return FAILURE;
|
||||
}
|
||||
return SUCCESS;
|
||||
@@ -650,20 +774,24 @@ int zend_register_functions(zend_function_entry *functions)
|
||||
/* count=-1 means erase all functions, otherwise,
|
||||
* erase the first count functions
|
||||
*/
|
||||
void zend_unregister_functions(zend_function_entry *functions,int count)
|
||||
void zend_unregister_functions(zend_function_entry *functions, int count, HashTable *function_table)
|
||||
{
|
||||
zend_function_entry *ptr = functions;
|
||||
int i=0;
|
||||
HashTable *target_function_table = function_table;
|
||||
CLS_FETCH();
|
||||
|
||||
if (!target_function_table) {
|
||||
target_function_table = CG(function_table);
|
||||
}
|
||||
while (ptr->fname) {
|
||||
if (count!=-1 && i>=count) {
|
||||
break;
|
||||
}
|
||||
#if 0
|
||||
zend_printf("Unregistering %s()\n",ptr->fname);
|
||||
zend_printf("Unregistering %s()\n", ptr->fname);
|
||||
#endif
|
||||
zend_hash_del(CG(function_table),ptr->fname,strlen(ptr->fname)+1);
|
||||
zend_hash_del(target_function_table, ptr->fname, strlen(ptr->fname)+1);
|
||||
ptr++;
|
||||
i++;
|
||||
}
|
||||
@@ -675,7 +803,7 @@ ZEND_API int zend_register_module(zend_module_entry *module)
|
||||
#if 0
|
||||
zend_printf("%s: Registering module %d\n",module->name, module->module_number);
|
||||
#endif
|
||||
if (module->functions && zend_register_functions(module->functions)==FAILURE) {
|
||||
if (module->functions && zend_register_functions(module->functions, NULL)==FAILURE) {
|
||||
zend_error(E_CORE_WARNING,"%s: Unable to register functions, unable to load",module->name);
|
||||
return FAILURE;
|
||||
}
|
||||
@@ -691,13 +819,6 @@ void module_destructor(zend_module_entry *module)
|
||||
clean_module_constants(module->module_number);
|
||||
}
|
||||
|
||||
if (module->request_started && module->request_shutdown_func) {
|
||||
#if 0
|
||||
zend_printf("%s: Request shutdown\n",module->name);
|
||||
#endif
|
||||
module->request_shutdown_func(module->type, module->module_number);
|
||||
}
|
||||
module->request_started=0;
|
||||
if (module->module_started && module->module_shutdown_func) {
|
||||
#if 0
|
||||
zend_printf("%s: Module shutdown\n",module->name);
|
||||
@@ -706,7 +827,7 @@ void module_destructor(zend_module_entry *module)
|
||||
}
|
||||
module->module_started=0;
|
||||
if (module->functions) {
|
||||
zend_unregister_functions(module->functions,-1);
|
||||
zend_unregister_functions(module->functions, -1, NULL);
|
||||
}
|
||||
|
||||
#if HAVE_LIBDL
|
||||
@@ -720,13 +841,17 @@ void module_destructor(zend_module_entry *module)
|
||||
/* call request startup for all modules */
|
||||
int module_registry_request_startup(zend_module_entry *module)
|
||||
{
|
||||
if (!module->request_started && module->request_startup_func) {
|
||||
if (module->request_startup_func) {
|
||||
ELS_FETCH();
|
||||
|
||||
#if 0
|
||||
zend_printf("%s: Request startup\n",module->name);
|
||||
#endif
|
||||
module->request_startup_func(module->type, module->module_number);
|
||||
if (module->request_startup_func(module->type, module->module_number ELS_CC)==FAILURE) {
|
||||
zend_error(E_WARNING, "request_startup() for %s module failed", module->name);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
module->request_started=1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -738,13 +863,12 @@ int module_registry_cleanup(zend_module_entry *module)
|
||||
{
|
||||
switch(module->type) {
|
||||
case MODULE_PERSISTENT:
|
||||
if (module->request_started && module->request_shutdown_func) {
|
||||
if (module->request_shutdown_func) {
|
||||
#if 0
|
||||
zend_printf("%s: Request shutdown\n",module->name);
|
||||
#endif
|
||||
module->request_shutdown_func(module->type, module->module_number);
|
||||
}
|
||||
module->request_started=0;
|
||||
return 0;
|
||||
break;
|
||||
case MODULE_TEMPORARY:
|
||||
@@ -774,8 +898,14 @@ ZEND_API zend_class_entry *register_internal_class(zend_class_entry *class_entry
|
||||
class_entry->parent = NULL;
|
||||
class_entry->refcount = (int *) malloc(sizeof(int));
|
||||
*class_entry->refcount = 1;
|
||||
zend_hash_init(&class_entry->default_properties, 0, NULL, PVAL_PTR_DTOR, 1);
|
||||
zend_hash_init(&class_entry->function_table, 0, NULL, (void (*)(void *)) destroy_zend_function, 1);
|
||||
class_entry->constants_updated = 0;
|
||||
zend_hash_init(&class_entry->default_properties, 0, NULL, ZVAL_PTR_DTOR, 1);
|
||||
zend_hash_init(&class_entry->function_table, 0, NULL, ZEND_FUNCTION_DTOR, 1);
|
||||
|
||||
|
||||
if (class_entry->builtin_functions) {
|
||||
zend_register_functions(class_entry->builtin_functions, &class_entry->function_table);
|
||||
}
|
||||
|
||||
zend_hash_update(CG(class_table), lowercase_name, class_entry->name_length+1, class_entry, sizeof(zend_class_entry), (void **) ®ister_class);
|
||||
free(lowercase_name);
|
||||
@@ -793,3 +923,23 @@ ZEND_API zend_module_entry *zend_get_module(int module_number)
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
ZEND_API int zend_set_hash_symbol(zval *symbol, char *name, int name_length,
|
||||
int is_ref, int num_symbol_tables, ...)
|
||||
{
|
||||
HashTable *symbol_table;
|
||||
va_list symbol_table_list;
|
||||
|
||||
if (num_symbol_tables <= 0) return FAILURE;
|
||||
|
||||
symbol->is_ref = is_ref;
|
||||
|
||||
va_start(symbol_table_list, num_symbol_tables);
|
||||
while(num_symbol_tables-- > 0) {
|
||||
symbol_table = va_arg(symbol_table_list, HashTable *);
|
||||
zend_hash_update(symbol_table, name, name_length + 1, &symbol, sizeof(zval *), NULL);
|
||||
zval_add_ref(&symbol);
|
||||
}
|
||||
va_end(symbol_table_list);
|
||||
return SUCCESS;
|
||||
}
|
||||
+301
-28
@@ -2,23 +2,30 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _ZEND_API_H
|
||||
#define _ZEND_API_H
|
||||
|
||||
#include "modules.h"
|
||||
#include "zend_list.h"
|
||||
#include "zend_fast_cache.h"
|
||||
#include "zend_operators.h"
|
||||
#include "zend_variables.h"
|
||||
|
||||
|
||||
#define ZEND_NAMED_FUNCTION(name) void name(INTERNAL_FUNCTION_PARAMETERS)
|
||||
@@ -28,73 +35,339 @@
|
||||
#define ZEND_FE(name, arg_types) ZEND_NAMED_FE(name, zend_if_##name, arg_types)
|
||||
|
||||
|
||||
#define INIT_CLASS_ENTRY(class_container, class_name, functions) \
|
||||
{ \
|
||||
class_container.name = strdup(class_name); \
|
||||
class_container.name_length = sizeof(class_name)-1; \
|
||||
class_container.builtin_functions = functions; \
|
||||
class_container.handle_function_call = NULL; \
|
||||
class_container.handle_property_get = NULL; \
|
||||
class_container.handle_property_set = NULL; \
|
||||
}
|
||||
|
||||
#define INIT_OVERLOADED_CLASS_ENTRY(class_container, class_name, functions, handle_fcall, handle_propget, handle_propset) \
|
||||
{ \
|
||||
class_container.name = strdup(class_name); \
|
||||
class_container.name_length = sizeof(class_name)-1; \
|
||||
class_container.builtin_functions = functions; \
|
||||
class_container.handle_function_call = handle_fcall; \
|
||||
class_container.handle_property_get = handle_propget; \
|
||||
class_container.handle_property_set = handle_propset; \
|
||||
}
|
||||
|
||||
|
||||
|
||||
int zend_next_free_module(void);
|
||||
|
||||
ZEND_API int getParameters(int ht, int param_count,...);
|
||||
ZEND_API int getParametersArray(int ht, int param_count, zval **argument_array);
|
||||
ZEND_API int getParametersEx(int param_count,...);
|
||||
ZEND_API int getParametersArrayEx(int param_count, zval ***argument_array);
|
||||
ZEND_API int zend_get_parameters(int ht, int param_count, ...);
|
||||
ZEND_API int zend_get_parameters_array(int ht, int param_count, zval **argument_array);
|
||||
ZEND_API int zend_get_parameters_ex(int param_count, ...);
|
||||
ZEND_API int zend_get_parameters_array_ex(int param_count, zval ***argument_array);
|
||||
|
||||
ZEND_API int getThis(zval **this_ptr);
|
||||
ZEND_API int ParameterPassedByReference(int ht, uint n);
|
||||
|
||||
int zend_register_functions(zend_function_entry *functions);
|
||||
void zend_unregister_functions(zend_function_entry *functions, int count);
|
||||
int zend_register_functions(zend_function_entry *functions, HashTable *function_table);
|
||||
void zend_unregister_functions(zend_function_entry *functions, int count, HashTable *function_table);
|
||||
ZEND_API int zend_register_module(zend_module_entry *module_entry);
|
||||
ZEND_API zend_class_entry *register_internal_class(zend_class_entry *class_entry);
|
||||
ZEND_API zend_module_entry *zend_get_module(int module_number);
|
||||
|
||||
ZEND_API void wrong_param_count(void);
|
||||
|
||||
#define getThis() (this_ptr)
|
||||
|
||||
#define WRONG_PARAM_COUNT { wrong_param_count(); return; }
|
||||
#define WRONG_PARAM_COUNT_WITH_RETVAL(ret) { wrong_param_count(); return ret; }
|
||||
#define ARG_COUNT(ht) (ht)
|
||||
#define ARG_COUNT(dummy) (ht)
|
||||
#define ZEND_NUM_ARGS() (ht)
|
||||
|
||||
#define BYREF_NONE 0
|
||||
#define BYREF_FORCE 1
|
||||
#define BYREF_ALLOW 2
|
||||
|
||||
#if !MSVC5
|
||||
#ifndef ZEND_WIN32
|
||||
#define DLEXPORT
|
||||
#endif
|
||||
|
||||
int zend_startup_module(zend_module_entry *module);
|
||||
ZEND_API int zend_startup_module(zend_module_entry *module);
|
||||
|
||||
#define array_init(arg) _array_init((arg) ZEND_FILE_LINE_CC)
|
||||
#define object_init(arg) _object_init((arg) ZEND_FILE_LINE_CC)
|
||||
#define object_init_ex(arg, ce) _object_init_ex((arg), (ce) ZEND_FILE_LINE_CC)
|
||||
ZEND_API int _array_init(zval *arg ZEND_FILE_LINE_DC);
|
||||
ZEND_API int _object_init(zval *arg ZEND_FILE_LINE_DC);
|
||||
ZEND_API int _object_init_ex(zval *arg, zend_class_entry *ce ZEND_FILE_LINE_DC);
|
||||
|
||||
/* no longer supported */
|
||||
ZEND_API int add_assoc_function(zval *arg, char *key,void (*function_ptr)(INTERNAL_FUNCTION_PARAMETERS));
|
||||
|
||||
ZEND_API int array_init(zval *arg);
|
||||
ZEND_API int object_init(zval *arg);
|
||||
ZEND_API int object_init_ex(zval *arg, zend_class_entry *ce);
|
||||
ZEND_API int add_assoc_long(zval *arg, char *key, long n);
|
||||
ZEND_API int add_assoc_unset(zval *arg, char *key);
|
||||
ZEND_API int add_assoc_bool(zval *arg, char *key, int b);
|
||||
ZEND_API int add_assoc_resource(zval *arg, char *key, int r);
|
||||
ZEND_API int add_assoc_double(zval *arg, char *key, double d);
|
||||
ZEND_API int add_assoc_string(zval *arg, char *key, char *str, int duplicate);
|
||||
ZEND_API int add_assoc_stringl(zval *arg, char *key, char *str, uint length, int duplicate);
|
||||
ZEND_API int add_assoc_function(zval *arg, char *key,void (*function_ptr)(INTERNAL_FUNCTION_PARAMETERS));
|
||||
|
||||
ZEND_API int add_index_long(zval *arg, uint idx, long n);
|
||||
ZEND_API int add_index_unset(zval *arg, uint idx);
|
||||
ZEND_API int add_index_bool(zval *arg, uint idx, int b);
|
||||
ZEND_API int add_index_resource(zval *arg, uint idx, int r);
|
||||
ZEND_API int add_index_double(zval *arg, uint idx, double d);
|
||||
ZEND_API int add_index_string(zval *arg, uint idx, char *str, int duplicate);
|
||||
ZEND_API int add_index_stringl(zval *arg, uint idx, char *str, uint length, int duplicate);
|
||||
|
||||
ZEND_API int add_next_index_long(zval *arg, long n);
|
||||
ZEND_API int add_next_index_unset(zval *arg);
|
||||
ZEND_API int add_next_index_bool(zval *arg, int b);
|
||||
ZEND_API int add_next_index_resource(zval *arg, int r);
|
||||
ZEND_API int add_next_index_double(zval *arg, double d);
|
||||
ZEND_API int add_next_index_string(zval *arg, char *str, int duplicate);
|
||||
ZEND_API int add_next_index_stringl(zval *arg, char *str, uint length, int duplicate);
|
||||
|
||||
ZEND_API int add_get_assoc_string(zval *arg, char *key, char *str, void **dest, int duplicate);
|
||||
ZEND_API int add_get_assoc_stringl(zval *arg, char *key, char *str, uint length, void **dest, int duplicate);
|
||||
ZEND_API int add_get_index_long(zval *arg, uint idx, long l, void **dest);
|
||||
ZEND_API int add_get_index_double(zval *arg, uint idx, double d, void **dest);
|
||||
ZEND_API int add_get_assoc_string(zval *arg, char *key, char *str, void **dest, int duplicate);
|
||||
ZEND_API int add_get_assoc_stringl(zval *arg, char *key, char *str, uint length, void **dest, int duplicate);
|
||||
ZEND_API int add_get_index_string(zval *arg, uint idx, char *str, void **dest, int duplicate);
|
||||
ZEND_API int add_get_index_stringl(zval *arg, uint idx, char *str, uint length, void **dest, int duplicate);
|
||||
|
||||
ZEND_API int call_user_function(HashTable *function_table, zval *object, zval *function_name, zval *retval, int param_count, zval *params[]);
|
||||
|
||||
ZEND_API int call_user_function(HashTable *function_table, zval *object, zval *function_name, zval *retval_ptr, int param_count, zval *params[]);
|
||||
ZEND_API int call_user_function_ex(HashTable *function_table, zval *object, zval *function_name, zval **retval_ptr_ptr, int param_count, zval **params[], int no_separation);
|
||||
|
||||
ZEND_API int add_property_long(zval *arg, char *key, long l);
|
||||
ZEND_API int add_property_unset(zval *arg, char *key);
|
||||
ZEND_API int add_property_bool(zval *arg, char *key, int b);
|
||||
ZEND_API int add_property_resource(zval *arg, char *key, long r);
|
||||
ZEND_API int add_property_double(zval *arg, char *key, double d);
|
||||
ZEND_API int add_property_string(zval *arg, char *key, char *str, int duplicate);
|
||||
ZEND_API int add_property_stringl(zval *arg, char *key, char *str, uint length, int duplicate);
|
||||
|
||||
ZEND_API int zend_set_hash_symbol(zval *symbol, char *name, int name_length,
|
||||
int is_ref, int num_symbol_tables, ...);
|
||||
|
||||
#define add_method(arg,key,method) add_assoc_function((arg),(key),(method))
|
||||
|
||||
#endif /* _ZEND_API_H */
|
||||
#define ZVAL_RESOURCE(z,l) { \
|
||||
(z)->type = IS_RESOURCE; \
|
||||
(z)->value.lval = l; \
|
||||
}
|
||||
#define ZVAL_BOOL(z,b) { \
|
||||
(z)->type = IS_BOOL; \
|
||||
(z)->value.lval = b; \
|
||||
}
|
||||
#define ZVAL_NULL(z) { \
|
||||
(z)->type = IS_NULL; \
|
||||
}
|
||||
#define ZVAL_LONG(z,l) { \
|
||||
(z)->type = IS_LONG; \
|
||||
(z)->value.lval = l; \
|
||||
}
|
||||
#define ZVAL_DOUBLE(z,d) { \
|
||||
(z)->type = IS_DOUBLE; \
|
||||
(z)->value.dval = d; \
|
||||
}
|
||||
#define ZVAL_STRING(z,s,duplicate) { \
|
||||
char *__s=(s); \
|
||||
(z)->value.str.len = strlen(__s); \
|
||||
(z)->value.str.val = (duplicate?estrndup(__s,(z)->value.str.len):__s); \
|
||||
(z)->type = IS_STRING; \
|
||||
}
|
||||
#define ZVAL_STRINGL(z,s,l,duplicate) { \
|
||||
char *__s=(s); int __l=l; \
|
||||
(z)->value.str.len = __l; \
|
||||
(z)->value.str.val = (duplicate?estrndup(__s,__l):__s); \
|
||||
(z)->type = IS_STRING; \
|
||||
}
|
||||
|
||||
#define ZVAL_EMPTY_STRING(z) { \
|
||||
(z)->value.str.len = 0; \
|
||||
(z)->value.str.val = empty_string \
|
||||
(z)->type = IS_STRING; \
|
||||
}
|
||||
|
||||
#define ZVAL_FALSE { (z)->value.lval = 0; (z)->type = IS_BOOL; }
|
||||
#define ZVAL_TRUE { (z)->value.lval = 1; (z)->type = IS_BOOL; }
|
||||
|
||||
#define RETVAL_RESOURCE(l) { \
|
||||
return_value->type = IS_RESOURCE;\
|
||||
return_value->value.lval = l; \
|
||||
}
|
||||
#define RETVAL_BOOL(b) { \
|
||||
return_value->type = IS_BOOL; \
|
||||
return_value->value.lval = b; \
|
||||
}
|
||||
#define RETVAL_NULL() { \
|
||||
return_value->type = IS_NULL; \
|
||||
}
|
||||
#define RETVAL_LONG(l) { \
|
||||
return_value->type = IS_LONG; \
|
||||
return_value->value.lval = l; \
|
||||
}
|
||||
#define RETVAL_DOUBLE(d) { \
|
||||
return_value->type = IS_DOUBLE; \
|
||||
return_value->value.dval = d; \
|
||||
}
|
||||
#define RETVAL_STRING(s,duplicate) { \
|
||||
char *__s=(s); \
|
||||
return_value->value.str.len = strlen(__s); \
|
||||
return_value->value.str.val = (duplicate?estrndup(__s,return_value->value.str.len):__s); \
|
||||
return_value->type = IS_STRING; \
|
||||
}
|
||||
#define RETVAL_STRINGL(s,l,duplicate) { \
|
||||
char *__s=(s); int __l=l; \
|
||||
return_value->value.str.len = __l; \
|
||||
return_value->value.str.val = (duplicate?estrndup(__s,__l):__s); \
|
||||
return_value->type = IS_STRING; \
|
||||
}
|
||||
|
||||
#define RETVAL_EMPTY_STRING() { \
|
||||
return_value->value.str.len = 0; \
|
||||
return_value->value.str.val = empty_string \
|
||||
return_value->type = IS_STRING; \
|
||||
}
|
||||
|
||||
#define RETVAL_FALSE { return_value->value.lval = 0; return_value->type = IS_BOOL; }
|
||||
#define RETVAL_TRUE { return_value->value.lval = 1; return_value->type = IS_BOOL; }
|
||||
|
||||
#define RETURN_RESOURCE(l) { \
|
||||
return_value->type = IS_RESOURCE;\
|
||||
return_value->value.lval = l; \
|
||||
return; \
|
||||
}
|
||||
|
||||
#define RETURN_BOOL(b) { \
|
||||
return_value->type = IS_BOOL; \
|
||||
return_value->value.lval = b; \
|
||||
return; \
|
||||
}
|
||||
|
||||
#define RETURN_NULL() { \
|
||||
return_value->type = IS_NULL; \
|
||||
return; \
|
||||
}
|
||||
|
||||
#define RETURN_LONG(l) { \
|
||||
return_value->type = IS_LONG; \
|
||||
return_value->value.lval = l; \
|
||||
return; \
|
||||
}
|
||||
#define RETURN_DOUBLE(d) { \
|
||||
return_value->type = IS_DOUBLE; \
|
||||
return_value->value.dval = d; \
|
||||
return; \
|
||||
}
|
||||
#define RETURN_STRING(s,duplicate) { \
|
||||
char *__s=(s); \
|
||||
return_value->value.str.len = strlen(__s); \
|
||||
return_value->value.str.val = (duplicate?estrndup(__s,return_value->value.str.len):__s); \
|
||||
return_value->type = IS_STRING; \
|
||||
return; \
|
||||
}
|
||||
#define RETURN_STRINGL(s,l,duplicate) { \
|
||||
char *__s=(s); int __l=l; \
|
||||
return_value->value.str.len = __l; \
|
||||
return_value->value.str.val = (duplicate?estrndup(__s,__l):__s); \
|
||||
return_value->type = IS_STRING; \
|
||||
return; \
|
||||
}
|
||||
|
||||
#define RETURN_EMPTY_STRING() { \
|
||||
return_value->value.str.len = 0; \
|
||||
return_value->value.str.val = empty_string \
|
||||
return_value->type = IS_STRING; \
|
||||
return; \
|
||||
}
|
||||
|
||||
#define RETURN_FALSE { RETVAL_FALSE; return; }
|
||||
#define RETURN_TRUE { RETVAL_TRUE; return; }
|
||||
|
||||
#define SET_VAR_STRING(n,v) { \
|
||||
{ \
|
||||
zval *var; \
|
||||
char *str=(v); /* prevent 'v' from being evaluated more than once */ \
|
||||
\
|
||||
ALLOC_ZVAL(var); \
|
||||
var->value.str.val = (str); \
|
||||
var->value.str.len = strlen((str)); \
|
||||
var->type = IS_STRING; \
|
||||
ZEND_SET_GLOBAL_VAR(n, var); \
|
||||
} \
|
||||
}
|
||||
|
||||
#define SET_VAR_STRINGL(n,v,l) { \
|
||||
{ \
|
||||
zval *var; \
|
||||
\
|
||||
ALLOC_ZVAL(var); \
|
||||
var->value.str.val = (v); \
|
||||
var->value.str.len = (l); \
|
||||
var->type = IS_STRING; \
|
||||
ZEND_SET_GLOBAL_VAR(n, var); \
|
||||
} \
|
||||
}
|
||||
|
||||
#define SET_VAR_LONG(n,v) { \
|
||||
{ \
|
||||
zval *var; \
|
||||
\
|
||||
ALLOC_ZVAL(var); \
|
||||
var->value.lval = (v); \
|
||||
var->type = IS_LONG; \
|
||||
ZEND_SET_GLOBAL_VAR(n, var); \
|
||||
} \
|
||||
}
|
||||
|
||||
#define SET_VAR_DOUBLE(n,v) { \
|
||||
{ \
|
||||
zval *var; \
|
||||
\
|
||||
ALLOC_ZVAL(var); \
|
||||
var->value.dval = (v); \
|
||||
var->type = IS_DOUBLE; \
|
||||
ZEND_SET_GLOBAL_VAR(n, var); \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
#define ZEND_SET_SYMBOL(symtable, name, var) \
|
||||
{ \
|
||||
char *_name = (name); \
|
||||
\
|
||||
ZEND_SET_SYMBOL_WITH_LENGTH(symtable, _name, strlen(_name)+1, var, 1, 0); \
|
||||
}
|
||||
|
||||
#define ZEND_SET_SYMBOL_WITH_LENGTH(symtable, name, name_length, var, _refcount, _is_ref) \
|
||||
{ \
|
||||
zval **orig_var; \
|
||||
\
|
||||
if (zend_hash_find(symtable, (name), (name_length), (void **) &orig_var)==SUCCESS \
|
||||
&& PZVAL_IS_REF(*orig_var)) { \
|
||||
(var)->refcount = (*orig_var)->refcount; \
|
||||
(var)->is_ref = 1; \
|
||||
\
|
||||
if (_refcount) { \
|
||||
(var)->refcount += _refcount-1; \
|
||||
} \
|
||||
zval_dtor(*orig_var); \
|
||||
**orig_var = *(var); \
|
||||
FREE_ZVAL(var); \
|
||||
} else { \
|
||||
(var)->is_ref = _is_ref; \
|
||||
if (_refcount) { \
|
||||
(var)->refcount = _refcount; \
|
||||
} \
|
||||
zend_hash_update(symtable, (name), (name_length), &(var), sizeof(zval *), NULL); \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
#define ZEND_SET_GLOBAL_VAR(name, var) \
|
||||
ZEND_SET_SYMBOL(&EG(symbol_table), name, var)
|
||||
|
||||
#define ZEND_SET_GLOBAL_VAR_WITH_LENGTH(name, name_length, var, _refcount, _is_ref) \
|
||||
ZEND_SET_SYMBOL_WITH_LENGTH(&EG(symbol_table), name, name_length, var, _refcount, _is_ref)
|
||||
|
||||
#define HASH_OF(p) ((p)->type==IS_ARRAY ? (p)->value.ht : (((p)->type==IS_OBJECT ? (p)->value.obj.properties : NULL)))
|
||||
#define ZVAL_IS_NULL(z) ((z)->type==IS_NULL)
|
||||
|
||||
#endif /* _ZEND_API_H */
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
|
||||
+194
-121
@@ -2,29 +2,43 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "zend.h"
|
||||
#include "zend_alloc.h"
|
||||
#include "zend_globals.h"
|
||||
#include "zend_fast_cache.h"
|
||||
#ifdef HAVE_SIGNAL_H
|
||||
# include <signal.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifndef ZTS
|
||||
static zend_alloc_globals alloc_globals;
|
||||
ZEND_API zend_alloc_globals alloc_globals;
|
||||
#endif
|
||||
|
||||
|
||||
#define ZEND_DISABLE_MEMORY_CACHE 0
|
||||
|
||||
|
||||
#if ZEND_DEBUG
|
||||
# define END_MAGIC_SIZE sizeof(long)
|
||||
# define END_ALIGNMENT(size) (((size)%PLATFORM_ALIGNMENT)?(PLATFORM_ALIGNMENT-((size)%PLATFORM_ALIGNMENT)):0)
|
||||
@@ -36,7 +50,7 @@ static zend_alloc_globals alloc_globals;
|
||||
|
||||
# if MEMORY_LIMIT
|
||||
# if ZEND_DEBUG
|
||||
#define CHECK_MEMORY_LIMIT(s) _CHECK_MEMORY_LIMIT(s,filename,lineno)
|
||||
#define CHECK_MEMORY_LIMIT(s) _CHECK_MEMORY_LIMIT(s, __zend_filename, __zend_lineno)
|
||||
# else
|
||||
#define CHECK_MEMORY_LIMIT(s) _CHECK_MEMORY_LIMIT(s,NULL,0)
|
||||
# endif
|
||||
@@ -83,39 +97,47 @@ static zend_alloc_globals alloc_globals;
|
||||
} \
|
||||
AG(head) = p; \
|
||||
} \
|
||||
p->pLast = (mem_header *) NULL;
|
||||
p->pLast = (zend_mem_header *) NULL;
|
||||
|
||||
|
||||
|
||||
#if ZEND_DEBUG
|
||||
ZEND_API void *_emalloc(size_t size, char *filename, uint lineno)
|
||||
#else
|
||||
ZEND_API void *_emalloc(size_t size)
|
||||
#endif
|
||||
ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
|
||||
{
|
||||
mem_header *p;
|
||||
zend_mem_header *p;
|
||||
ALS_FETCH();
|
||||
|
||||
if (!ZEND_DISABLE_MEMORY_CACHE && (size < MAX_CACHED_MEMORY) && (AG(cache_count)[size] > 0)) {
|
||||
p = AG(cache)[size][--AG(cache_count)[size]];
|
||||
#if ZEND_DEBUG
|
||||
p->filename = __zend_filename;
|
||||
p->lineno = __zend_lineno;
|
||||
p->orig_filename = __zend_orig_filename;
|
||||
p->orig_lineno = __zend_orig_lineno;
|
||||
p->magic = MEM_BLOCK_START_MAGIC;
|
||||
p->reported = 0;
|
||||
AG(cache_stats)[size][1]++;
|
||||
#endif
|
||||
p->persistent = 0;
|
||||
p->cached = 0;
|
||||
return (void *)((char *)p + sizeof(zend_mem_header) + PLATFORM_PADDING);
|
||||
} else {
|
||||
#if ZEND_DEBUG
|
||||
if (size<MAX_CACHED_MEMORY) {
|
||||
AG(cache_stats)[size][0]++;
|
||||
}
|
||||
#endif
|
||||
p = (zend_mem_header *) malloc(sizeof(zend_mem_header) + size + PLATFORM_PADDING + END_ALIGNMENT(size) + END_MAGIC_SIZE);
|
||||
}
|
||||
|
||||
HANDLE_BLOCK_INTERRUPTIONS();
|
||||
|
||||
if ((size < MAX_CACHED_MEMORY) && (AG(cache_count)[size] > 0)) {
|
||||
p = AG(cache)[size][--AG(cache_count)[size]];
|
||||
#if ZEND_DEBUG
|
||||
p->filename = filename;
|
||||
p->lineno = lineno;
|
||||
p->magic = MEM_BLOCK_START_MAGIC;
|
||||
#endif
|
||||
HANDLE_UNBLOCK_INTERRUPTIONS();
|
||||
p->persistent = 0;
|
||||
p->cached = 0;
|
||||
return (void *)((char *)p + sizeof(mem_header) + PLATFORM_PADDING);
|
||||
} else {
|
||||
p = (mem_header *) malloc(sizeof(mem_header) + size + PLATFORM_PADDING + END_ALIGNMENT(size) + END_MAGIC_SIZE);
|
||||
}
|
||||
|
||||
if (!p) {
|
||||
fprintf(stderr,"FATAL: emalloc(): Unable to allocate %d bytes\n", size);
|
||||
fprintf(stderr,"FATAL: emalloc(): Unable to allocate %ld bytes\n", (long) size);
|
||||
#if ZEND_DEBUG && defined(HAVE_KILL) && defined(HAVE_GETPID)
|
||||
kill(getpid(), SIGSEGV);
|
||||
#else
|
||||
exit(1);
|
||||
#endif
|
||||
HANDLE_UNBLOCK_INTERRUPTIONS();
|
||||
return (void *)p;
|
||||
}
|
||||
@@ -123,36 +145,36 @@ ZEND_API void *_emalloc(size_t size)
|
||||
ADD_POINTER_TO_LIST(p);
|
||||
p->size = size;
|
||||
#if ZEND_DEBUG
|
||||
p->filename = filename;
|
||||
p->lineno = lineno;
|
||||
p->filename = __zend_filename;
|
||||
p->lineno = __zend_lineno;
|
||||
p->orig_filename = __zend_orig_filename;
|
||||
p->orig_lineno = __zend_orig_lineno;
|
||||
p->magic = MEM_BLOCK_START_MAGIC;
|
||||
*((long *)(((char *) p) + sizeof(mem_header)+size+PLATFORM_PADDING+END_ALIGNMENT(size))) = MEM_BLOCK_END_MAGIC;
|
||||
p->reported = 0;
|
||||
*((long *)(((char *) p) + sizeof(zend_mem_header)+size+PLATFORM_PADDING+END_ALIGNMENT(size))) = MEM_BLOCK_END_MAGIC;
|
||||
#endif
|
||||
#if MEMORY_LIMIT
|
||||
CHECK_MEMORY_LIMIT(size);
|
||||
#endif
|
||||
HANDLE_UNBLOCK_INTERRUPTIONS();
|
||||
return (void *)((char *)p + sizeof(mem_header) + PLATFORM_PADDING);
|
||||
return (void *)((char *)p + sizeof(zend_mem_header) + PLATFORM_PADDING);
|
||||
}
|
||||
|
||||
|
||||
#if ZEND_DEBUG
|
||||
ZEND_API void _efree(void *ptr, char *filename, uint lineno)
|
||||
#else
|
||||
ZEND_API void _efree(void *ptr)
|
||||
#endif
|
||||
ZEND_API void _efree(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
|
||||
{
|
||||
mem_header *p = (mem_header *) ((char *)ptr - sizeof(mem_header) - PLATFORM_PADDING);
|
||||
zend_mem_header *p = (zend_mem_header *) ((char *)ptr - sizeof(zend_mem_header) - PLATFORM_PADDING);
|
||||
ALS_FETCH();
|
||||
|
||||
#if ZEND_DEBUG
|
||||
if (!_mem_block_check(ptr, 1, filename, lineno)) {
|
||||
if (!_mem_block_check(ptr, 1 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC)) {
|
||||
return;
|
||||
}
|
||||
memset(ptr, 0x5a, p->size);
|
||||
#endif
|
||||
|
||||
if (!p->persistent && (p->size < MAX_CACHED_MEMORY) && (AG(cache_count)[p->size] < MAX_CACHED_ENTRIES)) {
|
||||
if (!ZEND_DISABLE_MEMORY_CACHE
|
||||
&& !p->persistent && (p->size < MAX_CACHED_MEMORY) && (AG(cache_count)[p->size] < MAX_CACHED_ENTRIES)) {
|
||||
AG(cache)[p->size][AG(cache_count)[p->size]++] = p;
|
||||
p->cached = 1;
|
||||
#if ZEND_DEBUG
|
||||
@@ -172,21 +194,13 @@ ZEND_API void _efree(void *ptr)
|
||||
}
|
||||
|
||||
|
||||
#if ZEND_DEBUG
|
||||
ZEND_API void *_ecalloc(size_t nmemb, size_t size, char *filename, uint lineno)
|
||||
#else
|
||||
ZEND_API void *_ecalloc(size_t nmemb, size_t size)
|
||||
#endif
|
||||
ZEND_API void *_ecalloc(size_t nmemb, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
|
||||
{
|
||||
void *p;
|
||||
int final_size=size*nmemb;
|
||||
|
||||
HANDLE_BLOCK_INTERRUPTIONS();
|
||||
#if ZEND_DEBUG
|
||||
p = _emalloc(final_size,filename,lineno);
|
||||
#else
|
||||
p = emalloc(final_size);
|
||||
#endif
|
||||
p = _emalloc(final_size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
|
||||
if (!p) {
|
||||
HANDLE_UNBLOCK_INTERRUPTIONS();
|
||||
return (void *) p;
|
||||
@@ -197,39 +211,37 @@ ZEND_API void *_ecalloc(size_t nmemb, size_t size)
|
||||
}
|
||||
|
||||
|
||||
#if ZEND_DEBUG
|
||||
ZEND_API void *_erealloc(void *ptr, size_t size, char *filename, uint lineno)
|
||||
#else
|
||||
ZEND_API void *_erealloc(void *ptr, size_t size)
|
||||
#endif
|
||||
ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
|
||||
{
|
||||
mem_header *p = (mem_header *) ((char *)ptr-sizeof(mem_header)-PLATFORM_PADDING);
|
||||
mem_header *orig = p;
|
||||
zend_mem_header *p = (zend_mem_header *) ((char *)ptr-sizeof(zend_mem_header)-PLATFORM_PADDING);
|
||||
zend_mem_header *orig = p;
|
||||
ALS_FETCH();
|
||||
|
||||
if (!ptr) {
|
||||
#if ZEND_DEBUG
|
||||
return _emalloc(size, filename, lineno);
|
||||
#else
|
||||
return emalloc(size);
|
||||
#endif
|
||||
return _emalloc(size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
|
||||
}
|
||||
HANDLE_BLOCK_INTERRUPTIONS();
|
||||
REMOVE_POINTER_FROM_LIST(p);
|
||||
p = (mem_header *) realloc(p,sizeof(mem_header)+size+PLATFORM_PADDING+END_ALIGNMENT(size)+END_MAGIC_SIZE);
|
||||
p = (zend_mem_header *) realloc(p,sizeof(zend_mem_header)+size+PLATFORM_PADDING+END_ALIGNMENT(size)+END_MAGIC_SIZE);
|
||||
if (!p) {
|
||||
fprintf(stderr,"FATAL: erealloc(): Unable to allocate %d bytes\n", size);
|
||||
HANDLE_UNBLOCK_INTERRUPTIONS();
|
||||
zend_bailout();
|
||||
if (!allow_failure) {
|
||||
fprintf(stderr,"FATAL: erealloc(): Unable to allocate %ld bytes\n", (long) size);
|
||||
#if ZEND_DEBUG && HAVE_KILL && HAVE_GETPID
|
||||
kill(getpid(), SIGSEGV);
|
||||
#else
|
||||
exit(1);
|
||||
#endif
|
||||
}
|
||||
ADD_POINTER_TO_LIST(orig);
|
||||
HANDLE_UNBLOCK_INTERRUPTIONS();
|
||||
return (void *)NULL;
|
||||
}
|
||||
ADD_POINTER_TO_LIST(p);
|
||||
#if ZEND_DEBUG
|
||||
p->filename = filename;
|
||||
p->lineno = lineno;
|
||||
p->filename = __zend_filename;
|
||||
p->lineno = __zend_lineno;
|
||||
p->magic = MEM_BLOCK_START_MAGIC;
|
||||
*((long *)(((char *) p) + sizeof(mem_header)+size+PLATFORM_PADDING+END_ALIGNMENT(size))) = MEM_BLOCK_END_MAGIC;
|
||||
*((long *)(((char *) p) + sizeof(zend_mem_header)+size+PLATFORM_PADDING+END_ALIGNMENT(size))) = MEM_BLOCK_END_MAGIC;
|
||||
#endif
|
||||
#if MEMORY_LIMIT
|
||||
CHECK_MEMORY_LIMIT(size - p->size);
|
||||
@@ -237,26 +249,18 @@ ZEND_API void *_erealloc(void *ptr, size_t size)
|
||||
p->size = size;
|
||||
|
||||
HANDLE_UNBLOCK_INTERRUPTIONS();
|
||||
return (void *)((char *)p+sizeof(mem_header)+PLATFORM_PADDING);
|
||||
return (void *)((char *)p+sizeof(zend_mem_header)+PLATFORM_PADDING);
|
||||
}
|
||||
|
||||
|
||||
#if ZEND_DEBUG
|
||||
ZEND_API char *_estrdup(const char *s, char *filename, uint lineno)
|
||||
#else
|
||||
ZEND_API char *_estrdup(const char *s)
|
||||
#endif
|
||||
ZEND_API char *_estrdup(const char *s ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
|
||||
{
|
||||
int length;
|
||||
char *p;
|
||||
|
||||
length = strlen(s)+1;
|
||||
HANDLE_BLOCK_INTERRUPTIONS();
|
||||
#if ZEND_DEBUG
|
||||
p = (char *) _emalloc(length,filename,lineno);
|
||||
#else
|
||||
p = (char *) emalloc(length);
|
||||
#endif
|
||||
p = (char *) _emalloc(length ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
|
||||
if (!p) {
|
||||
HANDLE_UNBLOCK_INTERRUPTIONS();
|
||||
return (char *)NULL;
|
||||
@@ -267,20 +271,12 @@ ZEND_API char *_estrdup(const char *s)
|
||||
}
|
||||
|
||||
|
||||
#if ZEND_DEBUG
|
||||
ZEND_API char *_estrndup(const char *s, uint length, char *filename, uint lineno)
|
||||
#else
|
||||
ZEND_API char *_estrndup(const char *s, uint length)
|
||||
#endif
|
||||
ZEND_API char *_estrndup(const char *s, uint length ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
|
||||
{
|
||||
char *p;
|
||||
|
||||
HANDLE_BLOCK_INTERRUPTIONS();
|
||||
#if ZEND_DEBUG
|
||||
p = (char *) _emalloc(length+1,filename,lineno);
|
||||
#else
|
||||
p = (char *) emalloc(length+1);
|
||||
#endif
|
||||
p = (char *) _emalloc(length+1 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
|
||||
if (!p) {
|
||||
HANDLE_UNBLOCK_INTERRUPTIONS();
|
||||
return (char *)NULL;
|
||||
@@ -321,10 +317,8 @@ ZEND_API int zend_set_memory_limit(unsigned int memory_limit)
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void start_memory_manager(void)
|
||||
ZEND_API void start_memory_manager(ALS_D)
|
||||
{
|
||||
ALS_FETCH();
|
||||
|
||||
AG(phead) = AG(head) = NULL;
|
||||
|
||||
#if MEMORY_LIMIT
|
||||
@@ -333,25 +327,63 @@ ZEND_API void start_memory_manager(void)
|
||||
AG(memory_exhausted)=0;
|
||||
#endif
|
||||
|
||||
#if ZEND_DEBUG
|
||||
memset(AG(cache_stats), 0, sizeof(AG(cache_stats)));
|
||||
memset(AG(fast_cache_stats), 0, sizeof(AG(fast_cache_stats)));
|
||||
#endif
|
||||
|
||||
memset(AG(fast_cache_list_head), 0, sizeof(AG(fast_cache_list_head)));
|
||||
memset(AG(cache_count),0,MAX_CACHED_MEMORY*sizeof(unsigned char));
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void shutdown_memory_manager(int silent, int clean_cache)
|
||||
{
|
||||
mem_header *p, *t;
|
||||
zend_mem_header *p, *t;
|
||||
int fci;
|
||||
#if ZEND_DEBUG
|
||||
int had_leaks=0;
|
||||
#endif
|
||||
zend_fast_cache_list_entry *fast_cache_list_entry, *next_fast_cache_list_entry;
|
||||
ALS_FETCH();
|
||||
|
||||
|
||||
for (fci=0; fci<MAX_FAST_CACHE_TYPES; fci++) {
|
||||
fast_cache_list_entry = AG(fast_cache_list_head)[fci];
|
||||
while (fast_cache_list_entry) {
|
||||
next_fast_cache_list_entry = fast_cache_list_entry->next;
|
||||
efree(fast_cache_list_entry);
|
||||
fast_cache_list_entry = next_fast_cache_list_entry;
|
||||
}
|
||||
AG(fast_cache_list_head)[fci] = NULL;
|
||||
}
|
||||
|
||||
p=AG(head);
|
||||
t=AG(head);
|
||||
while (t) {
|
||||
if (!t->cached || clean_cache) {
|
||||
#if ZEND_DEBUG
|
||||
if (!t->cached) {
|
||||
/* does not use zend_error() *intentionally* */
|
||||
if (!t->cached && !t->reported) {
|
||||
zend_mem_header *iterator;
|
||||
int total_leak=0, total_leak_count=0;
|
||||
|
||||
had_leaks=1;
|
||||
if (!silent) {
|
||||
zend_message_dispatcher(ZMSG_MEMORY_LEAK_DETECTED, t);
|
||||
}
|
||||
t->reported = 1;
|
||||
for (iterator=t->pNext; iterator; iterator=iterator->pNext) {
|
||||
if (!iterator->cached
|
||||
&& iterator->filename==t->filename
|
||||
&& iterator->lineno==t->lineno) {
|
||||
total_leak += iterator->size;
|
||||
total_leak_count++;
|
||||
iterator->reported = 1;
|
||||
}
|
||||
}
|
||||
if (!silent && total_leak_count>0) {
|
||||
zend_message_dispatcher(ZMSG_MEMORY_LEAK_REPEATED, (void *) (long) (total_leak_count));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
p = t->pNext;
|
||||
@@ -362,6 +394,46 @@ ZEND_API void shutdown_memory_manager(int silent, int clean_cache)
|
||||
t = t->pNext;
|
||||
}
|
||||
}
|
||||
|
||||
#if (ZEND_DEBUG)
|
||||
do {
|
||||
zval display_memory_cache_stats;
|
||||
int i, j;
|
||||
|
||||
if (clean_cache) {
|
||||
/* we're shutting down completely, don't even touch the INI subsystem */
|
||||
break;
|
||||
}
|
||||
if (zend_get_ini_entry("display_memory_cache_stats", sizeof("display_memory_cache_stats"), &display_memory_cache_stats)==FAILURE) {
|
||||
break;
|
||||
}
|
||||
if (!atoi(display_memory_cache_stats.value.str.val)) {
|
||||
break;
|
||||
}
|
||||
fprintf(stderr, "Memory cache statistics\n"
|
||||
"-----------------------\n\n"
|
||||
"[zval, %2ld]\t\t%d / %d (%.2f%%)\n"
|
||||
"[hash, %2ld]\t\t%d / %d (%.2f%%)\n",
|
||||
(long) sizeof(zval),
|
||||
AG(fast_cache_stats)[ZVAL_CACHE_LIST][1], AG(fast_cache_stats)[ZVAL_CACHE_LIST][0]+AG(fast_cache_stats)[ZVAL_CACHE_LIST][1],
|
||||
((double) AG(fast_cache_stats)[ZVAL_CACHE_LIST][1] / (AG(fast_cache_stats)[ZVAL_CACHE_LIST][0]+AG(fast_cache_stats)[ZVAL_CACHE_LIST][1]))*100,
|
||||
(long) sizeof(HashTable),
|
||||
AG(fast_cache_stats)[HASHTABLE_CACHE_LIST][1], AG(fast_cache_stats)[HASHTABLE_CACHE_LIST][0]+AG(fast_cache_stats)[HASHTABLE_CACHE_LIST][1],
|
||||
((double) AG(fast_cache_stats)[HASHTABLE_CACHE_LIST][1] / (AG(fast_cache_stats)[HASHTABLE_CACHE_LIST][0]+AG(fast_cache_stats)[HASHTABLE_CACHE_LIST][1]))*100);
|
||||
|
||||
|
||||
for (i=0; i<MAX_CACHED_MEMORY; i+=2) {
|
||||
fprintf(stderr, "[%2d, %2d]\t\t", i, i+1);
|
||||
for (j=0; j<2; j++) {
|
||||
fprintf(stderr, "%d / %d (%.2f%%)\t\t",
|
||||
AG(cache_stats)[i+j][1], AG(cache_stats)[i+j][0]+AG(cache_stats)[i+j][1],
|
||||
((double) AG(cache_stats)[i+j][1] / (AG(cache_stats)[i+j][0]+AG(cache_stats)[i+j][1]))*100);
|
||||
}
|
||||
fprintf(stderr, "\n");
|
||||
}
|
||||
|
||||
} while (0);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -375,7 +447,7 @@ void zend_debug_alloc_output(char *format, ...)
|
||||
vsprintf(output_buf, format, args);
|
||||
va_end(args);
|
||||
|
||||
#if WIN32||WINNT
|
||||
#ifdef ZEND_WIN32
|
||||
OutputDebugString(output_buf);
|
||||
#else
|
||||
fprintf(stderr, output_buf);
|
||||
@@ -383,9 +455,9 @@ void zend_debug_alloc_output(char *format, ...)
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int _mem_block_check(void *ptr, int silent, char *filename, int lineno)
|
||||
ZEND_API int _mem_block_check(void *ptr, int silent ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
|
||||
{
|
||||
mem_header *p = (mem_header *) ((char *)ptr - sizeof(mem_header) - PLATFORM_PADDING);
|
||||
zend_mem_header *p = (zend_mem_header *) ((char *)ptr - sizeof(zend_mem_header) - PLATFORM_PADDING);
|
||||
int no_cache_notice=0;
|
||||
int valid_beginning=1;
|
||||
int had_problems=0;
|
||||
@@ -399,8 +471,12 @@ ZEND_API int _mem_block_check(void *ptr, int silent, char *filename, int lineno)
|
||||
no_cache_notice=1;
|
||||
}
|
||||
if (!silent) {
|
||||
zend_message_dispatcher(ZMSG_LOG_SCRIPT_NAME, NULL);
|
||||
zend_debug_alloc_output("---------------------------------------\n");
|
||||
zend_debug_alloc_output("Block 0x%0.8lX status at %s:%d:\n", (long) p, filename, lineno);
|
||||
zend_debug_alloc_output("%s(%d) : Block 0x%0.8lX status:\n" ZEND_FILE_LINE_RELAY_CC, (long) p);
|
||||
if (__zend_orig_filename) {
|
||||
zend_debug_alloc_output("%s(%d) : Actual location (location was relayed)\n" ZEND_FILE_LINE_ORIG_RELAY_CC);
|
||||
}
|
||||
zend_debug_alloc_output("%10s\t","Beginning: ");
|
||||
}
|
||||
|
||||
@@ -415,7 +491,7 @@ ZEND_API int _mem_block_check(void *ptr, int silent, char *filename, int lineno)
|
||||
zend_debug_alloc_output("Freed\n");
|
||||
had_problems=1;
|
||||
} else {
|
||||
return _mem_block_check(ptr, 0, filename, lineno);
|
||||
return _mem_block_check(ptr, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
|
||||
}
|
||||
break;
|
||||
case MEM_BLOCK_CACHED_MAGIC:
|
||||
@@ -426,7 +502,7 @@ ZEND_API int _mem_block_check(void *ptr, int silent, char *filename, int lineno)
|
||||
}
|
||||
} else {
|
||||
if (!no_cache_notice) {
|
||||
return _mem_block_check(ptr, 0, filename, lineno);
|
||||
return _mem_block_check(ptr, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -434,7 +510,7 @@ ZEND_API int _mem_block_check(void *ptr, int silent, char *filename, int lineno)
|
||||
if (!silent) {
|
||||
zend_debug_alloc_output("Overrun (magic=0x%0.8lX, expected=0x%0.8lX)\n", p->magic, MEM_BLOCK_START_MAGIC);
|
||||
} else {
|
||||
return _mem_block_check(ptr, 0, filename, lineno);
|
||||
return _mem_block_check(ptr, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
|
||||
}
|
||||
had_problems=1;
|
||||
valid_beginning=0;
|
||||
@@ -443,17 +519,17 @@ ZEND_API int _mem_block_check(void *ptr, int silent, char *filename, int lineno)
|
||||
|
||||
|
||||
if (valid_beginning
|
||||
&& *((long *)(((char *) p)+sizeof(mem_header)+p->size+PLATFORM_PADDING+END_ALIGNMENT(p->size))) != MEM_BLOCK_END_MAGIC) {
|
||||
&& *((long *)(((char *) p)+sizeof(zend_mem_header)+p->size+PLATFORM_PADDING+END_ALIGNMENT(p->size))) != MEM_BLOCK_END_MAGIC) {
|
||||
long magic_num = MEM_BLOCK_END_MAGIC;
|
||||
char *overflow_ptr, *magic_ptr=(char *) &magic_num;
|
||||
int overflows=0;
|
||||
int i;
|
||||
|
||||
if (silent) {
|
||||
return _mem_block_check(ptr, 0, filename, lineno);
|
||||
return _mem_block_check(ptr, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
|
||||
}
|
||||
had_problems=1;
|
||||
overflow_ptr = ((char *) p)+sizeof(mem_header)+p->size+PLATFORM_PADDING;
|
||||
overflow_ptr = ((char *) p)+sizeof(zend_mem_header)+p->size+PLATFORM_PADDING;
|
||||
|
||||
for (i=0; i<sizeof(long); i++) {
|
||||
if (overflow_ptr[i]!=magic_ptr[i]) {
|
||||
@@ -463,7 +539,7 @@ ZEND_API int _mem_block_check(void *ptr, int silent, char *filename, int lineno)
|
||||
|
||||
zend_debug_alloc_output("%10s\t", "End:");
|
||||
zend_debug_alloc_output("Overflown (magic=0x%0.8lX instead of 0x%0.8lX)\n",
|
||||
*((long *)(((char *) p) + sizeof(mem_header)+p->size+PLATFORM_PADDING+END_ALIGNMENT(p->size))), MEM_BLOCK_END_MAGIC);
|
||||
*((long *)(((char *) p) + sizeof(zend_mem_header)+p->size+PLATFORM_PADDING+END_ALIGNMENT(p->size))), MEM_BLOCK_END_MAGIC);
|
||||
zend_debug_alloc_output("%10s\t","");
|
||||
if (overflows>=sizeof(long)) {
|
||||
zend_debug_alloc_output("At least %d bytes overflown\n", sizeof(long));
|
||||
@@ -492,9 +568,9 @@ ZEND_API int _mem_block_check(void *ptr, int silent, char *filename, int lineno)
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void _full_mem_check(int silent, char *filename, uint lineno)
|
||||
ZEND_API void _full_mem_check(int silent ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
|
||||
{
|
||||
mem_header *p;
|
||||
zend_mem_header *p;
|
||||
int errors=0;
|
||||
ALS_FETCH();
|
||||
|
||||
@@ -502,31 +578,27 @@ ZEND_API void _full_mem_check(int silent, char *filename, uint lineno)
|
||||
|
||||
|
||||
zend_debug_alloc_output("------------------------------------------------\n");
|
||||
zend_debug_alloc_output("Full Memory Check at %s:%d\n", filename, lineno);
|
||||
zend_debug_alloc_output("Full Memory Check at %s:%d\n" ZEND_FILE_LINE_RELAY_CC);
|
||||
|
||||
while (p) {
|
||||
if (!_mem_block_check((void *)((char *)p + sizeof(mem_header) + PLATFORM_PADDING), (silent?2:3), filename, lineno)) {
|
||||
if (!_mem_block_check((void *)((char *)p + sizeof(zend_mem_header) + PLATFORM_PADDING), (silent?2:3) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC)) {
|
||||
errors++;
|
||||
}
|
||||
p = p->pNext;
|
||||
}
|
||||
zend_debug_alloc_output("End of full memory check %s:%d (%d errors)\n", filename, lineno, errors);
|
||||
zend_debug_alloc_output("End of full memory check %s:%d (%d errors)\n" ZEND_FILE_LINE_RELAY_CC, errors);
|
||||
zend_debug_alloc_output("------------------------------------------------\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if ZEND_DEBUG
|
||||
ZEND_API void _persist_alloc(void *ptr, char *filename, uint lineno)
|
||||
#else
|
||||
ZEND_API void _persist_alloc(void *ptr)
|
||||
#endif
|
||||
ZEND_API int _persist_alloc(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
|
||||
{
|
||||
mem_header *p = (mem_header *) ((char *)ptr-sizeof(mem_header)-PLATFORM_PADDING);
|
||||
zend_mem_header *p = (zend_mem_header *) ((char *)ptr-sizeof(zend_mem_header)-PLATFORM_PADDING);
|
||||
ALS_FETCH();
|
||||
|
||||
#if ZEND_DEBUG
|
||||
_mem_block_check(ptr, 1, filename, lineno);
|
||||
_mem_block_check(ptr, 1 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
|
||||
#endif
|
||||
|
||||
HANDLE_BLOCK_INTERRUPTIONS();
|
||||
@@ -539,6 +611,7 @@ ZEND_API void _persist_alloc(void *ptr)
|
||||
/* add the block to the persistent list */
|
||||
ADD_POINTER_TO_LIST(p);
|
||||
HANDLE_UNBLOCK_INTERRUPTIONS();
|
||||
return p->size;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+60
-49
@@ -2,42 +2,51 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _ALLOC_H
|
||||
#define _ALLOC_H
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "zend_globals_macros.h"
|
||||
|
||||
#define MEM_BLOCK_START_MAGIC 0x7312F8DCL
|
||||
#define MEM_BLOCK_END_MAGIC 0x2A8FCC84L
|
||||
#define MEM_BLOCK_FREED_MAGIC 0x99954317L
|
||||
#define MEM_BLOCK_CACHED_MAGIC 0xFB8277DCL
|
||||
|
||||
typedef struct _mem_header {
|
||||
typedef struct _zend_mem_header {
|
||||
#if ZEND_DEBUG
|
||||
long magic;
|
||||
char *filename;
|
||||
uint lineno;
|
||||
int reported;
|
||||
char *orig_filename;
|
||||
uint orig_lineno;
|
||||
#endif
|
||||
struct _mem_header *pNext;
|
||||
struct _mem_header *pLast;
|
||||
struct _zend_mem_header *pNext;
|
||||
struct _zend_mem_header *pLast;
|
||||
unsigned int size:30;
|
||||
unsigned int persistent:1;
|
||||
unsigned int cached:1;
|
||||
} mem_header;
|
||||
} zend_mem_header;
|
||||
|
||||
typedef union {
|
||||
typedef union _align_test {
|
||||
void *ptr;
|
||||
double dbl;
|
||||
long lng;
|
||||
@@ -45,50 +54,52 @@ typedef union {
|
||||
|
||||
#define MAX_CACHED_MEMORY 64
|
||||
#define MAX_CACHED_ENTRIES 16
|
||||
|
||||
#if (defined (__GNUC__) && __GNUC__ >= 2)
|
||||
#define PLATFORM_ALIGNMENT (__alignof__ (align_test))
|
||||
#else
|
||||
#define PLATFORM_ALIGNMENT (sizeof(align_test))
|
||||
#define PLATFORM_PADDING (((PLATFORM_ALIGNMENT-sizeof(mem_header))%PLATFORM_ALIGNMENT+PLATFORM_ALIGNMENT)%PLATFORM_ALIGNMENT)
|
||||
#endif
|
||||
|
||||
#define PLATFORM_PADDING (((PLATFORM_ALIGNMENT-sizeof(zend_mem_header))%PLATFORM_ALIGNMENT+PLATFORM_ALIGNMENT)%PLATFORM_ALIGNMENT)
|
||||
|
||||
ZEND_API char *zend_strndup(const char *s, unsigned int length);
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
|
||||
#if ZEND_DEBUG
|
||||
ZEND_API void *_emalloc(size_t size,char *filename,uint lineno);
|
||||
ZEND_API void _efree(void *ptr,char *filename,uint lineno);
|
||||
ZEND_API void *_ecalloc(size_t nmemb, size_t size,char *filename,uint lineno);
|
||||
ZEND_API void *_erealloc(void *ptr, size_t size,char *filename,uint lineno);
|
||||
ZEND_API char *_estrdup(const char *s,char *filename,uint lineno);
|
||||
ZEND_API char *_estrndup(const char *s, unsigned int length,char *filename,uint lineno);
|
||||
ZEND_API void _persist_alloc(void *ptr, char *filename, uint lineno);
|
||||
#define emalloc(size) _emalloc((size),__FILE__,__LINE__)
|
||||
#define efree(ptr) _efree((ptr),__FILE__,__LINE__)
|
||||
#define ecalloc(nmemb,size) _ecalloc((nmemb),(size),__FILE__,__LINE__)
|
||||
#define erealloc(ptr,size) _erealloc((ptr),(size),__FILE__,__LINE__)
|
||||
#define estrdup(s) _estrdup((s),__FILE__,__LINE__)
|
||||
#define estrndup(s,length) _estrndup((s),(length),__FILE__,__LINE__)
|
||||
#define persist_alloc(p) _persist_alloc((p),__FILE__,__LINE__)
|
||||
#else
|
||||
ZEND_API void *_emalloc(size_t size);
|
||||
ZEND_API void _efree(void *ptr);
|
||||
ZEND_API void *_ecalloc(size_t nmemb, size_t size);
|
||||
ZEND_API void *_erealloc(void *ptr, size_t size);
|
||||
ZEND_API char *_estrdup(const char *s);
|
||||
ZEND_API char *_estrndup(const char *s, unsigned int length);
|
||||
ZEND_API void _persist_alloc(void *ptr);
|
||||
#define emalloc(size) _emalloc((size))
|
||||
#define efree(ptr) _efree((ptr))
|
||||
#define ecalloc(nmemb,size) _ecalloc((nmemb),(size))
|
||||
#define erealloc(ptr,size) _erealloc((ptr),(size))
|
||||
#define estrdup(s) _estrdup((s))
|
||||
#define estrndup(s,length) _estrndup((s),(length))
|
||||
#define persist_alloc(p) _persist_alloc((p))
|
||||
#endif
|
||||
ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
|
||||
ZEND_API void _efree(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
|
||||
ZEND_API void *_ecalloc(size_t nmemb, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
|
||||
ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
|
||||
ZEND_API char *_estrdup(const char *s ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
|
||||
ZEND_API char *_estrndup(const char *s, unsigned int length ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
|
||||
ZEND_API int _persist_alloc(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
|
||||
|
||||
/* Standard wrapper macros */
|
||||
#define emalloc(size) _emalloc((size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
|
||||
#define efree(ptr) _efree((ptr) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
|
||||
#define ecalloc(nmemb,size) _ecalloc((nmemb), (size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
|
||||
#define erealloc(ptr,size) _erealloc((ptr), (size),0 ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
|
||||
#define erealloc_recoverable(ptr,size) _erealloc((ptr), (size),1 ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
|
||||
#define estrdup(s) _estrdup((s) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
|
||||
#define estrndup(s,length) _estrndup((s), (length) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
|
||||
#define persist_alloc(p) _persist_alloc((p) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
|
||||
|
||||
/* Relay wrapper macros */
|
||||
#define emalloc_rel(size) _emalloc((size) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
|
||||
#define efree_rel(ptr) _efree((ptr) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
|
||||
#define ecalloc_rel(nmemb, size) _ecalloc((nmemb), (size) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
|
||||
#define erealloc_rel(ptr, size) _erealloc((ptr), (size), 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
|
||||
#define erealloc_recoverable_rel(ptr, size) _erealloc((ptr), (size), 1 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
|
||||
#define estrdup_rel(s) _estrdup((s) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
|
||||
#define estrndup_rel(s, length) _estrndup((s), (length) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
|
||||
#define persist_alloc_rel(p) _persist_alloc((p) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
|
||||
|
||||
/* Selective persistent/non persistent allocation macros */
|
||||
#define pemalloc(size,persistent) ((persistent)?malloc(size):emalloc(size))
|
||||
#define pefree(ptr,persistent) ((persistent)?free(ptr):efree(ptr))
|
||||
#define pecalloc(nmemb,size,persistent) ((persistent)?calloc((nmemb),(size)):ecalloc((nmemb),(size)))
|
||||
#define perealloc(ptr,size,persistent) ((persistent)?realloc((ptr),(size)):erealloc((ptr),(size)))
|
||||
#define perealloc_recoverable(ptr,size,persistent) ((persistent)?realloc((ptr),(size)):erealloc_recoverable((ptr),(size)))
|
||||
#define pestrdup(s,persistent) ((persistent)?strdup(s):estrdup(s))
|
||||
|
||||
#define safe_estrdup(ptr) ((ptr)?(estrdup(ptr)):(empty_string))
|
||||
@@ -96,15 +107,15 @@ ZEND_API void _persist_alloc(void *ptr);
|
||||
|
||||
ZEND_API int zend_set_memory_limit(unsigned int memory_limit);
|
||||
|
||||
ZEND_API void start_memory_manager(void);
|
||||
ZEND_API void start_memory_manager(ALS_D);
|
||||
ZEND_API void shutdown_memory_manager(int silent, int clean_cache);
|
||||
|
||||
#if ZEND_DEBUG
|
||||
ZEND_API int _mem_block_check(void *ptr, int silent, char *filename, int lineno);
|
||||
ZEND_API void _full_mem_check(int silent, char *filename, uint lineno);
|
||||
#define mem_block_check(ptr, silent) _mem_block_check(ptr, silent, __FILE__, __LINE__)
|
||||
#define mem_block_check(ptr, silent) _mem_block_check(ptr, silent, __FILE__, __LINE__)
|
||||
#define full_mem_check(silent) _full_mem_check(silent, __FILE__, __LINE__)
|
||||
ZEND_API int _mem_block_check(void *ptr, int silent ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
|
||||
ZEND_API void _full_mem_check(int silent ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
|
||||
void zend_debug_alloc_output(char *format, ...);
|
||||
#define mem_block_check(ptr, silent) _mem_block_check(ptr, silent ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
|
||||
#define full_mem_check(silent) _full_mem_check(silent ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
|
||||
#else
|
||||
#define mem_block_check(type, ptr, silent)
|
||||
#define full_mem_check(silent)
|
||||
|
||||
@@ -0,0 +1,691 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#include "zend.h"
|
||||
#include "zend_API.h"
|
||||
#include "zend_builtin_functions.h"
|
||||
#include "zend_constants.h"
|
||||
|
||||
#undef ZEND_TEST_EXCEPTIONS
|
||||
|
||||
static ZEND_FUNCTION(zend_version);
|
||||
static ZEND_FUNCTION(func_num_args);
|
||||
static ZEND_FUNCTION(func_get_arg);
|
||||
static ZEND_FUNCTION(func_get_args);
|
||||
static ZEND_FUNCTION(strlen);
|
||||
static ZEND_FUNCTION(strcmp);
|
||||
static ZEND_FUNCTION(strncmp);
|
||||
static ZEND_FUNCTION(strcasecmp);
|
||||
static ZEND_FUNCTION(each);
|
||||
static ZEND_FUNCTION(error_reporting);
|
||||
static ZEND_FUNCTION(define);
|
||||
static ZEND_FUNCTION(defined);
|
||||
static ZEND_FUNCTION(get_class);
|
||||
static ZEND_FUNCTION(get_parent_class);
|
||||
static ZEND_FUNCTION(method_exists);
|
||||
static ZEND_FUNCTION(class_exists);
|
||||
static ZEND_FUNCTION(function_exists);
|
||||
static ZEND_FUNCTION(leak);
|
||||
#ifdef ZEND_TEST_EXCEPTIONS
|
||||
static ZEND_FUNCTION(crash);
|
||||
#endif
|
||||
static ZEND_FUNCTION(get_used_files);
|
||||
static ZEND_FUNCTION(get_included_files);
|
||||
static ZEND_FUNCTION(is_subclass_of);
|
||||
static ZEND_FUNCTION(get_class_vars);
|
||||
static ZEND_FUNCTION(get_object_vars);
|
||||
static ZEND_FUNCTION(get_class_methods);
|
||||
|
||||
unsigned char first_arg_force_ref[] = { 1, BYREF_FORCE };
|
||||
unsigned char first_arg_allow_ref[] = { 1, BYREF_ALLOW };
|
||||
unsigned char second_arg_force_ref[] = { 2, BYREF_NONE, BYREF_FORCE };
|
||||
unsigned char second_arg_allow_ref[] = { 2, BYREF_NONE, BYREF_ALLOW };
|
||||
|
||||
static zend_function_entry builtin_functions[] = {
|
||||
ZEND_FE(zend_version, NULL)
|
||||
ZEND_FE(func_num_args, NULL)
|
||||
ZEND_FE(func_get_arg, NULL)
|
||||
ZEND_FE(func_get_args, NULL)
|
||||
ZEND_FE(strlen, NULL)
|
||||
ZEND_FE(strcmp, NULL)
|
||||
ZEND_FE(strncmp, NULL)
|
||||
ZEND_FE(strcasecmp, NULL)
|
||||
ZEND_FE(each, first_arg_force_ref)
|
||||
ZEND_FE(error_reporting, NULL)
|
||||
ZEND_FE(define, NULL)
|
||||
ZEND_FE(defined, NULL)
|
||||
ZEND_FE(get_class, NULL)
|
||||
ZEND_FE(get_parent_class, NULL)
|
||||
ZEND_FE(method_exists, NULL)
|
||||
ZEND_FE(class_exists, NULL)
|
||||
ZEND_FE(function_exists, NULL)
|
||||
ZEND_FE(leak, NULL)
|
||||
#ifdef ZEND_TEST_EXCEPTIONS
|
||||
ZEND_FE(crash, NULL)
|
||||
#endif
|
||||
ZEND_FE(get_used_files, NULL)
|
||||
ZEND_FE(get_included_files, NULL)
|
||||
ZEND_FE(is_subclass_of, NULL)
|
||||
ZEND_FE(get_class_vars, NULL)
|
||||
ZEND_FE(get_object_vars, NULL)
|
||||
ZEND_FE(get_class_methods, NULL)
|
||||
{ NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
|
||||
int zend_startup_builtin_functions()
|
||||
{
|
||||
return zend_register_functions(builtin_functions, NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_FUNCTION(zend_version)
|
||||
{
|
||||
RETURN_STRINGL(ZEND_VERSION, sizeof(ZEND_VERSION)-1, 1);
|
||||
}
|
||||
|
||||
|
||||
ZEND_FUNCTION(func_num_args)
|
||||
{
|
||||
void **p;
|
||||
int arg_count;
|
||||
|
||||
p = EG(argument_stack).top_element-1;
|
||||
if (p) {
|
||||
zend_error(E_ERROR, "func_num_args(): Can't be used as a function parameter");
|
||||
}
|
||||
--p;
|
||||
arg_count = (ulong) *p; /* this is the amount of arguments passed to func_num_args(); */
|
||||
|
||||
p = EG(argument_stack).top_element-1-arg_count-2;
|
||||
if (p>=EG(argument_stack).elements) {
|
||||
RETURN_LONG((ulong) *p);
|
||||
} else {
|
||||
zend_error(E_WARNING, "func_num_args(): Called from the global scope - no function context");
|
||||
RETURN_LONG(-1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ZEND_FUNCTION(func_get_arg)
|
||||
{
|
||||
void **p;
|
||||
int arg_count;
|
||||
zval **z_requested_offset;
|
||||
zval *arg;
|
||||
long requested_offset;
|
||||
|
||||
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &z_requested_offset)==FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
convert_to_long_ex(z_requested_offset);
|
||||
requested_offset = (*z_requested_offset)->value.lval;
|
||||
|
||||
p = EG(argument_stack).top_element-1;
|
||||
if (p) {
|
||||
zend_error(E_ERROR, "func_get_arg(): Can't be used as a function parameter");
|
||||
}
|
||||
--p;
|
||||
arg_count = (ulong) *p; /* this is the amount of arguments passed to func_num_args(); */
|
||||
|
||||
p = EG(argument_stack).top_element-1-arg_count-2;
|
||||
if (p<EG(argument_stack).elements) {
|
||||
zend_error(E_WARNING, "func_get_arg(): Called from the global scope - no function context");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
arg_count = (ulong) *p;
|
||||
|
||||
if (requested_offset>=arg_count) {
|
||||
zend_error(E_WARNING, "func_get_arg(): Argument %d not passed to function", requested_offset);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
arg = *(p-(arg_count-requested_offset));
|
||||
*return_value = *arg;
|
||||
zval_copy_ctor(return_value);
|
||||
}
|
||||
|
||||
|
||||
ZEND_FUNCTION(func_get_args)
|
||||
{
|
||||
void **p;
|
||||
int arg_count;
|
||||
int i;
|
||||
|
||||
p = EG(argument_stack).top_element-1;
|
||||
if (p) {
|
||||
zend_error(E_ERROR, "func_get_args(): Can't be used as a function parameter");
|
||||
}
|
||||
--p;
|
||||
|
||||
arg_count = (ulong) *p; /* this is the amount of arguments passed to func_num_args(); */
|
||||
|
||||
p = EG(argument_stack).top_element-1-arg_count-2;
|
||||
if (p<EG(argument_stack).elements) {
|
||||
zend_error(E_WARNING, "func_get_args(): Called from the global scope - no function context");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
arg_count = (ulong) *p;
|
||||
|
||||
|
||||
array_init(return_value);
|
||||
for (i=0; i<arg_count; i++) {
|
||||
zval *element;
|
||||
|
||||
ALLOC_ZVAL(element);
|
||||
*element = **((zval **) (p-(arg_count-i)));
|
||||
zval_copy_ctor(element);
|
||||
INIT_PZVAL(element);
|
||||
zend_hash_next_index_insert(return_value->value.ht, &element, sizeof(zval *), NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* {{{ proto int strlen(string str)
|
||||
Get string length */
|
||||
ZEND_FUNCTION(strlen)
|
||||
{
|
||||
zval **str;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
convert_to_string_ex(str);
|
||||
RETVAL_LONG((*str)->value.str.len);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int strcmp(string str1, string str2)
|
||||
Binary safe string comparison */
|
||||
ZEND_FUNCTION(strcmp)
|
||||
{
|
||||
zval **s1, **s2;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &s1, &s2) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
convert_to_string_ex(s1);
|
||||
convert_to_string_ex(s2);
|
||||
RETURN_LONG(zend_binary_zval_strcmp(*s1,*s2));
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int strncmp(string str1, string str2, int len)
|
||||
Binary safe string comparison */
|
||||
ZEND_FUNCTION(strncmp)
|
||||
{
|
||||
zval **s1, **s2, **s3;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &s1, &s2, &s3) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
convert_to_string_ex(s1);
|
||||
convert_to_string_ex(s2);
|
||||
convert_to_long_ex(s3);
|
||||
RETURN_LONG(zend_binary_zval_strncmp(*s1,*s2,*s3));
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int strcasecmp(string str1, string str2)
|
||||
Binary safe case-insensitive string comparison */
|
||||
ZEND_FUNCTION(strcasecmp)
|
||||
{
|
||||
zval **s1, **s2;
|
||||
|
||||
if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, &s1, &s2) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
convert_to_string_ex(s1);
|
||||
convert_to_string_ex(s2);
|
||||
RETURN_LONG(zend_binary_zval_strcasecmp(*s1, *s2));
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_FUNCTION(each)
|
||||
{
|
||||
zval **array,*entry,**entry_ptr, *tmp;
|
||||
char *string_key;
|
||||
ulong num_key;
|
||||
zval **inserted_pointer;
|
||||
HashTable *target_hash;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
target_hash = HASH_OF(*array);
|
||||
if (!target_hash) {
|
||||
zend_error(E_WARNING,"Variable passed to each() is not an array or object");
|
||||
return;
|
||||
}
|
||||
if (zend_hash_get_current_data(target_hash, (void **) &entry_ptr)==FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
array_init(return_value);
|
||||
entry = *entry_ptr;
|
||||
|
||||
/* add value elements */
|
||||
if (entry->is_ref) {
|
||||
ALLOC_ZVAL(tmp);
|
||||
*tmp = *entry;
|
||||
zval_copy_ctor(tmp);
|
||||
tmp->is_ref=0;
|
||||
tmp->refcount=0;
|
||||
entry=tmp;
|
||||
}
|
||||
zend_hash_index_update(return_value->value.ht, 1, &entry, sizeof(zval *), NULL);
|
||||
entry->refcount++;
|
||||
zend_hash_update(return_value->value.ht, "value", sizeof("value"), &entry, sizeof(zval *), NULL);
|
||||
entry->refcount++;
|
||||
|
||||
/* add the key elements */
|
||||
switch (zend_hash_get_current_key(target_hash, &string_key, &num_key)) {
|
||||
case HASH_KEY_IS_STRING:
|
||||
add_get_index_string(return_value,0,string_key,(void **) &inserted_pointer,0);
|
||||
break;
|
||||
case HASH_KEY_IS_LONG:
|
||||
add_get_index_long(return_value,0,num_key, (void **) &inserted_pointer);
|
||||
break;
|
||||
}
|
||||
zend_hash_update(return_value->value.ht, "key", sizeof("key"), inserted_pointer, sizeof(zval *), NULL);
|
||||
(*inserted_pointer)->refcount++;
|
||||
zend_hash_move_forward(target_hash);
|
||||
}
|
||||
|
||||
ZEND_FUNCTION(error_reporting)
|
||||
{
|
||||
zval **arg;
|
||||
int old_error_reporting;
|
||||
|
||||
old_error_reporting = EG(error_reporting);
|
||||
switch (ZEND_NUM_ARGS()) {
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
if (zend_get_parameters_ex(1,&arg) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
convert_to_long_ex(arg);
|
||||
EG(error_reporting)=(*arg)->value.lval;
|
||||
break;
|
||||
default:
|
||||
WRONG_PARAM_COUNT;
|
||||
break;
|
||||
}
|
||||
|
||||
RETVAL_LONG(old_error_reporting);
|
||||
}
|
||||
|
||||
ZEND_FUNCTION(define)
|
||||
{
|
||||
zval **var, **val, **non_cs;
|
||||
int case_sensitive;
|
||||
zend_constant c;
|
||||
|
||||
switch(ZEND_NUM_ARGS()) {
|
||||
case 2:
|
||||
if (zend_get_parameters_ex(2, &var, &val)==FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
case_sensitive = CONST_CS;
|
||||
break;
|
||||
case 3:
|
||||
if (zend_get_parameters_ex(3, &var, &val, &non_cs)==FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
convert_to_long_ex(non_cs);
|
||||
if ((*non_cs)->value.lval) {
|
||||
case_sensitive = 0;
|
||||
} else {
|
||||
case_sensitive = CONST_CS;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
WRONG_PARAM_COUNT;
|
||||
break;
|
||||
}
|
||||
switch((*val)->type) {
|
||||
case IS_LONG:
|
||||
case IS_DOUBLE:
|
||||
case IS_STRING:
|
||||
case IS_BOOL:
|
||||
case IS_RESOURCE:
|
||||
case IS_NULL:
|
||||
break;
|
||||
default:
|
||||
zend_error(E_WARNING,"Constants may only evaluate to scalar values");
|
||||
RETURN_FALSE;
|
||||
break;
|
||||
}
|
||||
convert_to_string_ex(var);
|
||||
|
||||
c.value = **val;
|
||||
zval_copy_ctor(&c.value);
|
||||
c.flags = case_sensitive; /* non persistent */
|
||||
c.name = zend_strndup((*var)->value.str.val, (*var)->value.str.len);
|
||||
c.name_len = (*var)->value.str.len+1;
|
||||
zend_register_constant(&c ELS_CC);
|
||||
RETURN_TRUE;
|
||||
}
|
||||
|
||||
|
||||
ZEND_FUNCTION(defined)
|
||||
{
|
||||
zval **var;
|
||||
zval c;
|
||||
|
||||
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &var)==FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
convert_to_string_ex(var);
|
||||
if (zend_get_constant((*var)->value.str.val, (*var)->value.str.len, &c)) {
|
||||
zval_dtor(&c);
|
||||
RETURN_LONG(1);
|
||||
} else {
|
||||
RETURN_LONG(0);
|
||||
}
|
||||
}
|
||||
|
||||
/* {{{ proto string get_class(object object)
|
||||
Retrieves the class name */
|
||||
ZEND_FUNCTION(get_class)
|
||||
{
|
||||
zval **arg;
|
||||
|
||||
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &arg)==FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
if ((*arg)->type != IS_OBJECT) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
RETURN_STRINGL((*arg)->value.obj.ce->name, (*arg)->value.obj.ce->name_length, 1);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto string get_parent_class(object object)
|
||||
Retrieves the parent class name */
|
||||
ZEND_FUNCTION(get_parent_class)
|
||||
{
|
||||
zval **arg;
|
||||
|
||||
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &arg)==FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
if (((*arg)->type != IS_OBJECT) || !(*arg)->value.obj.ce->parent) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
RETURN_STRINGL((*arg)->value.obj.ce->parent->name, (*arg)->value.obj.ce->parent->name_length, 1);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto bool is_subclass_of(object object, string class_name)
|
||||
Returns true if the object has this class as one of its parents */
|
||||
ZEND_FUNCTION(is_subclass_of)
|
||||
{
|
||||
zval **obj, **class_name;
|
||||
char *lcname;
|
||||
zend_class_entry *parent_ce = NULL;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &obj, &class_name)==FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
if ((*obj)->type != IS_OBJECT) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
convert_to_string_ex(class_name);
|
||||
lcname = estrndup((*class_name)->value.str.val, (*class_name)->value.str.len);
|
||||
zend_str_tolower(lcname, (*class_name)->value.str.len);
|
||||
|
||||
for (parent_ce = (*obj)->value.obj.ce->parent; parent_ce != NULL; parent_ce = parent_ce->parent) {
|
||||
if (!strcmp(parent_ce->name, lcname)) {
|
||||
efree(lcname);
|
||||
RETURN_TRUE;
|
||||
}
|
||||
}
|
||||
efree(lcname);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto array get_class_vars(string class_name)
|
||||
Returns an array of default properties of the class */
|
||||
ZEND_FUNCTION(get_class_vars)
|
||||
{
|
||||
zval **class_name;
|
||||
char *lcname;
|
||||
zend_class_entry *ce;
|
||||
zval *tmp;
|
||||
CLS_FETCH();
|
||||
|
||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &class_name)==FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
convert_to_string_ex(class_name);
|
||||
lcname = estrndup((*class_name)->value.str.val, (*class_name)->value.str.len);
|
||||
zend_str_tolower(lcname, (*class_name)->value.str.len);
|
||||
|
||||
if (zend_hash_find(CG(class_table), lcname, (*class_name)->value.str.len+1, (void **)&ce)==FAILURE) {
|
||||
efree(lcname);
|
||||
RETURN_FALSE;
|
||||
} else {
|
||||
efree(lcname);
|
||||
array_init(return_value);
|
||||
zend_hash_copy(return_value->value.ht, &ce->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto array get_object_vars(object obj)
|
||||
Returns an array of object properties */
|
||||
ZEND_FUNCTION(get_object_vars)
|
||||
{
|
||||
zval **obj;
|
||||
zval *tmp;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &obj) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
if ((*obj)->type != IS_OBJECT) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
array_init(return_value);
|
||||
zend_hash_copy(return_value->value.ht, (*obj)->value.obj.properties,
|
||||
(copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto array get_class_methods(string class_name)
|
||||
Returns an array of class methods' names */
|
||||
ZEND_FUNCTION(get_class_methods)
|
||||
{
|
||||
zval **class_name;
|
||||
zval *method_name;
|
||||
char *lcname;
|
||||
zend_class_entry *ce;
|
||||
char *string_key;
|
||||
ulong num_key;
|
||||
int key_type;
|
||||
CLS_FETCH();
|
||||
|
||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &class_name)==FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
convert_to_string_ex(class_name);
|
||||
lcname = estrndup((*class_name)->value.str.val, (*class_name)->value.str.len);
|
||||
zend_str_tolower(lcname, (*class_name)->value.str.len);
|
||||
|
||||
if (zend_hash_find(CG(class_table), lcname, (*class_name)->value.str.len+1, (void **)&ce)==FAILURE) {
|
||||
efree(lcname);
|
||||
RETURN_NULL();
|
||||
} else {
|
||||
efree(lcname);
|
||||
array_init(return_value);
|
||||
zend_hash_internal_pointer_reset(&ce->function_table);
|
||||
while ((key_type = zend_hash_get_current_key(&ce->function_table, &string_key, &num_key)) != HASH_KEY_NON_EXISTANT) {
|
||||
if (key_type == HASH_KEY_IS_STRING) {
|
||||
MAKE_STD_ZVAL(method_name);
|
||||
ZVAL_STRING(method_name, string_key, 0);
|
||||
zend_hash_next_index_insert(return_value->value.ht, &method_name, sizeof(zval *), NULL);
|
||||
}
|
||||
zend_hash_move_forward(&ce->function_table);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto bool method_exists(object object, string method)
|
||||
Checks if the class method exists */
|
||||
ZEND_FUNCTION(method_exists)
|
||||
{
|
||||
zval **klass, **method_name;
|
||||
char *lcname;
|
||||
|
||||
if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, &klass, &method_name)==FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
if ((*klass)->type != IS_OBJECT) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
convert_to_string_ex(method_name);
|
||||
lcname = estrndup((*method_name)->value.str.val, (*method_name)->value.str.len);
|
||||
zend_str_tolower(lcname, (*method_name)->value.str.len);
|
||||
if(zend_hash_exists(&(*klass)->value.obj.ce->function_table, lcname, (*method_name)->value.str.len+1)) {
|
||||
efree(lcname);
|
||||
RETURN_TRUE;
|
||||
} else {
|
||||
efree(lcname);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto bool class_exists(string classname)
|
||||
Checks if the class exists */
|
||||
ZEND_FUNCTION(class_exists)
|
||||
{
|
||||
zval **class_name;
|
||||
char *lcname;
|
||||
CLS_FETCH();
|
||||
|
||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &class_name)==FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
convert_to_string_ex(class_name);
|
||||
lcname = estrndup((*class_name)->value.str.val, (*class_name)->value.str.len);
|
||||
zend_str_tolower(lcname, (*class_name)->value.str.len);
|
||||
if (zend_hash_exists(CG(class_table), lcname, (*class_name)->value.str.len+1)) {
|
||||
efree(lcname);
|
||||
RETURN_TRUE;
|
||||
} else {
|
||||
efree(lcname);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto bool function_exists(string function_name)
|
||||
Checks if the function exists */
|
||||
ZEND_FUNCTION(function_exists)
|
||||
{
|
||||
zval **function_name;
|
||||
char *lcname;
|
||||
int retval;
|
||||
|
||||
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &function_name)==FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
convert_to_string_ex(function_name);
|
||||
lcname = estrndup((*function_name)->value.str.val, (*function_name)->value.str.len);
|
||||
zend_str_tolower(lcname, (*function_name)->value.str.len);
|
||||
|
||||
retval = zend_hash_exists(EG(function_table), lcname, (*function_name)->value.str.len+1);
|
||||
efree(lcname);
|
||||
|
||||
RETURN_BOOL(retval);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
ZEND_FUNCTION(leak)
|
||||
{
|
||||
int leakbytes=3;
|
||||
zval **leak;
|
||||
|
||||
if (ZEND_NUM_ARGS()>=1) {
|
||||
if (zend_get_parameters_ex(1, &leak)==SUCCESS) {
|
||||
convert_to_long_ex(leak);
|
||||
leakbytes = (*leak)->value.lval;
|
||||
}
|
||||
}
|
||||
|
||||
emalloc(leakbytes);
|
||||
}
|
||||
|
||||
|
||||
#ifdef ZEND_TEST_EXCEPTIONS
|
||||
ZEND_FUNCTION(crash)
|
||||
{
|
||||
char *nowhere=NULL;
|
||||
|
||||
memcpy(nowhere, "something", sizeof("something"));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
static int copy_import_use_file(zend_file_handle *fh, zval *array)
|
||||
{
|
||||
if (fh->filename) {
|
||||
char *extension_start;
|
||||
|
||||
extension_start = strstr(fh->filename, zend_uv.import_use_extension);
|
||||
if (extension_start) {
|
||||
*extension_start = 0;
|
||||
if (fh->opened_path) {
|
||||
add_assoc_string(array, fh->filename, fh->opened_path, 1);
|
||||
} else {
|
||||
add_assoc_stringl(array, fh->filename, "N/A", sizeof("N/A")-1, 1);
|
||||
}
|
||||
*extension_start = zend_uv.import_use_extension[0];
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
ZEND_FUNCTION(get_used_files)
|
||||
{
|
||||
CLS_FETCH();
|
||||
|
||||
array_init(return_value);
|
||||
zend_hash_apply_with_argument(&CG(used_files), (int (*)(void *, void *)) copy_import_use_file, return_value);
|
||||
}
|
||||
|
||||
|
||||
ZEND_FUNCTION(get_included_files)
|
||||
{
|
||||
array_init(return_value);
|
||||
zend_hash_apply_with_argument(&EG(included_files), (int (*)(void *, void *)) copy_import_use_file, return_value);
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _ZEND_BUILTIN_FUNCTIONS_H
|
||||
#define _ZEND_BUILTIN_FUNCTIONS_H
|
||||
|
||||
int zend_startup_builtin_functions(void);
|
||||
|
||||
#endif /* _ZEND_BUILTIN_FUNCTIONS_H */
|
||||
+579
-188
File diff suppressed because it is too large.
Load diff
+239
-164
@@ -2,37 +2,39 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _COMPILE_H
|
||||
#define _COMPILE_H
|
||||
|
||||
#include "zend.h"
|
||||
|
||||
#if HAVE_STDARG_H
|
||||
#include <stdarg.h>
|
||||
#ifdef HAVE_STDARG_H
|
||||
# include <stdarg.h>
|
||||
#endif
|
||||
|
||||
#include "zend_llist.h"
|
||||
#define YYSTYPE znode
|
||||
#include "zend-parser.h"
|
||||
|
||||
#define DEBUG_ZEND 0
|
||||
|
||||
#ifndef ZTS
|
||||
#define SUPPORT_INTERACTIVE 1
|
||||
# define SUPPORT_INTERACTIVE 1
|
||||
#else
|
||||
#define SUPPORT_INTERACTIVE 0
|
||||
# define SUPPORT_INTERACTIVE 0
|
||||
#endif
|
||||
|
||||
#define FREE_PNODE(znode) zval_dtor(&znode->u.constant);
|
||||
@@ -51,24 +53,25 @@
|
||||
|
||||
typedef struct _zend_op_array zend_op_array;
|
||||
|
||||
typedef struct {
|
||||
typedef struct _znode {
|
||||
int op_type;
|
||||
union {
|
||||
zval constant;
|
||||
|
||||
int var;
|
||||
int opline_num;
|
||||
zend_uint var;
|
||||
int opline_num; /* Needs to be signed */
|
||||
zend_uchar fetch_type;
|
||||
zend_op_array *op_array;
|
||||
struct {
|
||||
int var; /* dummy */
|
||||
int type;
|
||||
zend_uint var; /* dummy */
|
||||
zend_uint type;
|
||||
} EA;
|
||||
} u;
|
||||
} znode;
|
||||
|
||||
|
||||
typedef struct _zend_op {
|
||||
int opcode;
|
||||
zend_uchar opcode;
|
||||
znode result;
|
||||
znode op1;
|
||||
znode op2;
|
||||
@@ -78,7 +81,7 @@ typedef struct _zend_op {
|
||||
} zend_op;
|
||||
|
||||
|
||||
typedef struct {
|
||||
typedef struct _zend_brk_cont_element {
|
||||
int cont;
|
||||
int brk;
|
||||
int parent;
|
||||
@@ -86,23 +89,22 @@ typedef struct {
|
||||
|
||||
|
||||
struct _zend_op_array {
|
||||
int type; /* MUST be the first element of this struct! */
|
||||
zend_uchar type; /* MUST be the first element of this struct! */
|
||||
|
||||
unsigned char *arg_types; /* MUST be the second element of this struct! */
|
||||
zend_uchar *arg_types; /* MUST be the second element of this struct! */
|
||||
char *function_name; /* MUST be the third element of this struct! */
|
||||
|
||||
int *refcount;
|
||||
zend_uint *refcount;
|
||||
|
||||
zend_op *opcodes;
|
||||
int last, size;
|
||||
zend_uint last, size;
|
||||
|
||||
int T;
|
||||
|
||||
char *function_name;
|
||||
zend_uint T;
|
||||
|
||||
zend_brk_cont_element *brk_cont_array;
|
||||
int last_brk_cont;
|
||||
int current_brk_cont;
|
||||
unsigned char initialized_globals;
|
||||
zend_uint last_brk_cont;
|
||||
zend_uint current_brk_cont;
|
||||
zend_bool uses_globals;
|
||||
|
||||
/* static variables support */
|
||||
HashTable *static_variables;
|
||||
@@ -112,26 +114,28 @@ struct _zend_op_array {
|
||||
int last_executed_op_number;
|
||||
int backpatch_count;
|
||||
#endif
|
||||
zend_bool return_reference;
|
||||
|
||||
void *reserved[4];
|
||||
void *reserved[ZEND_MAX_RESERVED_RESOURCES];
|
||||
};
|
||||
|
||||
|
||||
typedef struct {
|
||||
int type; /* MUST be the first element of this struct! */
|
||||
typedef struct _zend_internal_function {
|
||||
zend_uchar type; /* MUST be the first element of this struct! */
|
||||
|
||||
unsigned char *arg_types; /* MUST be the second element of this struct */
|
||||
zend_uchar *arg_types; /* MUST be the second element of this struct */
|
||||
char *function_name; /* MUST be the third element of this struct */
|
||||
|
||||
void (*handler)(INTERNAL_FUNCTION_PARAMETERS);
|
||||
char *function_name;
|
||||
} zend_internal_function;
|
||||
|
||||
|
||||
typedef union {
|
||||
int type; /* MUST be the first element of this struct! */
|
||||
typedef union _zend_function {
|
||||
zend_uchar type; /* MUST be the first element of this struct! */
|
||||
struct {
|
||||
int type; /* never used */
|
||||
unsigned char *arg_types;
|
||||
zend_uchar type; /* never used */
|
||||
zend_uchar *arg_types;
|
||||
char *function_name;
|
||||
} common;
|
||||
|
||||
zend_op_array op_array;
|
||||
@@ -142,18 +146,18 @@ typedef union {
|
||||
typedef struct _zend_function_state {
|
||||
HashTable *function_symbol_table;
|
||||
zend_function *function;
|
||||
void *reserved[4];
|
||||
void *reserved[ZEND_MAX_RESERVED_RESOURCES];
|
||||
} zend_function_state;
|
||||
|
||||
|
||||
typedef struct {
|
||||
typedef struct _zend_switch_entry {
|
||||
znode cond;
|
||||
int default_case;
|
||||
int control_var;
|
||||
} zend_switch_entry;
|
||||
|
||||
|
||||
typedef struct {
|
||||
typedef struct _list_llist_element {
|
||||
znode var;
|
||||
zend_llist dimensions;
|
||||
znode value;
|
||||
@@ -161,8 +165,9 @@ typedef struct {
|
||||
|
||||
|
||||
typedef struct _zend_file_handle {
|
||||
int type;
|
||||
zend_uchar type;
|
||||
char *filename;
|
||||
char *opened_path;
|
||||
union {
|
||||
int fd;
|
||||
FILE *fp;
|
||||
@@ -170,6 +175,7 @@ typedef struct _zend_file_handle {
|
||||
istream *is;
|
||||
#endif
|
||||
} handle;
|
||||
zend_bool free_filename;
|
||||
} zend_file_handle;
|
||||
|
||||
|
||||
@@ -183,26 +189,32 @@ typedef struct _zend_file_handle {
|
||||
|
||||
#define EXT_TYPE_UNUSED (1<<0)
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
|
||||
void init_compiler(CLS_D ELS_DC);
|
||||
void shutdown_compiler(CLS_D);
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
extern ZEND_API zend_op_array *(*zend_compile_files)(int mark_as_ref CLS_DC, int file_count, ...);
|
||||
|
||||
void zend_activate(CLS_D ELS_DC);
|
||||
void zend_deactivate(CLS_D ELS_DC);
|
||||
void zend_activate_modules(void);
|
||||
|
||||
|
||||
int lex_scan(zval *zendlval CLS_DC);
|
||||
void startup_scanner(CLS_D);
|
||||
void shutdown_scanner(CLS_D);
|
||||
|
||||
ZEND_API void zend_set_compiled_filename(char *new_compiled_filename);
|
||||
ZEND_API char *zend_set_compiled_filename(char *new_compiled_filename);
|
||||
ZEND_API void zend_restore_compiled_filename(char *original_compiled_filename);
|
||||
ZEND_API char *zend_get_compiled_filename();
|
||||
ZEND_API char *zend_get_compiled_filename(CLS_D);
|
||||
ZEND_API int zend_get_compiled_lineno(CLS_D);
|
||||
|
||||
#ifdef ZTS
|
||||
const char *zend_get_zendtext(CLS_D);
|
||||
int zend_get_zendleng(CLS_D);
|
||||
#endif
|
||||
|
||||
END_EXTERN_C()
|
||||
|
||||
/* parser-driven code generators */
|
||||
void do_binary_op(int op, znode *result, znode *op1, znode *op2 CLS_DC);
|
||||
@@ -211,21 +223,24 @@ void do_binary_assign_op(int op, znode *result, znode *op1, znode *op2 CLS_DC);
|
||||
void do_assign(znode *result, znode *variable, znode *value CLS_DC);
|
||||
void do_assign_ref(znode *result, znode *lvar, znode *rvar CLS_DC);
|
||||
void fetch_simple_variable(znode *result, znode *varname, int bp CLS_DC);
|
||||
void fetch_simple_variable_ex(znode *result, znode *varname, int bp, int op CLS_DC);
|
||||
void do_indirect_references(znode *result, znode *num_references, znode *variable CLS_DC);
|
||||
void do_fetch_global_or_static_variable(znode *varname, znode *static_assignment, int fetch_type CLS_DC);
|
||||
void do_fetch_globals(znode *varname CLS_DC);
|
||||
|
||||
void fetch_array_begin(znode *result, znode *varname, znode *first_dim CLS_DC);
|
||||
void fetch_array_dim(znode *result, znode *parent, znode *dim CLS_DC);
|
||||
void fetch_string_offset(znode *result, znode *parent, znode *offset CLS_DC);
|
||||
void do_print(znode *result, znode *arg CLS_DC);
|
||||
void do_echo(znode *arg CLS_DC);
|
||||
ZEND_API void *get_unary_op(int opcode);
|
||||
typedef int (*unary_op_type)(zval *, zval *);
|
||||
ZEND_API unary_op_type get_unary_op(int opcode);
|
||||
ZEND_API void *get_binary_op(int opcode);
|
||||
|
||||
void do_while_cond(znode *expr, znode *close_bracket_token CLS_DC);
|
||||
void do_while_end(znode *while_token, znode *close_bracket_token CLS_DC);
|
||||
void do_do_while_begin(CLS_D);
|
||||
void do_do_while_end(znode *do_token, znode *expr CLS_DC);
|
||||
void do_do_while_end(znode *do_token, znode *expr_open_bracket, znode *expr CLS_DC);
|
||||
|
||||
|
||||
void do_if_cond(znode *cond, znode *closing_bracket_token CLS_DC);
|
||||
@@ -240,7 +255,7 @@ void do_pre_incdec(znode *result, znode *op1, int op CLS_DC);
|
||||
void do_post_incdec(znode *result, znode *op1, int op CLS_DC);
|
||||
|
||||
void do_begin_variable_parse(CLS_D);
|
||||
void do_end_variable_parse(int type CLS_DC);
|
||||
void do_end_variable_parse(int type, int arg_offset CLS_DC);
|
||||
|
||||
void do_free(znode *op1 CLS_DC);
|
||||
|
||||
@@ -249,15 +264,15 @@ void do_add_char(znode *result, znode *op1, znode *op2 CLS_DC);
|
||||
void do_add_string(znode *result, znode *op1, znode *op2 CLS_DC);
|
||||
void do_add_variable(znode *result, znode *op1, znode *op2 CLS_DC);
|
||||
|
||||
void do_begin_function_declaration(znode *function_token, znode *function_name, int is_method CLS_DC);
|
||||
void do_begin_function_declaration(znode *function_token, znode *function_name, int is_method, int return_reference CLS_DC);
|
||||
void do_end_function_declaration(znode *function_token CLS_DC);
|
||||
void do_receive_arg(int op, znode *var, znode *offset, znode *initialization, unsigned char pass_type CLS_DC);
|
||||
void do_begin_function_call(znode *function_name CLS_DC);
|
||||
int do_begin_function_call(znode *function_name CLS_DC);
|
||||
void do_begin_dynamic_function_call(znode *function_name CLS_DC);
|
||||
void do_begin_class_member_function_call(znode *class_name, znode *function_name CLS_DC);
|
||||
void do_end_function_call(znode *function_name, znode *result, znode *argument_list, int is_method CLS_DC);
|
||||
void do_return(znode *expr CLS_DC);
|
||||
ZEND_API void do_bind_function_or_class(zend_op *opline, HashTable *function_table, HashTable *class_table);
|
||||
void do_end_function_call(znode *function_name, znode *result, znode *argument_list, int is_method, int is_dynamic_fcall CLS_DC);
|
||||
void do_return(znode *expr, int do_end_vparse CLS_DC);
|
||||
ZEND_API int do_bind_function_or_class(zend_op *opline, HashTable *function_table, HashTable *class_table, int compile_time);
|
||||
void do_early_binding(CLS_D);
|
||||
|
||||
void do_pass_param(znode *param, int op, int offset CLS_DC);
|
||||
@@ -287,17 +302,17 @@ void do_push_object(znode *object CLS_DC);
|
||||
void do_pop_object(znode *object CLS_DC);
|
||||
|
||||
|
||||
void do_begin_new_object(znode *result, znode *variable, znode *new_token, znode *class_name CLS_DC);
|
||||
void do_end_new_object(znode *class_name, znode *new_token, znode *argument_list CLS_DC);
|
||||
void do_begin_new_object(znode *new_token, znode *class_name CLS_DC);
|
||||
void do_end_new_object(znode *result, znode *class_name, znode *new_token, znode *argument_list CLS_DC);
|
||||
|
||||
void do_fetch_constant(znode *result, znode *constant_name, int mode CLS_DC);
|
||||
|
||||
void do_shell_exec(znode *result, znode *cmd CLS_DC);
|
||||
|
||||
void do_init_array(znode *result, znode *expr, znode *offset CLS_DC);
|
||||
void do_add_array_element(znode *result, znode *expr, znode *offset CLS_DC);
|
||||
void do_add_static_array_element(znode *result, znode *expr, znode *offset);
|
||||
void do_list_init();
|
||||
void do_init_array(znode *result, znode *expr, znode *offset, int is_ref CLS_DC);
|
||||
void do_add_array_element(znode *result, znode *expr, znode *offset, int is_ref CLS_DC);
|
||||
void do_add_static_array_element(znode *result, znode *offset, znode *expr);
|
||||
void do_list_init(CLS_D);
|
||||
void do_list_end(znode *result, znode *expr CLS_DC);
|
||||
void do_add_list_element(znode *element CLS_DC);
|
||||
void do_new_list_begin(CLS_D);
|
||||
@@ -305,6 +320,7 @@ void do_new_list_end(CLS_D);
|
||||
|
||||
void do_cast(znode *result, znode *expr, int type CLS_DC);
|
||||
void do_include_or_eval(int type, znode *result, znode *op1 CLS_DC);
|
||||
void do_require(znode *filename, zend_bool unique CLS_DC);
|
||||
|
||||
void do_unset(znode *variable CLS_DC);
|
||||
void do_isset_or_isempty(int type, znode *result, znode *variable CLS_DC);
|
||||
@@ -313,6 +329,10 @@ void do_foreach_begin(znode *foreach_token, znode *array, znode *open_brackets_t
|
||||
void do_foreach_cont(znode *value, znode *key, znode *as_token CLS_DC);
|
||||
void do_foreach_end(znode *foreach_token, znode *open_brackets_token CLS_DC);
|
||||
|
||||
void do_declare_begin(CLS_D);
|
||||
void do_declare_stmt(znode *var, znode *val CLS_DC);
|
||||
void do_declare_end(CLS_D);
|
||||
|
||||
void do_end_heredoc(CLS_D);
|
||||
|
||||
void do_exit(znode *result, znode *message CLS_DC);
|
||||
@@ -328,41 +348,44 @@ void do_extended_info(CLS_D);
|
||||
void do_extended_fcall_begin(CLS_D);
|
||||
void do_extended_fcall_end(CLS_D);
|
||||
|
||||
void do_ticks(CLS_D);
|
||||
|
||||
#define INITIAL_OP_ARRAY_SIZE 64
|
||||
|
||||
|
||||
/* helper functions in zend-scanner.l */
|
||||
BEGIN_EXTERN_C()
|
||||
ZEND_API int require_file(zend_file_handle *file_handle CLS_DC);
|
||||
ZEND_API int require_filename(char *filename CLS_DC);
|
||||
ZEND_API int require_file(zend_file_handle *file_handle, zend_bool unique CLS_DC);
|
||||
ZEND_API int require_filename(char *filename, zend_bool unique CLS_DC);
|
||||
ZEND_API int use_filename(char *filename, uint filename_length CLS_DC);
|
||||
ZEND_API zend_op_array *compile_files(int mark_as_ref CLS_DC, int file_count, ...);
|
||||
ZEND_API zend_op_array *v_compile_files(int mark_as_ref CLS_DC, int file_count, va_list files);
|
||||
ZEND_API zend_op_array *compile_string(zval *source_string CLS_DC);
|
||||
ZEND_API zend_op_array *compile_filename(zval *filename CLS_DC);
|
||||
ZEND_API inline int open_file_for_scanning(zend_file_handle *file_handle CLS_DC);
|
||||
ZEND_API zend_op_array *compile_filename(int mode, zval *filename CLS_DC ELS_DC);
|
||||
ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC);
|
||||
ZEND_API void init_op_array(zend_op_array *op_array, int initial_ops_size);
|
||||
ZEND_API void destroy_op_array(zend_op_array *op_array);
|
||||
ZEND_API void zend_close_file_handle(zend_file_handle *file_handle);
|
||||
END_EXTERN_C()
|
||||
ZEND_API void zend_close_file_handle(zend_file_handle *file_handle CLS_DC);
|
||||
ZEND_API void zend_open_file_dtor(zend_file_handle *fh);
|
||||
|
||||
ZEND_API void destroy_zend_function(zend_function *function);
|
||||
ZEND_API void destroy_zend_class(zend_class_entry *ce);
|
||||
void zend_class_add_ref(zend_class_entry *ce);
|
||||
|
||||
#define ZEND_FUNCTION_DTOR (void (*)(void *)) destroy_zend_function
|
||||
#define ZEND_CLASS_DTOR (void (*)(void *)) destroy_zend_class
|
||||
|
||||
zend_op *get_next_op(zend_op_array *op_array CLS_DC);
|
||||
void init_op(zend_op *op CLS_DC);
|
||||
int get_next_op_number(zend_op_array *op_array);
|
||||
int print_class(zend_class_entry *class_entry);
|
||||
void print_op_array(zend_op_array *op_array, int optimizations);
|
||||
BEGIN_EXTERN_C()
|
||||
int pass_two(zend_op_array *op_array);
|
||||
void pass_include_eval(zend_op_array *op_array);
|
||||
END_EXTERN_C()
|
||||
zend_brk_cont_element *get_next_brk_cont_element(zend_op_array *op_array);
|
||||
|
||||
ZEND_API zend_bool zend_is_compiling(void);
|
||||
|
||||
int zendlex(znode *zendlval CLS_DC);
|
||||
|
||||
|
||||
#define ZEND_NOP 0
|
||||
|
||||
#define ZEND_ADD 1
|
||||
@@ -379,113 +402,121 @@ int zendlex(znode *zendlval CLS_DC);
|
||||
#define ZEND_BW_NOT 12
|
||||
#define ZEND_BOOL_NOT 13
|
||||
#define ZEND_BOOL_XOR 14
|
||||
#define ZEND_IS_EQUAL 15
|
||||
#define ZEND_IS_NOT_EQUAL 16
|
||||
#define ZEND_IS_SMALLER 17
|
||||
#define ZEND_IS_SMALLER_OR_EQUAL 18
|
||||
#define ZEND_CAST 19
|
||||
#define ZEND_QM_ASSIGN 20
|
||||
#define ZEND_IS_IDENTICAL 15
|
||||
#define ZEND_IS_EQUAL 16
|
||||
#define ZEND_IS_NOT_EQUAL 17
|
||||
#define ZEND_IS_SMALLER 18
|
||||
#define ZEND_IS_SMALLER_OR_EQUAL 19
|
||||
#define ZEND_CAST 20
|
||||
#define ZEND_QM_ASSIGN 21
|
||||
|
||||
#define ZEND_ASSIGN_ADD 21
|
||||
#define ZEND_ASSIGN_SUB 22
|
||||
#define ZEND_ASSIGN_MUL 23
|
||||
#define ZEND_ASSIGN_DIV 24
|
||||
#define ZEND_ASSIGN_MOD 25
|
||||
#define ZEND_ASSIGN_SL 26
|
||||
#define ZEND_ASSIGN_SR 27
|
||||
#define ZEND_ASSIGN_CONCAT 28
|
||||
#define ZEND_ASSIGN_BW_OR 29
|
||||
#define ZEND_ASSIGN_BW_AND 30
|
||||
#define ZEND_ASSIGN_BW_XOR 31
|
||||
#define ZEND_ASSIGN_ADD 22
|
||||
#define ZEND_ASSIGN_SUB 23
|
||||
#define ZEND_ASSIGN_MUL 24
|
||||
#define ZEND_ASSIGN_DIV 25
|
||||
#define ZEND_ASSIGN_MOD 26
|
||||
#define ZEND_ASSIGN_SL 27
|
||||
#define ZEND_ASSIGN_SR 28
|
||||
#define ZEND_ASSIGN_CONCAT 29
|
||||
#define ZEND_ASSIGN_BW_OR 30
|
||||
#define ZEND_ASSIGN_BW_AND 31
|
||||
#define ZEND_ASSIGN_BW_XOR 32
|
||||
|
||||
#define ZEND_PRE_INC 32
|
||||
#define ZEND_PRE_DEC 33
|
||||
#define ZEND_POST_INC 34
|
||||
#define ZEND_POST_DEC 35
|
||||
#define ZEND_PRE_INC 33
|
||||
#define ZEND_PRE_DEC 34
|
||||
#define ZEND_POST_INC 35
|
||||
#define ZEND_POST_DEC 36
|
||||
|
||||
#define ZEND_ASSIGN 36
|
||||
#define ZEND_ASSIGN_REF 37
|
||||
#define ZEND_ASSIGN 37
|
||||
#define ZEND_ASSIGN_REF 38
|
||||
|
||||
#define ZEND_ECHO 38
|
||||
#define ZEND_PRINT 39
|
||||
#define ZEND_ECHO 39
|
||||
#define ZEND_PRINT 40
|
||||
|
||||
#define ZEND_JMP 40
|
||||
#define ZEND_JMPZ 41
|
||||
#define ZEND_JMPNZ 42
|
||||
#define ZEND_JMPZNZ 43
|
||||
#define ZEND_JMPZ_EX 44
|
||||
#define ZEND_JMPNZ_EX 45
|
||||
#define ZEND_CASE 46
|
||||
#define ZEND_BRK 47
|
||||
#define ZEND_CONT 48
|
||||
#define ZEND_BOOL 49
|
||||
#define ZEND_JMP 41
|
||||
#define ZEND_JMPZ 42
|
||||
#define ZEND_JMPNZ 43
|
||||
#define ZEND_JMPZNZ 44
|
||||
#define ZEND_JMPZ_EX 45
|
||||
#define ZEND_JMPNZ_EX 46
|
||||
#define ZEND_CASE 47
|
||||
#define ZEND_SWITCH_FREE 48
|
||||
#define ZEND_BRK 49
|
||||
#define ZEND_CONT 50
|
||||
#define ZEND_BOOL 51
|
||||
|
||||
#define ZEND_INIT_STRING 50
|
||||
#define ZEND_ADD_CHAR 51
|
||||
#define ZEND_ADD_STRING 52
|
||||
#define ZEND_ADD_VAR 53
|
||||
#define ZEND_INIT_STRING 52
|
||||
#define ZEND_ADD_CHAR 53
|
||||
#define ZEND_ADD_STRING 54
|
||||
#define ZEND_ADD_VAR 55
|
||||
|
||||
#define ZEND_BEGIN_SILENCE 54
|
||||
#define ZEND_END_SILENCE 55
|
||||
#define ZEND_BEGIN_SILENCE 56
|
||||
#define ZEND_END_SILENCE 57
|
||||
|
||||
#define ZEND_INIT_FCALL 56
|
||||
#define ZEND_INIT_FCALL_BY_NAME 57
|
||||
#define ZEND_DO_FCALL 58
|
||||
#define ZEND_RETURN 59
|
||||
#define ZEND_INIT_FCALL_BY_NAME 58
|
||||
#define ZEND_DO_FCALL 59
|
||||
#define ZEND_DO_FCALL_BY_NAME 60
|
||||
#define ZEND_RETURN 61
|
||||
|
||||
#define ZEND_RECV 60
|
||||
#define ZEND_RECV_INIT 61
|
||||
#define ZEND_RECV 62
|
||||
#define ZEND_RECV_INIT 63
|
||||
|
||||
#define ZEND_SEND_VAL 62
|
||||
#define ZEND_SEND_VAR 63
|
||||
#define ZEND_SEND_REF 64
|
||||
#define ZEND_SEND_VAL 64
|
||||
#define ZEND_SEND_VAR 65
|
||||
#define ZEND_SEND_REF 66
|
||||
|
||||
#define ZEND_NEW 65
|
||||
#define ZEND_JMP_NO_CTOR 66
|
||||
#define ZEND_FREE 67
|
||||
#define ZEND_NEW 67
|
||||
#define ZEND_JMP_NO_CTOR 68
|
||||
#define ZEND_FREE 69
|
||||
|
||||
#define ZEND_INIT_ARRAY 68
|
||||
#define ZEND_ADD_ARRAY_ELEMENT 69
|
||||
#define ZEND_INIT_ARRAY 70
|
||||
#define ZEND_ADD_ARRAY_ELEMENT 71
|
||||
|
||||
#define ZEND_INCLUDE_OR_EVAL 70
|
||||
#define ZEND_INCLUDE_OR_EVAL 72
|
||||
|
||||
#define ZEND_UNSET_VAR 71
|
||||
#define ZEND_UNSET_DIM_OBJ 72
|
||||
#define ZEND_ISSET_ISEMPTY 73
|
||||
#define ZEND_UNSET_VAR 73
|
||||
#define ZEND_UNSET_DIM_OBJ 74
|
||||
#define ZEND_ISSET_ISEMPTY 75
|
||||
|
||||
#define ZEND_FE_RESET 74
|
||||
#define ZEND_FE_FETCH 75
|
||||
#define ZEND_FE_RESET 76
|
||||
#define ZEND_FE_FETCH 77
|
||||
|
||||
#define ZEND_EXIT 76
|
||||
#define ZEND_EXIT 78
|
||||
|
||||
|
||||
/* the following 12 opcodes are 4 groups of 3 opcodes each, and must
|
||||
/* the following 18 opcodes are 6 groups of 3 opcodes each, and must
|
||||
* remain in that order!
|
||||
*/
|
||||
#define ZEND_FETCH_R 77
|
||||
#define ZEND_FETCH_DIM_R 78
|
||||
#define ZEND_FETCH_OBJ_R 79
|
||||
#define ZEND_FETCH_W 80
|
||||
#define ZEND_FETCH_DIM_W 81
|
||||
#define ZEND_FETCH_OBJ_W 82
|
||||
#define ZEND_FETCH_RW 83
|
||||
#define ZEND_FETCH_DIM_RW 84
|
||||
#define ZEND_FETCH_OBJ_RW 85
|
||||
#define ZEND_FETCH_IS 86
|
||||
#define ZEND_FETCH_DIM_IS 87
|
||||
#define ZEND_FETCH_OBJ_IS 88
|
||||
#define ZEND_FETCH_R 79
|
||||
#define ZEND_FETCH_DIM_R 80
|
||||
#define ZEND_FETCH_OBJ_R 81
|
||||
#define ZEND_FETCH_W 82
|
||||
#define ZEND_FETCH_DIM_W 83
|
||||
#define ZEND_FETCH_OBJ_W 84
|
||||
#define ZEND_FETCH_RW 85
|
||||
#define ZEND_FETCH_DIM_RW 86
|
||||
#define ZEND_FETCH_OBJ_RW 87
|
||||
#define ZEND_FETCH_IS 88
|
||||
#define ZEND_FETCH_DIM_IS 89
|
||||
#define ZEND_FETCH_OBJ_IS 90
|
||||
#define ZEND_FETCH_FUNC_ARG 91
|
||||
#define ZEND_FETCH_DIM_FUNC_ARG 92
|
||||
#define ZEND_FETCH_OBJ_FUNC_ARG 93
|
||||
#define ZEND_FETCH_UNSET 94
|
||||
#define ZEND_FETCH_DIM_UNSET 95
|
||||
#define ZEND_FETCH_OBJ_UNSET 96
|
||||
|
||||
#define ZEND_FETCH_DIM_TMP_VAR 89
|
||||
#define ZEND_FETCH_CONSTANT 90
|
||||
#define ZEND_FETCH_DIM_TMP_VAR 97
|
||||
#define ZEND_FETCH_CONSTANT 98
|
||||
|
||||
#define ZEND_DECLARE_FUNCTION_OR_CLASS 91
|
||||
#define ZEND_DECLARE_FUNCTION_OR_CLASS 99
|
||||
|
||||
#define ZEND_INIT_GLOBALS 92
|
||||
#define ZEND_EXT_STMT 100
|
||||
#define ZEND_EXT_FCALL_BEGIN 101
|
||||
#define ZEND_EXT_FCALL_END 102
|
||||
#define ZEND_EXT_NOP 103
|
||||
|
||||
#define ZEND_EXT_STMT 93
|
||||
#define ZEND_EXT_FCALL_BEGIN 94
|
||||
#define ZEND_EXT_FCALL_END 95
|
||||
#define ZEND_EXT_NOP 96
|
||||
#define ZEND_TICKS 104
|
||||
|
||||
/* end of block */
|
||||
|
||||
@@ -498,11 +529,13 @@ int zendlex(znode *zendlval CLS_DC);
|
||||
#define ZEND_FETCH_STATIC 2
|
||||
|
||||
/* var status for backpatching */
|
||||
#define BP_VAR_R 0
|
||||
#define BP_VAR_W 1
|
||||
#define BP_VAR_RW 2
|
||||
#define BP_VAR_IS 3
|
||||
#define BP_VAR_NA 4 /* if not applicable */
|
||||
#define BP_VAR_R 0
|
||||
#define BP_VAR_W 1
|
||||
#define BP_VAR_RW 2
|
||||
#define BP_VAR_IS 3
|
||||
#define BP_VAR_NA 4 /* if not applicable */
|
||||
#define BP_VAR_FUNC_ARG 5
|
||||
#define BP_VAR_UNSET 6
|
||||
|
||||
|
||||
#define ZEND_INTERNAL_FUNCTION 1
|
||||
@@ -515,6 +548,8 @@ int zendlex(znode *zendlval CLS_DC);
|
||||
|
||||
#define ZEND_EVAL (1<<0)
|
||||
#define ZEND_INCLUDE (1<<1)
|
||||
#define ZEND_INCLUDE_ONCE (1<<2)
|
||||
#define ZEND_REQUIRE (1<<3)
|
||||
|
||||
#define ZEND_ISSET (1<<0)
|
||||
#define ZEND_ISEMPTY (1<<1)
|
||||
@@ -523,12 +558,52 @@ int zendlex(znode *zendlval CLS_DC);
|
||||
#define ZEND_RT (1<<1)
|
||||
|
||||
|
||||
#define ZEND_HANDLE_FILENAME 0
|
||||
#define ZEND_HANDLE_FD 1
|
||||
#define ZEND_HANDLE_FP 2
|
||||
#define ZEND_HANDLE_ISTREAM 3
|
||||
#define ZEND_HANDLE_FILENAME 0
|
||||
#define ZEND_HANDLE_FD 1
|
||||
#define ZEND_HANDLE_FP 2
|
||||
#define ZEND_HANDLE_STDIOSTREAM 3
|
||||
#define ZEND_HANDLE_FSTREAM 4
|
||||
|
||||
#define ZEND_DECLARE_CLASS 1
|
||||
#define ZEND_DECLARE_FUNCTION 2
|
||||
#define ZEND_DECLARE_CLASS 1
|
||||
#define ZEND_DECLARE_FUNCTION 2
|
||||
#define ZEND_DECLARE_INHERITED_CLASS 3
|
||||
|
||||
#define ZEND_FETCH_STANDARD 0
|
||||
#define ZEND_FETCH_ADD_LOCK 1
|
||||
|
||||
#define ZEND_MEMBER_FUNC_CALL 1<<0
|
||||
#define ZEND_CTOR_CALL 1<<1
|
||||
|
||||
|
||||
#define AI_USE_PTR(ai) \
|
||||
if ((ai).ptr_ptr) { \
|
||||
(ai).ptr = *((ai).ptr_ptr); \
|
||||
(ai).ptr_ptr = &((ai).ptr); \
|
||||
} else { \
|
||||
(ai).ptr = NULL; \
|
||||
}
|
||||
|
||||
/* Lost In Stupid Parentheses */
|
||||
#define ARG_SHOULD_BE_SENT_BY_REF(offset, conduct_check, arg_types) \
|
||||
( \
|
||||
conduct_check \
|
||||
&& arg_types \
|
||||
&& \
|
||||
( \
|
||||
( \
|
||||
offset<=arg_types[0] \
|
||||
&& arg_types[offset]==BYREF_FORCE \
|
||||
) \
|
||||
|| ( \
|
||||
offset>=arg_types[0] \
|
||||
&& arg_types[arg_types[0]]==BYREF_FORCE_REST \
|
||||
) \
|
||||
) \
|
||||
)
|
||||
|
||||
#define ZEND_RETURN_VAL 0
|
||||
#define ZEND_RETURN_REF 1
|
||||
|
||||
END_EXTERN_C()
|
||||
|
||||
#endif /* _COMPILE_H */
|
||||
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _ZEND_CONFIG_W32_H
|
||||
#define _ZEND_CONFIG_W32_H
|
||||
|
||||
|
||||
#include <string.h>
|
||||
#include <windows.h>
|
||||
#include <float.h>
|
||||
|
||||
typedef unsigned long ulong;
|
||||
typedef unsigned int uint;
|
||||
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#include <malloc.h>
|
||||
|
||||
#undef HAVE_KILL
|
||||
#define HAVE_GETPID 1
|
||||
/* #define HAVE_ALLOCA_H 1 */
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_STDIOSTR_H 1
|
||||
#define HAVE_CLASS_ISTDIOSTREAM
|
||||
#define istdiostream stdiostream
|
||||
|
||||
#ifdef inline
|
||||
#undef inline
|
||||
#endif
|
||||
|
||||
#define zend_sprintf sprintf
|
||||
|
||||
/* This will cause the compilation process to be MUCH longer, but will generate
|
||||
* a much quicker PHP binary
|
||||
*/
|
||||
#ifdef ZEND_WIN32_FORCE_INLINE
|
||||
# define inline __forceinline
|
||||
#else
|
||||
# define inline
|
||||
#endif
|
||||
|
||||
#define finite(A) _finite(A)
|
||||
|
||||
#ifdef LIBZEND_EXPORTS
|
||||
# define ZEND_API __declspec(dllexport)
|
||||
#else
|
||||
# define ZEND_API __declspec(dllimport)
|
||||
#endif
|
||||
|
||||
#endif /* _ZEND_CONFIG_W32_H */
|
||||
+48
-35
@@ -2,12 +2,15 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
@@ -31,6 +34,23 @@ void free_zend_constant(zend_constant *c)
|
||||
}
|
||||
|
||||
|
||||
void copy_zend_constant(zend_constant *c)
|
||||
{
|
||||
c->name = zend_strndup(c->name, c->name_len);
|
||||
if (!(c->flags & CONST_PERSISTENT)) {
|
||||
zval_copy_ctor(&c->value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void zend_copy_constants(HashTable *target, HashTable *source)
|
||||
{
|
||||
zend_constant tmp_constant;
|
||||
|
||||
zend_hash_copy(target, source, (copy_ctor_func_t) copy_zend_constant, &tmp_constant, sizeof(zend_constant));
|
||||
}
|
||||
|
||||
|
||||
static int clean_non_persistent_constant(zend_constant *c)
|
||||
{
|
||||
if (c->flags & CONST_PERSISTENT) {
|
||||
@@ -61,44 +81,34 @@ void clean_module_constants(int module_number)
|
||||
|
||||
int zend_startup_constants(ELS_D)
|
||||
{
|
||||
#if WIN32|WINNT
|
||||
#ifdef ZEND_WIN32
|
||||
DWORD dwBuild=0;
|
||||
DWORD dwVersion = GetVersion();
|
||||
DWORD dwWindowsMajorVersion = (DWORD)(LOBYTE(LOWORD(dwVersion)));
|
||||
DWORD dwWindowsMinorVersion = (DWORD)(HIBYTE(LOWORD(dwVersion)));
|
||||
#endif
|
||||
|
||||
|
||||
/* ZEND_FIX: Move to PHP */
|
||||
#if 0
|
||||
#if WIN32|WINNT
|
||||
// Get build numbers for Windows NT or Win95
|
||||
if (dwVersion < 0x80000000){
|
||||
php3_os="WINNT";
|
||||
} else {
|
||||
php3_os="WIN32";
|
||||
}
|
||||
#else
|
||||
php3_os=PHP_OS;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
EG(zend_constants) = (HashTable *) malloc(sizeof(HashTable));
|
||||
|
||||
if (zend_hash_init(EG(zend_constants), 20, NULL, (void(*)(void *)) free_zend_constant, 1)==FAILURE) {
|
||||
if (zend_hash_init(EG(zend_constants), 20, NULL, ZEND_CONSTANT_DTOR, 1)==FAILURE) {
|
||||
return FAILURE;
|
||||
}
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* This should go back to PHP */
|
||||
REGISTER_MAIN_STRINGL_CONSTANT("PHP_VERSION", PHP_VERSION, sizeof(PHP_VERSION)-1, CONST_PERSISTENT | CONST_CS);
|
||||
REGISTER_MAIN_STRINGL_CONSTANT("PHP_OS", php3_os, strlen(php3_os), CONST_PERSISTENT | CONST_CS);
|
||||
#endif
|
||||
|
||||
|
||||
void zend_register_standard_constants(ELS_D)
|
||||
{
|
||||
REGISTER_MAIN_LONG_CONSTANT("E_ERROR", E_ERROR, CONST_PERSISTENT | CONST_CS);
|
||||
REGISTER_MAIN_LONG_CONSTANT("E_WARNING", E_WARNING, CONST_PERSISTENT | CONST_CS);
|
||||
REGISTER_MAIN_LONG_CONSTANT("E_NOTICE", E_NOTICE, CONST_PERSISTENT | CONST_CS);
|
||||
REGISTER_MAIN_LONG_CONSTANT("E_PARSE", E_PARSE, CONST_PERSISTENT | CONST_CS);
|
||||
REGISTER_MAIN_LONG_CONSTANT("E_NOTICE", E_NOTICE, CONST_PERSISTENT | CONST_CS);
|
||||
REGISTER_MAIN_LONG_CONSTANT("E_CORE_ERROR", E_CORE_ERROR, CONST_PERSISTENT | CONST_CS);
|
||||
REGISTER_MAIN_LONG_CONSTANT("E_CORE_WARNING", E_CORE_WARNING, CONST_PERSISTENT | CONST_CS);
|
||||
REGISTER_MAIN_LONG_CONSTANT("E_COMPILE_ERROR", E_COMPILE_ERROR, CONST_PERSISTENT | CONST_CS);
|
||||
REGISTER_MAIN_LONG_CONSTANT("E_COMPILE_WARNING", E_COMPILE_WARNING, CONST_PERSISTENT | CONST_CS);
|
||||
|
||||
REGISTER_MAIN_LONG_CONSTANT("E_ALL", E_ALL, CONST_PERSISTENT | CONST_CS);
|
||||
|
||||
/* true/false constants */
|
||||
@@ -109,20 +119,23 @@ int zend_startup_constants(ELS_D)
|
||||
c.flags = CONST_PERSISTENT;
|
||||
c.module_number = 0;
|
||||
|
||||
c.name = zend_strndup("TRUE",4);
|
||||
c.name_len = 5;
|
||||
c.name = zend_strndup(ZEND_STRL("TRUE"));
|
||||
c.name_len = sizeof("TRUE");
|
||||
c.value.value.lval = 1;
|
||||
c.value.type = IS_BOOL;
|
||||
zend_register_constant(&c ELS_CC);
|
||||
|
||||
c.name = zend_strndup("FALSE",5);
|
||||
c.name_len = 6;
|
||||
c.name = zend_strndup(ZEND_STRL("FALSE"));
|
||||
c.name_len = sizeof("FALSE");
|
||||
c.value.value.lval = 0;
|
||||
c.value.type = IS_BOOL;
|
||||
zend_register_constant(&c ELS_CC);
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
c.name = zend_strndup(ZEND_STRL("NULL"));
|
||||
c.name_len = sizeof("NULL");
|
||||
c.value.type = IS_NULL;
|
||||
zend_register_constant(&c ELS_CC);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+15
-6
@@ -2,18 +2,22 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _CONSTANTS_H
|
||||
#define _CONSTANTS_H
|
||||
|
||||
@@ -22,7 +26,7 @@
|
||||
#define CONST_CS 0x1 /* Case Sensitive */
|
||||
#define CONST_PERSISTENT 0x2
|
||||
|
||||
typedef struct {
|
||||
typedef struct _zend_constant {
|
||||
zval value;
|
||||
int flags;
|
||||
char *name;
|
||||
@@ -44,6 +48,7 @@ void clean_module_constants(int module_number);
|
||||
void free_zend_constant(zend_constant *c);
|
||||
int zend_startup_constants(ELS_D);
|
||||
int zend_shutdown_constants(ELS_D);
|
||||
void zend_register_standard_constants(ELS_D);
|
||||
void clean_non_persistent_constants(void);
|
||||
ZEND_API int zend_get_constant(char *name, uint name_len, zval *result);
|
||||
ZEND_API void zend_register_long_constant(char *name, uint name_len, long lval, int flags, int module_number ELS_DC);
|
||||
@@ -51,5 +56,9 @@ ZEND_API void zend_register_double_constant(char *name, uint name_len, double dv
|
||||
ZEND_API void zend_register_string_constant(char *name, uint name_len, char *strval, int flags, int module_number ELS_DC);
|
||||
ZEND_API void zend_register_stringl_constant(char *name, uint name_len, char *strval, uint strlen, int flags, int module_number ELS_DC);
|
||||
ZEND_API void zend_register_constant(zend_constant *c ELS_DC);
|
||||
void zend_copy_constants(HashTable *target, HashTable *sourc);
|
||||
void copy_zend_constant(zend_constant *c);
|
||||
|
||||
#define ZEND_CONSTANT_DTOR (void (*)(void *)) free_zend_constant
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include "zend.h"
|
||||
|
||||
typedef struct _dynamic_array {
|
||||
char *array;
|
||||
unsigned int element_size;
|
||||
unsigned int current;
|
||||
unsigned int allocated;
|
||||
} dynamic_array;
|
||||
|
||||
ZEND_API int zend_dynamic_array_init(dynamic_array *da, unsigned int element_size, unsigned int size)
|
||||
{
|
||||
da->element_size = element_size;
|
||||
da->allocated = size;
|
||||
da->current = 0;
|
||||
da->array = (char *) emalloc(size*element_size);
|
||||
if (da->array == NULL) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
ZEND_API void *zend_dynamic_array_push(dynamic_array *da)
|
||||
{
|
||||
if (da->current == da->allocated) {
|
||||
da->allocated *= 2;
|
||||
da->array = (char *) erealloc(da->array, da->allocated*da->element_size);
|
||||
}
|
||||
return (void *)(da->array+(da->current++)*da->element_size);
|
||||
}
|
||||
|
||||
ZEND_API void *zend_dynamic_array_pop(dynamic_array *da)
|
||||
{
|
||||
return (void *)(da->array+(--(da->current))*da->element_size);
|
||||
|
||||
}
|
||||
|
||||
ZEND_API void *zend_dynamic_array_get_element(dynamic_array *da, unsigned int index)
|
||||
{
|
||||
if (index >= da->current) {
|
||||
return NULL;
|
||||
}
|
||||
return (void *)(da->array+index*da->element_size);
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _DYNAMIC_ARRAY_H
|
||||
#define _DYNAMIC_ARRAY_H
|
||||
|
||||
typedef struct _dynamic_array {
|
||||
char *array;
|
||||
unsigned int element_size;
|
||||
unsigned int last_used;
|
||||
unsigned int allocated;
|
||||
} dynamic_array;
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
ZEND_API int zend_dynamic_array_init(dynamic_array *da);
|
||||
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);
|
||||
END_EXTERN_C()
|
||||
|
||||
#endif /* _ZEND_DYNAMIC_ARRAY_H */
|
||||
+18
-14
@@ -2,32 +2,36 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _ZEND_ERRORS_H
|
||||
#define _ZEND_ERRORS_H
|
||||
|
||||
#define E_CORE_ERROR (1<<0L)
|
||||
#define E_CORE_WARNING (1<<1L)
|
||||
#define E_COMPILE_ERROR (1<<2L)
|
||||
#define E_COMPILE_WARNING (1<<3L)
|
||||
#define E_PARSE (1<<4L)
|
||||
#define E_ERROR (1<<5L)
|
||||
#define E_WARNING (1<<6L)
|
||||
#define E_NOTICE (1<<7L)
|
||||
#define E_ERROR (1<<0L)
|
||||
#define E_WARNING (1<<1L)
|
||||
#define E_PARSE (1<<2L)
|
||||
#define E_NOTICE (1<<3L)
|
||||
#define E_CORE_ERROR (1<<4L)
|
||||
#define E_CORE_WARNING (1<<5L)
|
||||
#define E_COMPILE_ERROR (1<<6L)
|
||||
#define E_COMPILE_WARNING (1<<7L)
|
||||
|
||||
#define E_ALL (E_ERROR | E_WARNING | E_PARSE | E_NOTICE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING)
|
||||
#define E_CORE (E_CORE_ERROR | E_CORE_WARNING)
|
||||
|
||||
|
||||
#endif /* _ZEND_ERRORS_H */
|
||||
|
||||
+1002
-550
File diff suppressed because it is too large.
Load diff
+19
-11
@@ -2,29 +2,36 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _EXECUTE_H
|
||||
#define _EXECUTE_H
|
||||
|
||||
#include "zend_compile.h"
|
||||
#include "zend_hash.h"
|
||||
|
||||
typedef union {
|
||||
typedef union _temp_variable {
|
||||
zval tmp_var;
|
||||
zval **var;
|
||||
struct {
|
||||
zval **var_dummy; /* a dummy */
|
||||
zval **ptr_ptr;
|
||||
zval *ptr;
|
||||
} var;
|
||||
struct {
|
||||
zval tmp_var; /* a dummy */
|
||||
|
||||
zval *str;
|
||||
int offset;
|
||||
@@ -40,9 +47,9 @@ void shutdown_executor(ELS_D);
|
||||
void execute(zend_op_array *op_array ELS_DC);
|
||||
ZEND_API int zend_is_true(zval *op);
|
||||
ZEND_API inline void safe_free_zval_ptr(zval *p);
|
||||
ZEND_API void zend_eval_string(char *str, zval *retval CLS_DC ELS_DC);
|
||||
ZEND_API void zend_eval_string(char *str, zval *retval_ptr CLS_DC ELS_DC);
|
||||
ZEND_API inline int i_zend_is_true(zval *op);
|
||||
ZEND_API void zval_update_constant(zval *p);
|
||||
ZEND_API int zval_update_constant(zval **pp);
|
||||
ZEND_API inline void zend_assign_to_variable_reference(znode *result, zval **variable_ptr_ptr, zval **value_ptr_ptr, temp_variable *Ts ELS_DC);
|
||||
|
||||
/* dedicated Zend executor functions - do not use! */
|
||||
@@ -55,9 +62,10 @@ void execute_new_code(CLS_D);
|
||||
|
||||
|
||||
/* services */
|
||||
ZEND_API char *get_active_function_name();
|
||||
ZEND_API char *get_active_function_name(void);
|
||||
ZEND_API char *zend_get_executed_filename(ELS_D);
|
||||
ZEND_API uint zend_get_executed_lineno(ELS_D);
|
||||
ZEND_API zend_bool zend_is_executing(void);
|
||||
|
||||
#define zendi_zval_copy_ctor(p) zval_copy_ctor(&(p))
|
||||
#define zendi_zval_dtor(p) zval_dtor(&(p))
|
||||
|
||||
+207
-97
@@ -2,18 +2,22 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
|
||||
@@ -22,30 +26,40 @@
|
||||
#include "zend_execute.h"
|
||||
#include "zend_API.h"
|
||||
#include "zend_ptr_stack.h"
|
||||
#include "zend_variables.h"
|
||||
#include "zend_operators.h"
|
||||
#include "zend_constants.h"
|
||||
#include "zend_extensions.h"
|
||||
#include "zend_execute_locks.h"
|
||||
|
||||
|
||||
ZEND_API void (*zend_execute)(zend_op_array *op_array ELS_DC);
|
||||
|
||||
|
||||
#if ZEND_DEBUG
|
||||
static void (*original_sigsegv_handler)(int);
|
||||
static void zend_handle_sigsegv(int dummy)
|
||||
{
|
||||
fflush(stdout);
|
||||
signal(SIGSEGV, original_sigsegv_handler);
|
||||
/*
|
||||
printf("SIGSEGV caught on opcode %d on opline %d of %s() at %s:%d\n\n",
|
||||
active_opline->opcode,
|
||||
active_opline-EG(active_op_array)->opcodes,
|
||||
get_active_function_name(),
|
||||
zend_get_executed_filename(),
|
||||
zend_get_executed_lineno());
|
||||
original_sigsegv_handler(dummy);
|
||||
*/
|
||||
fflush(stderr);
|
||||
if (original_sigsegv_handler==zend_handle_sigsegv) {
|
||||
signal(SIGSEGV, original_sigsegv_handler);
|
||||
} else {
|
||||
signal(SIGSEGV, SIG_DFL);
|
||||
}
|
||||
{
|
||||
ELS_FETCH();
|
||||
|
||||
fprintf(stderr, "SIGSEGV caught on opcode %d on opline %d of %s() at %s:%d\n\n",
|
||||
active_opline->opcode,
|
||||
active_opline-EG(active_op_array)->opcodes,
|
||||
get_active_function_name(),
|
||||
zend_get_executed_filename(ELS_C),
|
||||
zend_get_executed_lineno(ELS_C));
|
||||
}
|
||||
if (original_sigsegv_handler!=zend_handle_sigsegv) {
|
||||
original_sigsegv_handler(dummy);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
static void zend_extension_activator(zend_extension *extension)
|
||||
@@ -66,18 +80,20 @@ static void zend_extension_deactivator(zend_extension *extension)
|
||||
|
||||
void init_executor(CLS_D ELS_DC)
|
||||
{
|
||||
var_uninit(&EG(uninitialized_zval));
|
||||
var_uninit(&EG(error_zval));
|
||||
EG(uninitialized_zval).refcount = 1;
|
||||
EG(uninitialized_zval).is_ref=0;
|
||||
INIT_ZVAL(EG(uninitialized_zval));
|
||||
INIT_ZVAL(EG(error_zval));
|
||||
EG(uninitialized_zval_ptr)=&EG(uninitialized_zval);
|
||||
EG(error_zval).refcount = 1;
|
||||
EG(error_zval).is_ref=0;
|
||||
EG(error_zval_ptr)=&EG(error_zval);
|
||||
zend_ptr_stack_init(&EG(arg_types_stack));
|
||||
zend_stack_init(&EG(overloaded_objects_stack));
|
||||
/* destroys stack frame, therefore makes core dumps worthless */
|
||||
#if 0&&ZEND_DEBUG
|
||||
original_sigsegv_handler = signal(SIGSEGV, zend_handle_sigsegv);
|
||||
EG(return_value) = &EG(global_return_value);
|
||||
#endif
|
||||
EG(return_value_ptr_ptr) = &EG(global_return_value_ptr);
|
||||
EG(global_return_value_ptr) = &EG(global_return_value);
|
||||
INIT_ZVAL(EG(global_return_value));
|
||||
|
||||
EG(symtable_cache_ptr) = EG(symtable_cache)-1;
|
||||
EG(symtable_cache_limit)=EG(symtable_cache)+SYMTABLE_CACHE_SIZE-1;
|
||||
EG(no_extensions)=0;
|
||||
@@ -85,32 +101,27 @@ void init_executor(CLS_D ELS_DC)
|
||||
EG(function_table) = CG(function_table);
|
||||
EG(class_table) = CG(class_table);
|
||||
|
||||
EG(in_execution) = 0;
|
||||
|
||||
zend_ptr_stack_init(&EG(argument_stack));
|
||||
|
||||
EG(AiCount) = 0;
|
||||
zend_ptr_stack_init(&EG(garbage));
|
||||
|
||||
EG(main_op_array) = NULL;
|
||||
zend_hash_init(&EG(symbol_table), 50, NULL, PVAL_PTR_DTOR, 0);
|
||||
zend_hash_init(&EG(symbol_table), 50, NULL, ZVAL_PTR_DTOR, 0);
|
||||
EG(active_symbol_table) = &EG(symbol_table);
|
||||
|
||||
zend_llist_apply(&zend_extensions, (void (*)(void *)) zend_extension_activator);
|
||||
EG(opline_ptr) = NULL;
|
||||
EG(garbage_ptr) = 0;
|
||||
|
||||
/* $GLOBALS array */
|
||||
{
|
||||
zval *globals = (zval *) emalloc(sizeof(zval));
|
||||
|
||||
globals->value.ht = &EG(symbol_table);
|
||||
globals->type = IS_ARRAY;
|
||||
globals->refcount = 1;
|
||||
globals->is_ref = 0;
|
||||
zend_hash_update(&EG(symbol_table), "GLOBALS", sizeof("GLOBALS"), &globals, sizeof(zval *), NULL);
|
||||
}
|
||||
zend_hash_init(&EG(included_files), 5, NULL, NULL, 0);
|
||||
|
||||
EG(ticks_count) = 0;
|
||||
}
|
||||
|
||||
|
||||
void shutdown_executor(ELS_D)
|
||||
{
|
||||
zval_dtor(&EG(global_return_value));
|
||||
zend_ptr_stack_destroy(&EG(arg_types_stack));
|
||||
zend_stack_destroy(&EG(overloaded_objects_stack));
|
||||
|
||||
@@ -120,11 +131,16 @@ void shutdown_executor(ELS_D)
|
||||
EG(symtable_cache_ptr)--;
|
||||
}
|
||||
zend_llist_apply(&zend_extensions, (void (*)(void *)) zend_extension_deactivator);
|
||||
zend_ptr_stack_destroy(&EG(garbage));
|
||||
|
||||
zend_hash_destroy(&EG(symbol_table));
|
||||
|
||||
destroy_resource_list(); /* must be destroyed after the main symbol table is destroyed */
|
||||
while (EG(garbage_ptr)--) {
|
||||
if (EG(garbage)[EG(garbage_ptr)]->refcount==1) {
|
||||
zval_ptr_dtor(&EG(garbage)[EG(garbage_ptr)]);
|
||||
}
|
||||
}
|
||||
|
||||
destroy_resource_list(ELS_C); /* must be destroyed after the main symbol table is destroyed */
|
||||
|
||||
zend_ptr_stack_destroy(&EG(argument_stack));
|
||||
if (EG(main_op_array)) {
|
||||
@@ -132,11 +148,19 @@ void shutdown_executor(ELS_D)
|
||||
efree(EG(main_op_array));
|
||||
}
|
||||
clean_non_persistent_constants();
|
||||
#if ZEND_DEBUG
|
||||
signal(SIGSEGV, original_sigsegv_handler);
|
||||
#endif
|
||||
|
||||
|
||||
zend_hash_destroy(&EG(included_files));
|
||||
}
|
||||
|
||||
|
||||
ZEND_API char *get_active_function_name(ELS_D)
|
||||
ZEND_API char *get_active_function_name()
|
||||
{
|
||||
ELS_FETCH();
|
||||
|
||||
switch(EG(function_state_ptr)->function->type) {
|
||||
case ZEND_USER_FUNCTION: {
|
||||
char *function_name = ((zend_op_array *) EG(function_state_ptr)->function)->function_name;
|
||||
@@ -159,13 +183,29 @@ ZEND_API char *get_active_function_name(ELS_D)
|
||||
|
||||
ZEND_API char *zend_get_executed_filename(ELS_D)
|
||||
{
|
||||
return active_opline->filename;
|
||||
if (EG(opline_ptr)) {
|
||||
return active_opline->filename;
|
||||
} else {
|
||||
return "[no active file]";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ZEND_API uint zend_get_executed_lineno(ELS_D)
|
||||
{
|
||||
return active_opline->lineno;
|
||||
if (EG(opline_ptr)) {
|
||||
return active_opline->lineno;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ZEND_API zend_bool zend_is_executing()
|
||||
{
|
||||
ELS_FETCH();
|
||||
|
||||
return EG(in_execution);
|
||||
}
|
||||
|
||||
|
||||
@@ -174,12 +214,12 @@ ZEND_API inline void safe_free_zval_ptr(zval *p)
|
||||
ELS_FETCH();
|
||||
|
||||
if (p!=EG(uninitialized_zval_ptr)) {
|
||||
efree(p);
|
||||
FREE_ZVAL(p);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zval_ptr_dtor(zval **zval_ptr)
|
||||
ZEND_API void _zval_ptr_dtor(zval **zval_ptr ZEND_FILE_LINE_DC)
|
||||
{
|
||||
#if DEBUG_ZEND>=2
|
||||
printf("Reducing refcount for %x (%x): %d->%d\n", *zval_ptr, zval_ptr, (*zval_ptr)->refcount, (*zval_ptr)->refcount-1);
|
||||
@@ -188,15 +228,20 @@ ZEND_API void zval_ptr_dtor(zval **zval_ptr)
|
||||
if ((*zval_ptr)->refcount==0) {
|
||||
zval_dtor(*zval_ptr);
|
||||
safe_free_zval_ptr(*zval_ptr);
|
||||
} else if (((*zval_ptr)->refcount == 1) && ((*zval_ptr)->type != IS_OBJECT)) {
|
||||
(*zval_ptr)->is_ref = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
ZEND_API inline int i_zend_is_true(zval *op)
|
||||
{
|
||||
int result;
|
||||
|
||||
switch (op->type) {
|
||||
case IS_NULL:
|
||||
result = 0;
|
||||
break;
|
||||
case IS_LONG:
|
||||
case IS_BOOL:
|
||||
case IS_RESOURCE:
|
||||
@@ -233,10 +278,13 @@ ZEND_API int zend_is_true(zval *op)
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zval_update_constant(zval *p)
|
||||
ZEND_API int zval_update_constant(zval **pp)
|
||||
{
|
||||
zval *p = *pp;
|
||||
|
||||
if (p->type == IS_CONSTANT) {
|
||||
zval c;
|
||||
int refcount = p->refcount;
|
||||
|
||||
if (!zend_get_constant(p->value.str.val, p->value.str.len, &c)) {
|
||||
zend_error(E_NOTICE, "Use of undefined constant %s - assumed '%s'",
|
||||
@@ -247,80 +295,126 @@ ZEND_API void zval_update_constant(zval *p)
|
||||
STR_FREE(p->value.str.val);
|
||||
*p = c;
|
||||
}
|
||||
p->refcount = 1;
|
||||
p->is_ref = 0;
|
||||
INIT_PZVAL(p);
|
||||
p->refcount = refcount;
|
||||
} else if (p->type == IS_ARRAY) {
|
||||
zend_hash_apply(p->value.ht, (int (*)(void *)) zval_update_constant);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int call_user_function(HashTable *function_table, zval *object, zval *function_name, zval *retval, int param_count, zval *params[])
|
||||
|
||||
int call_user_function(HashTable *function_table, zval *object, zval *function_name, zval *retval_ptr, int param_count, zval *params[])
|
||||
{
|
||||
zval ***params_array = (zval ***) emalloc(sizeof(zval **)*param_count);
|
||||
int i;
|
||||
int ex_retval;
|
||||
zval *local_retval_ptr;
|
||||
|
||||
for (i=0; i<param_count; i++) {
|
||||
params_array[i] = ¶ms[i];
|
||||
}
|
||||
ex_retval = call_user_function_ex(function_table, object, function_name, &local_retval_ptr, param_count, params_array, 1);
|
||||
if (local_retval_ptr) {
|
||||
COPY_PZVAL_TO_ZVAL(*retval_ptr, local_retval_ptr);
|
||||
} else {
|
||||
INIT_ZVAL(*retval_ptr);
|
||||
}
|
||||
efree(params_array);
|
||||
return ex_retval;
|
||||
}
|
||||
|
||||
|
||||
int call_user_function_ex(HashTable *function_table, zval *object, zval *function_name, zval **retval_ptr_ptr, int param_count, zval **params[], int no_separation)
|
||||
{
|
||||
int i;
|
||||
zval *original_return_value;
|
||||
zval **original_return_value;
|
||||
HashTable *calling_symbol_table;
|
||||
zend_function_state function_state;
|
||||
zend_function_state *original_function_state_ptr;
|
||||
zend_op_array *original_op_array;
|
||||
zend_op **original_opline_ptr;
|
||||
CLS_FETCH();
|
||||
ELS_FETCH();
|
||||
|
||||
*retval_ptr_ptr = NULL;
|
||||
|
||||
if (object) {
|
||||
if (object->type != IS_OBJECT) {
|
||||
return FAILURE;
|
||||
}
|
||||
function_table = &object->value.obj.ce->function_table;
|
||||
/* unimplemented */
|
||||
}
|
||||
original_function_state_ptr = EG(function_state_ptr);
|
||||
zend_str_tolower(function_name->value.str.val, function_name->value.str.len);
|
||||
if (zend_hash_find(function_table, function_name->value.str.val, function_name->value.str.len+1, (void **) &function_state.function)==FAILURE) {
|
||||
zend_error(E_ERROR, "Unknown function: %s()\n", function_name->value.str.val);
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
|
||||
for (i=0; i<param_count; i++) {
|
||||
zval *param;
|
||||
|
||||
param = (zval *) emalloc(sizeof(zval));
|
||||
*param = *(params[i]);
|
||||
param->refcount=1;
|
||||
param->is_ref=0;
|
||||
zval_copy_ctor(param);
|
||||
//zend_hash_next_index_insert_ptr(function_state.function_symbol_table, param, sizeof(zval *), NULL);
|
||||
if (function_state.function->common.arg_types
|
||||
&& i<function_state.function->common.arg_types[0]
|
||||
&& function_state.function->common.arg_types[i+1]==BYREF_FORCE
|
||||
&& !PZVAL_IS_REF(*params[i])) {
|
||||
if ((*params[i])->refcount>1) {
|
||||
zval *new_zval;
|
||||
|
||||
if (no_separation) {
|
||||
return FAILURE;
|
||||
}
|
||||
ALLOC_ZVAL(new_zval);
|
||||
*new_zval = **params[i];
|
||||
zval_copy_ctor(new_zval);
|
||||
new_zval->refcount = 1;
|
||||
(*params[i])->refcount--;
|
||||
*params[i] = new_zval;
|
||||
}
|
||||
(*params[i])->refcount++;
|
||||
(*params[i])->is_ref = 1;
|
||||
param = *params[i];
|
||||
} else if (*params[i] != &EG(uninitialized_zval)) {
|
||||
(*params[i])->refcount++;
|
||||
param = *params[i];
|
||||
} else {
|
||||
ALLOC_ZVAL(param);
|
||||
*param = **(params[i]);
|
||||
INIT_PZVAL(param);
|
||||
}
|
||||
zend_ptr_stack_push(&EG(argument_stack), param);
|
||||
}
|
||||
|
||||
zend_ptr_stack_push(&EG(argument_stack), (void *) param_count);
|
||||
zend_ptr_stack_n_push(&EG(argument_stack), 2, (void *) (long) param_count, NULL);
|
||||
|
||||
var_uninit(retval);
|
||||
if (function_state.function->type == ZEND_USER_FUNCTION) {
|
||||
calling_symbol_table = EG(active_symbol_table);
|
||||
EG(active_symbol_table) = (HashTable *) emalloc(sizeof(HashTable));
|
||||
zend_hash_init(EG(active_symbol_table), 0, NULL, PVAL_PTR_DTOR, 0);
|
||||
ALLOC_HASHTABLE(EG(active_symbol_table));
|
||||
zend_hash_init(EG(active_symbol_table), 0, NULL, ZVAL_PTR_DTOR, 0);
|
||||
if (object) {
|
||||
zval *dummy = (zval *) emalloc(sizeof(zval)), **this_ptr;
|
||||
zval *dummy, **this_ptr;
|
||||
|
||||
var_uninit(dummy);
|
||||
dummy->refcount=1;
|
||||
dummy->is_ref=0;
|
||||
zend_hash_update_ptr(EG(active_symbol_table), "this", sizeof("this"), dummy, sizeof(zval *), (void **) &this_ptr);
|
||||
ALLOC_ZVAL(dummy);
|
||||
INIT_ZVAL(*dummy);
|
||||
|
||||
zend_hash_update(EG(active_symbol_table), "this", sizeof("this"), &dummy, sizeof(zval *), (void **) &this_ptr);
|
||||
zend_assign_to_variable_reference(NULL, this_ptr, &object, NULL ELS_CC);
|
||||
}
|
||||
original_return_value = EG(return_value);
|
||||
original_return_value = EG(return_value_ptr_ptr);
|
||||
original_op_array = EG(active_op_array);
|
||||
EG(return_value) = retval;
|
||||
EG(return_value_ptr_ptr) = retval_ptr_ptr;
|
||||
EG(active_op_array) = (zend_op_array *) function_state.function;
|
||||
original_opline_ptr = EG(opline_ptr);
|
||||
original_opline_ptr = EG(opline_ptr);
|
||||
zend_execute(EG(active_op_array) ELS_CC);
|
||||
zend_hash_destroy(EG(active_symbol_table));
|
||||
efree(EG(active_symbol_table));
|
||||
FREE_HASHTABLE(EG(active_symbol_table));
|
||||
EG(active_symbol_table) = calling_symbol_table;
|
||||
EG(active_op_array) = original_op_array;
|
||||
EG(return_value)=original_return_value;
|
||||
EG(return_value_ptr_ptr)=original_return_value;
|
||||
EG(opline_ptr) = original_opline_ptr;
|
||||
} else {
|
||||
((zend_internal_function *) function_state.function)->handler(param_count, retval, &EG(regular_list), &EG(persistent_list));
|
||||
ALLOC_INIT_ZVAL(*retval_ptr_ptr);
|
||||
((zend_internal_function *) function_state.function)->handler(param_count, *retval_ptr_ptr, object, 1 ELS_CC);
|
||||
INIT_PZVAL(*retval_ptr_ptr);
|
||||
}
|
||||
zend_ptr_stack_clear_multiple(ELS_C);
|
||||
EG(function_state_ptr) = original_function_state_ptr;
|
||||
@@ -329,7 +423,7 @@ int call_user_function(HashTable *function_table, zval *object, zval *function_n
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zend_eval_string(char *str, zval *retval CLS_DC ELS_DC)
|
||||
ZEND_API void zend_eval_string(char *str, zval *retval_ptr CLS_DC ELS_DC)
|
||||
{
|
||||
zval pv;
|
||||
zend_op_array *new_op_array;
|
||||
@@ -337,7 +431,7 @@ ZEND_API void zend_eval_string(char *str, zval *retval CLS_DC ELS_DC)
|
||||
zend_function_state *original_function_state_ptr = EG(function_state_ptr);
|
||||
int original_handle_op_arrays;
|
||||
|
||||
if (retval) {
|
||||
if (retval_ptr) {
|
||||
pv.value.str.len = strlen(str)+sizeof("return ;")-1;
|
||||
pv.value.str.val = emalloc(pv.value.str.len+1);
|
||||
strcpy(pv.value.str.val, "return ");
|
||||
@@ -357,25 +451,35 @@ ZEND_API void zend_eval_string(char *str, zval *retval CLS_DC ELS_DC)
|
||||
CG(handle_op_arrays) = original_handle_op_arrays;
|
||||
|
||||
if (new_op_array) {
|
||||
zval dummy_retval;
|
||||
zval *original_return_value = EG(return_value);
|
||||
zval *local_retval_ptr=NULL;
|
||||
zval **original_return_value_ptr_ptr = EG(return_value_ptr_ptr);
|
||||
zend_op **original_opline_ptr = EG(opline_ptr);
|
||||
|
||||
EG(return_value) = (retval?retval:&dummy_retval);
|
||||
var_reset(EG(return_value));
|
||||
EG(return_value_ptr_ptr) = &local_retval_ptr;
|
||||
EG(active_op_array) = new_op_array;
|
||||
EG(no_extensions)=1;
|
||||
|
||||
zend_execute(new_op_array ELS_CC);
|
||||
|
||||
if (local_retval_ptr) {
|
||||
if (retval_ptr) {
|
||||
COPY_PZVAL_TO_ZVAL(*retval_ptr, local_retval_ptr);
|
||||
} else {
|
||||
zval_ptr_dtor(&local_retval_ptr);
|
||||
}
|
||||
} else {
|
||||
if (retval_ptr) {
|
||||
INIT_ZVAL(*retval_ptr);
|
||||
}
|
||||
}
|
||||
|
||||
EG(no_extensions)=0;
|
||||
EG(opline_ptr) = original_opline_ptr;
|
||||
EG(active_op_array) = original_active_op_array;
|
||||
EG(function_state_ptr) = original_function_state_ptr;
|
||||
destroy_op_array(new_op_array);
|
||||
efree(new_op_array);
|
||||
EG(return_value) = original_return_value;
|
||||
if (!retval) {
|
||||
zval_dtor(&dummy_retval);
|
||||
}
|
||||
EG(return_value_ptr_ptr) = original_return_value_ptr_ptr;
|
||||
} else {
|
||||
printf("Failed executing:\n%s\n", str);
|
||||
}
|
||||
@@ -397,34 +501,40 @@ ZEND_API inline void zend_assign_to_variable_reference(znode *result, zval **var
|
||||
value_ptr = *value_ptr_ptr;
|
||||
if (variable_ptr == EG(error_zval_ptr) || value_ptr==EG(error_zval_ptr)) {
|
||||
variable_ptr_ptr = &EG(uninitialized_zval_ptr);
|
||||
} else if (variable_ptr!=value_ptr) {
|
||||
/* } else if (variable_ptr==&EG(uninitialized_zval) || variable_ptr!=value_ptr) { */
|
||||
} else if (variable_ptr_ptr != value_ptr_ptr) {
|
||||
variable_ptr->refcount--;
|
||||
if (variable_ptr->refcount==0) {
|
||||
zendi_zval_dtor(*variable_ptr);
|
||||
efree(variable_ptr);
|
||||
FREE_ZVAL(variable_ptr);
|
||||
}
|
||||
|
||||
if (!value_ptr->is_ref) {
|
||||
if (!PZVAL_IS_REF(value_ptr)) {
|
||||
/* break it away */
|
||||
value_ptr->refcount--;
|
||||
if (value_ptr->refcount>0) {
|
||||
*value_ptr_ptr = (zval *) emalloc(sizeof(zval));
|
||||
ALLOC_ZVAL(*value_ptr_ptr);
|
||||
**value_ptr_ptr = *value_ptr;
|
||||
value_ptr = *value_ptr_ptr;
|
||||
zendi_zval_copy_ctor(*value_ptr);
|
||||
}
|
||||
value_ptr->refcount=1;
|
||||
value_ptr->is_ref=1;
|
||||
value_ptr->refcount = 1;
|
||||
value_ptr->is_ref = 1;
|
||||
}
|
||||
|
||||
*variable_ptr_ptr = value_ptr;
|
||||
value_ptr->refcount++;
|
||||
} else {
|
||||
/* nothing to do */
|
||||
if (variable_ptr->refcount>1) { /* we need to break away */
|
||||
SEPARATE_ZVAL(variable_ptr_ptr);
|
||||
}
|
||||
(*variable_ptr_ptr)->is_ref = 1;
|
||||
}
|
||||
|
||||
if (result && (result->op_type != IS_UNUSED)) {
|
||||
Ts[result->u.var].var = variable_ptr_ptr;
|
||||
Ts[result->u.var].var.ptr_ptr = variable_ptr_ptr;
|
||||
SELECTIVE_PZVAL_LOCK(*variable_ptr_ptr, result);
|
||||
AI_USE_PTR(Ts[result->u.var].var);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -454,10 +564,10 @@ void execute_new_code(CLS_D)
|
||||
*/
|
||||
ZEND_API inline void zend_ptr_stack_clear_multiple(ELS_D)
|
||||
{
|
||||
void **p = EG(argument_stack).top_element-1;
|
||||
void **p = EG(argument_stack).top_element-2;
|
||||
int delete_count = (ulong) *p;
|
||||
|
||||
EG(argument_stack).top -= (delete_count+1);
|
||||
EG(argument_stack).top -= (delete_count+2);
|
||||
while (--delete_count>=0) {
|
||||
zval_ptr_dtor((zval **) --p);
|
||||
}
|
||||
@@ -468,7 +578,7 @@ ZEND_API inline void zend_ptr_stack_clear_multiple(ELS_D)
|
||||
|
||||
ZEND_API int zend_ptr_stack_get_arg(int requested_arg, void **data ELS_DC)
|
||||
{
|
||||
void **p = EG(argument_stack).top_element-1;
|
||||
void **p = EG(argument_stack).top_element-2;
|
||||
int arg_count = (ulong) *p;
|
||||
|
||||
if (requested_arg>arg_count) {
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
#ifndef _ZEND_EXECUTE_LOCKS_H
|
||||
#define _ZEND_EXECUTE_LOCKS_H
|
||||
|
||||
#define PZVAL_LOCK(z) ((z)->refcount++)
|
||||
#define PZVAL_UNLOCK(z) { ((z)->refcount--); \
|
||||
if (!(z)->refcount) { \
|
||||
(z)->refcount = 1; \
|
||||
(z)->is_ref = 0; \
|
||||
EG(garbage)[EG(garbage_ptr)++] = (z); \
|
||||
if (EG(garbage_ptr) == 4) { \
|
||||
zval_ptr_dtor(&EG(garbage)[0]); \
|
||||
zval_ptr_dtor(&EG(garbage)[1]); \
|
||||
EG(garbage)[0] = EG(garbage)[2]; \
|
||||
EG(garbage)[1] = EG(garbage)[3]; \
|
||||
EG(garbage_ptr) -= 2; \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
#define SELECTIVE_PZVAL_LOCK(pzv, pzn) if (!((pzn)->u.EA.type & EXT_TYPE_UNUSED)) { PZVAL_LOCK(pzv); }
|
||||
|
||||
#endif /* _ZEND_EXECUTE_LOCKS_H */
|
||||
+24
-16
@@ -2,18 +2,22 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#include "zend_extensions.h"
|
||||
|
||||
ZEND_API zend_llist zend_extensions;
|
||||
@@ -45,19 +49,23 @@ int zend_load_extension(char *path)
|
||||
|
||||
handle = DL_LOAD(path);
|
||||
if (!handle) {
|
||||
zend_printf("Failed loading %s\n", path);
|
||||
#ifndef ZEND_WIN32
|
||||
fprintf(stderr, "Failed loading %s: %s\n", path, dlerror());
|
||||
#else
|
||||
fprintf(stderr, "Failed loading %s\n", path);
|
||||
#endif
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
extension_version_info = (zend_extension_version_info *) DL_FETCH_SYMBOL(handle, "extension_version_info");
|
||||
new_extension = (zend_extension *) DL_FETCH_SYMBOL(handle, "zend_extension_entry");
|
||||
if (!extension_version_info || !new_extension) {
|
||||
zend_printf("%s doesn't appear to be a valid Zend extension\n", path);
|
||||
fprintf(stderr, "%s doesn't appear to be a valid Zend extension\n", path);
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
if (extension_version_info->zend_extension_api_no > ZEND_EXTENSION_API_NO) {
|
||||
zend_printf("%s requires Zend version %s or later\n"
|
||||
fprintf(stderr, "%s requires Zend version %s or later\n"
|
||||
"Current version %s, API version %d\n",
|
||||
new_extension->name,
|
||||
extension_version_info->required_zend_version,
|
||||
@@ -67,7 +75,7 @@ int zend_load_extension(char *path)
|
||||
return FAILURE;
|
||||
} else if (extension_version_info->zend_extension_api_no < ZEND_EXTENSION_API_NO) {
|
||||
/* we may be able to allow for downwards compatability in some harmless cases. */
|
||||
zend_printf("%s is outdated (API version %d, current version %d)\n"
|
||||
fprintf(stderr, "%s is outdated (API version %d, current version %d)\n"
|
||||
"Contact %s at %s for a later version of this module.\n",
|
||||
new_extension->name,
|
||||
extension_version_info->zend_extension_api_no,
|
||||
@@ -77,17 +85,17 @@ int zend_load_extension(char *path)
|
||||
DL_UNLOAD(handle);
|
||||
return FAILURE;
|
||||
} else if (ZTS_V!=extension_version_info->thread_safe) {
|
||||
zend_printf("Cannot load %s - it %s thread safe, whereas Zend %s\n",
|
||||
fprintf(stderr, "Cannot load %s - it %s thread safe, whereas Zend %s\n",
|
||||
new_extension->name,
|
||||
(extension_version_info->thread_safe?"is":"isn't"),
|
||||
(ZTS_V?"is":"isn't"));
|
||||
DL_UNLOAD(handle);
|
||||
return FAILURE;
|
||||
} else if (ZEND_DEBUG_V!=extension_version_info->debug) {
|
||||
zend_printf("Cannot load %s - it %s debug information, whereas Zend %s\n",
|
||||
} else if (ZEND_DEBUG!=extension_version_info->debug) {
|
||||
fprintf(stderr, "Cannot load %s - it %s debug information, whereas Zend %s\n",
|
||||
new_extension->name,
|
||||
(extension_version_info->debug?"contains":"does not contain"),
|
||||
(ZEND_DEBUG_V?"does":"does not"));
|
||||
(ZEND_DEBUG?"does":"does not"));
|
||||
DL_UNLOAD(handle);
|
||||
return FAILURE;
|
||||
}
|
||||
@@ -103,13 +111,13 @@ int zend_load_extension(char *path)
|
||||
|
||||
zend_llist_add_element(&zend_extensions, &extension);
|
||||
|
||||
/*zend_printf("Loaded %s, version %s\n", extension.name, extension.version);*/
|
||||
/*fprintf(stderr, "Loaded %s, version %s\n", extension.name, extension.version);*/
|
||||
|
||||
zend_append_version_info(&extension);
|
||||
return SUCCESS;
|
||||
#else
|
||||
zend_printf("Extensions are not supported on this platform.\n");
|
||||
return FAILURE
|
||||
fprintf(stderr, "Extensions are not supported on this platform.\n");
|
||||
return FAILURE;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
+14
-16
@@ -2,26 +2,30 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _ZEND_EXTENSIONS_H
|
||||
#define _ZEND_EXTENSIONS_H
|
||||
|
||||
#include "zend_compile.h"
|
||||
|
||||
#define ZEND_EXTENSION_API_NO 2
|
||||
#define ZEND_EXTENSION_API_NO 20000306
|
||||
|
||||
typedef struct {
|
||||
typedef struct _zend_extension_version_info {
|
||||
int zend_extension_api_no;
|
||||
char *required_zend_version;
|
||||
unsigned char thread_safe;
|
||||
@@ -66,7 +70,7 @@ struct _zend_extension {
|
||||
};
|
||||
|
||||
|
||||
ZEND_API int zend_get_resource_handle();
|
||||
ZEND_API int zend_get_resource_handle(zend_extension *extension);
|
||||
|
||||
#ifdef ZTS
|
||||
#define ZTS_V 1
|
||||
@@ -74,15 +78,9 @@ ZEND_API int zend_get_resource_handle();
|
||||
#define ZTS_V 0
|
||||
#endif
|
||||
|
||||
#ifdef ZEND_DEBUG
|
||||
#define ZEND_DEBUG_V 1
|
||||
#else
|
||||
#define ZEND_DEBUG_V 0
|
||||
#endif
|
||||
|
||||
|
||||
#define ZEND_EXTENSION() \
|
||||
ZEND_EXT_API zend_extension_version_info extension_version_info = { ZEND_EXTENSION_API_NO, "0.80A", ZTS_V, ZEND_DEBUG_V }
|
||||
ZEND_EXT_API zend_extension_version_info extension_version_info = { ZEND_EXTENSION_API_NO, "0.90", ZTS_V, ZEND_DEBUG }
|
||||
|
||||
#define STANDARD_ZEND_EXTENSION_PROPERTIES NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, -1
|
||||
|
||||
@@ -93,6 +91,6 @@ void zend_extension_dtor(zend_extension *extension);
|
||||
int zend_load_extension(char *path);
|
||||
int zend_load_extensions(char **extension_paths);
|
||||
void zend_append_version_info(zend_extension *extension);
|
||||
void zend_shutdown_extensions();
|
||||
void zend_shutdown_extensions(void);
|
||||
|
||||
#endif /* _ZEND_EXTENSIONS_H */
|
||||
@@ -0,0 +1,140 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _ZEND_FAST_CACHE_H
|
||||
#define _ZEND_FAST_CACHE_H
|
||||
|
||||
#ifndef ZEND_ENABLE_FAST_CACHE
|
||||
# if ZEND_DEBUG
|
||||
# define ZEND_ENABLE_FAST_CACHE 0
|
||||
# else
|
||||
# define ZEND_ENABLE_FAST_CACHE 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
typedef struct _zend_fast_cache_list_entry {
|
||||
struct _zend_fast_cache_list_entry *next;
|
||||
} zend_fast_cache_list_entry;
|
||||
|
||||
#define MAX_FAST_CACHE_TYPES 4
|
||||
|
||||
|
||||
#define ZVAL_CACHE_LIST 0
|
||||
#define HASHTABLE_CACHE_LIST 1
|
||||
|
||||
#if ZEND_ENABLE_FAST_CACHE
|
||||
|
||||
|
||||
#include "zend_globals.h"
|
||||
#include "zend_globals_macros.h"
|
||||
#include "zend_alloc.h"
|
||||
|
||||
|
||||
#if ZEND_DEBUG
|
||||
# define RECORD_ZVAL_CACHE_HIT(fc_type) AG(fast_cache_stats)[fc_type][1]++;
|
||||
# define RECORD_ZVAL_CACHE_MISS(fc_type) AG(fast_cache_stats)[fc_type][0]++;
|
||||
#else
|
||||
# define RECORD_ZVAL_CACHE_HIT(fc_type)
|
||||
# define RECORD_ZVAL_CACHE_MISS(fc_type)
|
||||
#endif
|
||||
|
||||
|
||||
#define ZEND_FAST_ALLOC(p, type, fc_type) \
|
||||
{ \
|
||||
ALS_FETCH(); \
|
||||
\
|
||||
if (((p) = (type *) AG(fast_cache_list_head)[fc_type])) { \
|
||||
AG(fast_cache_list_head)[fc_type] = ((zend_fast_cache_list_entry *) AG(fast_cache_list_head)[fc_type])->next; \
|
||||
RECORD_ZVAL_CACHE_HIT(fc_type); \
|
||||
} else { \
|
||||
(p) = (type *) emalloc(sizeof(type)); \
|
||||
RECORD_ZVAL_CACHE_MISS(fc_type); \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
#define ZEND_FAST_FREE(p, fc_type) \
|
||||
{ \
|
||||
ALS_FETCH(); \
|
||||
\
|
||||
((zend_fast_cache_list_entry *) (p))->next = AG(fast_cache_list_head)[fc_type]; \
|
||||
AG(fast_cache_list_head)[fc_type] = (zend_fast_cache_list_entry *) (p); \
|
||||
}
|
||||
|
||||
#define ZEND_FAST_ALLOC_REL(p, type, fc_type) \
|
||||
ZEND_FAST_ALLOC(p, type, fc_type)
|
||||
|
||||
#define ZEND_FAST_FREE_REL(p, fc_type) \
|
||||
ZEND_FAST_FREE(p, fc_type)
|
||||
|
||||
|
||||
#else /* !ZEND_ENABLE_FAST_CACHE */
|
||||
|
||||
#define ZEND_FAST_ALLOC(p, type, fc_type) \
|
||||
(p) = (type *) emalloc(sizeof(type))
|
||||
|
||||
#define ZEND_FAST_FREE(p, fc_type) \
|
||||
efree(p)
|
||||
|
||||
#define ZEND_FAST_ALLOC_REL(p, type, fc_type) \
|
||||
(p) = (type *) emalloc_rel(sizeof(type))
|
||||
|
||||
#define ZEND_FAST_FREE_REL(p, fc_type) \
|
||||
efree_rel(p)
|
||||
|
||||
#endif /* ZEND_ENABLE_FAST_CACHE */
|
||||
|
||||
|
||||
|
||||
|
||||
/* fast cache for zval's */
|
||||
#define ALLOC_ZVAL(z) \
|
||||
ZEND_FAST_ALLOC(z, zval, ZVAL_CACHE_LIST)
|
||||
|
||||
#define FREE_ZVAL(z) \
|
||||
ZEND_FAST_FREE(z, ZVAL_CACHE_LIST)
|
||||
|
||||
#define ALLOC_ZVAL_REL(z) \
|
||||
ZEND_FAST_ALLOC_REL(z, zval, ZVAL_CACHE_LIST)
|
||||
|
||||
#define FREE_ZVAL_REL(z) \
|
||||
ZEND_FAST_FREE_REL(z, ZVAL_CACHE_LIST)
|
||||
|
||||
/* fast cache for HashTables */
|
||||
#define ALLOC_HASHTABLE(ht) \
|
||||
ZEND_FAST_ALLOC(ht, HashTable, HASHTABLE_CACHE_LIST)
|
||||
|
||||
#define FREE_HASHTABLE(ht) \
|
||||
ZEND_FAST_FREE(ht, HASHTABLE_CACHE_LIST)
|
||||
|
||||
#define ALLOC_HASHTABLE_REL(ht) \
|
||||
ZEND_FAST_ALLOC_REL(ht, HashTable, HASHTABLE_CACHE_LIST)
|
||||
|
||||
#define FREE_HASHTABLE_REL(ht) \
|
||||
ZEND_FAST_FREE_REL(ht, HASHTABLE_CACHE_LIST)
|
||||
|
||||
#endif /* _ZEND_FAST_CACHE_H */
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
*/
|
||||
+63
-84
@@ -2,27 +2,35 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _T_GLOBALS_H
|
||||
#define _T_GLOBALS_H
|
||||
|
||||
|
||||
#include <setjmp.h>
|
||||
|
||||
#include "zend_globals_macros.h"
|
||||
|
||||
#include "zend_stack.h"
|
||||
#include "zend_ptr_stack.h"
|
||||
#include "zend_hash.h"
|
||||
#include "zend_llist.h"
|
||||
#include "zend_fast_cache.h"
|
||||
|
||||
/* Define ZTS if you want a thread-safe Zend */
|
||||
/*#undef ZTS*/
|
||||
@@ -37,86 +45,32 @@ class ZendFlexLexer;
|
||||
BEGIN_EXTERN_C()
|
||||
ZEND_API extern int compiler_globals_id;
|
||||
ZEND_API extern int executor_globals_id;
|
||||
extern int alloc_globals_id;
|
||||
ZEND_API extern int alloc_globals_id;
|
||||
END_EXTERN_C()
|
||||
|
||||
#endif
|
||||
|
||||
typedef struct _zend_compiler_globals zend_compiler_globals;
|
||||
typedef struct _zend_executor_globals zend_executor_globals;
|
||||
typedef struct _zend_alloc_globals zend_alloc_globals;
|
||||
|
||||
#define SYMTABLE_CACHE_SIZE 32
|
||||
|
||||
|
||||
/* Compiler */
|
||||
#ifdef ZTS
|
||||
# define CLS_D zend_compiler_globals *compiler_globals
|
||||
# define CLS_DC , CLS_D
|
||||
# define CLS_C compiler_globals
|
||||
# define CLS_CC , CLS_C
|
||||
# define CG(v) (((zend_compiler_globals *) compiler_globals)->v)
|
||||
# define CLS_FETCH() zend_compiler_globals *compiler_globals = (zend_compiler_globals *) ts_resource(compiler_globals_id)
|
||||
# define YYPARSE_PARAM compiler_globals
|
||||
# define YYLEX_PARAM compiler_globals
|
||||
BEGIN_EXTERN_C()
|
||||
int zendparse(void *compiler_globals);
|
||||
END_EXTERN_C()
|
||||
#else
|
||||
# define CLS_D
|
||||
# define CLS_DC
|
||||
# define CLS_C
|
||||
# define CLS_CC
|
||||
# define CG(v) (compiler_globals.v)
|
||||
# define CLS_FETCH()
|
||||
extern ZEND_API zend_compiler_globals compiler_globals;
|
||||
int zendparse();
|
||||
#endif
|
||||
|
||||
|
||||
/* Executor */
|
||||
#ifdef ZTS
|
||||
# define ELS_D zend_executor_globals *executor_globals
|
||||
# define ELS_DC , ELS_D
|
||||
# define ELS_C executor_globals
|
||||
# define ELS_CC , ELS_C
|
||||
# define EG(v) (executor_globals->v)
|
||||
# define ELS_FETCH() zend_executor_globals *executor_globals = (zend_executor_globals *) ts_resource(executor_globals_id)
|
||||
#else
|
||||
# define ELS_D
|
||||
# define ELS_DC
|
||||
# define ELS_C
|
||||
# define ELS_CC
|
||||
# define EG(v) (executor_globals.v)
|
||||
# define ELS_FETCH()
|
||||
extern ZEND_API zend_executor_globals executor_globals;
|
||||
#endif
|
||||
|
||||
|
||||
/* Memory Manager */
|
||||
#ifdef ZTS
|
||||
# define ALS_D zend_alloc_globals *alloc_globals
|
||||
# define ALS_DC , ALS_D
|
||||
# define ALS_C alloc_globals
|
||||
# define ALS_CC , ALS_C
|
||||
# define AG(v) (((zend_alloc_globals *) alloc_globals)->v)
|
||||
# define ALS_FETCH() zend_alloc_globals *alloc_globals = (zend_alloc_globals *) ts_resource(alloc_globals_id)
|
||||
#else
|
||||
# define ALS_D
|
||||
# define ALS_DC
|
||||
# define ALS_C
|
||||
# define ALS_CC
|
||||
# define AG(v) (alloc_globals.v)
|
||||
# define ALS_FETCH()
|
||||
#endif
|
||||
|
||||
#include "zend_compile.h"
|
||||
#include "zend_execute.h"
|
||||
|
||||
/* excpt.h on Digital Unix 4.0 defines function_table */
|
||||
#undef function_table
|
||||
|
||||
|
||||
typedef struct _zend_declarables {
|
||||
zval ticks;
|
||||
} zend_declarables;
|
||||
|
||||
|
||||
struct _zend_compiler_globals {
|
||||
zend_stack bp_stack;
|
||||
zend_stack switch_cond_stack;
|
||||
zend_stack foreach_copy_stack;
|
||||
zend_stack object_stack;
|
||||
zend_stack declare_stack;
|
||||
|
||||
zend_class_entry class_entry, *active_class_entry;
|
||||
|
||||
@@ -129,6 +83,7 @@ struct _zend_compiler_globals {
|
||||
char *compiled_filename;
|
||||
|
||||
int zend_lineno;
|
||||
int comment_start_line;
|
||||
char *heredoc;
|
||||
int heredoc_len;
|
||||
|
||||
@@ -137,16 +92,24 @@ struct _zend_compiler_globals {
|
||||
HashTable *function_table; /* function symbol table */
|
||||
HashTable *class_table; /* class table */
|
||||
|
||||
HashTable used_files; /* files already included using 'use' */
|
||||
|
||||
zend_llist filenames_list;
|
||||
|
||||
unsigned char short_tags;
|
||||
unsigned char asp_tags;
|
||||
zend_bool in_compilation;
|
||||
zend_bool short_tags;
|
||||
zend_bool asp_tags;
|
||||
zend_bool allow_call_time_pass_reference;
|
||||
|
||||
zend_declarables declarables;
|
||||
|
||||
/* For extensions support */
|
||||
unsigned char extended_info; /* generate extension information for debugger/profiler */
|
||||
unsigned char handle_op_arrays; /* run op_arrays through op_array handlers */
|
||||
zend_bool extended_info; /* generate extension information for debugger/profiler */
|
||||
zend_bool handle_op_arrays; /* run op_arrays through op_array handlers */
|
||||
|
||||
unsigned char unclean_shutdown;
|
||||
zend_bool unclean_shutdown;
|
||||
|
||||
zend_llist open_files;
|
||||
#ifdef ZTS
|
||||
#ifdef __cplusplus
|
||||
ZendFlexLexer *ZFL;
|
||||
@@ -158,7 +121,7 @@ struct _zend_compiler_globals {
|
||||
|
||||
|
||||
struct _zend_executor_globals {
|
||||
zval *return_value;
|
||||
zval **return_value_ptr_ptr;
|
||||
|
||||
zval uninitialized_zval;
|
||||
zval *uninitialized_zval_ptr;
|
||||
@@ -169,6 +132,9 @@ struct _zend_executor_globals {
|
||||
zend_function_state *function_state_ptr;
|
||||
zend_ptr_stack arg_types_stack;
|
||||
zend_stack overloaded_objects_stack;
|
||||
|
||||
/* for global return() support */
|
||||
zval *global_return_value_ptr;
|
||||
zval global_return_value;
|
||||
|
||||
/* symbol table cache */
|
||||
@@ -181,6 +147,8 @@ struct _zend_executor_globals {
|
||||
HashTable *active_symbol_table;
|
||||
HashTable symbol_table; /* main symbol table */
|
||||
|
||||
HashTable included_files; /* files already included */
|
||||
|
||||
jmp_buf bailout;
|
||||
|
||||
int error_reporting;
|
||||
@@ -194,32 +162,43 @@ struct _zend_executor_globals {
|
||||
|
||||
long precision;
|
||||
|
||||
unsigned int AiCount;
|
||||
int ticks_count;
|
||||
|
||||
zend_ptr_stack garbage;
|
||||
zend_bool in_execution;
|
||||
|
||||
/* for extended information support */
|
||||
unsigned char no_extensions;
|
||||
zend_bool no_extensions;
|
||||
|
||||
HashTable regular_list;
|
||||
HashTable persistent_list;
|
||||
|
||||
zend_ptr_stack argument_stack;
|
||||
int free_op1, free_op2;
|
||||
int (*unary_op)(zval *result, zval *op1);
|
||||
int (*binary_op)(zval *result, zval *op1, zval *op2);
|
||||
|
||||
void *reserved[4];
|
||||
zval *garbage[4];
|
||||
int garbage_ptr;
|
||||
|
||||
void *reserved[ZEND_MAX_RESERVED_RESOURCES];
|
||||
#if SUPPORT_INTERACTIVE
|
||||
int interactive;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct _zend_alloc_globals {
|
||||
mem_header *head; /* standard list */
|
||||
mem_header *phead; /* persistent list */
|
||||
zend_mem_header *head; /* standard list */
|
||||
zend_mem_header *phead; /* persistent list */
|
||||
void *cache[MAX_CACHED_MEMORY][MAX_CACHED_ENTRIES];
|
||||
unsigned char cache_count[MAX_CACHED_MEMORY];
|
||||
void *fast_cache_list_head[MAX_FAST_CACHE_TYPES];
|
||||
|
||||
#if ZEND_DEBUG
|
||||
/* for performance tuning */
|
||||
int cache_stats[MAX_CACHED_MEMORY][2];
|
||||
int fast_cache_stats[MAX_FAST_CACHE_TYPES][2];
|
||||
#endif
|
||||
#if MEMORY_LIMIT
|
||||
unsigned int memory_limit;
|
||||
unsigned int allocated_memory;
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _ZEND_GLOBALS_MACROS_H
|
||||
#define _ZEND_GLOBALS_MACROS_H
|
||||
|
||||
typedef struct _zend_compiler_globals zend_compiler_globals;
|
||||
typedef struct _zend_executor_globals zend_executor_globals;
|
||||
typedef struct _zend_alloc_globals zend_alloc_globals;
|
||||
|
||||
/* Compiler */
|
||||
#ifdef ZTS
|
||||
# define CLS_D zend_compiler_globals *compiler_globals
|
||||
# define CLS_DC , CLS_D
|
||||
# define CLS_C compiler_globals
|
||||
# define CLS_CC , CLS_C
|
||||
# define CG(v) (((zend_compiler_globals *) compiler_globals)->v)
|
||||
# define CLS_FETCH() zend_compiler_globals *compiler_globals = (zend_compiler_globals *) ts_resource(compiler_globals_id)
|
||||
BEGIN_EXTERN_C()
|
||||
int zendparse(void *compiler_globals);
|
||||
END_EXTERN_C()
|
||||
#else
|
||||
# define CLS_D void
|
||||
# define CLS_DC
|
||||
# define CLS_C
|
||||
# define CLS_CC
|
||||
# define CG(v) (compiler_globals.v)
|
||||
# define CLS_FETCH()
|
||||
extern ZEND_API struct _zend_compiler_globals compiler_globals;
|
||||
int zendparse(void);
|
||||
#endif
|
||||
|
||||
|
||||
/* Executor */
|
||||
#ifdef ZTS
|
||||
# define ELS_D zend_executor_globals *executor_globals
|
||||
# define ELS_DC , ELS_D
|
||||
# define ELS_C executor_globals
|
||||
# define ELS_CC , ELS_C
|
||||
# define EG(v) (executor_globals->v)
|
||||
# define ELS_FETCH() zend_executor_globals *executor_globals = (zend_executor_globals *) ts_resource(executor_globals_id)
|
||||
#else
|
||||
# define ELS_D void
|
||||
# define ELS_DC
|
||||
# define ELS_C
|
||||
# define ELS_CC
|
||||
# define EG(v) (executor_globals.v)
|
||||
# define ELS_FETCH()
|
||||
extern ZEND_API zend_executor_globals executor_globals;
|
||||
#endif
|
||||
|
||||
|
||||
/* Memory Manager */
|
||||
#ifdef ZTS
|
||||
# define ALS_D zend_alloc_globals *alloc_globals
|
||||
# define ALS_DC , ALS_D
|
||||
# define ALS_C alloc_globals
|
||||
# define ALS_CC , ALS_C
|
||||
# define AG(v) (((zend_alloc_globals *) alloc_globals)->v)
|
||||
# define ALS_FETCH() zend_alloc_globals *alloc_globals = (zend_alloc_globals *) ts_resource(alloc_globals_id)
|
||||
#else
|
||||
# define ALS_D void
|
||||
# define ALS_DC
|
||||
# define ALS_C
|
||||
# define ALS_CC
|
||||
# define AG(v) (alloc_globals.v)
|
||||
# define ALS_FETCH()
|
||||
extern ZEND_API zend_alloc_globals alloc_globals;
|
||||
#endif
|
||||
|
||||
#endif /* _ZEND_GLOBALS_MACROS_H */
|
||||
|
||||
+445
-471
File diff suppressed because it is too large.
Load diff
+70
-38
@@ -2,19 +2,21 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _HASH_
|
||||
#define _HASH_
|
||||
|
||||
@@ -27,11 +29,18 @@
|
||||
#define HASH_UPDATE (1<<0)
|
||||
#define HASH_ADD (1<<1)
|
||||
#define HASH_NEXT_INSERT (1<<2)
|
||||
#define HASH_ADD_PTR (1<<3)
|
||||
|
||||
#define HASH_DEL_KEY 0
|
||||
#define HASH_DEL_INDEX 1
|
||||
|
||||
typedef int (*compare_func_t)(const void *, const void *);
|
||||
typedef void (*sort_func_t)(void *, size_t, register size_t, compare_func_t);
|
||||
typedef void (*dtor_func_t)(void *pDest);
|
||||
typedef int (*apply_func_t)(void *pDest);
|
||||
typedef int (*apply_func_arg_t)(void *pDest, void *argument);
|
||||
typedef ulong (*hash_func_t)(char *arKey, uint nKeyLength);
|
||||
typedef void (*copy_ctor_func_t)(void *pElement);
|
||||
|
||||
struct hashtable;
|
||||
|
||||
typedef struct bucket {
|
||||
@@ -39,10 +48,10 @@ typedef struct bucket {
|
||||
uint nKeyLength;
|
||||
void *pData;
|
||||
void *pDataPtr;
|
||||
char bIsPointer;
|
||||
struct bucket *pListNext;
|
||||
struct bucket *pListLast;
|
||||
struct bucket *pNext;
|
||||
struct bucket *pLast;
|
||||
char arKey[1]; /* Must be last element */
|
||||
} Bucket;
|
||||
|
||||
@@ -51,18 +60,24 @@ typedef struct hashtable {
|
||||
uint nHashSizeIndex;
|
||||
uint nNumOfElements;
|
||||
ulong nNextFreeElement;
|
||||
ulong(*pHashFunction) (char *arKey, uint nKeyLength);
|
||||
hash_func_t pHashFunction;
|
||||
Bucket *pInternalPointer; /* Used for element traversal */
|
||||
Bucket *pListHead;
|
||||
Bucket *pListTail;
|
||||
Bucket **arBuckets;
|
||||
void (*pDestructor) (void *pData);
|
||||
dtor_func_t pDestructor;
|
||||
unsigned char persistent;
|
||||
#if ZEND_DEBUG
|
||||
int inconsistent;
|
||||
#endif
|
||||
} HashTable;
|
||||
|
||||
typedef Bucket* HashPosition;
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
|
||||
/* startup/shutdown */
|
||||
ZEND_API int zend_hash_init(HashTable *ht, uint nSize, ulong(*pHashFunction) (char *arKey, uint nKeyLength), void (*pDestructor) (void *pData), int persistent);
|
||||
ZEND_API int zend_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, int persistent);
|
||||
ZEND_API void zend_hash_destroy(HashTable *ht);
|
||||
|
||||
ZEND_API void zend_hash_clean(HashTable *ht);
|
||||
@@ -73,34 +88,34 @@ ZEND_API int zend_hash_add_or_update(HashTable *ht, char *arKey, uint nKeyLength
|
||||
zend_hash_add_or_update(ht,arKey,nKeyLength,pData,nDataSize,pDest,HASH_UPDATE)
|
||||
#define zend_hash_add(ht,arKey,nKeyLength,pData,nDataSize,pDest) \
|
||||
zend_hash_add_or_update(ht,arKey,nKeyLength,pData,nDataSize,pDest,HASH_ADD)
|
||||
#define zend_hash_update_ptr(ht,arKey,nKeyLength,pData,nDataSize,pDest) \
|
||||
zend_hash_add_or_update(ht,arKey,nKeyLength,pData,0,pDest,(HASH_UPDATE|HASH_ADD_PTR))
|
||||
|
||||
ZEND_API int zend_hash_quick_add_or_update(HashTable *ht, char *arKey, uint nKeyLength, ulong h, void *pData, uint nDataSize, void **pDest,int flag);
|
||||
#define zend_hash_quick_update(ht,arKey,nKeyLength,h,pData,nDataSize,pDest) \
|
||||
zend_hash_quick_add_or_update(ht,arKey,nKeyLength,h,pData,nDataSize,pDest,HASH_UPDATE)
|
||||
#define zend_hash_quick_add(ht,arKey,nKeyLength,h,pData,nDataSize,pDest) \
|
||||
zend_hash_quick_add_or_update(ht,arKey,nKeyLength,h,pData,nDataSize,pDest,HASH_ADD)
|
||||
#define zend_hash_quick_update_ptr(ht,arKey,nKeyLength,h,pData,nDataSize,pDest) \
|
||||
zend_hash_quick_add_or_update(ht,arKey,nKeyLength,h,pData,0,pDest,HASH_UPDATE|HASH_ADD_PTR)
|
||||
|
||||
ZEND_API int zend_hash_index_update_or_next_insert(HashTable *ht, ulong h, void *pData, uint nDataSize, void **pDest, int flag);
|
||||
#define zend_hash_index_update(ht,h,pData,nDataSize,pDest) \
|
||||
zend_hash_index_update_or_next_insert(ht,h,pData,nDataSize,pDest,HASH_UPDATE)
|
||||
#define zend_hash_next_index_insert(ht,pData,nDataSize,pDest) \
|
||||
zend_hash_index_update_or_next_insert(ht,0,pData,nDataSize,pDest,HASH_NEXT_INSERT)
|
||||
#define zend_hash_next_index_insert_ptr(ht,pData,nDataSize,pDest) \
|
||||
zend_hash_index_update_or_next_insert(ht,0,pData,nDataSize,pDest,HASH_NEXT_INSERT|HASH_ADD_PTR)
|
||||
|
||||
ZEND_API int zend_hash_pointer_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData);
|
||||
typedef struct _zend_hash_key {
|
||||
char *arKey;
|
||||
uint nKeyLength;
|
||||
ulong h;
|
||||
} zend_hash_key;
|
||||
|
||||
|
||||
#define ZEND_STD_HASH_APPLIER \
|
||||
int (*)(void *element, int num_args, va_list args, zend_hash_key *hash_key)
|
||||
|
||||
ZEND_API void zend_hash_graceful_destroy(HashTable *ht);
|
||||
ZEND_API void zend_hash_apply(HashTable *ht, apply_func_t apply_func);
|
||||
ZEND_API void zend_hash_apply_with_argument(HashTable *ht, apply_func_arg_t apply_func, void *);
|
||||
ZEND_API void zend_hash_apply_with_arguments(HashTable *ht, ZEND_STD_HASH_APPLIER, int, ...);
|
||||
|
||||
ZEND_API int zend_hash_pointer_index_update_or_next_insert(HashTable *ht, ulong h, void *pData, int flag);
|
||||
#define zend_hash_pointer_index_update(ht,h,pData) \
|
||||
zend_hash_pointer_index_update_or_next_insert(ht,h,pData,HASH_UPDATE)
|
||||
#define zend_hash_next_index_pointer_insert(ht,pData) \
|
||||
zend_hash_pointer_index_update_or_next_insert(ht,0,pData,HASH_NEXT_INSERT)
|
||||
ZEND_API void zend_hash_apply(HashTable *ht,int (*destruct) (void *));
|
||||
ZEND_API void zend_hash_apply_with_argument(HashTable *ht,int (*destruct) (void *, void *), void *);
|
||||
|
||||
|
||||
|
||||
@@ -121,33 +136,50 @@ ZEND_API int zend_hash_index_find(HashTable *ht, ulong h, void **pData);
|
||||
/* Misc */
|
||||
ZEND_API int zend_hash_exists(HashTable *ht, char *arKey, uint nKeyLength);
|
||||
ZEND_API int zend_hash_index_exists(HashTable *ht, ulong h);
|
||||
ZEND_API int zend_hash_is_pointer(HashTable *ht, char *arKey, uint nKeyLength);
|
||||
ZEND_API int zend_hash_index_is_pointer(HashTable *ht, ulong h);
|
||||
ZEND_API ulong zend_hash_next_free_element(HashTable *ht);
|
||||
|
||||
/* traversing */
|
||||
ZEND_API void zend_hash_move_forward(HashTable *ht);
|
||||
ZEND_API void zend_hash_move_backwards(HashTable *ht);
|
||||
ZEND_API int zend_hash_get_current_key(HashTable *ht, char **str_index, ulong *num_index);
|
||||
ZEND_API int zend_hash_get_current_data(HashTable *ht, void **pData);
|
||||
ZEND_API void zend_hash_internal_pointer_reset(HashTable *ht);
|
||||
ZEND_API void zend_hash_internal_pointer_end(HashTable *ht);
|
||||
ZEND_API int zend_hash_move_forward_ex(HashTable *ht, HashPosition *pos);
|
||||
ZEND_API int zend_hash_move_backwards_ex(HashTable *ht, HashPosition *pos);
|
||||
ZEND_API int zend_hash_get_current_key_ex(HashTable *ht, char **str_index, ulong *num_index, HashPosition *pos);
|
||||
ZEND_API int zend_hash_get_current_key_type_ex(HashTable *ht, HashPosition *pos);
|
||||
ZEND_API int zend_hash_get_current_data_ex(HashTable *ht, void **pData, HashPosition *pos);
|
||||
ZEND_API void zend_hash_internal_pointer_reset_ex(HashTable *ht, HashPosition *pos);
|
||||
ZEND_API void zend_hash_internal_pointer_end_ex(HashTable *ht, HashPosition *pos);
|
||||
|
||||
#define zend_hash_move_forward(ht) \
|
||||
zend_hash_move_forward_ex(ht, NULL)
|
||||
#define zend_hash_move_backwards(ht) \
|
||||
zend_hash_move_backwards_ex(ht, NULL)
|
||||
#define zend_hash_get_current_key(ht, str_index, num_index) \
|
||||
zend_hash_get_current_key_ex(ht, str_index, num_index, NULL)
|
||||
#define zend_hash_get_current_key_type(ht) \
|
||||
zend_hash_get_current_key_type_ex(ht, NULL)
|
||||
#define zend_hash_get_current_data(ht, pData) \
|
||||
zend_hash_get_current_data_ex(ht, pData, NULL)
|
||||
#define zend_hash_internal_pointer_reset(ht) \
|
||||
zend_hash_internal_pointer_reset_ex(ht, NULL)
|
||||
#define zend_hash_internal_pointer_end(ht) \
|
||||
zend_hash_internal_pointer_end_ex(ht, NULL)
|
||||
|
||||
/* Copying, merging and sorting */
|
||||
ZEND_API void zend_hash_copy(HashTable *target, HashTable *source, void (*pCopyConstructor) (void *pData), void *tmp, uint size);
|
||||
ZEND_API void zend_hash_merge(HashTable *target, HashTable *source, void (*pCopyConstructor) (void *pData), void *tmp, uint size);
|
||||
ZEND_API int zend_hash_sort(HashTable *ht, int (*compar) (const void *, const void *), int renumber);
|
||||
ZEND_API int zend_hash_minmax(HashTable *ht, int (*compar) (const void *, const void *), int flag, void **pData);
|
||||
ZEND_API void zend_hash_copy(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size);
|
||||
ZEND_API void zend_hash_merge(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size, int overwrite);
|
||||
ZEND_API int zend_hash_sort(HashTable *ht, sort_func_t sort_func, compare_func_t compare_func, int renumber);
|
||||
ZEND_API int zend_hash_minmax(HashTable *ht, int (*compar)(const void *, const void *), int flag, void **pData);
|
||||
|
||||
ZEND_API int zend_hash_num_elements(HashTable *ht);
|
||||
|
||||
ZEND_API int zend_hash_rehash(HashTable *ht);
|
||||
|
||||
ZEND_API ulong hashpjw(char *arKey, uint nKeyLength);
|
||||
|
||||
#if DEBUG
|
||||
#if ZEND_DEBUG
|
||||
/* debug */
|
||||
void zend_hash_display_pListTail(HashTable *ht);
|
||||
void zend_hash_display(HashTable *ht);
|
||||
#endif
|
||||
|
||||
END_EXTERN_C()
|
||||
|
||||
#endif /* _HASH_ */
|
||||
+24
-7
@@ -2,19 +2,24 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#include "zend.h"
|
||||
#include "zend-parser.h"
|
||||
#include "zend_compile.h"
|
||||
#include "zend_highlight.h"
|
||||
#include "zend_ptr_stack.h"
|
||||
@@ -76,6 +81,7 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
|
||||
int in_string=0;
|
||||
CLS_FETCH();
|
||||
|
||||
zend_printf("<code>");
|
||||
zend_printf("<font color=\"%s\">\n", last_color);
|
||||
/* highlight stuff coming back from zendlex() */
|
||||
token.type = 0;
|
||||
@@ -88,6 +94,7 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
|
||||
next_color = syntax_highlighter_ini->highlight_comment;
|
||||
break;
|
||||
case T_OPEN_TAG:
|
||||
case T_OPEN_TAG_WITH_ECHO:
|
||||
next_color = syntax_highlighter_ini->highlight_default;
|
||||
break;
|
||||
case T_CLOSE_TAG:
|
||||
@@ -128,8 +135,8 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
|
||||
}
|
||||
}
|
||||
switch (token_type) {
|
||||
case T_DOLLAR_OPEN_CURLY_BRACES:
|
||||
html_puts("{", 1);
|
||||
case T_END_HEREDOC:
|
||||
html_puts(token.value.str.val, token.value.str.len);
|
||||
break;
|
||||
default:
|
||||
html_puts(zendtext, zendleng);
|
||||
@@ -139,6 +146,7 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
|
||||
if (token.type == IS_STRING) {
|
||||
switch (token_type) {
|
||||
case T_OPEN_TAG:
|
||||
case T_OPEN_TAG_WITH_ECHO:
|
||||
case T_CLOSE_TAG:
|
||||
case T_WHITESPACE:
|
||||
break;
|
||||
@@ -146,6 +154,14 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
|
||||
efree(token.value.str.val);
|
||||
break;
|
||||
}
|
||||
} else if (token_type == T_END_HEREDOC) {
|
||||
zend_bool has_semicolon=(strchr(token.value.str.val, ';')?1:0);
|
||||
|
||||
efree(token.value.str.val);
|
||||
if (has_semicolon) {
|
||||
/* the following semicolon was unput(), ignore it */
|
||||
lex_scan(&token CLS_CC);
|
||||
}
|
||||
}
|
||||
token.type = 0;
|
||||
}
|
||||
@@ -153,6 +169,7 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
|
||||
zend_printf("</font>\n");
|
||||
}
|
||||
zend_printf("</font>\n");
|
||||
zend_printf("</code>");
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+10
-6
@@ -2,18 +2,22 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _HIGHLIGHT_H
|
||||
#define _HIGHLIGHT_H
|
||||
|
||||
@@ -25,7 +29,7 @@
|
||||
#define HL_KEYWORD_COLOR "#007700" /* green */
|
||||
|
||||
|
||||
typedef struct {
|
||||
typedef struct _zend_syntax_highlighter_ini {
|
||||
char *highlight_html;
|
||||
char *highlight_comment;
|
||||
char *highlight_default;
|
||||
|
||||
+11
-6
@@ -2,22 +2,27 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
/* This indenter doesn't really work, it's here for no particular reason. */
|
||||
|
||||
|
||||
#include "zend.h"
|
||||
#include "zend-parser.h"
|
||||
#include "zend_compile.h"
|
||||
#include "zend_indent.h"
|
||||
|
||||
@@ -38,7 +43,7 @@ static void handle_whitespace(int *emit_whitespace)
|
||||
for (c=0; c<128; c++) {
|
||||
if (emit_whitespace[c]>0) {
|
||||
for (i=0; i<emit_whitespace[c]; i++) {
|
||||
zend_write(&c, 1);
|
||||
zend_write((char *) &c, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+10
-6
@@ -2,21 +2,25 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _ZEND_INDENT_H
|
||||
#define _ZEND_INDENT_H
|
||||
|
||||
ZEND_API void zend_indent();
|
||||
ZEND_API void zend_indent(void);
|
||||
|
||||
#endif /* _ZEND_INDENT_H */
|
||||
+99
-31
@@ -2,25 +2,30 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
/* resource lists */
|
||||
|
||||
#include "zend.h"
|
||||
#include "zend_list.h"
|
||||
#include "zend_API.h"
|
||||
#include "zend_globals.h"
|
||||
|
||||
|
||||
int le_index_ptr;
|
||||
ZEND_API int le_index_ptr;
|
||||
|
||||
static inline int zend_list_do_insert(HashTable *list,void *ptr, int type)
|
||||
{
|
||||
@@ -44,7 +49,7 @@ static inline int zend_list_do_delete(HashTable *list,int id)
|
||||
ELS_FETCH();
|
||||
|
||||
if (zend_hash_index_find(&EG(regular_list), id, (void **) &le)==SUCCESS) {
|
||||
// printf("del(%d): %d->%d\n", id, le->refcount, le->refcount-1);
|
||||
/* printf("del(%d): %d->%d\n", id, le->refcount, le->refcount-1); */
|
||||
if (--le->refcount<=0) {
|
||||
return zend_hash_index_del(&EG(regular_list), id);
|
||||
} else {
|
||||
@@ -70,7 +75,7 @@ static inline void *zend_list_do_find(HashTable *list,int id, int *type)
|
||||
}
|
||||
|
||||
|
||||
int zend_list_insert(void *ptr, int type)
|
||||
ZEND_API int zend_list_insert(void *ptr, int type)
|
||||
{
|
||||
ELS_FETCH();
|
||||
|
||||
@@ -78,7 +83,7 @@ int zend_list_insert(void *ptr, int type)
|
||||
}
|
||||
|
||||
|
||||
int zend_plist_insert(void *ptr, int type)
|
||||
ZEND_API int zend_plist_insert(void *ptr, int type)
|
||||
{
|
||||
ELS_FETCH();
|
||||
|
||||
@@ -86,21 +91,13 @@ int zend_plist_insert(void *ptr, int type)
|
||||
}
|
||||
|
||||
|
||||
int zend_list_delete(int id)
|
||||
{
|
||||
ELS_FETCH();
|
||||
|
||||
return zend_list_do_delete(&EG(regular_list), id);
|
||||
}
|
||||
|
||||
|
||||
int zend_list_addref(int id)
|
||||
ZEND_API int zend_list_addref(int id)
|
||||
{
|
||||
list_entry *le;
|
||||
ELS_FETCH();
|
||||
|
||||
if (zend_hash_index_find(&EG(regular_list), id, (void **) &le)==SUCCESS) {
|
||||
// printf("add(%d): %d->%d\n", id, le->refcount, le->refcount+1);
|
||||
/* printf("add(%d): %d->%d\n", id, le->refcount, le->refcount+1); */
|
||||
le->refcount++;
|
||||
return SUCCESS;
|
||||
} else {
|
||||
@@ -108,7 +105,16 @@ int zend_list_addref(int id)
|
||||
}
|
||||
}
|
||||
|
||||
int zend_plist_delete(int id)
|
||||
|
||||
ZEND_API int zend_list_delete(int id)
|
||||
{
|
||||
ELS_FETCH();
|
||||
|
||||
return zend_list_do_delete(&EG(regular_list), id);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int zend_plist_delete(int id)
|
||||
{
|
||||
ELS_FETCH();
|
||||
|
||||
@@ -116,7 +122,7 @@ int zend_plist_delete(int id)
|
||||
}
|
||||
|
||||
|
||||
void *zend_list_find(int id, int *type)
|
||||
ZEND_API void *zend_list_find(int id, int *type)
|
||||
{
|
||||
ELS_FETCH();
|
||||
|
||||
@@ -124,7 +130,7 @@ void *zend_list_find(int id, int *type)
|
||||
}
|
||||
|
||||
|
||||
void *zend_plist_find(int id, int *type)
|
||||
ZEND_API void *zend_plist_find(int id, int *type)
|
||||
{
|
||||
ELS_FETCH();
|
||||
|
||||
@@ -132,6 +138,72 @@ void *zend_plist_find(int id, int *type)
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type)
|
||||
{
|
||||
int rsrc_id;
|
||||
|
||||
rsrc_id = zend_list_insert(rsrc_pointer, rsrc_type);
|
||||
|
||||
if (rsrc_result) {
|
||||
rsrc_result->value.lval = rsrc_id;
|
||||
rsrc_result->type = IS_RESOURCE;
|
||||
}
|
||||
|
||||
return rsrc_id;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void *zend_fetch_resource(zval **passed_id, int default_id, char *resource_type_name, int *found_resource_type, int num_resource_types, ...)
|
||||
{
|
||||
int id;
|
||||
int actual_resource_type;
|
||||
void *resource;
|
||||
va_list resource_types;
|
||||
int i;
|
||||
|
||||
if (default_id==-1) { /* use id */
|
||||
if (!passed_id) {
|
||||
if (resource_type_name) {
|
||||
zend_error(E_WARNING, "No %s resource supplied", resource_type_name);
|
||||
}
|
||||
return NULL;
|
||||
} else if ((*passed_id)->type != IS_RESOURCE) {
|
||||
if (resource_type_name) {
|
||||
zend_error(E_WARNING, "Supplied argument is not a valid %s resource", resource_type_name);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
id = (*passed_id)->value.lval;
|
||||
} else {
|
||||
id = default_id;
|
||||
}
|
||||
|
||||
resource = zend_list_find(id, &actual_resource_type);
|
||||
if (!resource) {
|
||||
if (resource_type_name)
|
||||
zend_error(E_WARNING, "%d is not a valid %s resource", id, resource_type_name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
va_start(resource_types, num_resource_types);
|
||||
for (i=0; i<num_resource_types; i++) {
|
||||
if (actual_resource_type == va_arg(resource_types, int)) {
|
||||
va_end(resource_types);
|
||||
if (found_resource_type) {
|
||||
*found_resource_type = actual_resource_type;
|
||||
}
|
||||
return resource;
|
||||
}
|
||||
}
|
||||
va_end(resource_types);
|
||||
|
||||
if (resource_type_name)
|
||||
zend_error(E_WARNING, "Supplied resource is not a valid %s resource", resource_type_name);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
void list_entry_destructor(void *ptr)
|
||||
{
|
||||
list_entry *le = (list_entry *) ptr;
|
||||
@@ -174,19 +246,15 @@ int init_resource_plist(ELS_D)
|
||||
}
|
||||
|
||||
|
||||
void destroy_resource_list(void)
|
||||
void destroy_resource_list(ELS_D)
|
||||
{
|
||||
ELS_FETCH();
|
||||
|
||||
zend_hash_destroy(&EG(regular_list));
|
||||
zend_hash_graceful_destroy(&EG(regular_list));
|
||||
}
|
||||
|
||||
|
||||
void destroy_resource_plist(void)
|
||||
void destroy_resource_plist(ELS_D)
|
||||
{
|
||||
ELS_FETCH();
|
||||
|
||||
zend_hash_destroy(&EG(persistent_list));
|
||||
zend_hash_graceful_destroy(&EG(persistent_list));
|
||||
}
|
||||
|
||||
|
||||
|
||||
+41
-16
@@ -2,18 +2,22 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _LIST_H
|
||||
#define _LIST_H
|
||||
|
||||
@@ -22,13 +26,13 @@
|
||||
|
||||
extern HashTable list_destructors;
|
||||
|
||||
typedef struct {
|
||||
typedef struct _list_entry {
|
||||
void *ptr;
|
||||
int type;
|
||||
int refcount;
|
||||
} list_entry;
|
||||
|
||||
typedef struct {
|
||||
typedef struct _list_destructors_entry {
|
||||
void (*list_destructor)(void *);
|
||||
void (*plist_destructor)(void *);
|
||||
int module_number;
|
||||
@@ -48,15 +52,36 @@ void plist_entry_destructor(void *ptr);
|
||||
int clean_module_resource_destructors(list_destructors_entry *ld, int *module_number);
|
||||
int init_resource_list(ELS_D);
|
||||
int init_resource_plist(ELS_D);
|
||||
void destroy_resource_list(void);
|
||||
void destroy_resource_plist(void);
|
||||
void destroy_resource_list(ELS_D);
|
||||
void destroy_resource_plist(ELS_D);
|
||||
|
||||
int zend_list_insert(void *ptr, int type);
|
||||
int zend_plist_insert(void *ptr, int type);
|
||||
int zend_list_addref(int id);
|
||||
int zend_list_delete(int id);
|
||||
int zend_plist_delete(int id);
|
||||
void *zend_list_find(int id, int *type);
|
||||
void *zend_plist_find(int id, int *type);
|
||||
ZEND_API int zend_list_insert(void *ptr, int type);
|
||||
ZEND_API int zend_plist_insert(void *ptr, int type);
|
||||
ZEND_API int zend_list_addref(int id);
|
||||
ZEND_API int zend_list_delete(int id);
|
||||
ZEND_API int zend_plist_delete(int id);
|
||||
ZEND_API void *zend_list_find(int id, int *type);
|
||||
ZEND_API void *zend_plist_find(int id, int *type);
|
||||
|
||||
ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type);
|
||||
ZEND_API void *zend_fetch_resource(zval **passed_id, int default_id, char *resource_type_name, int *found_resource_type, int num_resource_types, ...);
|
||||
|
||||
extern ZEND_API int le_index_ptr; /* list entry type for index pointers */
|
||||
|
||||
#define ZEND_VERIFY_RESOURCE(rsrc) \
|
||||
if (!rsrc) { \
|
||||
RETURN_FALSE; \
|
||||
}
|
||||
|
||||
#define ZEND_FETCH_RESOURCE(rsrc, rsrc_type, passed_id, default_id, resource_type_name, resource_type) \
|
||||
rsrc = (rsrc_type) zend_fetch_resource(passed_id, default_id, resource_type_name, NULL, 1, resource_type); \
|
||||
ZEND_VERIFY_RESOURCE(rsrc);
|
||||
|
||||
#define ZEND_FETCH_RESOURCE2(rsrc, rsrc_type, passed_id, default_id, resource_type_name, resource_type1,resource_type2) \
|
||||
rsrc = (rsrc_type) zend_fetch_resource(passed_id, default_id, resource_type_name, NULL, 2, resource_type1, resource_type2); \
|
||||
ZEND_VERIFY_RESOURCE(rsrc);
|
||||
|
||||
#define ZEND_REGISTER_RESOURCE(rsrc_result, rsrc_pointer, rsrc_type) \
|
||||
zend_register_resource(rsrc_result, rsrc_pointer, rsrc_type);
|
||||
|
||||
#endif
|
||||
+74
-25
@@ -2,18 +2,22 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#include "zend.h"
|
||||
#include "zend_llist.h"
|
||||
|
||||
@@ -59,12 +63,12 @@ ZEND_API void zend_llist_prepend_element(zend_llist *l, void *element)
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zend_llist_del_element(zend_llist *l, void *element)
|
||||
ZEND_API void zend_llist_del_element(zend_llist *l, void *element, int (*compare)(void *element1, void *element2))
|
||||
{
|
||||
zend_llist_element *current=l->head;
|
||||
|
||||
while (current) {
|
||||
if (current->data == element) {
|
||||
if (compare(current->data, element)) {
|
||||
if (current->prev) {
|
||||
current->prev->next = current->next;
|
||||
} else {
|
||||
@@ -144,6 +148,43 @@ ZEND_API void zend_llist_apply(zend_llist *l, void (*func)(void *data))
|
||||
}
|
||||
}
|
||||
|
||||
ZEND_API void zend_llist_sort(zend_llist *l, llist_compare_func_t comp_func)
|
||||
{
|
||||
int list_size=0, i;
|
||||
|
||||
zend_llist_element **elements;
|
||||
zend_llist_element *element, **ptr;
|
||||
|
||||
for (element=l->head; element; element=element->next) {
|
||||
list_size++;
|
||||
}
|
||||
|
||||
if (list_size == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
elements = (zend_llist_element **) emalloc(list_size*sizeof(zend_llist_element *));
|
||||
|
||||
ptr = &elements[0];
|
||||
|
||||
for (element=l->head; element; element=element->next) {
|
||||
*ptr++ = element;
|
||||
}
|
||||
|
||||
qsort(elements, list_size, sizeof(zend_llist_element *), (int (*)(const void *, const void *)) comp_func);
|
||||
|
||||
l->head = elements[0];
|
||||
elements[0]->prev = NULL;
|
||||
|
||||
for (i=1; i<list_size; i++) {
|
||||
elements[i]->prev = elements[i-1];
|
||||
elements[i-1]->next = elements[i];
|
||||
}
|
||||
elements[i-1]->next = NULL;
|
||||
l->tail = elements[i-1];
|
||||
efree(elements);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zend_llist_apply_with_argument(zend_llist *l, void (*func)(void *data, void *arg), void *arg)
|
||||
{
|
||||
@@ -167,46 +208,54 @@ ZEND_API int zend_llist_count(zend_llist *l)
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void *zend_llist_get_first(zend_llist *l)
|
||||
ZEND_API void *zend_llist_get_first_ex(zend_llist *l, zend_llist_position *pos)
|
||||
{
|
||||
l->traverse_ptr = l->head;
|
||||
if (l->traverse_ptr) {
|
||||
return l->traverse_ptr->data;
|
||||
zend_llist_position *current = pos ? pos : &l->traverse_ptr;
|
||||
|
||||
*current = l->head;
|
||||
if (*current) {
|
||||
return (*current)->data;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void *zend_llist_get_last(zend_llist *l)
|
||||
ZEND_API void *zend_llist_get_last_ex(zend_llist *l, zend_llist_position *pos)
|
||||
{
|
||||
l->traverse_ptr = l->tail;
|
||||
if (l->traverse_ptr) {
|
||||
return l->traverse_ptr->data;
|
||||
zend_llist_position *current = pos ? pos : &l->traverse_ptr;
|
||||
|
||||
*current = l->tail;
|
||||
if (*current) {
|
||||
return (*current)->data;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void *zend_llist_get_next(zend_llist *l)
|
||||
ZEND_API void *zend_llist_get_next_ex(zend_llist *l, zend_llist_position *pos)
|
||||
{
|
||||
if (l->traverse_ptr) {
|
||||
l->traverse_ptr = l->traverse_ptr->next;
|
||||
if (l->traverse_ptr) {
|
||||
return l->traverse_ptr->data;
|
||||
zend_llist_position *current = pos ? pos : &l->traverse_ptr;
|
||||
|
||||
if (*current) {
|
||||
*current = (*current)->next;
|
||||
if (*current) {
|
||||
return (*current)->data;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void *zend_llist_get_prev(zend_llist *l)
|
||||
ZEND_API void *zend_llist_get_prev_ex(zend_llist *l, zend_llist_position *pos)
|
||||
{
|
||||
if (l->traverse_ptr) {
|
||||
l->traverse_ptr = l->traverse_ptr->prev;
|
||||
if (l->traverse_ptr) {
|
||||
return l->traverse_ptr->data;
|
||||
zend_llist_position *current = pos ? pos : &l->traverse_ptr;
|
||||
|
||||
if (*current) {
|
||||
*current = (*current)->prev;
|
||||
if (*current) {
|
||||
return (*current)->data;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
|
||||
+27
-11
@@ -2,18 +2,22 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _ZEND_LLIST_H
|
||||
#define _ZEND_LLIST_H
|
||||
|
||||
@@ -25,7 +29,7 @@ typedef struct _zend_llist_element {
|
||||
char data[1]; /* Needs to always be last in the struct */
|
||||
} zend_llist_element;
|
||||
|
||||
typedef struct {
|
||||
typedef struct _zend_llist {
|
||||
zend_llist_element *head;
|
||||
zend_llist_element *tail;
|
||||
size_t size;
|
||||
@@ -34,10 +38,14 @@ typedef struct {
|
||||
zend_llist_element *traverse_ptr;
|
||||
} zend_llist;
|
||||
|
||||
typedef int (*llist_compare_func_t) (const zend_llist_element *, const zend_llist_element *);
|
||||
typedef zend_llist_element* zend_llist_position;
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
ZEND_API void zend_llist_init(zend_llist *l, size_t size, void (*dtor)(void *data), unsigned char persistent);
|
||||
ZEND_API void zend_llist_add_element(zend_llist *l, void *element);
|
||||
ZEND_API void zend_llist_prepend_element(zend_llist *l, void *element);
|
||||
ZEND_API void zend_llist_del_element(zend_llist *l, void *element);
|
||||
ZEND_API void zend_llist_del_element(zend_llist *l, void *element, int (*compare)(void *element1, void *element2));
|
||||
ZEND_API void zend_llist_destroy(zend_llist *l);
|
||||
ZEND_API void zend_llist_clean(zend_llist *l);
|
||||
ZEND_API void zend_llist_remove_tail(zend_llist *l);
|
||||
@@ -45,11 +53,19 @@ ZEND_API void zend_llist_copy(zend_llist *dst, zend_llist *src);
|
||||
ZEND_API void zend_llist_apply(zend_llist *l, void (*func)(void *data));
|
||||
ZEND_API void zend_llist_apply_with_argument(zend_llist *l, void (*func)(void *data, void *arg), void *arg);
|
||||
ZEND_API int zend_llist_count(zend_llist *l);
|
||||
ZEND_API void zend_llist_sort(zend_llist *l, llist_compare_func_t comp_func);
|
||||
|
||||
/* traversal */
|
||||
ZEND_API void *zend_llist_get_first(zend_llist *l);
|
||||
ZEND_API void *zend_llist_get_last(zend_llist *l);
|
||||
ZEND_API void *zend_llist_get_next(zend_llist *l);
|
||||
ZEND_API void *zend_llist_get_prev(zend_llist *l);
|
||||
ZEND_API void *zend_llist_get_first_ex(zend_llist *l, zend_llist_position *pos);
|
||||
ZEND_API void *zend_llist_get_last_ex(zend_llist *l, zend_llist_position *pos);
|
||||
ZEND_API void *zend_llist_get_next_ex(zend_llist *l, zend_llist_position *pos);
|
||||
ZEND_API void *zend_llist_get_prev_ex(zend_llist *l, zend_llist_position *pos);
|
||||
|
||||
#define zend_llist_get_first(l) zend_llist_get_first_ex(l, NULL)
|
||||
#define zend_llist_get_last(l) zend_llist_get_last_ex(l, NULL)
|
||||
#define zend_llist_get_next(l) zend_llist_get_next_ex(l, NULL)
|
||||
#define zend_llist_get_prev(l) zend_llist_get_prev_ex(l, NULL)
|
||||
|
||||
END_EXTERN_C()
|
||||
|
||||
#endif /* _ZEND_LLIST_H */
|
||||
+43
-11
@@ -2,27 +2,53 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _MODULES_H
|
||||
#define _MODULES_H
|
||||
|
||||
#define INIT_FUNC_ARGS int type, int module_number
|
||||
#define INIT_FUNC_ARGS int type, int module_number ELS_DC
|
||||
#define INIT_FUNC_ARGS_PASSTHRU type, module_number ELS_CC
|
||||
#define SHUTDOWN_FUNC_ARGS int type, int module_number
|
||||
#define SHUTDOWN_FUNC_ARGS_PASSTHRU type, module_number
|
||||
#define ZEND_MODULE_INFO_FUNC_ARGS zend_module_entry *zend_module
|
||||
#define ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU zend_module
|
||||
#define GINIT_FUNC_ARGS void
|
||||
#define GINIT_FUNC_ARGS_PASSTHRU
|
||||
|
||||
#define STANDARD_MODULE_PROPERTIES 0, 0, 0, NULL, 0
|
||||
extern unsigned char first_arg_force_ref[];
|
||||
extern unsigned char first_arg_allow_ref[];
|
||||
extern unsigned char second_arg_force_ref[];
|
||||
extern unsigned char second_arg_allow_ref[];
|
||||
|
||||
#include "zend.h"
|
||||
|
||||
#define ZEND_MODULE_API_NO 20000313
|
||||
|
||||
#ifdef ZTS
|
||||
#define USING_ZTS 1
|
||||
#else
|
||||
#define USING_ZTS 0
|
||||
#endif
|
||||
|
||||
#define STANDARD_MODULE_PROPERTIES_EX 0, 0, NULL, 0, ZEND_DEBUG, USING_ZTS, ZEND_MODULE_API_NO
|
||||
|
||||
#define STANDARD_MODULE_PROPERTIES \
|
||||
NULL, NULL, STANDARD_MODULE_PROPERTIES_EX
|
||||
|
||||
#define MODULE_PERSISTENT 1
|
||||
#define MODULE_TEMPORARY 2
|
||||
@@ -37,17 +63,23 @@ struct _zend_module_entry {
|
||||
int (*request_startup_func)(INIT_FUNC_ARGS);
|
||||
int (*request_shutdown_func)(SHUTDOWN_FUNC_ARGS);
|
||||
void (*info_func)(ZEND_MODULE_INFO_FUNC_ARGS);
|
||||
int request_started, module_started;
|
||||
int (*global_startup_func)(void);
|
||||
int (*global_shutdown_func)(void);
|
||||
int module_started;
|
||||
unsigned char type;
|
||||
void *handle;
|
||||
int module_number;
|
||||
unsigned char zend_debug;
|
||||
unsigned char zts;
|
||||
unsigned int zend_api;
|
||||
};
|
||||
|
||||
|
||||
extern HashTable module_registry;
|
||||
|
||||
extern void module_destructor(zend_module_entry *module);
|
||||
extern int module_registry_cleanup(zend_module_entry *module);
|
||||
extern int module_registry_request_startup(zend_module_entry *module);
|
||||
void module_destructor(zend_module_entry *module);
|
||||
int module_registry_cleanup(zend_module_entry *module);
|
||||
int module_registry_request_startup(zend_module_entry *module);
|
||||
|
||||
#define ZEND_MODULE_DTOR (void (*)(void *)) module_destructor
|
||||
#endif
|
||||
+44
-21
@@ -2,25 +2,27 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "zend.h"
|
||||
#include "zend_alloc.h"
|
||||
#include "zend_compile.h"
|
||||
#include "zend_variables.h"
|
||||
#include "zend_operators.h"
|
||||
#include "zend_extensions.h"
|
||||
#include "zend_API.h"
|
||||
|
||||
@@ -74,7 +76,7 @@ void init_op_array(zend_op_array *op_array, int initial_ops_size)
|
||||
}
|
||||
#endif
|
||||
|
||||
op_array->refcount = (int *) emalloc(sizeof(int));
|
||||
op_array->refcount = (zend_uint *) emalloc(sizeof(zend_uint));
|
||||
*op_array->refcount = 1;
|
||||
op_array->size = initial_ops_size;
|
||||
op_array->last = 0;
|
||||
@@ -93,7 +95,9 @@ void init_op_array(zend_op_array *op_array, int initial_ops_size)
|
||||
|
||||
op_array->static_variables = NULL;
|
||||
|
||||
op_array->initialized_globals = 0;
|
||||
op_array->uses_globals = 0;
|
||||
|
||||
op_array->return_reference = 0;
|
||||
|
||||
zend_llist_apply_with_argument(&zend_extensions, (void (*)(void *, void *)) zend_extension_op_array_ctor_handler, op_array);
|
||||
}
|
||||
@@ -145,6 +149,11 @@ ZEND_API void destroy_op_array(zend_op_array *op_array)
|
||||
zend_op *opline = op_array->opcodes;
|
||||
zend_op *end = op_array->opcodes+op_array->last;
|
||||
|
||||
if (op_array->static_variables) {
|
||||
zend_hash_destroy(op_array->static_variables);
|
||||
FREE_HASHTABLE(op_array->static_variables);
|
||||
}
|
||||
|
||||
if (--(*op_array->refcount)>0) {
|
||||
return;
|
||||
}
|
||||
@@ -176,17 +185,27 @@ ZEND_API void destroy_op_array(zend_op_array *op_array)
|
||||
if (op_array->brk_cont_array) {
|
||||
efree(op_array->brk_cont_array);
|
||||
}
|
||||
if (op_array->static_variables) {
|
||||
zend_hash_destroy(op_array->static_variables);
|
||||
efree(op_array->static_variables);
|
||||
}
|
||||
zend_llist_apply_with_argument(&zend_extensions, (void (*)(void *, void *)) zend_extension_op_array_dtor_handler, op_array);
|
||||
}
|
||||
|
||||
|
||||
void init_op(zend_op *op CLS_DC)
|
||||
{
|
||||
op->lineno = CG(zend_lineno);
|
||||
op->filename = zend_get_compiled_filename(CLS_C);
|
||||
op->result.op_type = IS_UNUSED;
|
||||
op->extended_value = 0;
|
||||
op->op1.u.EA.var = 0;
|
||||
op->op1.u.EA.type = 0;
|
||||
op->op2.u.EA.var = 0;
|
||||
op->op2.u.EA.type = 0;
|
||||
op->result.u.EA.var = 0;
|
||||
op->result.u.EA.type = 0;
|
||||
}
|
||||
|
||||
zend_op *get_next_op(zend_op_array *op_array CLS_DC)
|
||||
{
|
||||
int next_op_num = op_array->last++;
|
||||
zend_uint next_op_num = op_array->last++;
|
||||
zend_op *next_op;
|
||||
|
||||
if (next_op_num >= op_array->size) {
|
||||
@@ -205,9 +224,8 @@ zend_op *get_next_op(zend_op_array *op_array CLS_DC)
|
||||
}
|
||||
|
||||
next_op = &(op_array->opcodes[next_op_num]);
|
||||
next_op->lineno = CG(zend_lineno);
|
||||
next_op->filename = zend_get_compiled_filename();
|
||||
next_op->result.op_type = IS_UNUSED;
|
||||
|
||||
init_op(next_op CLS_CC);
|
||||
|
||||
return next_op;
|
||||
}
|
||||
@@ -293,9 +311,11 @@ void pass_include_eval(zend_op_array *op_array)
|
||||
while (opline<end) {
|
||||
if (opline->op1.op_type==IS_CONST) {
|
||||
opline->op1.u.constant.is_ref = 1;
|
||||
opline->op1.u.constant.refcount = 2; /* Make sure is_ref won't be reset */
|
||||
}
|
||||
if (opline->op2.op_type==IS_CONST) {
|
||||
opline->op2.u.constant.is_ref = 1;
|
||||
opline->op2.u.constant.refcount = 2;
|
||||
}
|
||||
opline++;
|
||||
}
|
||||
@@ -310,17 +330,17 @@ int print_class(zend_class_entry *class_entry)
|
||||
return 0;
|
||||
}
|
||||
|
||||
ZEND_API void *get_unary_op(int opcode)
|
||||
ZEND_API unary_op_type get_unary_op(int opcode)
|
||||
{
|
||||
switch(opcode) {
|
||||
case ZEND_BW_NOT:
|
||||
return (void *) bitwise_not_function;
|
||||
return (unary_op_type) bitwise_not_function;
|
||||
break;
|
||||
case ZEND_BOOL_NOT:
|
||||
return (void *) boolean_not_function;
|
||||
return (unary_op_type) boolean_not_function;
|
||||
break;
|
||||
default:
|
||||
return (void *) NULL;
|
||||
return (unary_op_type) NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -361,6 +381,9 @@ ZEND_API void *get_binary_op(int opcode)
|
||||
case ZEND_ASSIGN_CONCAT:
|
||||
return (void *) concat_function;
|
||||
break;
|
||||
case ZEND_IS_IDENTICAL:
|
||||
return (void *) is_identical_function;
|
||||
break;
|
||||
case ZEND_IS_EQUAL:
|
||||
return (void *) is_equal_function;
|
||||
break;
|
||||
|
||||
+335
-205
@@ -2,34 +2,41 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
#include <ctype.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "zend.h"
|
||||
#include "zend_operators.h"
|
||||
#include "zend_variables.h"
|
||||
#include "zend_globals.h"
|
||||
#include "zend_list.h"
|
||||
#include "zend_fast_cache.h"
|
||||
|
||||
|
||||
#if WITH_BCMATH
|
||||
#include "functions/number.h"
|
||||
#include "ext/bcmath/number.h"
|
||||
#endif
|
||||
|
||||
static inline int is_numeric_string(char *str, int length, long *lval, double *dval);
|
||||
|
||||
ZEND_API void convert_scalar_to_number(zval *op)
|
||||
{
|
||||
@@ -42,7 +49,7 @@ ZEND_API void convert_scalar_to_number(zval *op)
|
||||
case IS_LONG:
|
||||
break;
|
||||
#if WITH_BCMATH
|
||||
case IS_BC:
|
||||
case FLAG_IS_BC:
|
||||
op->type = IS_DOUBLE; /* may have lost significant digits */
|
||||
break;
|
||||
#endif
|
||||
@@ -52,128 +59,114 @@ ZEND_API void convert_scalar_to_number(zval *op)
|
||||
break;
|
||||
}
|
||||
STR_FREE(strval);
|
||||
} else if (op->type == IS_BOOL || op->type==IS_RESOURCE) {
|
||||
} else if (op->type==IS_BOOL || op->type==IS_RESOURCE) {
|
||||
op->type = IS_LONG;
|
||||
} else if (op->type==IS_NULL) {
|
||||
op->type = IS_LONG;
|
||||
op->value.lval = 0;
|
||||
}
|
||||
}
|
||||
|
||||
#define zendi_convert_scalar_to_number(op, holder) \
|
||||
if ((op)->type == IS_STRING) { \
|
||||
switch (((holder).type=is_numeric_string((op)->value.str.val, (op)->value.str.len, &(holder).value.lval, &(holder).value.dval))) { \
|
||||
case IS_DOUBLE: \
|
||||
case IS_LONG: \
|
||||
break; \
|
||||
case IS_BC: \
|
||||
(holder).type = IS_DOUBLE; /* may have lost significant digits */ \
|
||||
break; \
|
||||
default: \
|
||||
(holder).value.lval = strtol((op)->value.str.val, NULL, 10); \
|
||||
(holder).type = IS_LONG; \
|
||||
break; \
|
||||
} \
|
||||
(op) = &(holder); \
|
||||
#define zendi_convert_scalar_to_number(op, holder, result) \
|
||||
if (op==result) { \
|
||||
convert_scalar_to_number(op); \
|
||||
} else if ((op)->type == IS_STRING) { \
|
||||
switch (((holder).type=is_numeric_string((op)->value.str.val, (op)->value.str.len, &(holder).value.lval, &(holder).value.dval))) { \
|
||||
case IS_DOUBLE: \
|
||||
case IS_LONG: \
|
||||
break; \
|
||||
case FLAG_IS_BC: \
|
||||
(holder).type = IS_DOUBLE; /* may have lost significant digits */ \
|
||||
break; \
|
||||
default: \
|
||||
(holder).value.lval = strtol((op)->value.str.val, NULL, 10); \
|
||||
(holder).type = IS_LONG; \
|
||||
break; \
|
||||
} \
|
||||
(op) = &(holder); \
|
||||
} else if ((op)->type==IS_BOOL || (op)->type==IS_RESOURCE) { \
|
||||
(holder).value.lval = (op)->value.lval; \
|
||||
(holder).type = IS_LONG; \
|
||||
(op) = &(holder); \
|
||||
} else if ((op)->type==IS_NULL) { \
|
||||
(holder).value.lval = 0; \
|
||||
(holder).type = IS_LONG; \
|
||||
(op) = &(holder); \
|
||||
}
|
||||
|
||||
|
||||
#define zendi_convert_to_long(op, holder) \
|
||||
if ((op)->type != IS_LONG) { \
|
||||
switch ((op)->type) { \
|
||||
case IS_BOOL: \
|
||||
case IS_RESOURCE: \
|
||||
break; \
|
||||
case IS_DOUBLE: \
|
||||
(holder).value.lval = (long) (op)->value.dval; \
|
||||
break; \
|
||||
case IS_STRING: \
|
||||
(holder).value.lval = strtol((op)->value.str.val, NULL, 10); \
|
||||
break; \
|
||||
case IS_ARRAY: \
|
||||
(holder).value.lval = (zend_hash_num_elements((op)->value.ht)?1:0); \
|
||||
break; \
|
||||
case IS_OBJECT: \
|
||||
(holder).value.lval = (zend_hash_num_elements((op)->value.obj.properties)?1:0); \
|
||||
break; \
|
||||
default: \
|
||||
zend_error(E_WARNING, "Cannot convert to ordinal value"); \
|
||||
(holder).value.lval = 0; \
|
||||
break; \
|
||||
} \
|
||||
(holder).type = IS_LONG; \
|
||||
(op) = &(holder); \
|
||||
|
||||
#define zendi_convert_to_long(op, holder, result) \
|
||||
if (op==result) { \
|
||||
convert_to_long(op); \
|
||||
} else if ((op)->type==IS_BOOL || (op)->type==IS_RESOURCE) { \
|
||||
(holder).value.lval = (op)->value.lval; \
|
||||
(holder).type = IS_LONG; \
|
||||
(op) = &(holder); \
|
||||
} else if ((op)->type != IS_LONG) { \
|
||||
switch ((op)->type) { \
|
||||
case IS_NULL: \
|
||||
(holder).value.lval = 0; \
|
||||
break; \
|
||||
case IS_DOUBLE: \
|
||||
(holder).value.lval = (long) (op)->value.dval; \
|
||||
break; \
|
||||
case IS_STRING: \
|
||||
(holder).value.lval = strtol((op)->value.str.val, NULL, 10); \
|
||||
break; \
|
||||
case IS_ARRAY: \
|
||||
(holder).value.lval = (zend_hash_num_elements((op)->value.ht)?1:0); \
|
||||
break; \
|
||||
case IS_OBJECT: \
|
||||
(holder).value.lval = (zend_hash_num_elements((op)->value.obj.properties)?1:0); \
|
||||
break; \
|
||||
default: \
|
||||
zend_error(E_WARNING, "Cannot convert to ordinal value"); \
|
||||
(holder).value.lval = 0; \
|
||||
break; \
|
||||
} \
|
||||
(holder).type = IS_LONG; \
|
||||
(op) = &(holder); \
|
||||
}
|
||||
|
||||
|
||||
#define zendi_convert_to_boolean(op, holder) \
|
||||
if ((op)->type != IS_BOOL) { \
|
||||
switch ((op)->type) { \
|
||||
case IS_LONG: \
|
||||
case IS_RESOURCE: \
|
||||
(holder).value.lval = ((op)->value.lval ? 1 : 0); \
|
||||
break; \
|
||||
case IS_DOUBLE: \
|
||||
(holder).value.lval = ((op)->value.dval ? 1 : 0); \
|
||||
break; \
|
||||
case IS_STRING: \
|
||||
if ((op)->value.str.len == 0 \
|
||||
|| ((op)->value.str.len==1 && (op)->value.str.val[0]=='0')) { \
|
||||
(holder).value.lval = 0; \
|
||||
} else { \
|
||||
(holder).value.lval = 1; \
|
||||
} \
|
||||
break; \
|
||||
case IS_ARRAY: \
|
||||
(holder).value.lval = (zend_hash_num_elements((op)->value.ht)?1:0); \
|
||||
break; \
|
||||
case IS_OBJECT: \
|
||||
(holder).value.lval = (zend_hash_num_elements((op)->value.obj.properties)?1:0); \
|
||||
break; \
|
||||
default: \
|
||||
(holder).value.lval = 0; \
|
||||
break; \
|
||||
} \
|
||||
(holder).type = IS_BOOL; \
|
||||
(op) = &(holder); \
|
||||
} \
|
||||
|
||||
|
||||
static inline void zendi_convert_to_string(zval **op_ptr, zval *holder)
|
||||
{
|
||||
zval *op = *op_ptr;
|
||||
ELS_FETCH();
|
||||
|
||||
if (op->type != IS_STRING) {
|
||||
switch (op->type) {
|
||||
case IS_BOOL:
|
||||
holder->value.str.val = (op->value.lval?estrndup("1",1):estrndup("0",1));
|
||||
holder->value.str.len = 1;
|
||||
break;
|
||||
case IS_RESOURCE:
|
||||
case IS_LONG:
|
||||
holder->value.str.val = (char *) emalloc(MAX_LENGTH_OF_LONG + 1);
|
||||
holder->value.str.len = zend_sprintf(holder->value.str.val, "%ld", op->value.lval); /* SAFE */
|
||||
break;
|
||||
case IS_DOUBLE: {
|
||||
holder->value.str.val = (char *) emalloc(MAX_LENGTH_OF_DOUBLE + EG(precision) + 1);
|
||||
holder->value.str.len = zend_sprintf(holder->value.str.val, "%.*G", (int) EG(precision), op->value.dval); /* SAFE */
|
||||
/* %G already handles removing trailing zeros from the fractional part, yay */
|
||||
break;
|
||||
}
|
||||
case IS_ARRAY:
|
||||
holder->value.str.val = estrndup("Array",sizeof("Array")-1);
|
||||
holder->value.str.len = sizeof("Array")-1;
|
||||
break;
|
||||
case IS_OBJECT:
|
||||
holder->value.str.val = estrndup("Object",sizeof("Object")-1);
|
||||
holder->value.str.len = sizeof("Object")-1;
|
||||
break;
|
||||
default:
|
||||
var_reset(holder);
|
||||
break;
|
||||
}
|
||||
holder->type = IS_STRING;
|
||||
*op_ptr = holder;
|
||||
#define zendi_convert_to_boolean(op, holder, result) \
|
||||
if (op==result) { \
|
||||
convert_to_boolean(op); \
|
||||
} else if ((op)->type != IS_BOOL) { \
|
||||
switch ((op)->type) { \
|
||||
case IS_NULL: \
|
||||
(holder).value.lval = 0; \
|
||||
break; \
|
||||
case IS_RESOURCE: \
|
||||
case IS_LONG: \
|
||||
(holder).value.lval = ((op)->value.lval ? 1 : 0); \
|
||||
break; \
|
||||
case IS_DOUBLE: \
|
||||
(holder).value.lval = ((op)->value.dval ? 1 : 0); \
|
||||
break; \
|
||||
case IS_STRING: \
|
||||
if ((op)->value.str.len == 0 \
|
||||
|| ((op)->value.str.len==1 && (op)->value.str.val[0]=='0')) { \
|
||||
(holder).value.lval = 0; \
|
||||
} else { \
|
||||
(holder).value.lval = 1; \
|
||||
} \
|
||||
break; \
|
||||
case IS_ARRAY: \
|
||||
(holder).value.lval = (zend_hash_num_elements((op)->value.ht)?1:0); \
|
||||
break; \
|
||||
case IS_OBJECT: \
|
||||
(holder).value.lval = (zend_hash_num_elements((op)->value.obj.properties)?1:0); \
|
||||
break; \
|
||||
default: \
|
||||
(holder).value.lval = 0; \
|
||||
break; \
|
||||
} \
|
||||
(holder).type = IS_BOOL; \
|
||||
(op) = &(holder); \
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void convert_to_long(zval *op)
|
||||
{
|
||||
@@ -187,37 +180,35 @@ ZEND_API void convert_to_long_base(zval *op, int base)
|
||||
long tmp;
|
||||
|
||||
switch (op->type) {
|
||||
case IS_BOOL:
|
||||
case IS_NULL:
|
||||
op->value.lval = 0;
|
||||
break;
|
||||
case IS_RESOURCE:
|
||||
case IS_BOOL:
|
||||
case IS_LONG:
|
||||
return;
|
||||
break;
|
||||
case IS_DOUBLE:
|
||||
op->value.lval = (long) op->value.dval;
|
||||
op->type = IS_LONG;
|
||||
break;
|
||||
case IS_STRING:
|
||||
strval = op->value.str.val;
|
||||
op->value.lval = strtol(strval, NULL, base);
|
||||
op->type = IS_LONG;
|
||||
STR_FREE(strval);
|
||||
break;
|
||||
case IS_ARRAY:
|
||||
tmp = (zend_hash_num_elements(op->value.ht)?1:0);
|
||||
zval_dtor(op);
|
||||
op->value.lval = tmp;
|
||||
op->type = IS_LONG;
|
||||
break;
|
||||
case IS_OBJECT:
|
||||
tmp = (zend_hash_num_elements(op->value.obj.properties)?1:0);
|
||||
zval_dtor(op);
|
||||
op->value.lval = tmp;
|
||||
op->type = IS_LONG;
|
||||
break;
|
||||
default:
|
||||
zend_error(E_WARNING, "Cannot convert to ordinal value");
|
||||
zval_dtor(op);
|
||||
op->value.lval = 0;
|
||||
op->type = IS_LONG;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -231,11 +222,13 @@ ZEND_API void convert_to_double(zval *op)
|
||||
double tmp;
|
||||
|
||||
switch (op->type) {
|
||||
case IS_BOOL:
|
||||
case IS_NULL:
|
||||
op->value.dval = 0.0;
|
||||
break;
|
||||
case IS_RESOURCE:
|
||||
case IS_BOOL:
|
||||
case IS_LONG:
|
||||
op->value.dval = (double) op->value.lval;
|
||||
op->type = IS_DOUBLE;
|
||||
break;
|
||||
case IS_DOUBLE:
|
||||
break;
|
||||
@@ -243,28 +236,32 @@ ZEND_API void convert_to_double(zval *op)
|
||||
strval = op->value.str.val;
|
||||
|
||||
op->value.dval = strtod(strval, NULL);
|
||||
op->type = IS_DOUBLE;
|
||||
STR_FREE(strval);
|
||||
break;
|
||||
case IS_ARRAY:
|
||||
tmp = (zend_hash_num_elements(op->value.ht)?1:0);
|
||||
zval_dtor(op);
|
||||
op->value.dval = tmp;
|
||||
op->type = IS_DOUBLE;
|
||||
break;
|
||||
case IS_OBJECT:
|
||||
tmp = (zend_hash_num_elements(op->value.obj.properties)?1:0);
|
||||
zval_dtor(op);
|
||||
op->value.dval = tmp;
|
||||
op->type = IS_DOUBLE;
|
||||
break;
|
||||
default:
|
||||
zend_error(E_WARNING, "Cannot convert to real value (type=%d)", op->type);
|
||||
zval_dtor(op);
|
||||
op->value.dval = 0;
|
||||
op->type = IS_DOUBLE;
|
||||
break;
|
||||
}
|
||||
op->type = IS_DOUBLE;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void convert_to_null(zval *op)
|
||||
{
|
||||
zval_dtor(op);
|
||||
op->type = IS_NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -276,8 +273,11 @@ ZEND_API void convert_to_boolean(zval *op)
|
||||
switch (op->type) {
|
||||
case IS_BOOL:
|
||||
break;
|
||||
case IS_LONG:
|
||||
case IS_NULL:
|
||||
op->value.lval = 0;
|
||||
break;
|
||||
case IS_RESOURCE:
|
||||
case IS_LONG:
|
||||
op->value.lval = (op->value.lval ? 1 : 0);
|
||||
break;
|
||||
case IS_DOUBLE:
|
||||
@@ -320,11 +320,20 @@ ZEND_API void convert_to_string(zval *op)
|
||||
ELS_FETCH();
|
||||
|
||||
switch (op->type) {
|
||||
case IS_NULL:
|
||||
op->value.str.val = empty_string;
|
||||
op->value.str.len = 0;
|
||||
break;
|
||||
case IS_STRING:
|
||||
break;
|
||||
case IS_BOOL:
|
||||
op->value.str.val = (op->value.lval?estrndup("1",1):estrndup("0",0));
|
||||
op->value.str.len = 1;
|
||||
if (op->value.lval) {
|
||||
op->value.str.val = estrndup("1", 1);
|
||||
op->value.str.len = 1;
|
||||
} else {
|
||||
op->value.str.val = empty_string;
|
||||
op->value.str.len = 0;
|
||||
}
|
||||
break;
|
||||
case IS_LONG:
|
||||
lval = op->value.lval;
|
||||
@@ -360,24 +369,24 @@ ZEND_API void convert_to_string(zval *op)
|
||||
|
||||
static void convert_scalar_to_array(zval *op, int type)
|
||||
{
|
||||
zval *entry = (zval *) emalloc(sizeof(zval));
|
||||
zval *entry;
|
||||
|
||||
ALLOC_ZVAL(entry);
|
||||
*entry = *op;
|
||||
entry->refcount = 1;
|
||||
entry->is_ref = 0;
|
||||
INIT_PZVAL(entry);
|
||||
|
||||
switch (type) {
|
||||
case IS_ARRAY:
|
||||
op->value.ht = (HashTable *) emalloc(sizeof(HashTable));
|
||||
zend_hash_init(op->value.ht, 0, NULL, PVAL_PTR_DTOR, 0);
|
||||
ALLOC_HASHTABLE(op->value.ht);
|
||||
zend_hash_init(op->value.ht, 0, NULL, ZVAL_PTR_DTOR, 0);
|
||||
zend_hash_index_update(op->value.ht, 0, (void *) &entry, sizeof(zval *), NULL);
|
||||
op->type = IS_ARRAY;
|
||||
break;
|
||||
case IS_OBJECT:
|
||||
op->value.obj.properties = (HashTable *) emalloc(sizeof(HashTable));
|
||||
zend_hash_init(op->value.obj.properties, 0, NULL, PVAL_PTR_DTOR, 0);
|
||||
ALLOC_HASHTABLE(op->value.obj.properties);
|
||||
zend_hash_init(op->value.obj.properties, 0, NULL, ZVAL_PTR_DTOR, 0);
|
||||
zend_hash_update(op->value.obj.properties, "scalar", sizeof("scalar"), (void *) &entry, sizeof(zval *), NULL);
|
||||
op->value.obj.ce = &standard_class;
|
||||
op->value.obj.ce = &zend_standard_class_def;
|
||||
op->type = IS_OBJECT;
|
||||
break;
|
||||
}
|
||||
@@ -394,6 +403,10 @@ ZEND_API void convert_to_array(zval *op)
|
||||
op->type = IS_ARRAY;
|
||||
op->value.ht = op->value.obj.properties;
|
||||
return;
|
||||
case IS_NULL:
|
||||
ALLOC_HASHTABLE(op->value.ht);
|
||||
zend_hash_init(op->value.ht, 0, NULL, ZVAL_PTR_DTOR, 0);
|
||||
op->type = IS_ARRAY;
|
||||
break;
|
||||
default:
|
||||
convert_scalar_to_array(op, IS_ARRAY);
|
||||
@@ -408,11 +421,16 @@ ZEND_API void convert_to_object(zval *op)
|
||||
case IS_ARRAY:
|
||||
op->type = IS_OBJECT;
|
||||
op->value.obj.properties = op->value.ht;
|
||||
op->value.obj.ce = &standard_class;
|
||||
op->value.obj.ce = &zend_standard_class_def;
|
||||
return;
|
||||
break;
|
||||
case IS_OBJECT:
|
||||
return;
|
||||
case IS_NULL:
|
||||
ALLOC_HASHTABLE(op->value.obj.properties);
|
||||
zend_hash_init(op->value.obj.properties, 0, NULL, ZVAL_PTR_DTOR, 0);
|
||||
op->value.obj.ce = &zend_standard_class_def;
|
||||
op->type = IS_OBJECT;
|
||||
break;
|
||||
default:
|
||||
convert_scalar_to_array(op, IS_OBJECT);
|
||||
@@ -426,15 +444,23 @@ ZEND_API int add_function(zval *result, zval *op1, zval *op2)
|
||||
zval op1_copy, op2_copy;
|
||||
|
||||
if (op1->type == IS_ARRAY && op2->type == IS_ARRAY) {
|
||||
zval tmp;
|
||||
|
||||
zend_hash_merge(op1->value.ht,op2->value.ht,(void (*)(void *pData)) zval_copy_ctor, (void *) &tmp, sizeof(zval));
|
||||
*result = *op1;
|
||||
zval_dtor(op2);
|
||||
zval *tmp;
|
||||
|
||||
if ((result == op1) && (result == op2)) {
|
||||
/* $a += $a */
|
||||
return SUCCESS;
|
||||
}
|
||||
if (result != op1) {
|
||||
/* $a += $b */
|
||||
*result = *op1;
|
||||
zval_copy_ctor(result);
|
||||
}
|
||||
zend_hash_merge(result->value.ht, op2->value.ht, (void (*)(void *pData)) zval_add_ref, (void *) &tmp, sizeof(zval *), 0);
|
||||
return SUCCESS;
|
||||
}
|
||||
zendi_convert_scalar_to_number(op1, op1_copy);
|
||||
zendi_convert_scalar_to_number(op2, op2_copy);
|
||||
zendi_convert_scalar_to_number(op1, op1_copy, result);
|
||||
zendi_convert_scalar_to_number(op2, op2_copy, result);
|
||||
|
||||
|
||||
if (op1->type == IS_LONG && op2->type == IS_LONG) {
|
||||
double dval = (double) op1->value.lval + (double) op2->value.lval;
|
||||
@@ -470,8 +496,8 @@ ZEND_API int sub_function(zval *result, zval *op1, zval *op2)
|
||||
{
|
||||
zval op1_copy, op2_copy;
|
||||
|
||||
zendi_convert_scalar_to_number(op1, op1_copy);
|
||||
zendi_convert_scalar_to_number(op2, op2_copy);
|
||||
zendi_convert_scalar_to_number(op1, op1_copy, result);
|
||||
zendi_convert_scalar_to_number(op2, op2_copy, result);
|
||||
|
||||
if (op1->type == IS_LONG && op2->type == IS_LONG) {
|
||||
double dval = (double) op1->value.lval - (double) op2->value.lval;
|
||||
@@ -507,8 +533,8 @@ ZEND_API int mul_function(zval *result, zval *op1, zval *op2)
|
||||
{
|
||||
zval op1_copy, op2_copy;
|
||||
|
||||
zendi_convert_scalar_to_number(op1, op1_copy);
|
||||
zendi_convert_scalar_to_number(op2, op2_copy);
|
||||
zendi_convert_scalar_to_number(op1, op1_copy, result);
|
||||
zendi_convert_scalar_to_number(op2, op2_copy, result);
|
||||
|
||||
if (op1->type == IS_LONG && op2->type == IS_LONG) {
|
||||
double dval = (double) op1->value.lval * (double) op2->value.lval;
|
||||
@@ -543,8 +569,8 @@ ZEND_API int div_function(zval *result, zval *op1, zval *op2)
|
||||
{
|
||||
zval op1_copy, op2_copy;
|
||||
|
||||
zendi_convert_scalar_to_number(op1, op1_copy);
|
||||
zendi_convert_scalar_to_number(op2, op2_copy);
|
||||
zendi_convert_scalar_to_number(op1, op1_copy, result);
|
||||
zendi_convert_scalar_to_number(op2, op2_copy, result);
|
||||
|
||||
if ((op2->type == IS_LONG && op2->value.lval == 0) || (op2->type == IS_DOUBLE && op2->value.dval == 0.0)) {
|
||||
zend_error(E_WARNING, "Division by zero");
|
||||
@@ -583,8 +609,8 @@ ZEND_API int mod_function(zval *result, zval *op1, zval *op2)
|
||||
{
|
||||
zval op1_copy, op2_copy;
|
||||
|
||||
zendi_convert_to_long(op1, op1_copy);
|
||||
zendi_convert_to_long(op2, op2_copy);
|
||||
zendi_convert_to_long(op1, op1_copy, result);
|
||||
zendi_convert_to_long(op2, op2_copy, result);
|
||||
|
||||
if (op2->value.lval == 0) {
|
||||
var_reset(result);
|
||||
@@ -603,12 +629,12 @@ ZEND_API int boolean_or_function(zval *result, zval *op1, zval *op2)
|
||||
|
||||
result->type = IS_BOOL;
|
||||
|
||||
zendi_convert_to_boolean(op1, op1_copy);
|
||||
zendi_convert_to_boolean(op1, op1_copy, result);
|
||||
if (op1->value.lval) {
|
||||
result->value.lval = 1;
|
||||
return SUCCESS;
|
||||
}
|
||||
zendi_convert_to_boolean(op2, op2_copy);
|
||||
zendi_convert_to_boolean(op2, op2_copy, result);
|
||||
if (op2->value.lval) {
|
||||
result->value.lval = 1;
|
||||
return SUCCESS;
|
||||
@@ -624,12 +650,12 @@ ZEND_API int boolean_and_function(zval *result, zval *op1, zval *op2)
|
||||
|
||||
result->type = IS_BOOL;
|
||||
|
||||
zendi_convert_to_boolean(op1, op1_copy);
|
||||
zendi_convert_to_boolean(op1, op1_copy, result);
|
||||
if (!op1->value.lval) {
|
||||
result->value.lval = 0;
|
||||
return SUCCESS;
|
||||
}
|
||||
zendi_convert_to_boolean(op2, op2_copy);
|
||||
zendi_convert_to_boolean(op2, op2_copy, result);
|
||||
if (!op2->value.lval) {
|
||||
result->value.lval = 0;
|
||||
return SUCCESS;
|
||||
@@ -645,8 +671,8 @@ ZEND_API int boolean_xor_function(zval *result, zval *op1, zval *op2)
|
||||
|
||||
result->type = IS_BOOL;
|
||||
|
||||
zendi_convert_to_boolean(op1, op1_copy);
|
||||
zendi_convert_to_boolean(op2, op2_copy);
|
||||
zendi_convert_to_boolean(op1, op1_copy, result);
|
||||
zendi_convert_to_boolean(op2, op2_copy, result);
|
||||
result->value.lval = op1->value.lval ^ op2->value.lval;
|
||||
return SUCCESS;
|
||||
}
|
||||
@@ -656,7 +682,7 @@ ZEND_API int boolean_not_function(zval *result, zval *op1)
|
||||
{
|
||||
zval op1_copy;
|
||||
|
||||
zendi_convert_to_boolean(op1, op1_copy);
|
||||
zendi_convert_to_boolean(op1, op1_copy, result);
|
||||
|
||||
result->type = IS_BOOL;
|
||||
result->value.lval = !op1->value.lval;
|
||||
@@ -711,6 +737,7 @@ ZEND_API int bitwise_or_function(zval *result, zval *op1, zval *op2)
|
||||
shorter = op1;
|
||||
}
|
||||
|
||||
result->type = IS_STRING;
|
||||
result->value.str.len = longer->value.str.len;
|
||||
result->value.str.val = estrndup(longer->value.str.val, longer->value.str.len);
|
||||
for (i = 0; i < shorter->value.str.len; i++) {
|
||||
@@ -718,8 +745,8 @@ ZEND_API int bitwise_or_function(zval *result, zval *op1, zval *op2)
|
||||
}
|
||||
return SUCCESS;
|
||||
}
|
||||
zendi_convert_to_long(op1, op1_copy);
|
||||
zendi_convert_to_long(op2, op2_copy);
|
||||
zendi_convert_to_long(op1, op1_copy, result);
|
||||
zendi_convert_to_long(op2, op2_copy, result);
|
||||
|
||||
result->type = IS_LONG;
|
||||
result->value.lval = op1->value.lval | op2->value.lval;
|
||||
@@ -743,6 +770,7 @@ ZEND_API int bitwise_and_function(zval *result, zval *op1, zval *op2)
|
||||
shorter = op1;
|
||||
}
|
||||
|
||||
result->type = IS_STRING;
|
||||
result->value.str.len = shorter->value.str.len;
|
||||
result->value.str.val = estrndup(shorter->value.str.val, shorter->value.str.len);
|
||||
for (i = 0; i < shorter->value.str.len; i++) {
|
||||
@@ -752,8 +780,8 @@ ZEND_API int bitwise_and_function(zval *result, zval *op1, zval *op2)
|
||||
}
|
||||
|
||||
|
||||
zendi_convert_to_long(op1, op1_copy);
|
||||
zendi_convert_to_long(op2, op2_copy);
|
||||
zendi_convert_to_long(op1, op1_copy, result);
|
||||
zendi_convert_to_long(op2, op2_copy, result);
|
||||
|
||||
result->type = IS_LONG;
|
||||
result->value.lval = op1->value.lval & op2->value.lval;
|
||||
@@ -777,6 +805,7 @@ ZEND_API int bitwise_xor_function(zval *result, zval *op1, zval *op2)
|
||||
shorter = op1;
|
||||
}
|
||||
|
||||
result->type = IS_STRING;
|
||||
result->value.str.len = shorter->value.str.len;
|
||||
result->value.str.val = estrndup(shorter->value.str.val, shorter->value.str.len);
|
||||
for (i = 0; i < shorter->value.str.len; i++) {
|
||||
@@ -785,8 +814,8 @@ ZEND_API int bitwise_xor_function(zval *result, zval *op1, zval *op2)
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
zendi_convert_to_long(op1, op1_copy);
|
||||
zendi_convert_to_long(op2, op2_copy);
|
||||
zendi_convert_to_long(op1, op1_copy, result);
|
||||
zendi_convert_to_long(op2, op2_copy, result);
|
||||
|
||||
result->type = IS_LONG;
|
||||
result->value.lval = op1->value.lval ^ op2->value.lval;
|
||||
@@ -798,8 +827,8 @@ ZEND_API int shift_left_function(zval *result, zval *op1, zval *op2)
|
||||
{
|
||||
zval op1_copy, op2_copy;
|
||||
|
||||
zendi_convert_to_long(op1, op1_copy);
|
||||
zendi_convert_to_long(op2, op2_copy);
|
||||
zendi_convert_to_long(op1, op1_copy, result);
|
||||
zendi_convert_to_long(op2, op2_copy, result);
|
||||
result->value.lval = op1->value.lval << op2->value.lval;
|
||||
result->type = IS_LONG;
|
||||
return SUCCESS;
|
||||
@@ -810,8 +839,8 @@ ZEND_API int shift_right_function(zval *result, zval *op1, zval *op2)
|
||||
{
|
||||
zval op1_copy, op2_copy;
|
||||
|
||||
zendi_convert_to_long(op1, op1_copy);
|
||||
zendi_convert_to_long(op2, op2_copy);
|
||||
zendi_convert_to_long(op1, op1_copy, result);
|
||||
zendi_convert_to_long(op2, op2_copy, result);
|
||||
result->value.lval = op1->value.lval >> op2->value.lval;
|
||||
result->type = IS_LONG;
|
||||
return SUCCESS;
|
||||
@@ -847,11 +876,18 @@ ZEND_API int add_string_to_string(zval *result, zval *op1, zval *op2)
|
||||
ZEND_API int concat_function(zval *result, zval *op1, zval *op2)
|
||||
{
|
||||
zval op1_copy, op2_copy;
|
||||
zval *orig_op1=op1, *orig_op2=op2;
|
||||
|
||||
zendi_convert_to_string(&op1, &op1_copy);
|
||||
zendi_convert_to_string(&op2, &op2_copy);
|
||||
int use_copy1, use_copy2;
|
||||
|
||||
|
||||
zend_make_printable_zval(op1, &op1_copy, &use_copy1);
|
||||
zend_make_printable_zval(op2, &op2_copy, &use_copy2);
|
||||
|
||||
if (use_copy1) {
|
||||
op1 = &op1_copy;
|
||||
}
|
||||
if (use_copy2) {
|
||||
op2 = &op2_copy;
|
||||
}
|
||||
if (result==op1) { /* special case, perform operations on result */
|
||||
uint res_len = op1->value.str.len + op2->value.str.len;
|
||||
|
||||
@@ -872,10 +908,10 @@ ZEND_API int concat_function(zval *result, zval *op1, zval *op2)
|
||||
result->value.str.val[result->value.str.len] = 0;
|
||||
result->type = IS_STRING;
|
||||
}
|
||||
if (orig_op1 != op1) {
|
||||
if (use_copy1) {
|
||||
zval_dtor(op1);
|
||||
}
|
||||
if (orig_op2 != op2) {
|
||||
if (use_copy2) {
|
||||
zval_dtor(op2);
|
||||
}
|
||||
return SUCCESS;
|
||||
@@ -887,19 +923,21 @@ ZEND_API int compare_function(zval *result, zval *op1, zval *op2)
|
||||
zval op1_copy, op2_copy;
|
||||
|
||||
if (op1->type == IS_STRING && op2->type == IS_STRING) {
|
||||
zendi_smart_strcmp(result,op1,op2);
|
||||
zendi_smart_strcmp(result, op1, op2);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
if (op1->type == IS_BOOL || op2->type == IS_BOOL) {
|
||||
zendi_convert_to_boolean(op1, op1_copy);
|
||||
zendi_convert_to_boolean(op2, op2_copy);
|
||||
if (op1->type == IS_BOOL || op2->type == IS_BOOL
|
||||
|| op1->type == IS_NULL || op2->type == IS_NULL) {
|
||||
zendi_convert_to_boolean(op1, op1_copy, result);
|
||||
zendi_convert_to_boolean(op2, op2_copy, result);
|
||||
result->type = IS_LONG;
|
||||
result->value.lval = (op1->value.lval!=op2->value.lval);
|
||||
result->value.lval = op1->value.lval - op2->value.lval;
|
||||
return SUCCESS;
|
||||
}
|
||||
zendi_convert_scalar_to_number(op1, op1_copy);
|
||||
zendi_convert_scalar_to_number(op2, op2_copy);
|
||||
|
||||
zendi_convert_scalar_to_number(op1, op1_copy, result);
|
||||
zendi_convert_scalar_to_number(op2, op2_copy, result);
|
||||
|
||||
if (op1->type == IS_LONG && op2->type == IS_LONG) {
|
||||
result->type = IS_LONG;
|
||||
@@ -921,6 +959,46 @@ ZEND_API int compare_function(zval *result, zval *op1, zval *op2)
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int is_identical_function(zval *result, zval *op1, zval *op2)
|
||||
{
|
||||
result->type = IS_BOOL;
|
||||
if (op1->type != op2->type) {
|
||||
result->value.lval = 0;
|
||||
return SUCCESS;
|
||||
}
|
||||
switch (op1->type) {
|
||||
case IS_NULL:
|
||||
result->value.lval = (op2->type==IS_NULL);
|
||||
return SUCCESS;
|
||||
break;
|
||||
case IS_BOOL:
|
||||
case IS_LONG:
|
||||
case IS_RESOURCE:
|
||||
result->value.lval = (op1->value.lval == op2->value.lval);
|
||||
return SUCCESS;
|
||||
break;
|
||||
case IS_DOUBLE:
|
||||
result->value.lval = (op1->value.dval == op2->value.dval);
|
||||
return SUCCESS;
|
||||
break;
|
||||
case IS_STRING:
|
||||
if ((op1->value.str.len == op2->value.str.len)
|
||||
&& (!memcmp(op1->value.str.val, op2->value.str.val, op1->value.str.len))) {
|
||||
result->value.lval = 1;
|
||||
} else {
|
||||
result->value.lval = 0;
|
||||
}
|
||||
return SUCCESS;
|
||||
break;
|
||||
case IS_ARRAY:
|
||||
case IS_OBJECT:
|
||||
zend_error(E_WARNING,"Cannot compare arrays or objects");
|
||||
break;
|
||||
}
|
||||
var_reset(result);
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
ZEND_API int is_equal_function(zval *result, zval *op1, zval *op2)
|
||||
{
|
||||
if (compare_function(result, op1, op2) == FAILURE) {
|
||||
@@ -953,7 +1031,6 @@ ZEND_API int is_not_equal_function(zval *result, zval *op1, zval *op2)
|
||||
|
||||
ZEND_API int is_smaller_function(zval *result, zval *op1, zval *op2)
|
||||
{
|
||||
//printf("Comparing %d and %d\n", op1->value.lval, op2->value.lval);
|
||||
if (compare_function(result, op1, op2) == FAILURE) {
|
||||
return FAILURE;
|
||||
}
|
||||
@@ -1090,14 +1167,12 @@ ZEND_API int increment_function(zval *op1)
|
||||
case IS_DOUBLE:
|
||||
op1->value.dval = op1->value.dval + 1;
|
||||
break;
|
||||
case IS_NULL:
|
||||
op1->value.lval = 1;
|
||||
op1->type = IS_LONG;
|
||||
break;
|
||||
case IS_STRING: /* Perl style string increment */
|
||||
if (op1->value.str.len==0) { /* consider as 0 */
|
||||
STR_FREE(op1->value.str.val);
|
||||
op1->value.lval = 1;
|
||||
op1->type = IS_LONG;
|
||||
} else {
|
||||
increment_string(op1);
|
||||
}
|
||||
increment_string(op1);
|
||||
break;
|
||||
default:
|
||||
return FAILURE;
|
||||
@@ -1124,6 +1199,7 @@ ZEND_API int decrement_function(zval *op1)
|
||||
op1->type = IS_LONG;
|
||||
break;
|
||||
} else if (is_numeric_string(op1->value.str.val, op1->value.str.len, &lval, NULL)==IS_LONG) { /* long */
|
||||
STR_FREE(op1->value.str.val);
|
||||
op1->value.lval = lval-1;
|
||||
op1->type = IS_LONG;
|
||||
break;
|
||||
@@ -1155,18 +1231,67 @@ ZEND_API void zend_str_tolower(char *str, unsigned int length)
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int zend_binary_strcmp(zval *s1, zval *s2)
|
||||
ZEND_API int zend_binary_strcmp(char *s1, uint len1, char *s2, uint len2)
|
||||
{
|
||||
int retval;
|
||||
|
||||
retval = memcmp(s1->value.str.val, s2->value.str.val, MIN(s1->value.str.len,s2->value.str.len));
|
||||
retval = memcmp(s1, s2, MIN(len1, len2));
|
||||
if (!retval) {
|
||||
return (s1->value.str.len - s2->value.str.len);
|
||||
return (len1 - len2);
|
||||
} else {
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
|
||||
ZEND_API int zend_binary_strncmp(char *s1, uint len1, char *s2, uint len2, uint length)
|
||||
{
|
||||
int retval;
|
||||
|
||||
retval = memcmp(s1, s2, MIN(length, MIN(len1, len2)));
|
||||
if (!retval) {
|
||||
return (MIN(length, len1) - MIN(length, len2));
|
||||
} else {
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int zend_binary_strcasecmp(char *s1, uint len1, char *s2, uint len2)
|
||||
{
|
||||
unsigned char c1 = 0, c2 = 0;
|
||||
|
||||
if (len1 != len2 || !len1) {
|
||||
return len1 - len2;
|
||||
}
|
||||
|
||||
while (len1--) {
|
||||
c1 = tolower(*s1++);
|
||||
c2 = tolower(*s2++);
|
||||
if (c1 != c2) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return c1 - c2;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int zend_binary_zval_strcmp(zval *s1, zval *s2)
|
||||
{
|
||||
return zend_binary_strcmp(s1->value.str.val, s1->value.str.len, s2->value.str.val, s2->value.str.len);
|
||||
}
|
||||
|
||||
ZEND_API int zend_binary_zval_strncmp(zval *s1, zval *s2, zval *s3)
|
||||
{
|
||||
return zend_binary_strncmp(s1->value.str.val, s1->value.str.len, s2->value.str.val, s2->value.str.len, s3->value.lval);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int zend_binary_zval_strcasecmp(zval *s1, zval *s2)
|
||||
{
|
||||
return zend_binary_strcasecmp(s1->value.str.val, s1->value.str.len, s2->value.str.val, s2->value.str.len);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2)
|
||||
{
|
||||
@@ -1177,7 +1302,7 @@ ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2)
|
||||
if ((ret1=is_numeric_string(s1->value.str.val, s1->value.str.len, &lval1, &dval1)) &&
|
||||
(ret2=is_numeric_string(s2->value.str.val, s2->value.str.len, &lval2, &dval2))) {
|
||||
#if WITH_BCMATH
|
||||
if ((ret1==IS_BC) || (ret2==IS_BC)) {
|
||||
if ((ret1==FLAG_IS_BC) || (ret2==FLAG_IS_BC)) {
|
||||
bc_num first, second;
|
||||
|
||||
/* use the BC math library to compare the numbers */
|
||||
@@ -1204,7 +1329,7 @@ ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2)
|
||||
result->type = IS_LONG;
|
||||
}
|
||||
} else {
|
||||
result->value.lval = zend_binary_strcmp(s1,s2);
|
||||
result->value.lval = zend_binary_zval_strcmp(s1, s2);
|
||||
result->type = IS_LONG;
|
||||
}
|
||||
return;
|
||||
@@ -1214,11 +1339,11 @@ ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2)
|
||||
/* returns 0 for non-numeric string
|
||||
* returns IS_DOUBLE for floating point string, and assigns the value to *dval (if it's not NULL)
|
||||
* returns IS_LONG for integer strings, and assigns the value to *lval (if it's not NULL)
|
||||
* returns IS_BC if the number might lose accuracy when converted to a double
|
||||
* returns FLAG_IS_BC if the number might lose accuracy when converted to a double
|
||||
*/
|
||||
|
||||
#if 1
|
||||
static inline int is_numeric_string(char *str, int length, long *lval, double *dval)
|
||||
ZEND_API inline int is_numeric_string(char *str, int length, long *lval, double *dval)
|
||||
{
|
||||
long local_lval;
|
||||
double local_dval;
|
||||
@@ -1240,6 +1365,11 @@ static inline int is_numeric_string(char *str, int length, long *lval, double *d
|
||||
errno=0;
|
||||
local_dval = strtod(str, &end_ptr);
|
||||
if (errno!=ERANGE && end_ptr == str+length) { /* floating point string */
|
||||
if (! finite(local_dval)) {
|
||||
/* "inf","nan" and maybe other weird ones */
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (dval) {
|
||||
*dval = local_dval;
|
||||
}
|
||||
@@ -1258,7 +1388,7 @@ static inline int is_numeric_string(char *str, int length, long *lval, double *d
|
||||
break;
|
||||
}
|
||||
}
|
||||
return IS_BC;
|
||||
return FLAG_IS_BC;
|
||||
} else {
|
||||
return IS_DOUBLE;
|
||||
}
|
||||
|
||||
+43
-7
@@ -2,18 +2,22 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _OPERATORS_H
|
||||
#define _OPERATORS_H
|
||||
|
||||
@@ -38,9 +42,11 @@ ZEND_API int shift_right_function(zval *result, zval *op1, zval *op2);
|
||||
ZEND_API int concat_function(zval *result, zval *op1, zval *op2);
|
||||
|
||||
ZEND_API int is_equal_function(zval *result, zval *op1, zval *op2);
|
||||
ZEND_API int is_identical_function(zval *result, zval *op1, zval *op2);
|
||||
ZEND_API int is_not_equal_function(zval *result, zval *op1, zval *op2);
|
||||
ZEND_API int is_smaller_function(zval *result, zval *op1, zval *op2);
|
||||
ZEND_API int is_smaller_or_equal_function(zval *result, zval *op1, zval *op2);
|
||||
ZEND_API inline int is_numeric_string(char *str, int length, long *lval, double *dval);
|
||||
|
||||
ZEND_API int increment_function(zval *op1);
|
||||
ZEND_API int decrement_function(zval *op2);
|
||||
@@ -49,20 +55,50 @@ BEGIN_EXTERN_C()
|
||||
ZEND_API void convert_scalar_to_number(zval *op);
|
||||
ZEND_API void convert_to_string(zval *op);
|
||||
ZEND_API void convert_to_long(zval *op);
|
||||
ZEND_API void convert_to_double(zval *op);
|
||||
ZEND_API void convert_to_long_base(zval *op, int base);
|
||||
ZEND_API void convert_to_null(zval *op);
|
||||
ZEND_API void convert_to_boolean(zval *op);
|
||||
ZEND_API void convert_to_array(zval *op);
|
||||
ZEND_API void convert_to_object(zval *op);
|
||||
ZEND_API int add_char_to_string(zval *result, zval *op1, zval *op2);
|
||||
ZEND_API int add_string_to_string(zval *result, zval *op1, zval *op2);
|
||||
ZEND_API void convert_to_double(zval *op);
|
||||
END_EXTERN_C()
|
||||
|
||||
ZEND_API int zval_is_true(zval *op);
|
||||
ZEND_API int compare_function(zval *result, zval *op1, zval *op2);
|
||||
|
||||
ZEND_API void zend_str_tolower(char *str, unsigned int length);
|
||||
ZEND_API int zend_binary_strcmp(zval *s1, zval *s2);
|
||||
ZEND_API int zend_binary_zval_strcmp(zval *s1, zval *s2);
|
||||
ZEND_API int zend_binary_zval_strncmp(zval *s1, zval *s2, zval *s3);
|
||||
ZEND_API int zend_binary_zval_strcasecmp(zval *s1, zval *s2);
|
||||
ZEND_API int zend_binary_strcmp(char *s1, uint len1, char *s2, uint len2);
|
||||
ZEND_API int zend_binary_strcasecmp(char *s1, uint len1, char *s2, uint len2);
|
||||
|
||||
ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2);
|
||||
|
||||
#define convert_to_ex_master(ppzv, lower_type, upper_type) \
|
||||
if ((*ppzv)->type!=IS_##upper_type) { \
|
||||
if (!(*ppzv)->is_ref) { \
|
||||
SEPARATE_ZVAL(ppzv); \
|
||||
} \
|
||||
convert_to_##lower_type(*ppzv); \
|
||||
}
|
||||
|
||||
#define convert_to_boolean_ex(ppzv) convert_to_ex_master(ppzv, boolean, BOOL)
|
||||
#define convert_to_long_ex(ppzv) convert_to_ex_master(ppzv, long, LONG)
|
||||
#define convert_to_double_ex(ppzv) convert_to_ex_master(ppzv, double, DOUBLE)
|
||||
#define convert_to_string_ex(ppzv) convert_to_ex_master(ppzv, string, STRING)
|
||||
#define convert_to_array_ex(ppzv) convert_to_ex_master(ppzv, array, ARRAY)
|
||||
#define convert_to_object_ex(ppzv) convert_to_ex_master(ppzv, object, OBJECT)
|
||||
#define convert_to_null_ex(ppzv) convert_to_ex_master(ppzv, null, NULL)
|
||||
|
||||
#define convert_scalar_to_number_ex(ppzv) \
|
||||
if ((*ppzv)->type!=IS_LONG && (*ppzv)->type!=IS_DOUBLE) { \
|
||||
if (!(*ppzv)->is_ref) { \
|
||||
SEPARATE_ZVAL(ppzv); \
|
||||
} \
|
||||
convert_scalar_to_number(*ppzv); \
|
||||
}
|
||||
|
||||
#endif
|
||||
+51
-11
@@ -2,26 +2,32 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#include "zend.h"
|
||||
#include "zend_ptr_stack.h"
|
||||
|
||||
#ifdef HAVE_STDARG_H
|
||||
# include <stdarg.h>
|
||||
#endif
|
||||
|
||||
ZEND_API void zend_ptr_stack_init(zend_ptr_stack *stack)
|
||||
{
|
||||
stack->top_element = stack->elements = (void **) emalloc(sizeof(void *)*STACK_BLOCK_SIZE);
|
||||
stack->max = STACK_BLOCK_SIZE;
|
||||
stack->top_element = stack->elements = (void **) emalloc(sizeof(void *)*PTR_STACK_BLOCK_SIZE);
|
||||
stack->max = PTR_STACK_BLOCK_SIZE;
|
||||
stack->top = 0;
|
||||
}
|
||||
|
||||
@@ -29,15 +35,49 @@ ZEND_API void zend_ptr_stack_init(zend_ptr_stack *stack)
|
||||
ZEND_API inline void zend_ptr_stack_push(zend_ptr_stack *stack, void *ptr)
|
||||
{
|
||||
if (stack->top >= stack->max) { /* we need to allocate more memory */
|
||||
short diff = stack->top_element-stack->elements;
|
||||
|
||||
stack->elements = (void **) erealloc(stack->elements, (sizeof(void *) * (stack->max *= 2 )));
|
||||
stack->top_element = stack->elements+diff;
|
||||
stack->top_element = stack->elements+stack->top;
|
||||
}
|
||||
stack->top++;
|
||||
*(stack->top_element++) = ptr;
|
||||
}
|
||||
|
||||
ZEND_API void zend_ptr_stack_n_push(zend_ptr_stack *stack, int count, ...)
|
||||
{
|
||||
va_list ptr;
|
||||
void *elem;
|
||||
|
||||
if (stack->top+count > stack->max) { /* we need to allocate more memory */
|
||||
stack->max *= 2;
|
||||
stack->max += count;
|
||||
stack->elements = (void **) erealloc(stack->elements, (sizeof(void *) * (stack->max)));
|
||||
stack->top_element = stack->elements+stack->top;
|
||||
}
|
||||
va_start(ptr, count);
|
||||
while (count>0) {
|
||||
elem = va_arg(ptr, void *);
|
||||
stack->top++;
|
||||
*(stack->top_element++) = elem;
|
||||
count--;
|
||||
}
|
||||
va_end(ptr);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zend_ptr_stack_n_pop(zend_ptr_stack *stack, int count, ...)
|
||||
{
|
||||
va_list ptr;
|
||||
void **elem;
|
||||
|
||||
va_start(ptr, count);
|
||||
while (count>0) {
|
||||
elem = va_arg(ptr, void **);
|
||||
*elem = *(--stack->top_element);
|
||||
stack->top--;
|
||||
count--;
|
||||
}
|
||||
va_end(ptr);
|
||||
}
|
||||
|
||||
ZEND_API inline void *zend_ptr_stack_pop(zend_ptr_stack *stack)
|
||||
{
|
||||
|
||||
+13
-8
@@ -2,12 +2,15 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
@@ -18,18 +21,20 @@
|
||||
#ifndef _ZEND_PTR_STACK_H
|
||||
#define _ZEND_PTR_STACK_H
|
||||
|
||||
typedef struct {
|
||||
short top, max;
|
||||
typedef struct _zend_ptr_stack {
|
||||
int top, max;
|
||||
void **elements;
|
||||
void **top_element;
|
||||
} zend_ptr_stack;
|
||||
|
||||
|
||||
#define STACK_BLOCK_SIZE 64
|
||||
#define PTR_STACK_BLOCK_SIZE 64
|
||||
|
||||
ZEND_API void zend_ptr_stack_init(zend_ptr_stack *stack);
|
||||
ZEND_API void zend_ptr_stack_push(zend_ptr_stack *stack, void *ptr);
|
||||
ZEND_API void zend_ptr_stack_n_push(zend_ptr_stack *stack, int count, ...);
|
||||
ZEND_API void *zend_ptr_stack_pop(zend_ptr_stack *stack);
|
||||
ZEND_API void zend_ptr_stack_n_pop(zend_ptr_stack *stack, int count, ...);
|
||||
ZEND_API void zend_ptr_stack_destroy(zend_ptr_stack *stack);
|
||||
ZEND_API void zend_ptr_stack_apply(zend_ptr_stack *stack, void (*func)(void *));
|
||||
ZEND_API void zend_ptr_stack_clean(zend_ptr_stack *stack, void (*func)(void *));
|
||||
|
||||
+13
-9
@@ -2,27 +2,31 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "zend.h"
|
||||
|
||||
#if HAVE_STDARG_H
|
||||
#include <stdarg.h>
|
||||
#ifdef HAVE_STDARG_H
|
||||
# include <stdarg.h>
|
||||
#endif
|
||||
|
||||
#if BROKEN_SPRINTF
|
||||
#if ZEND_BROKEN_SPRINTF
|
||||
int zend_sprintf(char *buffer, const char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
@@ -33,4 +37,4 @@ int zend_sprintf(char *buffer, const char *format, ...)
|
||||
|
||||
return strlen(buffer);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
+55
-5
@@ -2,18 +2,22 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#include "zend.h"
|
||||
#include "zend_stack.h"
|
||||
|
||||
@@ -112,3 +116,49 @@ ZEND_API int zend_stack_count(zend_stack *stack)
|
||||
{
|
||||
return stack->top;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zend_stack_apply(zend_stack *stack, int (*apply_function)(void *element), int type)
|
||||
{
|
||||
int i;
|
||||
|
||||
switch (type) {
|
||||
case ZEND_STACK_APPLY_TOPDOWN:
|
||||
for (i=stack->top-1; i>=0; i--) {
|
||||
if (apply_function(stack->elements[i])) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ZEND_STACK_APPLY_BOTTOMUP:
|
||||
for (i=0; i<stack->top; i++) {
|
||||
if (apply_function(stack->elements[i])) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zend_stack_apply_with_argument(zend_stack *stack, int (*apply_function)(void *element, void *arg), int type, void *arg)
|
||||
{
|
||||
int i;
|
||||
|
||||
switch (type) {
|
||||
case ZEND_STACK_APPLY_TOPDOWN:
|
||||
for (i=stack->top-1; i>=0; i--) {
|
||||
if (apply_function(stack->elements[i], arg)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ZEND_STACK_APPLY_BOTTOMUP:
|
||||
for (i=0; i<stack->top; i++) {
|
||||
if (apply_function(stack->elements[i], arg)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
+14
-6
@@ -2,22 +2,26 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _ZEND_STACK_H
|
||||
#define _ZEND_STACK_H
|
||||
|
||||
typedef struct {
|
||||
typedef struct _zend_stack {
|
||||
int top, max;
|
||||
void **elements;
|
||||
} zend_stack;
|
||||
@@ -34,6 +38,10 @@ ZEND_API int zend_stack_is_empty(zend_stack *stack);
|
||||
ZEND_API int zend_stack_destroy(zend_stack *stack);
|
||||
ZEND_API void **zend_stack_base(zend_stack *stack);
|
||||
ZEND_API int zend_stack_count(zend_stack *stack);
|
||||
ZEND_API void zend_stack_apply(zend_stack *stack, int (*apply_function)(void *element), int type);
|
||||
ZEND_API void zend_stack_apply_with_argument(zend_stack *stack, int (*apply_function)(void *element, void *arg), int type, void *arg);
|
||||
|
||||
#define ZEND_STACK_APPLY_TOPDOWN 1
|
||||
#define ZEND_STACK_APPLY_BOTTOMUP 2
|
||||
|
||||
#endif /* _ZEND_STACK_H */
|
||||
+67
-45
@@ -2,24 +2,27 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include "zend.h"
|
||||
#include "zend_API.h"
|
||||
#include "zend_globals.h"
|
||||
#include "zend_constants.h"
|
||||
#include "zend_variables.h"
|
||||
#include "zend_list.h"
|
||||
|
||||
ZEND_API char *empty_string = ""; /* in order to save emalloc() and efree() time for
|
||||
@@ -28,26 +31,27 @@ ZEND_API char *empty_string = ""; /* in order to save emalloc() and efree() time
|
||||
* The macro STR_FREE() will not efree() it.
|
||||
*/
|
||||
|
||||
ZEND_API char *undefined_variable_string = "\0";
|
||||
|
||||
/* this function MUST set the value for the variable to an empty string */
|
||||
/* and empty strings must be evaluated as FALSE */
|
||||
ZEND_API inline void var_reset(zval *var)
|
||||
{
|
||||
#if 0
|
||||
var->type = IS_STRING;
|
||||
var->value.str.val = empty_string;
|
||||
var->value.str.len = 0;
|
||||
#else
|
||||
var->type = IS_BOOL;
|
||||
var->value.lval = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
ZEND_API inline void var_uninit(zval *var)
|
||||
{
|
||||
var->type = IS_STRING;
|
||||
var->value.str.val = undefined_variable_string;
|
||||
var->value.str.len = 0;
|
||||
var->type = IS_NULL;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zval_dtor(zval *zvalue)
|
||||
ZEND_API void _zval_dtor(zval *zvalue ZEND_FILE_LINE_DC)
|
||||
{
|
||||
if (zvalue->type==IS_LONG) {
|
||||
return;
|
||||
@@ -55,31 +59,20 @@ ZEND_API void zval_dtor(zval *zvalue)
|
||||
switch(zvalue->type) {
|
||||
case IS_STRING:
|
||||
case IS_CONSTANT:
|
||||
STR_FREE(zvalue->value.str.val);
|
||||
STR_FREE_REL(zvalue->value.str.val);
|
||||
break;
|
||||
case IS_ARRAY: {
|
||||
ELS_FETCH();
|
||||
|
||||
if (zvalue->value.ht && (zvalue->value.ht != &EG(symbol_table))) {
|
||||
if (EG(AiCount)==0) {
|
||||
zend_hash_destroy(zvalue->value.ht);
|
||||
efree(zvalue->value.ht);
|
||||
} else {
|
||||
zend_ptr_stack_push(&EG(garbage), zvalue->value.ht);
|
||||
}
|
||||
zend_hash_destroy(zvalue->value.ht);
|
||||
FREE_HASHTABLE(zvalue->value.ht);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case IS_OBJECT: {
|
||||
ELS_FETCH();
|
||||
|
||||
if (EG(AiCount)==0) {
|
||||
zend_hash_destroy(zvalue->value.obj.properties);
|
||||
efree(zvalue->value.obj.properties);
|
||||
} else {
|
||||
zend_ptr_stack_push(&EG(garbage), zvalue->value.obj.properties);
|
||||
}
|
||||
}
|
||||
case IS_OBJECT:
|
||||
zend_hash_destroy(zvalue->value.obj.properties);
|
||||
FREE_HASHTABLE(zvalue->value.obj.properties);
|
||||
break;
|
||||
case IS_RESOURCE:
|
||||
/* destroy resource */
|
||||
@@ -88,6 +81,7 @@ ZEND_API void zval_dtor(zval *zvalue)
|
||||
case IS_LONG:
|
||||
case IS_DOUBLE:
|
||||
case IS_BOOL:
|
||||
case IS_NULL:
|
||||
default:
|
||||
return;
|
||||
break;
|
||||
@@ -95,15 +89,23 @@ ZEND_API void zval_dtor(zval *zvalue)
|
||||
}
|
||||
|
||||
|
||||
void zval_del_ref(zval **p)
|
||||
{
|
||||
(*p)->refcount--;
|
||||
if ((*p)->refcount==0) {
|
||||
zval_dtor(*p);
|
||||
FREE_ZVAL(*p);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void zval_add_ref(zval **p)
|
||||
{
|
||||
(*p)->refcount++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
ZEND_API int zval_copy_ctor(zval *zvalue)
|
||||
ZEND_API int _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
|
||||
{
|
||||
switch (zvalue->type) {
|
||||
case IS_RESOURCE:
|
||||
@@ -111,41 +113,40 @@ ZEND_API int zval_copy_ctor(zval *zvalue)
|
||||
break;
|
||||
case IS_BOOL:
|
||||
case IS_LONG:
|
||||
case IS_NULL:
|
||||
break;
|
||||
case IS_STRING:
|
||||
if (zvalue->value.str.val) {
|
||||
if (zvalue->value.str.len==0) {
|
||||
if (zvalue->value.str.val==undefined_variable_string) {
|
||||
zvalue->value.str.val = undefined_variable_string;
|
||||
} else {
|
||||
zvalue->value.str.val = empty_string;
|
||||
}
|
||||
zvalue->value.str.val = empty_string;
|
||||
return SUCCESS;
|
||||
}
|
||||
}
|
||||
zvalue->value.str.val = (char *) estrndup(zvalue->value.str.val, zvalue->value.str.len);
|
||||
zvalue->value.str.val = (char *) estrndup_rel(zvalue->value.str.val, zvalue->value.str.len);
|
||||
break;
|
||||
case IS_ARRAY: {
|
||||
zval *tmp;
|
||||
HashTable *original_ht = zvalue->value.ht;
|
||||
ELS_FETCH();
|
||||
|
||||
if (!zvalue->value.ht || zvalue->value.ht==&EG(symbol_table)) {
|
||||
if (!zvalue->value.ht) {
|
||||
var_reset(zvalue);
|
||||
return FAILURE;
|
||||
} else if (zvalue->value.ht==&EG(symbol_table)) {
|
||||
return SUCCESS; /* do nothing */
|
||||
}
|
||||
zvalue->value.ht = (HashTable *) emalloc(sizeof(HashTable));
|
||||
zend_hash_init(zvalue->value.ht, 0, NULL, PVAL_PTR_DTOR, 0);
|
||||
zend_hash_copy(zvalue->value.ht, original_ht, (void (*)(void *)) zval_add_ref, (void *) &tmp, sizeof(zval *));
|
||||
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 *));
|
||||
}
|
||||
break;
|
||||
case IS_OBJECT: {
|
||||
zval *tmp;
|
||||
HashTable *original_ht = zvalue->value.obj.properties;
|
||||
|
||||
zvalue->value.obj.properties = (HashTable *) emalloc(sizeof(HashTable));
|
||||
zend_hash_init(zvalue->value.obj.properties, 0, NULL, PVAL_PTR_DTOR, 0);
|
||||
zend_hash_copy(zvalue->value.obj.properties, original_ht, (void (*)(void *)) zval_add_ref, (void *) &tmp, sizeof(zval *));
|
||||
ALLOC_HASHTABLE_REL(zvalue->value.obj.properties);
|
||||
zend_hash_init(zvalue->value.obj.properties, 0, NULL, ZVAL_PTR_DTOR, 0);
|
||||
zend_hash_copy(zvalue->value.obj.properties, original_ht, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -159,6 +160,27 @@ ZEND_API int zend_print_variable(zval *var)
|
||||
}
|
||||
|
||||
|
||||
#if ZEND_DEBUG
|
||||
ZEND_API int _zval_copy_ctor_wrapper(zval *zvalue)
|
||||
{
|
||||
return zval_copy_ctor(zvalue);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void _zval_dtor_wrapper(zval *zvalue)
|
||||
{
|
||||
zval_dtor(zvalue);
|
||||
}
|
||||
|
||||
|
||||
|
||||
ZEND_API void _zval_ptr_dtor_wrapper(zval **zval_ptr)
|
||||
{
|
||||
zval_ptr_dtor(zval_ptr);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
|
||||
+35
-12
@@ -2,18 +2,22 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to the Zend license, that is bundled |
|
||||
| with this package in the file LICENSE. If you did not receive a |
|
||||
| copy of the Zend license, please mail us at zend@zend.com so we can |
|
||||
| send you a copy immediately. |
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.zend.com/license/0_92.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _VARIABLES_H
|
||||
#define _VARIABLES_H
|
||||
|
||||
@@ -21,16 +25,35 @@
|
||||
ZEND_API int zend_print_variable(zval *var);
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
ZEND_API int zval_copy_ctor(zval *zvalue);
|
||||
ZEND_API void zval_dtor(zval *zvalue);
|
||||
ZEND_API int _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC);
|
||||
ZEND_API void _zval_dtor(zval *zvalue ZEND_FILE_LINE_DC);
|
||||
ZEND_API void _zval_ptr_dtor(zval **zval_ptr ZEND_FILE_LINE_DC);
|
||||
#define zval_copy_ctor(zvalue) _zval_copy_ctor((zvalue) ZEND_FILE_LINE_CC)
|
||||
#define zval_dtor(zvalue) _zval_dtor((zvalue) ZEND_FILE_LINE_CC)
|
||||
#define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)
|
||||
|
||||
#if ZEND_DEBUG
|
||||
ZEND_API int _zval_copy_ctor_wrapper(zval *zvalue);
|
||||
ZEND_API void _zval_dtor_wrapper(zval *zvalue);
|
||||
ZEND_API void _zval_ptr_dtor_wrapper(zval **zval_ptr);
|
||||
#define zval_copy_ctor_wrapper _zval_copy_ctor_wrapper
|
||||
#define zval_dtor_wrapper _zval_dtor_wrapper
|
||||
#define zval_ptr_dtor_wrapper _zval_ptr_dtor_wrapper
|
||||
#else
|
||||
#define zval_copy_ctor_wrapper _zval_copy_ctor
|
||||
#define zval_dtor_wrapper _zval_dtor
|
||||
#define zval_ptr_dtor_wrapper _zval_ptr_dtor
|
||||
#endif
|
||||
|
||||
END_EXTERN_C()
|
||||
|
||||
ZEND_API void zval_ptr_dtor(zval **zval_ptr);
|
||||
void zval_add_ref(zval **p);
|
||||
|
||||
#define PVAL_DESTRUCTOR (void (*)(void *)) zval_dtor
|
||||
#define PVAL_PTR_DTOR (void (*)(void *)) zval_ptr_dtor
|
||||
#define PVAL_COPY_CTOR (void (*)(void *)) zval_copy_ctor
|
||||
void zval_add_ref(zval **p);
|
||||
void zval_del_ref(zval **p);
|
||||
|
||||
#define ZVAL_DESTRUCTOR (void (*)(void *)) zval_dtor_wrapper
|
||||
#define ZVAL_PTR_DTOR (void (*)(void *)) zval_ptr_dtor_wrapper
|
||||
#define ZVAL_COPY_CTOR (void (*)(void *)) zval_copy_ctor_wrapper
|
||||
|
||||
ZEND_API void var_reset(zval *var);
|
||||
ZEND_API void var_uninit(zval *var);
|
||||
|
||||
+22
-25
@@ -4,12 +4,16 @@
|
||||
#undef PACKAGE
|
||||
#undef VERSION
|
||||
|
||||
#undef HAVE_LIBDL
|
||||
|
||||
#undef HAVE_STRUCT_FLOCK
|
||||
#undef HAVE_TM_GMTOFF
|
||||
|
||||
#define CONFIGURATION_FILE_PATH "php3.ini"
|
||||
#define CONFIGURATION_FILE_PATH "php.ini"
|
||||
#define USE_CONFIG_FILE 1
|
||||
|
||||
#undef HAVE_DMALLOC
|
||||
|
||||
/* Some global constants defined by conigure */
|
||||
#undef PHP_BUILD_DATE
|
||||
#undef PHP_OS
|
||||
@@ -26,10 +30,10 @@
|
||||
|
||||
/* Define if you have dirent.h but opendir() resides in libc rather than in libdir */
|
||||
/* This will cause HAVE_DIRENT_H defined twice sometimes, but it should be problem */
|
||||
#define HAVE_DIRENT_H 0
|
||||
#undef HAVE_DIRENT_H
|
||||
|
||||
/* Define if you have the resolv library (-lresolv). */
|
||||
#define HAVE_LIBRESOLV 0
|
||||
#undef HAVE_LIBRESOLV
|
||||
|
||||
/* Define if you have the pam library (-lpam). */
|
||||
#define HAVE_LIBPAM 0
|
||||
@@ -62,17 +66,14 @@
|
||||
#define HSREGEX 0
|
||||
|
||||
/* Define if you have and want to use libnsl */
|
||||
#define HAVE_LIBNSL 0
|
||||
#undef HAVE_LIBNSL
|
||||
|
||||
/* Define if you have and want to use libsocket */
|
||||
#define HAVE_LIBSOCKET 0
|
||||
#undef HAVE_LIBSOCKET
|
||||
|
||||
/* Define if you have the sendmail program available */
|
||||
#define HAVE_SENDMAIL 0
|
||||
|
||||
/* Define if you are compiling PHP as an Apache module */
|
||||
#define APACHE 0
|
||||
|
||||
/* Define if you are compiling PHP as an Apache module with mod_charset patch applied (aka Russian Apache)*/
|
||||
#define USE_TRANSFER_TABLES 0
|
||||
|
||||
@@ -88,16 +89,6 @@
|
||||
/* Define if your Apache has src/include/ap_compat.h */
|
||||
#define HAVE_AP_COMPAT_H 0
|
||||
|
||||
#ifndef DEBUG /* should be set to ZEND_DEBUG */
|
||||
#define DEBUG 0
|
||||
#endif
|
||||
|
||||
/* Define if your system has the gettimeofday() call */
|
||||
#define HAVE_GETTIMEOFDAY 0
|
||||
|
||||
/* Define if your system has the putenv() library call */
|
||||
#define HAVE_PUTENV 0
|
||||
|
||||
/* Define if you want to enable PHP RPC (experimental) */
|
||||
#define PHP_RPC 0
|
||||
|
||||
@@ -107,19 +98,25 @@
|
||||
/* Define if you want to prevent the CGI from using path_info and path_translated */
|
||||
#define DISCARD_PATH 0
|
||||
|
||||
/* Define if you want to enable memory limit support */
|
||||
#define MEMORY_LIMIT 0
|
||||
|
||||
/* Define if you want include() and other functions to be able to open
|
||||
* http and ftp URLs as files.
|
||||
*/
|
||||
#define PHP3_URL_FOPEN 0
|
||||
#define PHP_URL_FOPEN 0
|
||||
|
||||
/* Define if you have broken header files like SunOS 4 */
|
||||
#define MISSING_FCLOSE_DECL 0
|
||||
|
||||
/* Define if you have broken sprintf function like SunOS 4 */
|
||||
#define BROKEN_SPRINTF 0
|
||||
|
||||
/* Define to compile PHP/Zend thread safe */
|
||||
#undef ZTS
|
||||
|
||||
/* Define when compiling with Zeus support */
|
||||
#undef WITH_ZEUS
|
||||
|
||||
/* Define if struct sockaddr contains the field sa_len */
|
||||
#undef HAVE_SOCKADDR_SA_LEN
|
||||
|
||||
#undef BROKEN_SPRINTF
|
||||
|
||||
#if BROKEN_SPRINTF
|
||||
#define sprintf php_sprintf
|
||||
#endif
|
||||
+532
-41
@@ -2,6 +2,334 @@ dnl $Id$
|
||||
dnl
|
||||
dnl This file contains local autoconf functions.
|
||||
|
||||
AC_DEFUN(PHP_MODULE_PTR,[
|
||||
EXTRA_MODULE_PTRS="$EXTRA_MODULE_PTRS $1,"
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_CONFIG_NICE,[
|
||||
rm -f $1
|
||||
cat >$1<<EOF
|
||||
#! /bin/sh
|
||||
#
|
||||
# Created by configure
|
||||
|
||||
EOF
|
||||
|
||||
for arg in [$]0 "[$]@"; do
|
||||
echo "\"[$]arg\" \\" >> $1
|
||||
done
|
||||
echo '"[$]@"' >> $1
|
||||
chmod +x $1
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_TIME_R_TYPE,[
|
||||
AC_CACHE_CHECK(for time_r type, ac_cv_time_r_type,[
|
||||
AC_TRY_RUN([
|
||||
#include <time.h>
|
||||
|
||||
main() {
|
||||
char buf[27];
|
||||
struct tm t;
|
||||
time_t old = 0;
|
||||
int r;
|
||||
|
||||
gmtime_r(&old, &t);
|
||||
r = (int) asctime_r(&t, buf, 26);
|
||||
if (r == -1 || (r > 0 && r <= 26)) exit(0);
|
||||
exit(1);
|
||||
}
|
||||
],[
|
||||
ac_cv_time_r_type=hpux
|
||||
],[
|
||||
ac_cv_time_r_type=normal
|
||||
],[
|
||||
ac_cv_time_r_type=normal
|
||||
])
|
||||
])
|
||||
if test "$ac_cv_time_r_type" = "hpux"; then
|
||||
AC_DEFINE(PHP_HPUX_TIME_R,1,[Whether you have HP-SUX 10.x])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_SUBST,[
|
||||
PHP_VAR_SUBST="$PHP_VAR_SUBST $1"
|
||||
AC_SUBST($1)
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_FAST_OUTPUT,[
|
||||
PHP_FAST_OUTPUT_FILES="$PHP_FAST_OUTPUT_FILES $1"
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_MKDIR_P_CHECK,[
|
||||
AC_CACHE_CHECK(for working mkdir -p, ac_cv_mkdir_p,[
|
||||
test -d conftestdir && rm -rf conftestdir
|
||||
mkdir -p conftestdir/somedir >/dev/null 2>&1
|
||||
if test -d conftestdir/somedir; then
|
||||
ac_cv_mkdir_p=yes
|
||||
else
|
||||
ac_cv_mkdir_p=no
|
||||
fi
|
||||
rm -rf conftestdir
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_FAST_GENERATE,[
|
||||
PHP_MKDIR_P_CHECK
|
||||
echo creating config_vars.mk
|
||||
> config_vars.mk
|
||||
for i in $PHP_VAR_SUBST; do
|
||||
eval echo "$i = \$$i" >> config_vars.mk
|
||||
done
|
||||
$SHELL $srcdir/build/fastgen.sh $srcdir $ac_cv_mkdir_p $PHP_FAST_OUTPUT_FILES
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_TM_GMTOFF,[
|
||||
AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff,
|
||||
[AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_gmtoff;],
|
||||
ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)])
|
||||
|
||||
if test "$ac_cv_struct_tm_gmtoff" = yes; then
|
||||
AC_DEFINE(HAVE_TM_GMTOFF)
|
||||
fi
|
||||
])
|
||||
|
||||
dnl PHP_CONFIGURE_PART(MESSAGE)
|
||||
dnl Idea borrowed from mm
|
||||
AC_DEFUN(PHP_CONFIGURE_PART,[
|
||||
AC_MSG_RESULT()
|
||||
AC_MSG_RESULT(${T_MD}$1${T_ME})
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_PROG_SENDMAIL,[
|
||||
AC_PATH_PROG(PROG_SENDMAIL, sendmail, /usr/lib/sendmail, $PATH /usr/bin /usr/sbin /usr/etc /etc /usr/ucblib)
|
||||
if test -n "$PROG_SENDMAIL"; then
|
||||
AC_DEFINE(HAVE_SENDMAIL)
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_RUNPATH_SWITCH,[
|
||||
dnl check for -R, etc. switch
|
||||
AC_MSG_CHECKING(if compiler supports -R)
|
||||
AC_CACHE_VAL(php_cv_cc_dashr,[
|
||||
SAVE_LIBS="${LIBS}"
|
||||
LIBS="-R /usr/lib ${LIBS}"
|
||||
AC_TRY_LINK([], [], php_cv_cc_dashr=yes, php_cv_cc_dashr=no)
|
||||
LIBS="${SAVE_LIBS}"])
|
||||
AC_MSG_RESULT($php_cv_cc_dashr)
|
||||
if test $php_cv_cc_dashr = "yes"; then
|
||||
ld_runpath_switch="-R"
|
||||
else
|
||||
AC_MSG_CHECKING([if compiler supports -Wl,-rpath,])
|
||||
AC_CACHE_VAL(php_cv_cc_rpath,[
|
||||
SAVE_LIBS="${LIBS}"
|
||||
LIBS="-Wl,-rpath,/usr/lib ${LIBS}"
|
||||
AC_TRY_LINK([], [], php_cv_cc_rpath=yes, php_cv_cc_rpath=no)
|
||||
LIBS="${SAVE_LIBS}"])
|
||||
AC_MSG_RESULT($php_cv_cc_rpath)
|
||||
if test $php_cv_cc_rpath = "yes"; then
|
||||
ld_runpath_switch="-Wl,-rpath,"
|
||||
else
|
||||
dnl something innocuous
|
||||
ld_runpath_switch="-L"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_STRUCT_FLOCK,[
|
||||
AC_CACHE_CHECK(for struct flock,ac_cv_struct_flock,
|
||||
AC_TRY_COMPILE([
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
],
|
||||
[struct flock x;],
|
||||
[
|
||||
ac_cv_struct_flock=yes
|
||||
],[
|
||||
ac_cv_struct_flock=no
|
||||
])
|
||||
)
|
||||
if test "$ac_cv_struct_flock" = "yes" ; then
|
||||
AC_DEFINE(HAVE_STRUCT_FLOCK, 1)
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_SOCKLEN_T,[
|
||||
AC_CACHE_CHECK(for socklen_t,ac_cv_socklen_t,
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
],[
|
||||
socklen_t x;
|
||||
],[
|
||||
ac_cv_socklen_t=yes
|
||||
],[
|
||||
ac_cv_socklen_t=no
|
||||
]))
|
||||
if test "$ac_cv_socklen_t" = "yes"; then
|
||||
AC_DEFINE(HAVE_SOCKLEN_T, 1, [Whether you have socklen_t])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl PHP_SET_SYM_FILE(path)
|
||||
dnl
|
||||
dnl set the path of the file which contains the symbol export list
|
||||
dnl
|
||||
AC_DEFUN(PHP_SET_SYM_FILE,
|
||||
[
|
||||
PHP_SYM_FILE="$1"
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl PHP_BUILD_THREAD_SAFE
|
||||
dnl
|
||||
AC_DEFUN(PHP_BUILD_THREAD_SAFE,[
|
||||
enable_experimental_zts=yes
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl PHP_BUILD_SHARED
|
||||
dnl
|
||||
AC_DEFUN(PHP_BUILD_SHARED,[
|
||||
php_build_target=shared
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl PHP_BUILD_STATIC
|
||||
dnl
|
||||
AC_DEFUN(PHP_BUILD_STATIC,[
|
||||
php_build_target=static
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl PHP_BUILD_PROGRAM
|
||||
dnl
|
||||
AC_DEFUN(PHP_BUILD_PROGRAM,[
|
||||
php_build_target=program
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl AC_PHP_ONCE(namespace, variable, code)
|
||||
dnl
|
||||
dnl execute code, if variable is not set in namespace
|
||||
dnl
|
||||
AC_DEFUN(AC_PHP_ONCE,[
|
||||
unique=`echo $ac_n "$2$ac_c" | tr -cd a-zA-Z0-9`
|
||||
cmd="echo $ac_n \"\$$1$unique$ac_c\""
|
||||
if test -n "$unique" && test "`eval $cmd`" = "" ; then
|
||||
eval "$1$unique=set"
|
||||
$3
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl AC_EXPAND_PATH(path, variable)
|
||||
dnl
|
||||
dnl expands path to an absolute path and assigns it to variable
|
||||
dnl
|
||||
AC_DEFUN(AC_EXPAND_PATH,[
|
||||
if test -z "$1" || echo "$1" | grep '^/' >/dev/null ; then
|
||||
$2="$1"
|
||||
else
|
||||
ep_dir="`dirname \"$1\"`"
|
||||
ep_realdir="`(cd \"$ep_dir\" && pwd)`"
|
||||
$2="$ep_realdir/`basename \"$1\"`"
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl AC_ADD_LIBPATH(path)
|
||||
dnl
|
||||
dnl add a library to linkpath/runpath
|
||||
dnl
|
||||
AC_DEFUN(AC_ADD_LIBPATH,[
|
||||
if test "$1" != "/usr/lib"; then
|
||||
AC_EXPAND_PATH($1, ai_p)
|
||||
AC_PHP_ONCE(LIBPATH, $ai_p, [
|
||||
test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
|
||||
LDFLAGS="$LDFLAGS -L$ai_p"
|
||||
PHP_RPATHS="$PHP_RPATHS $ai_p"
|
||||
])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl AC_BUILD_RPATH()
|
||||
dnl
|
||||
dnl builds RPATH from PHP_RPATHS
|
||||
dnl
|
||||
AC_DEFUN(AC_BUILD_RPATH,[
|
||||
if test "$enable_rpath" = "yes" && test -n "$PHP_RPATHS"; then
|
||||
OLD_RPATHS="$PHP_RPATHS"
|
||||
PHP_RPATHS=""
|
||||
for i in $OLD_RPATHS; do
|
||||
PHP_LDFLAGS="$PHP_LDFLAGS -L$i"
|
||||
PHP_RPATHS="$PHP_RPATHS -R $i"
|
||||
NATIVE_RPATHS="$NATIVE_RPATHS ${ld_runpath_switch}$i"
|
||||
done
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl AC_ADD_INCLUDE(path)
|
||||
dnl
|
||||
dnl add a include path
|
||||
dnl
|
||||
AC_DEFUN(AC_ADD_INCLUDE,[
|
||||
if test "$1" != "/usr/include"; then
|
||||
AC_EXPAND_PATH($1, ai_p)
|
||||
AC_PHP_ONCE(INCLUDEPATH, $ai_p, [
|
||||
INCLUDES="$INCLUDES -I$ai_p"
|
||||
])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl AC_ADD_LIBRARY(library[, append])
|
||||
dnl
|
||||
dnl add a library to the link line
|
||||
dnl
|
||||
AC_DEFUN(AC_ADD_LIBRARY,[
|
||||
AC_PHP_ONCE(LIBRARY, $1, [
|
||||
ifelse($#, 1, LIBS="-l$1 $LIBS", LIBS="$LIBS -l$1")
|
||||
])
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl AC_ADD_LIBRARY_DEFER(library[, append])
|
||||
dnl
|
||||
dnl add a library to the link line (deferred)
|
||||
AC_DEFUN(AC_ADD_LIBRARY_DEFER,[
|
||||
AC_PHP_ONCE(LIBRARY, $1, [
|
||||
ifelse($#, 1, DLIBS="-l$1 $DLIBS", DLIBS="$DLIBS -l$1")
|
||||
])
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl AC_ADD_LIBRARY_WITH_PATH(library, path)
|
||||
dnl
|
||||
dnl add a library to the link line and path to linkpath/runpath
|
||||
dnl
|
||||
AC_DEFUN(AC_ADD_LIBRARY_WITH_PATH,[
|
||||
AC_ADD_LIBPATH($2)
|
||||
AC_ADD_LIBRARY($1)
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl AC_ADD_LIBRARY_DEFER_WITH_PATH(library, path)
|
||||
dnl
|
||||
dnl add a library to the link line (deferred)
|
||||
dnl and path to linkpath/runpath (not deferred)
|
||||
dnl
|
||||
AC_DEFUN(AC_ADD_LIBRARY_DEFER_WITH_PATH,[
|
||||
AC_ADD_LIBPATH($2)
|
||||
AC_ADD_LIBRARY_DEFER($1)
|
||||
])
|
||||
|
||||
AC_DEFUN(AM_SET_LIBTOOL_VARIABLE,[
|
||||
LIBTOOL='$(SHELL) $(top_builddir)/libtool $1'
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl Check for cc option
|
||||
@@ -9,26 +337,42 @@ dnl
|
||||
AC_DEFUN(AC_CHECK_CC_OPTION,[
|
||||
echo "main(){return 0;}" > conftest.$ac_ext
|
||||
opt="$1"
|
||||
if echo '\c' | grep -s c >/dev/null 2>&1
|
||||
then
|
||||
echo_n="-n"
|
||||
echo_c=""
|
||||
else
|
||||
echo_n=""
|
||||
echo_c='\c'
|
||||
fi
|
||||
var=`echo $echo_n "$opt$echo_c"|tr -c a-zA-Z0-9 _`
|
||||
var=`echo $ac_n "$opt$ac_c"|tr -c a-zA-Z0-9 _`
|
||||
AC_MSG_CHECKING([if compiler supports -$1 really])
|
||||
ac_compile="${CC-cc} -$opt -c $CFLAGS $CPPFLAGS conftest.$ac_ext 2>&1"
|
||||
if eval $ac_compile | egrep "$opt" > /dev/null 2>&1 ; then
|
||||
ac_php_compile="${CC-cc} -$opt -o conftest $CFLAGS $CPPFLAGS conftest.$ac_ext 2>&1"
|
||||
if eval $ac_php_compile 2>&1 | egrep "$opt" > /dev/null 2>&1 ; then
|
||||
eval php_cc_$var=no
|
||||
AC_MSG_RESULT(no)
|
||||
else
|
||||
eval php_cc_$var=yes
|
||||
AC_MSG_RESULT(yes)
|
||||
if eval ./conftest 2>/dev/null ; then
|
||||
eval php_cc_$var=yes
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
eval php_cc_$var=no
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_REGEX,[
|
||||
|
||||
if test "$REGEX_TYPE" = "php"; then
|
||||
REGEX_LIB=regex/libregex.la
|
||||
REGEX_DIR=regex
|
||||
AC_DEFINE(HSREGEX)
|
||||
AC_DEFINE(REGEX,1)
|
||||
PHP_FAST_OUTPUT(regex/Makefile)
|
||||
elif test "$REGEX_TYPE" = "system"; then
|
||||
AC_DEFINE(REGEX,0)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(which regex library to use)
|
||||
AC_MSG_RESULT($REGEX_TYPE)
|
||||
|
||||
PHP_SUBST(REGEX_DIR)
|
||||
PHP_SUBST(REGEX_LIB)
|
||||
PHP_SUBST(HSREGEX)
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl See if we have broken header files like SunOS has.
|
||||
@@ -48,36 +392,183 @@ dnl
|
||||
dnl Check for broken sprintf()
|
||||
dnl
|
||||
AC_DEFUN(AC_BROKEN_SPRINTF,[
|
||||
AC_MSG_CHECKING([for broken sprintf])
|
||||
AC_TRY_RUN([main() { char buf[20]; exit (sprintf(buf,"testing 123")!=11); }],[
|
||||
AC_DEFINE(BROKEN_SPRINTF,0)
|
||||
AC_MSG_RESULT(ok)
|
||||
],[
|
||||
AC_DEFINE(BROKEN_SPRINTF,1)
|
||||
AC_MSG_RESULT(broken)
|
||||
],[
|
||||
AC_DEFINE(BROKEN_SPRINTF,0)
|
||||
AC_MSG_RESULT(cannot check, guessing ok)
|
||||
AC_CACHE_CHECK(whether sprintf is broken, ac_cv_broken_sprintf,[
|
||||
AC_TRY_RUN([main() {char buf[20];exit(sprintf(buf,"testing 123")!=11); }],[
|
||||
ac_cv_broken_sprintf=no
|
||||
],[
|
||||
ac_cv_broken_sprintf=yes
|
||||
],[
|
||||
ac_cv_broken_sprintf=no
|
||||
])
|
||||
])
|
||||
if test "$ac_cv_broken_sprintf" = "yes"; then
|
||||
AC_DEFINE(BROKEN_SPRINTF, 1)
|
||||
else
|
||||
AC_DEFINE(BROKEN_SPRINTF, 0)
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl PHP_EXTENSION(extname [, shared])
|
||||
dnl
|
||||
dnl Includes an extension in the build.
|
||||
dnl
|
||||
dnl "extname" is the name of the ext/ subdir where the extension resides
|
||||
dnl "shared" can be set to "shared" or "yes" to build the extension as
|
||||
dnl a dynamically loadable library.
|
||||
dnl
|
||||
AC_DEFUN(PHP_EXTENSION,[
|
||||
if test -d "$abs_srcdir/ext/$1" ; then
|
||||
ext_src_base="$abs_srcdir/ext/$1/"
|
||||
ext_base="ext/$1/"
|
||||
EXT_SUBDIRS="$EXT_SUBDIRS $1"
|
||||
if test "$2" != "shared" && test "$2" != "yes" && test -z "$php_always_shared"; then
|
||||
_extlib="lib$1.a"
|
||||
EXT_LTLIBS="$EXT_LTLIBS ext/$1/lib$1.la"
|
||||
EXT_LIBS="$EXT_LIBS $1/$_extlib"
|
||||
EXT_STATIC="$EXT_STATIC $1"
|
||||
else
|
||||
AC_DEFINE_UNQUOTED([COMPILE_DL_]translit($1,a-z-,A-Z_), 1, Whether to build $1 as dynamic module)
|
||||
EXT_SHARED="$EXT_SHARED $1"
|
||||
fi
|
||||
PHP_FAST_OUTPUT(ext/$1/Makefile)
|
||||
fi
|
||||
])
|
||||
|
||||
PHP_SUBST(EXT_SUBDIRS)
|
||||
PHP_SUBST(EXT_STATIC)
|
||||
PHP_SUBST(EXT_SHARED)
|
||||
PHP_SUBST(EXT_LIBS)
|
||||
PHP_SUBST(EXT_LTLIBS)
|
||||
|
||||
dnl
|
||||
dnl Solaris requires main code to be position independent in order
|
||||
dnl to let shared objects find symbols. Weird. Ugly.
|
||||
dnl
|
||||
dnl Must be run after all --with-NN options that let the user
|
||||
dnl choose dynamic extensions, and after the gcc test.
|
||||
dnl
|
||||
AC_DEFUN(PHP_SOLARIS_PIC_WEIRDNESS,[
|
||||
AC_MSG_CHECKING(whether -fPIC is required)
|
||||
if test "$EXT_SHARED" != ""; then
|
||||
os=`uname -sr 2>/dev/null`
|
||||
case "$os" in
|
||||
"SunOS 5.6"|"SunOS 5.7")
|
||||
case "$CC" in
|
||||
gcc*|egcs*) CFLAGS="$CFLAGS -fPIC";;
|
||||
*) CFLAGS="$CFLAGS -fpic";;
|
||||
esac
|
||||
AC_MSG_RESULT(yes);;
|
||||
*)
|
||||
AC_MSG_RESULT(no);;
|
||||
esac
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl Checks whether $withval is "shared" or starts with "shared,XXX"
|
||||
dnl and sets $shared to "yes" or "no", and removes "shared,?" stuff
|
||||
dnl from $withval.
|
||||
dnl
|
||||
AC_DEFUN(PHP_WITH_SHARED,[
|
||||
case $withval in
|
||||
shared)
|
||||
shared=yes
|
||||
withval=yes
|
||||
;;
|
||||
shared,*)
|
||||
shared=yes
|
||||
withval=`echo $withval | sed -e 's/^shared,//'`
|
||||
;;
|
||||
*)
|
||||
shared=no
|
||||
;;
|
||||
esac
|
||||
if test -n "$php_always_shared"; then
|
||||
shared=yes
|
||||
fi
|
||||
])
|
||||
|
||||
dnl The problem is that the default compilation flags in Solaris 2.6 won't
|
||||
dnl let programs access large files; you need to tell the compiler that
|
||||
dnl you actually want your programs to work on large files. For more
|
||||
dnl details about this brain damage please see:
|
||||
dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
|
||||
|
||||
dnl Written by Paul Eggert <eggert@twinsun.com>.
|
||||
|
||||
AC_DEFUN(AC_SYS_LFS,
|
||||
[dnl
|
||||
# If available, prefer support for large files unless the user specified
|
||||
# one of the CPPFLAGS, LDFLAGS, or LIBS variables.
|
||||
AC_MSG_CHECKING(whether large file support needs explicit enabling)
|
||||
ac_getconfs=''
|
||||
ac_result=yes
|
||||
ac_set=''
|
||||
ac_shellvars='CPPFLAGS LDFLAGS LIBS'
|
||||
for ac_shellvar in $ac_shellvars; do
|
||||
case $ac_shellvar in
|
||||
CPPFLAGS) ac_lfsvar=LFS_CFLAGS ;;
|
||||
*) ac_lfsvar=LFS_$ac_shellvar ;;
|
||||
esac
|
||||
eval test '"${'$ac_shellvar'+set}"' = set && ac_set=$ac_shellvar
|
||||
(getconf $ac_lfsvar) >/dev/null 2>&1 || { ac_result=no; break; }
|
||||
ac_getconf=`getconf $ac_lfsvar`
|
||||
ac_getconfs=$ac_getconfs$ac_getconf
|
||||
eval ac_test_$ac_shellvar=\$ac_getconf
|
||||
done
|
||||
case "$ac_result$ac_getconfs" in
|
||||
yes) ac_result=no ;;
|
||||
esac
|
||||
case "$ac_result$ac_set" in
|
||||
yes?*) ac_result="yes, but $ac_set is already set, so use its settings"
|
||||
esac
|
||||
AC_MSG_RESULT($ac_result)
|
||||
case $ac_result in
|
||||
yes)
|
||||
for ac_shellvar in $ac_shellvars; do
|
||||
eval $ac_shellvar=\$ac_test_$ac_shellvar
|
||||
done ;;
|
||||
esac
|
||||
])
|
||||
|
||||
AC_DEFUN(AC_SOCKADDR_SA_LEN,[
|
||||
AC_CACHE_CHECK([for field sa_len in struct sockaddr],ac_cv_sockaddr_sa_len,[
|
||||
AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <sys/socket.h>],
|
||||
[struct sockaddr s; s.sa_len;],
|
||||
[ac_cv_sockaddr_sa_len=yes
|
||||
AC_DEFINE(HAVE_SOCKADDR_SA_LEN)],
|
||||
[ac_cv_sockaddr_sa_len=no])
|
||||
])
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl Stuff to do when setting up a new extension.
|
||||
dnl XXX have to change the hardcoding of ".a" when we want to be able
|
||||
dnl to make dynamic libraries as well.
|
||||
dnl
|
||||
AC_DEFUN(PHP_EXTENSION,[
|
||||
EXT_SUBDIRS="$EXT_SUBDIRS $1"
|
||||
_extlib="libphpext_$1.a"
|
||||
EXT_LIBS="$EXT_LIBS $1/$_extlib"
|
||||
EXTINFO_DEPS="$EXTINFO_DEPS ../ext/$1/extinfo.c.stub"
|
||||
dnl EXT_INCLUDE_CODE="\#include \"ext/$1/php3_$1.h\"\\n$EXT_INCLUDE_CODE"
|
||||
dnl EXT_MODULE_PTRS="phpext_$1_ptr, $EXT_MODULE_PTRS"
|
||||
dnl "
|
||||
|
||||
dnl ## PHP_AC_OUTPUT(file)
|
||||
dnl ## adds "file" to the list of files generated by AC_OUTPUT
|
||||
dnl ## This macro can be used several times.
|
||||
AC_DEFUN(PHP_OUTPUT,[
|
||||
PHP_OUTPUT_FILES="$PHP_OUTPUT_FILES $1"
|
||||
])
|
||||
|
||||
AC_SUBST(EXT_SUBDIRS)
|
||||
AC_SUBST(EXT_LIBS)
|
||||
AC_SUBST(EXTINFO_DEPS)
|
||||
dnl AC_SUBST(EXT_INCLUDE_CODE)
|
||||
dnl AC_SUBST(EXT_MODULES_PTRS)
|
||||
AC_DEFUN(PHP_DECLARED_TIMEZONE,[
|
||||
AC_CACHE_CHECK(for declared timezone, ac_cv_declared_timezone,[
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
],[
|
||||
time_t foo = (time_t) timezone;
|
||||
],[
|
||||
ac_cv_declared_timezone=yes
|
||||
],[
|
||||
ac_cv_declared_timezone=no
|
||||
])])
|
||||
if test "$ac_cv_declared_timezone" = "yes"; then
|
||||
AC_DEFINE(HAVE_DECLARED_TIMEZONE, 1, [Whether system headers declare timezone])
|
||||
fi
|
||||
])
|
||||
+2
-2
@@ -64,7 +64,7 @@ php3_write()
|
||||
|
||||
php4_write()
|
||||
{
|
||||
pval *newval = (pval *) emalloc(sizeof(pval));
|
||||
pval *newval = ALLOC_ZVAL();
|
||||
|
||||
newval->refcount=1;
|
||||
newval->is_ref=0;
|
||||
@@ -163,7 +163,7 @@ cfg_hash into php3_ini.
|
||||
b. Get rid of php3_ini. The performance penalty of copying it around all
|
||||
the time in the Apache module probably wasn't too high, but
|
||||
psychologically, it annoyed me :)
|
||||
c. Get rid of the ugly code in mod_php3.c, that also reads values from
|
||||
c. Get rid of the ugly code in mod_php4.c, that also reads values from
|
||||
Apache directives and puts them into the php3_ini structure.
|
||||
d. Generalize all the code so that you only have to add an entry in one
|
||||
single place and get it automatically supported in php3.ini, Apache, Win32
|
||||
|
||||
+3
-3
@@ -19,7 +19,7 @@ Table of Contents
|
||||
|
||||
All functions look like this:
|
||||
|
||||
void php3_foo(INTERNAL_FUNCTION_PARAMETERS) {
|
||||
PHP_FUNCTION(foo) {
|
||||
|
||||
}
|
||||
|
||||
@@ -471,13 +471,13 @@ handy when a server supports multiple virtual hosts.
|
||||
|
||||
The steps required to add a new directive:
|
||||
|
||||
1. Add directive to php3_ini_structure struct in mod_php3.h.
|
||||
1. Add directive to php3_ini_structure struct in mod_php4.h.
|
||||
|
||||
2. In main.c, edit the php3_module_startup function and add the
|
||||
appropriate cfg_get_string() or cfg_get_long() call.
|
||||
|
||||
3. Add the directive, restrictions and a comment to the php3_commands
|
||||
structure in mod_php3.c. Note the restrictions part. RSRC_CONF are
|
||||
structure in mod_php4.c. Note the restrictions part. RSRC_CONF are
|
||||
directives that can only be present in the actual Apache .conf files.
|
||||
Any OR_OPTIONS directives can be present anywhere, include normal
|
||||
.htaccess files.
|
||||
|
||||
+58
-60
@@ -23,70 +23,68 @@
|
||||
| If you did not, or have any questions about PHP licensing, please |
|
||||
| contact core@php.net. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Stig Sæther Bakken <ssb@guardian.no> |
|
||||
| Authors: Stig Sæther Bakken <ssb@fast.no> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#define PHP_ADA_INCLUDE "@ADA_INCLUDE@"
|
||||
#define PHP_ADA_LFLAGS "@ADA_LFLAGS@"
|
||||
#define PHP_ADA_LIBS "@ADA_LIBS@"
|
||||
#define PHP_APACHE_INCLUDE "@APACHE_INCLUDE@"
|
||||
#define PHP_APACHE_TARGET "@APACHE_TARGET@"
|
||||
#define PHP_FHTTPD_INCLUDE "@FHTTPD_INCLUDE@"
|
||||
#define PHP_FHTTPD_LIB "@FHTTPD_LIB@"
|
||||
#define PHP_FHTTPD_TARGET "@FHTTPD_TARGET@"
|
||||
#define CONFIGURE_COMMAND "@CONFIGURE_COMMAND@"
|
||||
#define PHP_ADA_INCLUDE ""
|
||||
#define PHP_ADA_LFLAGS ""
|
||||
#define PHP_ADA_LIBS ""
|
||||
#define PHP_APACHE_INCLUDE ""
|
||||
#define PHP_APACHE_TARGET ""
|
||||
#define PHP_FHTTPD_INCLUDE ""
|
||||
#define PHP_FHTTPD_LIB ""
|
||||
#define PHP_FHTTPD_TARGET ""
|
||||
#define PHP_BINNAME "@BINNAME@"
|
||||
#define PHP_CFLAGS "@CFLAGS@"
|
||||
#define PHP_DBASE_LIB "@DBASE_LIB@"
|
||||
#define PHP_DEBUG "@PHP_DEBUG@"
|
||||
#define PHP_GDBM_INCLUDE "@GDBM_INCLUDE@"
|
||||
#define PHP_HSREGEX "@HSREGEX@"
|
||||
#define PHP_IBASE_INCLUDE "@IBASE_INCLUDE@"
|
||||
#define PHP_IBASE_LFLAGS "@IBASE_LFLAGS@"
|
||||
#define PHP_IBASE_LIBS "@IBASE_LIBS@"
|
||||
#define PHP_IFX_INCLUDE "@IFX_INCLUDE@"
|
||||
#define PHP_IFX_LFLAGS "@IFX_LFLAGS@"
|
||||
#define PHP_IFX_LIBS "@IFX_LIBS@"
|
||||
#define PHP_DBASE_LIB ""
|
||||
#define PHP_BUILD_DEBUG "@DEBUG_CFLAGS@"
|
||||
#define PHP_GDBM_INCLUDE ""
|
||||
#define PHP_HSREGEX ""
|
||||
#define PHP_IBASE_INCLUDE ""
|
||||
#define PHP_IBASE_LFLAGS ""
|
||||
#define PHP_IBASE_LIBS ""
|
||||
#define PHP_IFX_INCLUDE ""
|
||||
#define PHP_IFX_LFLAGS ""
|
||||
#define PHP_IFX_LIBS ""
|
||||
#define PHP_INSTALL_IT "@INSTALL_IT@"
|
||||
#define PHP_IODBC_INCLUDE "@IODBC_INCLUDE@"
|
||||
#define PHP_IODBC_LFLAGS "@IODBC_LFLAGS@"
|
||||
#define PHP_IODBC_LIBS "@IODBC_LIBS@"
|
||||
#define PHP_MSQL_INCLUDE "@MSQL_INCLUDE@"
|
||||
#define PHP_MSQL_LFLAGS "@MSQL_LFLAGS@"
|
||||
#define PHP_MSQL_LIBS "@MSQL_LIBS@"
|
||||
#define PHP_MYSQL_INCLUDE "@MYSQL_INCLUDE@"
|
||||
#define PHP_MYSQL_LFLAGS "@MYSQL_LFLAGS@"
|
||||
#define PHP_MYSQL_LIBS "@MYSQL_LIBS@"
|
||||
#define PHP_ORACLE_HOME "@ORACLE_HOME@"
|
||||
#define PHP_ORACLE_INCLUDE "@ORACLE_INCLUDE@"
|
||||
#define PHP_ORACLE_LFLAGS "@ORACLE_LFLAGS@"
|
||||
#define PHP_ORACLE_LIBS "@ORACLE_LIBS@"
|
||||
#define PHP_ORACLE_SHLIBS "@ORACLE_SHLIBS@"
|
||||
#define PHP_ORACLE_STLIBS "@ORACLE_STLIBS@"
|
||||
#define PHP_ORACLE_VERSION "@ORACLE_VERSION@"
|
||||
#define PHP_PGSQL_INCLUDE "@PGSQL_INCLUDE@"
|
||||
#define PHP_PGSQL_LFLAGS "@PGSQL_LFLAGS@"
|
||||
#define PHP_PGSQL_LIBS "@PGSQL_LIBS@"
|
||||
#define PHP_IODBC_INCLUDE ""
|
||||
#define PHP_IODBC_LFLAGS ""
|
||||
#define PHP_IODBC_LIBS ""
|
||||
#define PHP_MSQL_INCLUDE ""
|
||||
#define PHP_MSQL_LFLAGS ""
|
||||
#define PHP_MSQL_LIBS ""
|
||||
#define PHP_MYSQL_INCLUDE ""
|
||||
#define PHP_MYSQL_LFLAGS ""
|
||||
#define PHP_MYSQL_LIBS ""
|
||||
#define PHP_ODBC_TYPE "@ODBC_TYPE@"
|
||||
#define PHP_ODBC_INCLUDE "@ODBC_INCLUDE@"
|
||||
#define PHP_ODBC_LFLAGS "@ODBC_LFLAGS@"
|
||||
#define PHP_ODBC_LIBS "@ODBC_LIBS@"
|
||||
#define PHP_ORACLE_HOME ""
|
||||
#define PHP_ORACLE_INCLUDE ""
|
||||
#define PHP_ORACLE_LFLAGS ""
|
||||
#define PHP_ORACLE_LIBS ""
|
||||
#define PHP_ORACLE_SHLIBS ""
|
||||
#define PHP_ORACLE_STLIBS ""
|
||||
#define PHP_ORACLE_VERSION ""
|
||||
#define PHP_PGSQL_INCLUDE ""
|
||||
#define PHP_PGSQL_LFLAGS ""
|
||||
#define PHP_PGSQL_LIBS ""
|
||||
#define PHP_PROG_SENDMAIL "@PROG_SENDMAIL@"
|
||||
#define PHP_REGEX_LIB "@REGEX_LIB@"
|
||||
#define PHP_SOLID_INCLUDE "@SOLID_INCLUDE@"
|
||||
#define PHP_SOLID_LIBS "@SOLID_LIBS@"
|
||||
#define PHP_EMPRESS_INCLUDE "@EMPRESS_INCLUDE@"
|
||||
#define PHP_EMPRESS_LIBS "@EMPRESS_LIBS@"
|
||||
#define PHP_SYBASE_INCLUDE "@SYBASE_INCLUDE@"
|
||||
#define PHP_SYBASE_LFLAGS "@SYBASE_LFLAGS@"
|
||||
#define PHP_SYBASE_LIBS "@SYBASE_LIBS@"
|
||||
#define PHP_DBM_TYPE "@DBM_TYPE@"
|
||||
#define PHP_DBM_LIB "@DBM_LIB@"
|
||||
#define PHP_LDAP_LFLAGS "@LDAP_LFLAGS@"
|
||||
#define PHP_LDAP_INCLUDE "@LDAP_INCLUDE@"
|
||||
#define PHP_LDAP_LIBS "@LDAP_LIBS@"
|
||||
#define PHP_VELOCIS_INCLUDE "@VELOCIS_INCLUDE@"
|
||||
#define PHP_VELOCIS_LIBS "@VELOCIS_LIBS@"
|
||||
|
||||
#define ODBC_TYPE "@ODBC_TYPE@"
|
||||
#define ODBC_INCDIR "@ODBC_INCDIR@"
|
||||
#define ODBC_INCLUDE "@ODBC_INCLUDE@"
|
||||
#define ODBC_LIBDIR "@ODBC_LIBDIR@"
|
||||
#define ODBC_LFLAGS "@ODBC_LFLAGS@"
|
||||
#define ODBC_LIBS "@ODBC_LIBS@"
|
||||
#define PHP_REGEX_LIB ""
|
||||
#define PHP_SOLID_INCLUDE ""
|
||||
#define PHP_SOLID_LIBS ""
|
||||
#define PHP_EMPRESS_INCLUDE ""
|
||||
#define PHP_EMPRESS_LIBS ""
|
||||
#define PHP_SYBASE_INCLUDE ""
|
||||
#define PHP_SYBASE_LFLAGS ""
|
||||
#define PHP_SYBASE_LIBS ""
|
||||
#define PHP_DBM_TYPE ""
|
||||
#define PHP_DBM_LIB ""
|
||||
#define PHP_LDAP_LFLAGS ""
|
||||
#define PHP_LDAP_INCLUDE ""
|
||||
#define PHP_LDAP_LIBS ""
|
||||
#define PHP_VELOCIS_INCLUDE ""
|
||||
#define PHP_VELOCIS_LIBS ""
|
||||
@@ -0,0 +1,77 @@
|
||||
# Copyright (c) 1999, 2000 Sascha Schumann. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY SASCHA SCHUMANN ``AS IS'' AND ANY EXPRESS OR
|
||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
# EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
||||
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
##############################################################################
|
||||
# $Id$
|
||||
#
|
||||
# Makefile to generate build tools
|
||||
#
|
||||
|
||||
SUBDIRS = Zend TSRM
|
||||
|
||||
STAMP = buildmk.stamp
|
||||
|
||||
ALWAYS = generated_lists
|
||||
|
||||
all: $(STAMP) $(ALWAYS)
|
||||
@$(MAKE) AMFLAGS=$(AMFLAGS) -s -f build/build2.mk
|
||||
|
||||
generated_lists:
|
||||
@echo makefile_am_files = Zend/Makefile.am \
|
||||
TSRM/Makefile.am > $@
|
||||
@echo config_h_files = Zend/acconfig.h TSRM/acconfig.h >> $@
|
||||
@echo config_m4_files = Zend/Zend.m4 TSRM/tsrm.m4 \
|
||||
Zend/acinclude.m4 ext/*/config.m4 sapi/*/config.m4 >> $@
|
||||
|
||||
$(STAMP): build/buildcheck.sh
|
||||
@build/buildcheck.sh && touch $(STAMP)
|
||||
|
||||
snapshot:
|
||||
distname='$(DISTNAME)'; \
|
||||
if test -z "$$distname"; then \
|
||||
distname='php4-snapshot'; \
|
||||
fi; \
|
||||
myname=`basename \`pwd\`` ; \
|
||||
cd .. && cp -rp $$myname $$distname; \
|
||||
cd $$distname; \
|
||||
rm -f $(SUBDIRS) 2>/dev/null || true; \
|
||||
for i in $(SUBDIRS); do \
|
||||
test -d $$i || (test -d ../$$i && cp -rp ../$$i $$i); \
|
||||
done; \
|
||||
find . -type l -exec rm {} \; ; \
|
||||
$(MAKE) AMFLAGS=--copy -f build/build.mk; \
|
||||
cd ..; \
|
||||
tar cf $$distname.tar $$distname; \
|
||||
rm -rf $$distname $$distname.tar.*; \
|
||||
bzip2 -9 $$distname.tar; \
|
||||
md5sum $$distname.tar.bz2; \
|
||||
sync; sleep 2; \
|
||||
md5sum $$distname.tar.bz2; \
|
||||
bzip2 -t $$distname.tar.bz2
|
||||
|
||||
cvsclean:
|
||||
@for i in `find . -name .cvsignore`; do \
|
||||
(cd `dirname $$i` 2>/dev/null && rm -rf `cat .cvsignore` *.o *.a || true); \
|
||||
done
|
||||
@rm -f $(SUBDIRS) 2>/dev/null || true
|
||||
|
||||
.PHONY: $(ALWAYS) snapshot cvsclean
|
||||
@@ -0,0 +1,89 @@
|
||||
# Copyright (c) 1999, 2000 Sascha Schumann. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY SASCHA SCHUMANN ``AS IS'' AND ANY EXPRESS OR
|
||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
# EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
||||
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
##############################################################################
|
||||
# $Id$
|
||||
|
||||
include generated_lists
|
||||
|
||||
TOUCH_FILES = mkinstalldirs install-sh missing
|
||||
|
||||
LT_TARGETS = ltconfig ltmain.sh config.guess config.sub
|
||||
|
||||
makefile_in_files = $(makefile_am_files:.am=.in)
|
||||
makefile_files = $(makefile_am_files:e.am=e)
|
||||
|
||||
config_h_in = php_config.h.in
|
||||
|
||||
acconfig_h_SOURCES = acconfig.h.in $(config_h_files)
|
||||
|
||||
targets = $(TOUCH_FILES) $(makefile_in_files) configure $(config_h_in)
|
||||
|
||||
|
||||
all: .deps Zend/Makefile.am TSRM/Makefile.am $(targets)
|
||||
|
||||
.deps:
|
||||
@echo creating empty dependencies
|
||||
for i in `find ext sapi regex -type d \! -name \*CVS`; do \
|
||||
list="$$list $$i/.deps"; \
|
||||
done; \
|
||||
touch $$list pear/.deps $@
|
||||
|
||||
Zend/Makefile.am:
|
||||
test -d Zend || (test -d ../Zend && ln -s ../Zend Zend)
|
||||
|
||||
TSRM/Makefile.am:
|
||||
test -d TSRM || (test -d ../TSRM && ln -s ../TSRM TSRM)
|
||||
|
||||
acconfig.h: $(acconfig_h_SOURCES)
|
||||
@echo rebuilding $@
|
||||
cat $(acconfig_h_SOURCES) > $@
|
||||
|
||||
$(makefile_in_files): $(makefile_am_files) aclocal.m4 configure.in $(config_m4_files)
|
||||
@echo rebuilding Makefile.in\'s
|
||||
@for i in $(LT_TARGETS); do \
|
||||
if test -f "$$i"; then \
|
||||
mv $$i $$i.bak; \
|
||||
cp $$i.bak $$i; \
|
||||
fi; \
|
||||
done
|
||||
@test -f want_dependencies || flag=-i; \
|
||||
automake -a $$flag $(AMFLAGS) $(makefile_files) \
|
||||
|| true >&2
|
||||
@for i in $(LT_TARGETS); do mv $$i.bak $$i; done
|
||||
|
||||
aclocal.m4: configure.in acinclude.m4
|
||||
aclocal
|
||||
|
||||
$(config_h_in): configure acconfig.h
|
||||
# explicitly remove target since autoheader does not seem to work
|
||||
# correctly otherwise (timestamps are not updated)
|
||||
@echo rebuilding $@
|
||||
@rm -f $@
|
||||
@autoheader 2>&1 | (grep -v 'warning: AC_TRY_RUN called without default to allow cross compiling'||true)
|
||||
|
||||
$(TOUCH_FILES):
|
||||
touch $(TOUCH_FILES)
|
||||
|
||||
configure: aclocal.m4 configure.in $(config_m4_files)
|
||||
@echo rebuilding $@
|
||||
@autoconf 2>&1 | (grep -v 'warning: AC_TRY_RUN called without default to allow cross compiling'||true)
|
||||
Loaded 100 of 932 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user