mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-10 18:50:50 +00:00
Compare commits
2466
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a2c60b0e32 | ||
|
|
0613e48b8e | ||
|
|
8522d30081 | ||
|
|
2b82b1c47a | ||
|
|
daf68d8d91 | ||
|
|
8f710d827e | ||
|
|
74ffa31da1 | ||
|
|
d4b7d08019 | ||
|
|
e7875fc20d | ||
|
|
f446cc2e3f | ||
|
|
715b32f618 | ||
|
|
5fb6dda2fc | ||
|
|
f00c18ad23 | ||
|
|
ad8426b7d3 | ||
|
|
eb2afa6cfb | ||
|
|
d16d5eb9f6 | ||
|
|
3b6a30dd6b | ||
|
|
36393c74f5 | ||
|
|
4a58dd0b64 | ||
|
|
3ab749ce27 | ||
|
|
5fe65aa136 | ||
|
|
5ce1dc591b | ||
|
|
fb5d197a99 | ||
|
|
ab5900f9bb | ||
|
|
45c5791d5e | ||
|
|
1ab8f39f47 | ||
|
|
6a6318d4be | ||
|
|
de3c9594e4 | ||
|
|
8bb1eb9d01 | ||
|
|
f48c985537 | ||
|
|
57293eea0b | ||
|
|
a37a9db454 | ||
|
|
285ec0ca2c | ||
|
|
c3a10fe0d1 | ||
|
|
78cd4cdbe1 | ||
|
|
f2427f42fa | ||
|
|
83848d2e1f | ||
|
|
3b2a83b942 | ||
|
|
7db391b054 | ||
|
|
123491aeac | ||
|
|
3118af8293 | ||
|
|
714d083cb8 | ||
|
|
48caa74c20 | ||
|
|
ebf7c99391 | ||
|
|
1791658112 | ||
|
|
0fa068e1fa | ||
|
|
7a7590002c | ||
|
|
be83ba17da | ||
|
|
40dd7eef96 | ||
|
|
13148b5491 | ||
|
|
d73ef12429 | ||
|
|
2d54fb39b9 | ||
|
|
23a446c429 | ||
|
|
12503baa55 | ||
|
|
48545dd7b9 | ||
|
|
5b4d6e7db3 | ||
|
|
cf48573277 | ||
|
|
dde50d6afd | ||
|
|
397c76d787 | ||
|
|
ba12d0b4b1 | ||
|
|
6795032cb8 | ||
|
|
85980139b2 | ||
|
|
bdcaa8ec44 | ||
|
|
499b63a354 | ||
|
|
3db6f55748 | ||
|
|
adc498e705 | ||
|
|
492a619be3 | ||
|
|
0e9581bddb | ||
|
|
e2e49e7b84 | ||
|
|
e826651d7e | ||
|
|
f3c9c8dd07 | ||
|
|
f98710c870 | ||
|
|
4230bdd3ed | ||
|
|
8d677828b9 | ||
|
|
068fd3b24f | ||
|
|
dc5f1ed519 | ||
|
|
78c050114c | ||
|
|
e30d8e4abf | ||
|
|
a4a8369f7d | ||
|
|
be8a991ccc | ||
|
|
154bba297b | ||
|
|
177f9bd1f5 | ||
|
|
31775e9706 | ||
|
|
4578c9af93 | ||
|
|
02cc050108 | ||
|
|
f4917d49c3 | ||
|
|
515c20da47 | ||
|
|
d7e17582da | ||
|
|
36ded42156 | ||
|
|
f4dfa7df00 | ||
|
|
b2dc847c0a | ||
|
|
0b65578ec7 | ||
|
|
9a04f870ab | ||
|
|
93e9e7521a | ||
|
|
aed7d01138 | ||
|
|
34cb5dff68 | ||
|
|
0ece429a16 | ||
|
|
20d2432c86 | ||
|
|
13a97fefeb | ||
|
|
9e43c35158 | ||
|
|
800950c5a7 | ||
|
|
a40f208ab8 | ||
|
|
5d6cb2fc32 | ||
|
|
559c254f8f | ||
|
|
7c2ea02288 | ||
|
|
5d3939ac39 | ||
|
|
64ad839328 | ||
|
|
31d1714779 | ||
|
|
929551891e | ||
|
|
356fc41a0a | ||
|
|
0ac039536f | ||
|
|
81a2669216 | ||
|
|
dca3c8753f | ||
|
|
87ee97e303 | ||
|
|
1b38207410 | ||
|
|
1000a86e5f | ||
|
|
a22ada795f | ||
|
|
39724f6e4a | ||
|
|
b9749a40cc | ||
|
|
f6f67ffd62 | ||
|
|
ac30c36dc0 | ||
|
|
c64fe7fbe1 | ||
|
|
0117c7848e | ||
|
|
0a98aa6ada | ||
|
|
ce39c56c8b | ||
|
|
0cf7edb4a5 | ||
|
|
5c1724177d | ||
|
|
9be9e95f06 | ||
|
|
a5c676e91f | ||
|
|
f494aff5c3 | ||
|
|
e4ef496ee5 | ||
|
|
1dcda7c92b | ||
|
|
30b242f832 | ||
|
|
9d7148531f | ||
|
|
d1fdea8373 | ||
|
|
bdacbc4c94 | ||
|
|
80cdb812c1 | ||
|
|
de6c69f716 | ||
|
|
abb18a7918 | ||
|
|
9f5b255b3f | ||
|
|
f262b2a738 | ||
|
|
5a8b126d21 | ||
|
|
8bc7344f0b | ||
|
|
fdadc6342d | ||
|
|
1b7eaa76c4 | ||
|
|
6fcde257f3 | ||
|
|
4360a5a4c7 | ||
|
|
d3ce7f294c | ||
|
|
fa0085b495 | ||
|
|
78db58502c | ||
|
|
34f81476f1 | ||
|
|
217ac2778c | ||
|
|
e591ae24cb | ||
|
|
b917f1e159 | ||
|
|
9a109425fe | ||
|
|
474a59eacb | ||
|
|
4202409b26 | ||
|
|
cfe2412081 | ||
|
|
423fcaf2dc | ||
|
|
035d2b3077 | ||
|
|
e2f632e1f2 | ||
|
|
2d89bf1fcb | ||
|
|
b22a6ef2b1 | ||
|
|
2da359bb84 | ||
|
|
a824c87e6d | ||
|
|
6ed0cbb140 | ||
|
|
145a319f43 | ||
|
|
0e729b502f | ||
|
|
63ec8d7eaf | ||
|
|
d3625c0a90 | ||
|
|
01ed33d1b6 | ||
|
|
5e5f5886ff | ||
|
|
043dcb64af | ||
|
|
ade8417ad9 | ||
|
|
18f3c3900a | ||
|
|
7335076b8a | ||
|
|
cb00ed2bd3 | ||
|
|
18396f9875 | ||
|
|
b8787bf2d8 | ||
|
|
95b3347d8b | ||
|
|
7080fa5b53 | ||
|
|
a0d3c5a88e | ||
|
|
17444700d4 | ||
|
|
ab128eedaa | ||
|
|
7fbdc83318 | ||
|
|
f901783074 | ||
|
|
c7a4e718fd | ||
|
|
d883ff47ed | ||
|
|
08d3e700fa | ||
|
|
eb6ba01d1c | ||
|
|
13b88fc18f | ||
|
|
d2c9e8074c | ||
|
|
121d71c54d | ||
|
|
f812a8a77e | ||
|
|
7513a2f972 | ||
|
|
6b80554404 | ||
|
|
9a1c4e5328 | ||
|
|
b37b5f93aa | ||
|
|
0bed994531 | ||
|
|
cb1a89cb64 | ||
|
|
a40ee1f181 | ||
|
|
adb3e3992c | ||
|
|
280e10aac7 | ||
|
|
d516726329 | ||
|
|
6869507071 | ||
|
|
54b8f2ee76 | ||
|
|
c2fb53bed7 | ||
|
|
e805c1b3c1 | ||
|
|
e6c03422fa | ||
|
|
f263260d38 | ||
|
|
9fa484104e | ||
|
|
c8a22a3848 | ||
|
|
f1caba9325 | ||
|
|
6bbecd4c07 | ||
|
|
047e598c3a | ||
|
|
9a28132876 | ||
|
|
8bf6bdc2b9 | ||
|
|
77d14126b1 | ||
|
|
4cda96691c | ||
|
|
454221ba62 | ||
|
|
b0af96a9fe | ||
|
|
bd98f3d124 | ||
|
|
118c015529 | ||
|
|
6e31987376 | ||
|
|
977b9ddc01 | ||
|
|
28ed45fa72 | ||
|
|
09c7116f6e | ||
|
|
7139926e84 | ||
|
|
4a32816f9e | ||
|
|
5ed1199b61 | ||
|
|
8d7972b69b | ||
|
|
2b45f38ec9 | ||
|
|
5b741dfb58 | ||
|
|
328ca1b178 | ||
|
|
0656a47f3e | ||
|
|
47f7795594 | ||
|
|
e8ef0d8b2c | ||
|
|
59a58018a5 | ||
|
|
7557c0b066 | ||
|
|
ed64a52d65 | ||
|
|
de4833fc8c | ||
|
|
b14d2cc0dc | ||
|
|
c685f25d33 | ||
|
|
a3775357ec | ||
|
|
df868616aa | ||
|
|
a798fe8d5d | ||
|
|
6542e70473 | ||
|
|
714e340a3b | ||
|
|
adcd6e7b0b | ||
|
|
a96174dbe3 | ||
|
|
721d59948e | ||
|
|
57ce23e3cb | ||
|
|
ffa08fc26e | ||
|
|
f9fe688055 | ||
|
|
10695935e0 | ||
|
|
cef5e966fd | ||
|
|
fd4f472928 | ||
|
|
1ed938ceba | ||
|
|
a4d8deb6e5 | ||
|
|
8fd9c6e206 | ||
|
|
1424e36315 | ||
|
|
4c04c755dd | ||
|
|
3bfea1e627 | ||
|
|
1888a98a4b | ||
|
|
fa8f552fbf | ||
|
|
cdda03cf07 | ||
|
|
179fffbe74 | ||
|
|
82c2851bcc | ||
|
|
c211778f5d | ||
|
|
0eec8cf2f7 | ||
|
|
2403578e35 | ||
|
|
1e6be5aaf5 | ||
|
|
b91b1779a5 | ||
|
|
5db26dd415 | ||
|
|
e6050684fa | ||
|
|
5941ae891b | ||
|
|
8c92cdd897 | ||
|
|
e9c4218470 | ||
|
|
d6aab98541 | ||
|
|
84c243d3cc | ||
|
|
a7679d2556 | ||
|
|
a297dbd6f3 | ||
|
|
176f24c9a5 | ||
|
|
c315e137c3 | ||
|
|
a15e465a34 | ||
|
|
8d6f13dc2b | ||
|
|
5f4090d0e0 | ||
|
|
6bf8736737 | ||
|
|
5a5ae1815f | ||
|
|
67c2eaa6ea | ||
|
|
55f25fb942 | ||
|
|
08009cfd39 | ||
|
|
69ab3f53f6 | ||
|
|
392e9869ee | ||
|
|
7911be587b | ||
|
|
0b11c910f5 | ||
|
|
f49d4de599 | ||
|
|
2c3b7385bf | ||
|
|
d27ebba71f | ||
|
|
eba3660d72 | ||
|
|
d0f235fec0 | ||
|
|
bbe53dedcc | ||
|
|
2f0238dc4e | ||
|
|
8499b430cf | ||
|
|
5ca813a564 | ||
|
|
72ec2e8f12 | ||
|
|
cd55dfa3bd | ||
|
|
637e8e14aa | ||
|
|
c239da7e66 | ||
|
|
0a446bc274 | ||
|
|
8cef8a9ca1 | ||
|
|
28b2869ac8 | ||
|
|
0450aecb8c | ||
|
|
59e1b2cd4e | ||
|
|
3fc482b207 | ||
|
|
e4f4983cdc | ||
|
|
ecaeac5881 | ||
|
|
b972771971 | ||
|
|
2648283b5b | ||
|
|
4a54a15fc6 | ||
|
|
f5874e9758 | ||
|
|
ab6bd757ec | ||
|
|
9adb1d771b | ||
|
|
a3f0f0c279 | ||
|
|
9d6f117938 | ||
|
|
9d8c1fb983 | ||
|
|
f6925611fb | ||
|
|
79a38a1c3a | ||
|
|
9a631384f3 | ||
|
|
f3063553c3 | ||
|
|
c2f1a45b24 | ||
|
|
880db726f7 | ||
|
|
4ea3336962 | ||
|
|
4c21de658f | ||
|
|
4afacc0a7c | ||
|
|
033190cbcf | ||
|
|
488d808748 | ||
|
|
d854b26e43 | ||
|
|
201342385e | ||
|
|
fc7d103b73 | ||
|
|
6b906ba742 | ||
|
|
c484140cfa | ||
|
|
7eb2ad0d81 | ||
|
|
733977e4bd | ||
|
|
ef2e1a72cf | ||
|
|
bc26a67a54 | ||
|
|
766bdbc919 | ||
|
|
d8a83a3722 | ||
|
|
e0c4bd742e | ||
|
|
4877d13ffa | ||
|
|
279588aa12 | ||
|
|
e0b2a5f583 | ||
|
|
140279fc7b | ||
|
|
7a6df789cf | ||
|
|
e7a148a758 | ||
|
|
6b0d9e19e1 | ||
|
|
9db16758b3 | ||
|
|
32b8cdde14 | ||
|
|
df9803c75f | ||
|
|
e0107c14fc | ||
|
|
51c535f510 | ||
|
|
9976674c6f | ||
|
|
28052724e7 | ||
|
|
5182488725 | ||
|
|
156207b37b | ||
|
|
271617483a | ||
|
|
4aefaf2816 | ||
|
|
e03125fe60 | ||
|
|
126f9c2776 | ||
|
|
cc4a1506a4 | ||
|
|
e541a27eed | ||
|
|
222ac6e30e | ||
|
|
0c759c822c | ||
|
|
26283a3bcc | ||
|
|
88fce00cc0 | ||
|
|
74912b9afb | ||
|
|
b2873a6cc2 | ||
|
|
b017713c3b | ||
|
|
b10273781a | ||
|
|
b2067a1839 | ||
|
|
c3531b3750 | ||
|
|
bf84618244 | ||
|
|
cf11a4fbc8 | ||
|
|
b5875d9d7c | ||
|
|
3926cc2278 | ||
|
|
ee668c5881 | ||
|
|
1b2387102d | ||
|
|
5355703cf3 | ||
|
|
5de418fde4 | ||
|
|
fb057e7ea9 | ||
|
|
f182245c53 | ||
|
|
fce819effa | ||
|
|
886cd2d937 | ||
|
|
83265243d3 | ||
|
|
efa9319c64 | ||
|
|
fad70e0d98 | ||
|
|
6c08573e42 | ||
|
|
2128e901c7 | ||
|
|
7a85ec55f7 | ||
|
|
712f09d2a8 | ||
|
|
a97e0e1964 | ||
|
|
1754a750d0 | ||
|
|
ae3549d479 | ||
|
|
fb28df713f | ||
|
|
98d8ba8cc4 | ||
|
|
088a4b7151 | ||
|
|
56d3b036ec | ||
|
|
50f28f4372 | ||
|
|
4695ff82b9 | ||
|
|
792af4b6b2 | ||
|
|
bf6ce01b78 | ||
|
|
c5baa5ede1 | ||
|
|
96343bac90 | ||
|
|
91d91d5052 | ||
|
|
2ee1ed2138 | ||
|
|
2265b5b4c5 | ||
|
|
c6633698b4 | ||
|
|
58dc4ad8db | ||
|
|
6745b16c82 | ||
|
|
ab60971ec4 | ||
|
|
38fae9bae4 | ||
|
|
f4f20f5bb1 | ||
|
|
e684eb390d | ||
|
|
e365fc21e9 | ||
|
|
9c1abab2db | ||
|
|
1366f67d0b | ||
|
|
a4df53ad1c | ||
|
|
138ab8eccf | ||
|
|
bb6d3e60e8 | ||
|
|
898baa8b54 | ||
|
|
23ddeac9a5 | ||
|
|
b7b7ffbabd | ||
|
|
d7b7c7283f | ||
|
|
5af00138e9 | ||
|
|
e07eda31ed | ||
|
|
485c8fb570 | ||
|
|
102752abc2 | ||
|
|
0651b4ff16 | ||
|
|
8fe036596f | ||
|
|
f5bec86645 | ||
|
|
3eb01b1fb2 | ||
|
|
0c450fa966 | ||
|
|
31c8104dc6 | ||
|
|
0611acb910 | ||
|
|
00b84703f8 | ||
|
|
638ecd26f7 | ||
|
|
6859af3ac8 | ||
|
|
04267de3a1 | ||
|
|
6f1ca9de3e | ||
|
|
7413c65e31 | ||
|
|
b3fd49365a | ||
|
|
2242647e64 | ||
|
|
98b685a515 | ||
|
|
2f2d32fa61 | ||
|
|
fb33db9aa8 | ||
|
|
53d5f91b40 | ||
|
|
1a07f60b92 | ||
|
|
b940c97233 | ||
|
|
4086ba9773 | ||
|
|
2dc33e3e71 | ||
|
|
789182d06c | ||
|
|
f904c6b84d | ||
|
|
cdf6b7e2c3 | ||
|
|
86c5a77ed9 | ||
|
|
4320dc0a2c | ||
|
|
79a39e3d39 | ||
|
|
608678bbfa | ||
|
|
7cf00c7076 | ||
|
|
bbca5a86f8 | ||
|
|
dee2fd1ec4 | ||
|
|
7478783b20 | ||
|
|
dac7ab13da | ||
|
|
622ff39185 | ||
|
|
f5a369232a | ||
|
|
c256b323a2 | ||
|
|
01f800b740 | ||
|
|
35524d3a73 | ||
|
|
5b57490772 | ||
|
|
f67df57491 | ||
|
|
eb10bf2358 | ||
|
|
e7e0084eeb | ||
|
|
4d612e7827 | ||
|
|
7896314614 | ||
|
|
5f89c6892f | ||
|
|
416f4b7e95 | ||
|
|
c7f5ad4336 | ||
|
|
a8624ac62a | ||
|
|
d683a1e18d | ||
|
|
6ec31afcb1 | ||
|
|
b4378dcf80 | ||
|
|
a06f392ae4 | ||
|
|
dc1bcb790e | ||
|
|
bcac88e8fb | ||
|
|
fa0b0286b8 | ||
|
|
a5064992e9 | ||
|
|
7ca330741b | ||
|
|
773b582b1a | ||
|
|
f40c1eaeba | ||
|
|
d3aee7591f | ||
|
|
f703c4e178 | ||
|
|
585e76e121 | ||
|
|
b5d80647fc | ||
|
|
5073b97ffb | ||
|
|
5ad27928ac | ||
|
|
c5b67e119c | ||
|
|
f275ad0cbe | ||
|
|
e7da11fd93 | ||
|
|
35a1731c85 | ||
|
|
f07b32969f | ||
|
|
dd7eb4284b | ||
|
|
800f555b70 | ||
|
|
d36858681a | ||
|
|
373e830117 | ||
|
|
3ffba3d033 | ||
|
|
55f7053c00 | ||
|
|
36ef109f1a | ||
|
|
b56006b5b2 | ||
|
|
63f73bfe13 | ||
|
|
57f99633ce | ||
|
|
5afcfc4498 | ||
|
|
5068444dfe | ||
|
|
7357ee8fa4 | ||
|
|
21aeba29d0 | ||
|
|
a4e0f9371a | ||
|
|
544f79b30c | ||
|
|
0d0a8f55d6 | ||
|
|
3793dc18f2 | ||
|
|
9a02c9993d | ||
|
|
fbbdb1ddf7 | ||
|
|
6255a24f1c | ||
|
|
67cdb386a4 | ||
|
|
8769a693c9 | ||
|
|
83cf6629ec | ||
|
|
3353ad7e6e | ||
|
|
5c867551fe | ||
|
|
95bf259c29 | ||
|
|
ef95a346f1 | ||
|
|
5d03ac038d | ||
|
|
dea0e01fa8 | ||
|
|
d5550b4706 | ||
|
|
5a233fb7c2 | ||
|
|
07413645f2 | ||
|
|
c14a3c5072 | ||
|
|
ee73470370 | ||
|
|
60e8fa617a | ||
|
|
fd83f5e1a4 | ||
|
|
78c88541f1 | ||
|
|
96ba644e9f | ||
|
|
809bf95a90 | ||
|
|
5dcf6618bc | ||
|
|
0a3761e283 | ||
|
|
2016ae4a79 | ||
|
|
7fe074d752 | ||
|
|
82d58bdc4a | ||
|
|
9a3cb4559f | ||
|
|
405d11e604 | ||
|
|
ddf488970c | ||
|
|
ec966598f4 | ||
|
|
bdb2651c1d | ||
|
|
4ea7ba79c5 | ||
|
|
fd46d9ee9e | ||
|
|
04d7c9815f | ||
|
|
66dafaa2c5 | ||
|
|
c334520377 | ||
|
|
b5dcd83664 | ||
|
|
ccd94c4831 | ||
|
|
457888ac44 | ||
|
|
62606e7789 | ||
|
|
db50ae2e7d | ||
|
|
c927c254dd | ||
|
|
91b0e1a7a8 | ||
|
|
051dd6108c | ||
|
|
f74998a783 | ||
|
|
f5795a56de | ||
|
|
ebf4bf2165 | ||
|
|
19689013de | ||
|
|
a588d65591 | ||
|
|
b8b40f697e | ||
|
|
625978cd9c | ||
|
|
69abc1e9d7 | ||
|
|
fa0727e794 | ||
|
|
12537e9787 | ||
|
|
af6cef27b1 | ||
|
|
4fb349c626 | ||
|
|
a910f8cc80 | ||
|
|
9877acdb32 | ||
|
|
47ea52ca58 | ||
|
|
f6eae19147 | ||
|
|
57d200c21b | ||
|
|
0e08845eb0 | ||
|
|
d294f46f5a | ||
|
|
f8522c7fa9 | ||
|
|
0592feb2a1 | ||
|
|
90c8e2cf75 | ||
|
|
db0b8bc05b | ||
|
|
5951b8063a | ||
|
|
c6ffb5389e | ||
|
|
8023907941 | ||
|
|
42b1b44ad4 | ||
|
|
ebe94513cc | ||
|
|
1d40310fa4 | ||
|
|
fcdf6ac680 | ||
|
|
c88be3f8b3 | ||
|
|
833ba12664 | ||
|
|
dd01542bad | ||
|
|
646e796e5a | ||
|
|
487f211fcf | ||
|
|
bd92e10213 | ||
|
|
f6ad8186d6 | ||
|
|
e37d304d35 | ||
|
|
ef462402f4 | ||
|
|
40f3524247 | ||
|
|
5311bfa5c5 | ||
|
|
6b84fb1cde | ||
|
|
27afea5c6d | ||
|
|
d9671d5d49 | ||
|
|
560e218ee6 | ||
|
|
c61a557808 | ||
|
|
00db616ac4 | ||
|
|
c814b08536 | ||
|
|
e1f21f0be4 | ||
|
|
a85da45a66 | ||
|
|
94ca2181fb | ||
|
|
97510346ed | ||
|
|
1104639d0a | ||
|
|
707e7bd938 | ||
|
|
86624dfad9 | ||
|
|
93f4fa8d73 | ||
|
|
7b7d1d962d | ||
|
|
fc1cdda10d | ||
|
|
6562e98afa | ||
|
|
30441cda5b | ||
|
|
5d8e3c37d9 | ||
|
|
d0c2255750 | ||
|
|
d9f52a4176 | ||
|
|
fe98565b60 | ||
|
|
0dccef294c | ||
|
|
6e7b42cd66 | ||
|
|
2d17c57664 | ||
|
|
5cf503b2a9 | ||
|
|
ab6639564c | ||
|
|
5faaf2436f | ||
|
|
dc45d88c47 | ||
|
|
0e6fe30139 | ||
|
|
490cca07de | ||
|
|
946fe57119 | ||
|
|
69d16ee1f9 | ||
|
|
b208f6bc7d | ||
|
|
87f75b51e8 | ||
|
|
910ac866a1 | ||
|
|
1346295d86 | ||
|
|
a8e88c0ddc | ||
|
|
1fc035dfa5 | ||
|
|
29714ff530 | ||
|
|
5a610cecef | ||
|
|
dbb15ec671 | ||
|
|
0841703c32 | ||
|
|
c2881f7c6b | ||
|
|
ae92ebb92b | ||
|
|
6871b839b5 | ||
|
|
2b3d9d7ec4 | ||
|
|
0afe88cbc6 | ||
|
|
b161bc1593 | ||
|
|
501774946a | ||
|
|
a929ef223b | ||
|
|
97173871d0 | ||
|
|
6792978aed | ||
|
|
c172daa6d1 | ||
|
|
0c7e7324bc | ||
|
|
4f43188762 | ||
|
|
b09b97ff4b | ||
|
|
f058a07915 | ||
|
|
b0234843f8 | ||
|
|
7eb8469679 | ||
|
|
8d5d20500b | ||
|
|
6aef38f590 | ||
|
|
187828f2f2 | ||
|
|
0acff20f38 | ||
|
|
4e035d035a | ||
|
|
0afcb03de3 | ||
|
|
0719e7e006 | ||
|
|
e247b206e0 | ||
|
|
de847f60ba | ||
|
|
7dd166e8c0 | ||
|
|
574eaa8ed4 | ||
|
|
dbb3402c0f | ||
|
|
426d4104ea | ||
|
|
7fbc93d57f | ||
|
|
6a6317a403 | ||
|
|
145f60a485 | ||
|
|
aff9ff8356 | ||
|
|
74175e429d | ||
|
|
b06323cd6e | ||
|
|
77ebea3a6f | ||
|
|
d812ecb75f | ||
|
|
40a71cfdc7 | ||
|
|
897f293d13 | ||
|
|
735b8ed6ed | ||
|
|
c7984660fc | ||
|
|
7d6d09ec3b | ||
|
|
3d158a845c | ||
|
|
c43cad2f40 | ||
|
|
12d0b86803 | ||
|
|
6368933118 | ||
|
|
75eea8ed1b | ||
|
|
560c9cee30 | ||
|
|
517b81ad43 | ||
|
|
b2cb9ac8fe | ||
|
|
d0dbf1ea57 | ||
|
|
65eac44f69 | ||
|
|
0a1d3aa108 | ||
|
|
a1c3f92ac7 | ||
|
|
f1afd6f487 | ||
|
|
7e79846d10 | ||
|
|
742d339d93 | ||
|
|
0ecaf2eac6 | ||
|
|
0301041f79 | ||
|
|
c4d673a1f9 | ||
|
|
ceec9203a1 | ||
|
|
903018ef36 | ||
|
|
7235542cee | ||
|
|
5f6bc23931 | ||
|
|
412939dd0c | ||
|
|
62375ba7bd | ||
|
|
1b3385cad8 | ||
|
|
3f2a3a9b01 | ||
|
|
d79071b2da | ||
|
|
59fa3f3d04 | ||
|
|
1b15d1f166 | ||
|
|
41cd55dd44 | ||
|
|
24c49a21b9 | ||
|
|
9f68043524 | ||
|
|
dd2cd995cb | ||
|
|
e14aeb8668 | ||
|
|
fc289c973a | ||
|
|
1f23e50789 | ||
|
|
b7944539a4 | ||
|
|
bcf179d047 | ||
|
|
572e0b78fb | ||
|
|
337edb9cf4 | ||
|
|
20aa57ec0d | ||
|
|
56ffa5723c | ||
|
|
e4d1107058 | ||
|
|
6005910da2 | ||
|
|
12f2d57caa | ||
|
|
41f165e022 | ||
|
|
6e9061f40a | ||
|
|
7c4e41f855 | ||
|
|
315e790ccc | ||
|
|
4d25067387 | ||
|
|
be5cfa608a | ||
|
|
fe8238e6e9 | ||
|
|
0d258cc523 | ||
|
|
aae9e7ee59 | ||
|
|
5e5c59ebcb | ||
|
|
db56ddb36c | ||
|
|
3cb57374a8 | ||
|
|
32c3af8c39 | ||
|
|
4fe3182b1f | ||
|
|
7583c6177d | ||
|
|
2c3f424e01 | ||
|
|
542fa4eace | ||
|
|
db0be122d2 | ||
|
|
b849be0b02 | ||
|
|
fb9c918f1a | ||
|
|
0798a81739 | ||
|
|
c178c3b5e4 | ||
|
|
abcdb47fc2 | ||
|
|
e976d8ed1d | ||
|
|
69f0255a2c | ||
|
|
f3258b2426 | ||
|
|
43a7643453 | ||
|
|
b83ee202c4 | ||
|
|
cc51599f4a | ||
|
|
8dca8f0e69 | ||
|
|
e4a946b3f4 | ||
|
|
d52824c42d | ||
|
|
31a1c0aca6 | ||
|
|
2f6a05ecb8 | ||
|
|
3ef382dfcd | ||
|
|
60776dbeeb | ||
|
|
795025e0dc | ||
|
|
c5da386dbd | ||
|
|
ea46f79a97 | ||
|
|
6b23ef6cef | ||
|
|
b7c12ab483 | ||
|
|
29854e9555 | ||
|
|
cec2d1f302 | ||
|
|
fe8a8444bd | ||
|
|
efab051391 | ||
|
|
bd0ac7fe14 | ||
|
|
348f6c609c | ||
|
|
175cf6b08a | ||
|
|
ba114dc997 | ||
|
|
a35b9c45f5 | ||
|
|
7b5138035c | ||
|
|
18603033fb | ||
|
|
0048312fa6 | ||
|
|
c5b11042b0 | ||
|
|
fbbaf5b5b5 | ||
|
|
8b2dbfca77 | ||
|
|
68fa8f9b0b | ||
|
|
2a926135a9 | ||
|
|
cf66091554 | ||
|
|
b0adbf8aff | ||
|
|
7af7199a17 | ||
|
|
a0e3802663 | ||
|
|
4e384e0073 | ||
|
|
54d53055c2 | ||
|
|
338b9b0819 | ||
|
|
34f5c0c36d | ||
|
|
76a69dfa13 | ||
|
|
6f6e13de54 | ||
|
|
a697d076bc | ||
|
|
dc2f1d9db7 | ||
|
|
f4a53d0665 | ||
|
|
d4ff503e3d | ||
|
|
658903cde0 | ||
|
|
60492fa685 | ||
|
|
8e22a8a73b | ||
|
|
3ca8721e99 | ||
|
|
7574cd4360 | ||
|
|
80ff1a3874 | ||
|
|
971e3a6473 | ||
|
|
72f99e668e | ||
|
|
5722a0e1ce | ||
|
|
3a16dc1cac | ||
|
|
b8be713dd5 | ||
|
|
a1322e145c | ||
|
|
14c195a6d8 | ||
|
|
1fb4c6dfe8 | ||
|
|
5e4b86d1e8 | ||
|
|
cec94760fd | ||
|
|
009064bc4d | ||
|
|
9defdc6fbb | ||
|
|
f052eab681 | ||
|
|
24361033ed | ||
|
|
92f61634eb | ||
|
|
0b194cbca6 | ||
|
|
c334058412 | ||
|
|
9815d5c94c | ||
|
|
663d426e74 | ||
|
|
3c9f50efaf | ||
|
|
a1614b8411 | ||
|
|
aa6d2ac5d0 | ||
|
|
36eaad252f | ||
|
|
0fcce4a77a | ||
|
|
3e28346336 | ||
|
|
3185447c6b | ||
|
|
c29e24c7e2 | ||
|
|
225a08e8dd | ||
|
|
e6f9ea5158 | ||
|
|
30cb5f32f6 | ||
|
|
765b8435cb | ||
|
|
7f96af83b2 | ||
|
|
060e647e5e | ||
|
|
73c0f4b4c2 | ||
|
|
9e9688d1de | ||
|
|
48552b1ba4 | ||
|
|
7f25ef4700 | ||
|
|
ae2af0e14b | ||
|
|
48b410c41e | ||
|
|
1d35ad33c6 | ||
|
|
560a4c1105 | ||
|
|
f487f5960a | ||
|
|
5cc6344edc | ||
|
|
aa6e16f495 | ||
|
|
402d60491b | ||
|
|
c66c250c41 | ||
|
|
bbf41d2116 | ||
|
|
e4ca57bb57 | ||
|
|
22854f8016 | ||
|
|
e2f33cb14f | ||
|
|
e0f026c600 | ||
|
|
0a300b9935 | ||
|
|
9e3fa59ac2 | ||
|
|
532210b5ac | ||
|
|
d3a04db0f2 | ||
|
|
63873aba37 | ||
|
|
9a135a2b29 | ||
|
|
43adbdcc72 | ||
|
|
9a87dc3bdc | ||
|
|
361d04b84b | ||
|
|
1b5493f819 | ||
|
|
2949dcb6c0 | ||
|
|
9722c1397a | ||
|
|
f23ebb7c5e | ||
|
|
603a23ade2 | ||
|
|
675985c892 | ||
|
|
2ef76284f0 | ||
|
|
1f7f2416be | ||
|
|
43c94f221a | ||
|
|
96ccf69301 | ||
|
|
138ea941fa | ||
|
|
d6f0bd3bb8 | ||
|
|
d63f8130bc | ||
|
|
6529b06618 | ||
|
|
5868427dcf | ||
|
|
98f2db94ec | ||
|
|
8b1377043d | ||
|
|
2c650cd178 | ||
|
|
2bb4b1e604 | ||
|
|
2d011afbfd | ||
|
|
9fbd0a24ba | ||
|
|
8518010945 | ||
|
|
86a1cace27 | ||
|
|
93a93c2429 | ||
|
|
c01d3612e9 | ||
|
|
a472edb99b | ||
|
|
a0acd8054a | ||
|
|
808da6dbb5 | ||
|
|
fbf699adb6 | ||
|
|
ffd0e06b60 | ||
|
|
6caa8c37c2 | ||
|
|
40677872d5 | ||
|
|
1e9acc15cf | ||
|
|
73155d10c4 | ||
|
|
b76900ed43 | ||
|
|
6e1e78d1c6 | ||
|
|
ac2e12a9a9 | ||
|
|
11e5f9bd44 | ||
|
|
3b20a425c9 | ||
|
|
80e1124c21 | ||
|
|
6b5c37a8c5 | ||
|
|
c0daf14cb3 | ||
|
|
9b1b253548 | ||
|
|
9967b2e149 | ||
|
|
61f632a0f2 | ||
|
|
7e032b8b30 | ||
|
|
89279afdd3 | ||
|
|
a730ffdc39 | ||
|
|
98ce9ed699 | ||
|
|
944c3b40b4 | ||
|
|
63e6b0b5bf | ||
|
|
be895bcb96 | ||
|
|
0e41e3c7cf | ||
|
|
a017a6c025 | ||
|
|
e81c9642b8 | ||
|
|
a70b01b96e | ||
|
|
672a300022 | ||
|
|
276cb7cdb1 | ||
|
|
08d104e040 | ||
|
|
b2a016135e | ||
|
|
199160d4db | ||
|
|
16987ca15f | ||
|
|
62f626b157 | ||
|
|
6072e2fabb | ||
|
|
b750eed22f | ||
|
|
0d02c7d337 | ||
|
|
3abdbd3de9 | ||
|
|
5dc9742071 | ||
|
|
25e3740bcc | ||
|
|
ba862cc06d | ||
|
|
0731f54d35 | ||
|
|
868c8769f8 | ||
|
|
d1d74ec8a4 | ||
|
|
6239ddfe6d | ||
|
|
9d87c7a791 | ||
|
|
9002d1e570 | ||
|
|
a1c20a04ff | ||
|
|
e68c902e3b | ||
|
|
889b717a4c | ||
|
|
104311042c | ||
|
|
753e46657f | ||
|
|
429c4c7922 | ||
|
|
107aa9f71a | ||
|
|
d41137fedf | ||
|
|
1f31360f01 | ||
|
|
ec381d949e | ||
|
|
a9a1553031 | ||
|
|
71348b8b9e | ||
|
|
8bb668b226 | ||
|
|
56e718d87e | ||
|
|
9206955425 | ||
|
|
e0e42d336a | ||
|
|
948c4bebd5 | ||
|
|
8405de34b8 | ||
|
|
9f0fc7db8b | ||
|
|
18cfac40a5 | ||
|
|
ac3c7fb5de | ||
|
|
98349a9408 | ||
|
|
e01ce716a3 | ||
|
|
27b2c29210 | ||
|
|
90d65f1865 | ||
|
|
fe13e4b05d | ||
|
|
c9f1fe638d | ||
|
|
41f3d66705 | ||
|
|
fe9290e4a9 | ||
|
|
05dc226919 | ||
|
|
9b3942a79a | ||
|
|
767fa2c6af | ||
|
|
efbc4a2566 | ||
|
|
3288325bd4 | ||
|
|
749ed8568a | ||
|
|
4078b3cff9 | ||
|
|
8f74a36858 | ||
|
|
acdae3a149 | ||
|
|
9147a81a19 | ||
|
|
6c0ed47a6c | ||
|
|
9fff35ac9f | ||
|
|
9b46346a23 | ||
|
|
f5abd4c50b | ||
|
|
0ddb725f91 | ||
|
|
4ada3dd3a0 | ||
|
|
9d50bc0161 | ||
|
|
7ff9dcacb1 | ||
|
|
9eaddc999d | ||
|
|
5e4817ec5d | ||
|
|
6a356cf5c8 | ||
|
|
8ba3eeabd9 | ||
|
|
5ff861bd4a | ||
|
|
ea251e82e1 | ||
|
|
b531e43c49 | ||
|
|
52d3777f50 | ||
|
|
eefe6739ee | ||
|
|
e52ee0d208 | ||
|
|
6ccfc3fb15 | ||
|
|
417309262b | ||
|
|
fb87cc8c8e | ||
|
|
b03af37e19 | ||
|
|
5604ae2de4 | ||
|
|
45c218968c | ||
|
|
7e28784de3 | ||
|
|
41f8d621b6 | ||
|
|
bbb46b6c0c | ||
|
|
9be60903d7 | ||
|
|
596c3b7fd5 | ||
|
|
cc9d7fc744 | ||
|
|
dca0d5852d | ||
|
|
650e7bff12 | ||
|
|
24373fd1e7 | ||
|
|
dc4b1c1adf | ||
|
|
8ef5afc6fb | ||
|
|
352d23b853 | ||
|
|
589a66feda | ||
|
|
76381dbf53 | ||
|
|
4a3fdce696 | ||
|
|
848e51fda5 | ||
|
|
2b846ec7e5 | ||
|
|
92fc209384 | ||
|
|
b97e23c4a8 | ||
|
|
48e7da206f | ||
|
|
a762072659 | ||
|
|
1c33368211 | ||
|
|
694a5620e4 | ||
|
|
c18ce859cb | ||
|
|
690812d165 | ||
|
|
10b460e7ca | ||
|
|
2bfb11218f | ||
|
|
471d0d2f0c | ||
|
|
f48c0fbc95 | ||
|
|
81def6d9d5 | ||
|
|
dedec6614e | ||
|
|
bfe4e5bf37 | ||
|
|
f0744d73de | ||
|
|
2d322a13a2 | ||
|
|
911abe100a | ||
|
|
e052f9f575 | ||
|
|
c20df37045 | ||
|
|
676bb6b9a0 | ||
|
|
844db6ebb1 | ||
|
|
a6e2642ac5 | ||
|
|
a75b19e0f6 | ||
|
|
aa2d9117d9 | ||
|
|
56094458b7 | ||
|
|
5b47d1ef7a | ||
|
|
3f38d892c0 | ||
|
|
5f683e7d78 | ||
|
|
c95a8f39b9 | ||
|
|
bc042fb841 | ||
|
|
dc72565a91 | ||
|
|
d36c316ac6 | ||
|
|
cbb2379b5b | ||
|
|
1e0a87d62b | ||
|
|
1f934084cd | ||
|
|
af97475e93 | ||
|
|
15c53ba23c | ||
|
|
a777149199 | ||
|
|
e1d314afa2 | ||
|
|
182724f477 | ||
|
|
d4b4ed3505 | ||
|
|
1731fb0c67 | ||
|
|
bb1d16c122 | ||
|
|
8d48566c6f | ||
|
|
10c685112a | ||
|
|
91436356b8 | ||
|
|
8e3abe8946 | ||
|
|
b3b277f32a | ||
|
|
4f4cac9611 | ||
|
|
8476f5b29e | ||
|
|
a1510f90b0 | ||
|
|
ae7c036e41 | ||
|
|
727e89ab1b | ||
|
|
f9e226fe4a | ||
|
|
518ab3c62f | ||
|
|
744f1a34ef | ||
|
|
6cdc90bae3 | ||
|
|
c2f1139738 | ||
|
|
1888009e26 | ||
|
|
4daab7c982 | ||
|
|
42fc96aaaf | ||
|
|
66e3243ddd | ||
|
|
ad17d8f0a4 | ||
|
|
20490db03f | ||
|
|
5cb6b6c667 | ||
|
|
f7650fe8ae | ||
|
|
ebffa649c3 | ||
|
|
2cc8e2f8c7 | ||
|
|
93b2587876 | ||
|
|
0bc55d8c81 | ||
|
|
69e30c20c1 | ||
|
|
d8bc7084ee | ||
|
|
2672602e30 | ||
|
|
2fef94cc11 | ||
|
|
bb69296ddd | ||
|
|
3a930785ec | ||
|
|
e5a997ff59 | ||
|
|
5c16c9fa1a | ||
|
|
dcd971e6bf | ||
|
|
4e1b1fa929 | ||
|
|
6e7a9e2705 | ||
|
|
84f8310e9a | ||
|
|
8d9082563a | ||
|
|
aa11144649 | ||
|
|
81814c8ddc | ||
|
|
3b195720e0 | ||
|
|
949b0893dc | ||
|
|
1626ba7ee9 | ||
|
|
0644641616 | ||
|
|
aa6a62d96d | ||
|
|
d5af60ca2f | ||
|
|
19bca1a309 | ||
|
|
45807e6dd9 | ||
|
|
dca467faf3 | ||
|
|
d4fc424554 | ||
|
|
8a03f3062f | ||
|
|
203d67ea6b | ||
|
|
939a8b31e7 | ||
|
|
960cc62e59 | ||
|
|
a33a3925f9 | ||
|
|
0d1bcd480c | ||
|
|
917cfd14e9 | ||
|
|
96b95bd286 | ||
|
|
fe25ebdd11 | ||
|
|
ea536c5808 | ||
|
|
b762691d4d | ||
|
|
def5059f44 | ||
|
|
db0d2c9bd6 | ||
|
|
888f376e4c | ||
|
|
0af5c36d94 | ||
|
|
f03b949134 | ||
|
|
23c3b190c2 | ||
|
|
78ed6e831f | ||
|
|
a216a9ad7e | ||
|
|
4a60447800 | ||
|
|
5ebbef16f2 | ||
|
|
819f11c9d2 | ||
|
|
ccb857ba81 | ||
|
|
e6d07d6fa3 | ||
|
|
df7c2eeabc | ||
|
|
4bb015938e | ||
|
|
cabfc674c2 | ||
|
|
fb35b3996c | ||
|
|
c534109bce | ||
|
|
ee3353e8d3 | ||
|
|
7ace1a3e8d | ||
|
|
a9f8aa69c9 | ||
|
|
b24c82e82a | ||
|
|
e3dae1013d | ||
|
|
929197cf83 | ||
|
|
e7101eb193 | ||
|
|
3cacf33572 | ||
|
|
c1dff68b34 | ||
|
|
53e3452649 | ||
|
|
e937eeb2e5 | ||
|
|
2f6fe425a4 | ||
|
|
781cf450f8 | ||
|
|
2c95d6268c | ||
|
|
c476bce2f1 | ||
|
|
be6ab20415 | ||
|
|
b36afe2957 | ||
|
|
e7aff0b676 | ||
|
|
a56c9f8e68 | ||
|
|
2fefaba7b6 | ||
|
|
afccae85d9 | ||
|
|
2ef6b689e8 | ||
|
|
6c1af20310 | ||
|
|
0222f92358 | ||
|
|
939b72c771 | ||
|
|
886fbabb0b | ||
|
|
5347ef1728 | ||
|
|
efa026c86b | ||
|
|
231d1a12d1 | ||
|
|
0b981df1b2 | ||
|
|
9d468a33c4 | ||
|
|
f8dabac6d5 | ||
|
|
12077112b4 | ||
|
|
9ca1038535 | ||
|
|
0a1f0ea22e | ||
|
|
358731195f | ||
|
|
f5bf3c10fd | ||
|
|
cea34b9dbe | ||
|
|
fda42b034f | ||
|
|
67f66b32c0 | ||
|
|
649c59b731 | ||
|
|
7743f5a59d | ||
|
|
4a8d9df816 | ||
|
|
cedb39ee56 | ||
|
|
ee23c53108 | ||
|
|
19555e57a8 | ||
|
|
67bb9d1ae2 | ||
|
|
b2c957d4b1 | ||
|
|
b5d5b3a703 | ||
|
|
dc70b6172b | ||
|
|
b853cd5dc8 | ||
|
|
d161e9d1c1 | ||
|
|
119ee485c6 | ||
|
|
35f4826fea | ||
|
|
1f6878e912 | ||
|
|
df81663614 | ||
|
|
6d2a433ec5 | ||
|
|
620cda3987 | ||
|
|
ce87ae4159 | ||
|
|
c8a56ea11d | ||
|
|
3b1a3a3f8c | ||
|
|
3c8cc8ab36 | ||
|
|
92dd81ba7f | ||
|
|
769cde2f9f | ||
|
|
49014ed560 | ||
|
|
965bb6d211 | ||
|
|
1cf5973ab4 | ||
|
|
0ee7fbe41a | ||
|
|
2116cfedf3 | ||
|
|
82952f8830 | ||
|
|
42b0e1cb1f | ||
|
|
66c667c974 | ||
|
|
030b707296 | ||
|
|
9a0b61a619 | ||
|
|
1ebdb6fa14 | ||
|
|
5b59b51e50 | ||
|
|
3c48053ca8 | ||
|
|
d5a09981d6 | ||
|
|
5739ee8799 | ||
|
|
b81828864f | ||
|
|
8b500cdcdf | ||
|
|
5767ab3f75 | ||
|
|
eb437a5870 | ||
|
|
66d8f798ad | ||
|
|
b52648efd5 | ||
|
|
ac5e01e567 | ||
|
|
3e2ddd1edf | ||
|
|
7059daa7ef | ||
|
|
023a95ae1c | ||
|
|
86f0184c33 | ||
|
|
280461e06b | ||
|
|
9f1eb35d6f | ||
|
|
608ee593a4 | ||
|
|
6f79fc7d46 | ||
|
|
6a81095313 | ||
|
|
31f63bee93 | ||
|
|
ca05afa7fc | ||
|
|
4bb564ad2b | ||
|
|
d1cecd1dd2 | ||
|
|
51011a6672 | ||
|
|
bde531da79 | ||
|
|
2fea5bb19c | ||
|
|
471bcfc8c8 | ||
|
|
14350f9aef | ||
|
|
d0b3314c77 | ||
|
|
8dcb3fdf3c | ||
|
|
fb8be26654 | ||
|
|
3625a729a7 | ||
|
|
c960bd930d | ||
|
|
008d23bb5c | ||
|
|
2d57a5b2a4 | ||
|
|
0b6a8d0458 | ||
|
|
d4f9f83363 | ||
|
|
eca0bd0f39 | ||
|
|
89d5983ad9 | ||
|
|
8f0d033450 | ||
|
|
218149da14 | ||
|
|
c509dc6dc7 | ||
|
|
dba76125e4 | ||
|
|
d13547fa7f | ||
|
|
f3a17761be | ||
|
|
5526248e53 | ||
|
|
60dd569a69 | ||
|
|
b4a6acf697 | ||
|
|
fcdf44a1a0 | ||
|
|
0c3d96c3ba | ||
|
|
c1e1bc07ff | ||
|
|
468068705f | ||
|
|
86b7cd0572 | ||
|
|
5d7a485cd7 | ||
|
|
6a86b6fad5 | ||
|
|
0f7f5c2c0e | ||
|
|
9b42296bab | ||
|
|
db65d0e076 | ||
|
|
4004ef6f25 | ||
|
|
34b0b1fc11 | ||
|
|
124569d167 | ||
|
|
39f8c9807e | ||
|
|
eea750ebc8 | ||
|
|
3fbfbf1f45 | ||
|
|
04f180b08a | ||
|
|
8658cace16 | ||
|
|
1f6edfc779 | ||
|
|
dd83069fff | ||
|
|
89d6b5b5bd | ||
|
|
6a149caaed | ||
|
|
20ab5c58c7 | ||
|
|
2325a41346 | ||
|
|
71e53f2a5f | ||
|
|
a2774081c9 | ||
|
|
40462d1d02 | ||
|
|
4d6ecaf26b | ||
|
|
86b8e890dc | ||
|
|
802d716c0d | ||
|
|
1ccf94066c | ||
|
|
86a13dd94e | ||
|
|
b69dd89d34 | ||
|
|
38569740da | ||
|
|
56d673217c | ||
|
|
4d48df3339 | ||
|
|
5e33cdaef3 | ||
|
|
52aba68aa2 | ||
|
|
7534b9857a | ||
|
|
7c8f9371e5 | ||
|
|
0bbb1906bd | ||
|
|
25db8b1882 | ||
|
|
86ac33e638 | ||
|
|
b98f580143 | ||
|
|
3374176643 | ||
|
|
f950a3724c | ||
|
|
113a5bb8c2 | ||
|
|
d9d4824cd3 | ||
|
|
ecaf64a362 | ||
|
|
2a5f8a8906 | ||
|
|
a46f36a564 | ||
|
|
eaad937f84 | ||
|
|
d82bade81c | ||
|
|
ffc95d6125 | ||
|
|
781816998c | ||
|
|
368054d223 | ||
|
|
1f71f1f3c0 | ||
|
|
7eb6e8d551 | ||
|
|
443d289380 | ||
|
|
4eece9b1bd | ||
|
|
3e2fa2781a | ||
|
|
f6a8f905b1 | ||
|
|
63cdbbd56e | ||
|
|
5e7041615a | ||
|
|
41d83c5d95 | ||
|
|
905e41af5c | ||
|
|
1afebc69c7 | ||
|
|
e4c95b17e6 | ||
|
|
64ef92eafb | ||
|
|
95eceee413 | ||
|
|
3f85e944ab | ||
|
|
c824ee09a0 | ||
|
|
87d8e44c26 | ||
|
|
9e40204f00 | ||
|
|
50e0d9d34b | ||
|
|
ef8fb2767b | ||
|
|
c9e39592b5 | ||
|
|
4be1fa5ea1 | ||
|
|
407ac966f8 | ||
|
|
5360d78278 | ||
|
|
ae6314468f | ||
|
|
79fd4ad841 | ||
|
|
c5e776ec2d | ||
|
|
e2bb93c575 | ||
|
|
65150b8512 | ||
|
|
6f0014982d | ||
|
|
61f2088846 | ||
|
|
44ecf58519 | ||
|
|
65f37060db | ||
|
|
cde5c779dc | ||
|
|
7f1dc85574 | ||
|
|
efd8117fd4 | ||
|
|
24035faa29 | ||
|
|
dec089e39c | ||
|
|
c5ff85c8bc | ||
|
|
248b5a32be | ||
|
|
2906e61a06 | ||
|
|
e7a632e950 | ||
|
|
16ca32d057 | ||
|
|
ee7821ea7d | ||
|
|
5a58b723ec | ||
|
|
1f3273481e | ||
|
|
ed218bb6b4 | ||
|
|
ea9ac669da | ||
|
|
f25ccb0a83 | ||
|
|
41a2b59977 | ||
|
|
a6a792ecdd | ||
|
|
d381e0702c | ||
|
|
1f9ee4857b | ||
|
|
29086bc027 | ||
|
|
d6e7b4fefa | ||
|
|
e314da896f | ||
|
|
b80e71fdac | ||
|
|
47654fd021 | ||
|
|
ffde875f70 | ||
|
|
303fe604e9 | ||
|
|
c5a87b4fa3 | ||
|
|
41c361dcbc | ||
|
|
f70f0909b6 | ||
|
|
cc73072804 | ||
|
|
6f398a247d | ||
|
|
1f00cff3ab | ||
|
|
848d353880 | ||
|
|
0d04945bfa | ||
|
|
90f2f64ca8 | ||
|
|
8e9967be00 | ||
|
|
f391eb7423 | ||
|
|
3e8ac5d7f8 | ||
|
|
0feb2a21e5 | ||
|
|
b4ce4e2634 | ||
|
|
c0904e1c9e | ||
|
|
5e48df787a | ||
|
|
b00ef1eb50 | ||
|
|
1f03630846 | ||
|
|
a5c75761c2 | ||
|
|
6d0749a95b | ||
|
|
313a459af3 | ||
|
|
8da331e6ab | ||
|
|
8ea486c58f | ||
|
|
b20f8b39b9 | ||
|
|
76accf4806 | ||
|
|
715ce15a6f | ||
|
|
a43cd1438e | ||
|
|
a3a0fe3797 | ||
|
|
e560ecfa47 | ||
|
|
139d5c102b | ||
|
|
6451d58455 | ||
|
|
471d070c94 | ||
|
|
4d3fc68f11 | ||
|
|
1497e148f4 | ||
|
|
51ec089429 | ||
|
|
6da2eaf600 | ||
|
|
1956fb48d2 | ||
|
|
3c775e6446 | ||
|
|
6053f2a118 | ||
|
|
d0ec3df288 | ||
|
|
e17df3a7bc | ||
|
|
24343cd5c0 | ||
|
|
e6b6213619 | ||
|
|
2986b89e1d | ||
|
|
464a561bb0 | ||
|
|
f1a9920bcf | ||
|
|
b06998a7d1 | ||
|
|
a878709db3 | ||
|
|
838264de75 | ||
|
|
8aa6f6d55c | ||
|
|
ce501c78a8 | ||
|
|
1884518cf4 | ||
|
|
d26cb379c8 | ||
|
|
32dcafc669 | ||
|
|
d949733c70 | ||
|
|
816f1f7903 | ||
|
|
a44361a769 | ||
|
|
43ff395b65 | ||
|
|
9866d899e9 | ||
|
|
3ac8e25812 | ||
|
|
1f53d0203c | ||
|
|
a023f9280a | ||
|
|
0b25301bce | ||
|
|
e8e3be00d5 | ||
|
|
18d1ecaa5e | ||
|
|
8c4852c2cb | ||
|
|
3dd6c2d96f | ||
|
|
4462bc2e2d | ||
|
|
94042d6848 | ||
|
|
c42564f780 | ||
|
|
f9e5c33803 | ||
|
|
648c141cbc | ||
|
|
f0c0ea97a8 | ||
|
|
91622ad7cb | ||
|
|
d9ba87c84c | ||
|
|
87e88d5a33 | ||
|
|
6139a2c8ce | ||
|
|
8907e17bde | ||
|
|
b25b80c147 | ||
|
|
0330643ea2 | ||
|
|
2ad7083005 | ||
|
|
d6d3f5e9b6 | ||
|
|
dfcd4c18e6 | ||
|
|
f90f30df60 | ||
|
|
0ee12a6488 | ||
|
|
8aecb3c984 | ||
|
|
7ab46420be | ||
|
|
00b8b66132 | ||
|
|
3bc3677439 | ||
|
|
92d37f688e | ||
|
|
dfe57b01a2 | ||
|
|
9e2a591ac6 | ||
|
|
fc466bebd8 | ||
|
|
604876542a | ||
|
|
c420d653ee | ||
|
|
f589a3b587 | ||
|
|
dc3f6eaf29 | ||
|
|
1b34b0bd89 | ||
|
|
4c2abe7df4 | ||
|
|
55ccb5a35b | ||
|
|
78194a47b7 | ||
|
|
4171da016c | ||
|
|
9596255da8 | ||
|
|
ea6985a225 | ||
|
|
2f5f83f518 | ||
|
|
fad7092ff8 | ||
|
|
c31faf0bd9 | ||
|
|
4b5eb2cf2c | ||
|
|
702b510dc6 | ||
|
|
1f7a3b3b11 | ||
|
|
76ede5ce5c | ||
|
|
622e66b31f | ||
|
|
7eed2e5b01 | ||
|
|
47a84052e5 | ||
|
|
4d0992bb22 | ||
|
|
283531c4e4 | ||
|
|
1e00d43dd6 | ||
|
|
7e8074731b | ||
|
|
f52a59062d | ||
|
|
60c0835470 | ||
|
|
3c06816532 | ||
|
|
668b3e89f5 | ||
|
|
4af433d627 | ||
|
|
ab3beffad7 | ||
|
|
d0fbddcc2b | ||
|
|
366c16e561 | ||
|
|
f3243082a3 | ||
|
|
6b4c369164 | ||
|
|
d39c2cf0f1 | ||
|
|
b07276c3e2 | ||
|
|
ca07586e1e | ||
|
|
009e5df030 | ||
|
|
af87dfe204 | ||
|
|
bed7034f92 | ||
|
|
27a8480028 | ||
|
|
13183ed5c3 | ||
|
|
c38005a4f1 | ||
|
|
e04fd648a6 | ||
|
|
f01e3fbe56 | ||
|
|
9041d4eedd | ||
|
|
86b2d4fefe | ||
|
|
7b0d92dd18 | ||
|
|
19dad410ec | ||
|
|
1fd09132c2 | ||
|
|
825457ae64 | ||
|
|
fc4b704fca | ||
|
|
e76bafd648 | ||
|
|
4a895b6919 | ||
|
|
a400c594ba | ||
|
|
ac7e22d3c4 | ||
|
|
273422f277 | ||
|
|
06de8e78cf | ||
|
|
b74d02dbe4 | ||
|
|
3dc7fc54a0 | ||
|
|
d77aede9a9 | ||
|
|
f302028e0e | ||
|
|
d943274af7 | ||
|
|
b45d265c54 | ||
|
|
11af318a62 | ||
|
|
d313ad8bf5 | ||
|
|
e252d77d5f | ||
|
|
70f262d0c5 | ||
|
|
02537bd2f2 | ||
|
|
ea7534a848 | ||
|
|
56ccd8701d | ||
|
|
f136e5cf08 | ||
|
|
d4cf62f86f | ||
|
|
b522397298 | ||
|
|
93683d052b | ||
|
|
50500e680b | ||
|
|
4f97ff0096 | ||
|
|
6b435870de | ||
|
|
703a0c1159 | ||
|
|
6ff371d9f7 | ||
|
|
3b02d88b8e | ||
|
|
33c8f50534 | ||
|
|
b725c6eef3 | ||
|
|
055efb70c3 | ||
|
|
e6dd64e96e | ||
|
|
85b52234e4 | ||
|
|
01b4c07747 | ||
|
|
9b2a1110a6 | ||
|
|
e577215736 | ||
|
|
2946f87f00 | ||
|
|
717e934a88 | ||
|
|
3a263dcd99 | ||
|
|
f367b3dfc8 | ||
|
|
b3ab7b8948 | ||
|
|
6f0e47f690 | ||
|
|
5583203e91 | ||
|
|
4aab269181 | ||
|
|
f610c44190 | ||
|
|
2b060b3bf3 | ||
|
|
52e45f514b | ||
|
|
00d1d1a347 | ||
|
|
39387c7781 | ||
|
|
2517250b35 | ||
|
|
4f757a3af0 | ||
|
|
c57830c1d2 | ||
|
|
8ef0d01baf | ||
|
|
5b7ff6f72a | ||
|
|
89aa77d306 | ||
|
|
d504de0f78 | ||
|
|
26f5fe6375 | ||
|
|
27a1c12ad8 | ||
|
|
fd7284a665 | ||
|
|
e5b0945e4c | ||
|
|
93232c7064 | ||
|
|
f1dcb32c9f | ||
|
|
84681b9c81 | ||
|
|
a35bf41670 | ||
|
|
1026416153 | ||
|
|
383a5e7d49 | ||
|
|
167c0a0277 | ||
|
|
2d7860edc7 | ||
|
|
6911ee5b99 | ||
|
|
48e5d3189f | ||
|
|
e91a524490 | ||
|
|
7c11cfaf03 | ||
|
|
86c0d81253 | ||
|
|
b17451635d | ||
|
|
fa8452bbb2 | ||
|
|
4fa1a4b468 | ||
|
|
def5cb5332 | ||
|
|
bccdaff6d1 | ||
|
|
1bf216ca57 | ||
|
|
0e705a5f60 | ||
|
|
b57f9eb541 | ||
|
|
dbdfbd9e0c | ||
|
|
32b10882e5 | ||
|
|
248d8527fd | ||
|
|
7ef3e414e2 | ||
|
|
3c92f6bb50 | ||
|
|
8f494c2ad0 | ||
|
|
61cf1f34a5 | ||
|
|
f69a4a431a | ||
|
|
69d704622d | ||
|
|
02f599ead5 | ||
|
|
667e96f2c8 | ||
|
|
7883ddaf51 | ||
|
|
5741816315 | ||
|
|
e8c7fd7f5f | ||
|
|
989d471643 | ||
|
|
4f1a8a763a | ||
|
|
0646a49386 | ||
|
|
6ac8281cf4 | ||
|
|
6cd1273c43 | ||
|
|
1d582b8829 | ||
|
|
4d676fe9d8 | ||
|
|
4edb210028 | ||
|
|
508d1993ed | ||
|
|
a953b5ae4d | ||
|
|
bef776742c | ||
|
|
c10bf6d129 | ||
|
|
9224f8e211 | ||
|
|
d12c4de6ba | ||
|
|
04f0f0b12c | ||
|
|
7d3b7d7cb2 | ||
|
|
218c2fa3ae | ||
|
|
6337c12473 | ||
|
|
8f280b2656 | ||
|
|
84bcbe7055 | ||
|
|
15d05bbce3 | ||
|
|
74ce674d27 | ||
|
|
c663980808 | ||
|
|
456ed7ae23 | ||
|
|
836df2f798 | ||
|
|
8fe7cf26fc | ||
|
|
625fde5090 | ||
|
|
a2dbb10eb1 | ||
|
|
ebaf484830 | ||
|
|
4682a3fe95 | ||
|
|
2c874f745d | ||
|
|
094d01148a | ||
|
|
a2cb42039f | ||
|
|
222d004714 | ||
|
|
878e348ff9 | ||
|
|
dadb140e2f | ||
|
|
7b4983c8f8 | ||
|
|
a0cfab65ea | ||
|
|
07d781be66 | ||
|
|
6b6b6cd940 | ||
|
|
6b8faeb1f2 | ||
|
|
d485e7fc29 | ||
|
|
287fc71ee2 | ||
|
|
2288607fc5 | ||
|
|
6cfcf6e010 | ||
|
|
2c05a539e5 | ||
|
|
1d9acd8337 | ||
|
|
78493a1b03 | ||
|
|
52fc5f0cd3 | ||
|
|
dc44e06eeb | ||
|
|
a57ea792c6 | ||
|
|
57dcb93324 | ||
|
|
5fc85205d9 | ||
|
|
e8967fdc58 | ||
|
|
c13cfa040d | ||
|
|
f9606d82fa | ||
|
|
ed9f9b3cd7 | ||
|
|
6eb45b5964 | ||
|
|
a9655b77ab | ||
|
|
928da71046 | ||
|
|
ffc6e72604 | ||
|
|
a953f6bc5b | ||
|
|
9f71179ca9 | ||
|
|
23defd97e9 | ||
|
|
7a54e0b10c | ||
|
|
33d15279ac | ||
|
|
afdf0e759f | ||
|
|
adb12b50b5 | ||
|
|
2da9a94d38 | ||
|
|
d47e48329b | ||
|
|
2ecce2dc35 | ||
|
|
aa203477bc | ||
|
|
f85a4a7325 | ||
|
|
7cb8ad4ea3 | ||
|
|
8fbf6ca7c5 | ||
|
|
5386c05cd1 | ||
|
|
610edbc7de | ||
|
|
9e5ef06ceb | ||
|
|
98bbb11780 | ||
|
|
68b899ce26 | ||
|
|
13fa52b881 | ||
|
|
e058cb0648 | ||
|
|
ffbd2367e7 | ||
|
|
9e693657d9 | ||
|
|
0b59e4b821 | ||
|
|
142a32b437 | ||
|
|
6e09d7cb53 | ||
|
|
e8861e6d20 | ||
|
|
d95bc9b3eb | ||
|
|
2d24f03033 | ||
|
|
c27ef11305 | ||
|
|
7c0ba95806 | ||
|
|
8cdff379d6 | ||
|
|
b3fb8a6e97 | ||
|
|
1f245a6f73 | ||
|
|
1c85ad029b | ||
|
|
8f5e25598a | ||
|
|
4de105ae4a | ||
|
|
4086197d95 | ||
|
|
9c1097c4db | ||
|
|
6fd1c9a929 | ||
|
|
d282abf2df | ||
|
|
54754242da | ||
|
|
5d98e49cbb | ||
|
|
f6b66196e1 | ||
|
|
d004ea17c3 | ||
|
|
be60fcb11a | ||
|
|
bc422640d7 | ||
|
|
0892ae5b25 | ||
|
|
83b3818e67 | ||
|
|
cd7dae0676 | ||
|
|
61a71738ae | ||
|
|
e6d03e7a3e | ||
|
|
5db1090dff | ||
|
|
154052ff15 | ||
|
|
5c6593b505 | ||
|
|
c3026223f7 | ||
|
|
beb42300e1 | ||
|
|
b8cadf21db | ||
|
|
c6e0cef254 | ||
|
|
ce51b94461 | ||
|
|
d7969026b3 | ||
|
|
bc37c9b1cd | ||
|
|
545ae277bc | ||
|
|
6d5f1d97f8 | ||
|
|
afef79762d | ||
|
|
6fb51171c8 | ||
|
|
38ad62e6c7 | ||
|
|
cae27179ce | ||
|
|
e07e515a1b | ||
|
|
e91c188e85 | ||
|
|
9bd721eb10 | ||
|
|
d82c344869 | ||
|
|
a57282df4b | ||
|
|
3ee228371d | ||
|
|
4166063897 | ||
|
|
8e4fe0acf9 | ||
|
|
174253123e | ||
|
|
82d199b639 | ||
|
|
5a48521049 | ||
|
|
a70ae211e1 | ||
|
|
e880e3fe0c | ||
|
|
22e48a814a | ||
|
|
5423a08558 | ||
|
|
2b3333f53e | ||
|
|
3156be3fa6 | ||
|
|
68683825ad | ||
|
|
d2d5320ee8 | ||
|
|
0fd6a7ed18 | ||
|
|
aee3c65a8f | ||
|
|
e9887156cf | ||
|
|
0b1b5e3080 | ||
|
|
dee2d85e77 | ||
|
|
48167d2b21 | ||
|
|
dea72ba6a4 | ||
|
|
b3d949852f | ||
|
|
ac0880fd8f | ||
|
|
f3232e99c3 | ||
|
|
84f81c50ba | ||
|
|
57a5bbd387 | ||
|
|
c834cbba59 | ||
|
|
98038f8228 | ||
|
|
1abd99a443 | ||
|
|
9aa38aad45 | ||
|
|
23a96536fa | ||
|
|
f2ddc10685 | ||
|
|
0b7745d713 | ||
|
|
9a0d7a40be | ||
|
|
8fc4200414 | ||
|
|
332b7125de | ||
|
|
be19c812ab | ||
|
|
8716039dec | ||
|
|
83905d9fec | ||
|
|
814639b2fc | ||
|
|
877855a74e | ||
|
|
8759dcc0ce | ||
|
|
a03858c40b | ||
|
|
e9ba352023 | ||
|
|
ab0f48d506 | ||
|
|
a193c9ce3e | ||
|
|
92b3dd06e3 | ||
|
|
046ecab96f | ||
|
|
86f2ad3017 | ||
|
|
bbc37db2f3 | ||
|
|
85d125c22c | ||
|
|
9103cae5e5 | ||
|
|
97bd1845a6 | ||
|
|
09f89187f4 | ||
|
|
d667e05543 | ||
|
|
990a86615d | ||
|
|
f2f5f5a870 | ||
|
|
c99f72d5ea | ||
|
|
683ce541c8 | ||
|
|
6b5441c30f | ||
|
|
b88fc00775 | ||
|
|
996bd9300b | ||
|
|
8520f94796 | ||
|
|
472c1a099b | ||
|
|
a39da32bf0 | ||
|
|
31a5160a0a | ||
|
|
9ece8612b8 | ||
|
|
7292abefc1 | ||
|
|
4b0db9a47b | ||
|
|
348079bc3f | ||
|
|
fb2c23645b | ||
|
|
5ab813e1b6 | ||
|
|
791cda209c | ||
|
|
d84c5a2238 | ||
|
|
f06ee6bdba | ||
|
|
8538f86ac1 | ||
|
|
3dd574bb94 | ||
|
|
b3450c2246 | ||
|
|
47dfaf232f | ||
|
|
6d92ac275d | ||
|
|
5674f1be45 | ||
|
|
de527c2379 | ||
|
|
5bcba1fadf | ||
|
|
da6c94f73b | ||
|
|
cc415d699e | ||
|
|
acc4a8ed6d | ||
|
|
897b701dee | ||
|
|
a1abfb7643 | ||
|
|
94bea2902b | ||
|
|
e97718461b | ||
|
|
3dab84005d | ||
|
|
18f86e7757 | ||
|
|
d37b140601 | ||
|
|
38423a895b | ||
|
|
a648a5c2cc | ||
|
|
641f19c68f | ||
|
|
ff9946b264 | ||
|
|
fe550afba6 | ||
|
|
bf7603cf83 | ||
|
|
cca7178332 | ||
|
|
28c96e89e1 | ||
|
|
b189759bcd | ||
|
|
c26b4d8c9f | ||
|
|
a37b138d7c | ||
|
|
79a898697d | ||
|
|
3f65e03649 | ||
|
|
7482eb6adc | ||
|
|
113b132639 | ||
|
|
82070f1cdf | ||
|
|
eac689a606 | ||
|
|
ba90d5d529 | ||
|
|
4dceb59561 | ||
|
|
5819b6d4a6 | ||
|
|
58294f67d2 | ||
|
|
9ccc11ce50 | ||
|
|
d4b0d7850d | ||
|
|
e597dbd0be | ||
|
|
53535918d0 | ||
|
|
f6c67cec11 | ||
|
|
01927063d5 | ||
|
|
0960b3618f | ||
|
|
27a819c620 | ||
|
|
ef1dea5e1e | ||
|
|
ab8c6ed967 | ||
|
|
3f80efd660 | ||
|
|
2622eba31d | ||
|
|
499507ca0e | ||
|
|
1c4207a1f8 | ||
|
|
c7c8ed155c | ||
|
|
8ef9700499 | ||
|
|
53e1e33045 | ||
|
|
85e2dc34d5 | ||
|
|
1e6ae4496b | ||
|
|
7b5ba2f1fd | ||
|
|
36dc3e1c20 | ||
|
|
974a0ddf65 | ||
|
|
3f72b744e0 | ||
|
|
11c88a0ff5 | ||
|
|
3be464e4ec | ||
|
|
ca1b12c5a1 | ||
|
|
4b89b67d1c | ||
|
|
a68a224efd | ||
|
|
5844b74e22 | ||
|
|
c4fd954b8a | ||
|
|
7fdb466d14 | ||
|
|
23b14d4cfb | ||
|
|
eba5d76078 | ||
|
|
97089c0370 | ||
|
|
aee1a49287 | ||
|
|
e048e34e80 | ||
|
|
56c474cf48 | ||
|
|
7a4e086d7a | ||
|
|
3e0d46d222 | ||
|
|
39752c2ed0 | ||
|
|
045ee57f04 | ||
|
|
7ad1cf5785 | ||
|
|
ee11aabc30 | ||
|
|
b4ac6f4fdd | ||
|
|
9b118c6bb6 | ||
|
|
ec4a36ec12 | ||
|
|
d51fe40c2d | ||
|
|
2e4ab68995 | ||
|
|
3823ad3ec0 | ||
|
|
5bf4e7857d | ||
|
|
1cc3e6b5e6 | ||
|
|
d4cd24c22d | ||
|
|
5b6d752119 | ||
|
|
1e5bf63b6a | ||
|
|
b8dabd3fb8 | ||
|
|
77e7617654 | ||
|
|
58d8ab855f | ||
|
|
abbfbf18bc | ||
|
|
a2f126c351 | ||
|
|
99771d91ce | ||
|
|
7db874096e | ||
|
|
d959c647e2 | ||
|
|
cd151feb19 | ||
|
|
8ef52cabcf | ||
|
|
9ff7f19e32 | ||
|
|
12aca26b5b | ||
|
|
309827ec1d | ||
|
|
59d3eb5f24 | ||
|
|
663666e26a | ||
|
|
0f3ef58fa3 | ||
|
|
9a9e2e72b0 | ||
|
|
0776f7d3d7 | ||
|
|
d9b4f90969 | ||
|
|
71931b05f0 | ||
|
|
09e00183bd | ||
|
|
7b6d8bfc3c | ||
|
|
854c0622f0 | ||
|
|
cfa22547e0 | ||
|
|
16d7cb88fa | ||
|
|
f27f790f29 | ||
|
|
e5bb148d4e | ||
|
|
7aa23d3ca3 | ||
|
|
9c6414d6fa | ||
|
|
cd9ab22f84 | ||
|
|
07e71ce1f1 | ||
|
|
61dc840cdd | ||
|
|
a2dc8a2fa5 | ||
|
|
ceedeb4a7e | ||
|
|
83987c17ac | ||
|
|
d836f5d4c0 | ||
|
|
cc53ad5166 | ||
|
|
dd59d14805 | ||
|
|
c54047b0b0 | ||
|
|
813f7b58d6 | ||
|
|
a7ef1966ac | ||
|
|
95ae21ff1b | ||
|
|
7f86b7224c | ||
|
|
5b0ca1585a | ||
|
|
51498e1d3f | ||
|
|
e07e19f271 | ||
|
|
fd81040420 | ||
|
|
e2efb3cf06 | ||
|
|
c45b1c2c8b | ||
|
|
ade9a02eef | ||
|
|
4208c264d7 | ||
|
|
4b3fb7b05e | ||
|
|
d9d65f18e9 | ||
|
|
2ec043606b | ||
|
|
e986a4b0a3 | ||
|
|
cfa034a07a | ||
|
|
f3f3df734c | ||
|
|
8b23529beb | ||
|
|
b84a1bed0a | ||
|
|
5cec06b1a8 | ||
|
|
1fbc3945a2 | ||
|
|
5918218872 | ||
|
|
08e1c852aa | ||
|
|
27fb7df0d2 | ||
|
|
2158bbfa7f | ||
|
|
e740042363 | ||
|
|
20f43a76ba | ||
|
|
a45553cd57 | ||
|
|
e9d946d374 | ||
|
|
e7b0cd7ad2 | ||
|
|
c4d2d9e14f | ||
|
|
322891a2dd | ||
|
|
618bfebfaf | ||
|
|
17332d6b21 | ||
|
|
15adb9bb42 | ||
|
|
d3ca6394eb | ||
|
|
0e874a094c | ||
|
|
962c163cdf | ||
|
|
5418b59681 | ||
|
|
da3c43182a | ||
|
|
b111463f4c | ||
|
|
28690c3d16 | ||
|
|
856a7b766f | ||
|
|
ce46ccd32b | ||
|
|
c7d31495bf | ||
|
|
a6bb6f5df3 | ||
|
|
409e2e7e98 | ||
|
|
09ac5ed748 | ||
|
|
84908add07 | ||
|
|
119ad66740 | ||
|
|
0f22953a67 | ||
|
|
7c53e635b2 | ||
|
|
63aec84825 | ||
|
|
526d45e95f | ||
|
|
cce70fa84a | ||
|
|
3933ff52a1 | ||
|
|
4ffaf35556 | ||
|
|
f7054b3561 | ||
|
|
5d97102f8f | ||
|
|
6c3d7449e1 | ||
|
|
5286b3971c | ||
|
|
5470222d70 | ||
|
|
34574352be | ||
|
|
b852f3941f | ||
|
|
75d73aaffb | ||
|
|
d23ad61dc3 | ||
|
|
5925071957 | ||
|
|
f6a24fce48 | ||
|
|
44e04f7688 | ||
|
|
e0a5a4813e | ||
|
|
7b892ddf5a | ||
|
|
49cb1d620b | ||
|
|
88b469203c | ||
|
|
aa312ec61c | ||
|
|
e5b4099e43 | ||
|
|
49162267a3 | ||
|
|
f29b5131d3 | ||
|
|
0c1620840f | ||
|
|
71066c12dc | ||
|
|
f5cf7d7eb7 | ||
|
|
b510fcf96e | ||
|
|
4b243ebeeb | ||
|
|
228648397e | ||
|
|
824fc6a084 | ||
|
|
d9e180b9b7 | ||
|
|
f45f6d788f | ||
|
|
95d2ca8a46 | ||
|
|
68611e2d55 | ||
|
|
2e0ae6d25f | ||
|
|
bd616da7ca | ||
|
|
5348058938 | ||
|
|
db1422f10e | ||
|
|
770098eca8 | ||
|
|
6ac728e179 | ||
|
|
1ccac6ed55 | ||
|
|
5abacc5413 | ||
|
|
5ed3e24f47 | ||
|
|
3ab30838d7 | ||
|
|
9559b88894 | ||
|
|
42c5a9dad7 | ||
|
|
d44d114b75 | ||
|
|
43e62ac46e | ||
|
|
7fe41da165 | ||
|
|
e9dd13754b | ||
|
|
585e338e5e | ||
|
|
1d64caac88 | ||
|
|
e8f3025373 | ||
|
|
4237ddadb5 | ||
|
|
e7402d7a50 | ||
|
|
d443fff043 | ||
|
|
a05c35b802 | ||
|
|
bb030e6fa8 | ||
|
|
6ccbc0d37d | ||
|
|
b32ff568e6 | ||
|
|
0b9a78cb1e | ||
|
|
f020f3eaa5 | ||
|
|
1a092713d0 | ||
|
|
98cb18a7d7 | ||
|
|
2d5316a11c | ||
|
|
d993b05a5b | ||
|
|
eba1b6221d | ||
|
|
d8a4a9b1dd | ||
|
|
e6c77fde1d | ||
|
|
04eb5270d6 | ||
|
|
22edfd2b3b | ||
|
|
eb12dfc9e5 | ||
|
|
bc00916346 | ||
|
|
4acff8f37f | ||
|
|
b7ecaacd07 | ||
|
|
242139d5ac | ||
|
|
f802468c2a | ||
|
|
3115a0ccfe | ||
|
|
67f59f7b40 | ||
|
|
6c4cb4c079 | ||
|
|
20fe0a5685 | ||
|
|
971f8b0881 | ||
|
|
7918735b11 | ||
|
|
8d24db9ac0 | ||
|
|
e2cb8ec02c | ||
|
|
3edf46ff73 | ||
|
|
fa6bb59773 | ||
|
|
b409d2f9ea | ||
|
|
75086e3088 | ||
|
|
9a4c654606 | ||
|
|
91c808ecc4 | ||
|
|
d10336ec0e | ||
|
|
522aec4443 | ||
|
|
6426d1c9ce | ||
|
|
24b2feff63 | ||
|
|
df5e0cb0a5 | ||
|
|
4f0842663f | ||
|
|
85f42b7f7a | ||
|
|
9b1aed8323 | ||
|
|
ed8c8539df | ||
|
|
81fb5a7682 | ||
|
|
b0d0a483cc | ||
|
|
51bc85ce5f | ||
|
|
f501979c33 | ||
|
|
f68fb8fad2 | ||
|
|
662c6c6c06 | ||
|
|
0fddc30b7a | ||
|
|
80aa02a197 | ||
|
|
e17614722d | ||
|
|
fe434a05b4 | ||
|
|
204f4adca7 | ||
|
|
f390d7e2ab | ||
|
|
e5d8f20f17 | ||
|
|
677d4b9913 | ||
|
|
51a4b2411d | ||
|
|
b8a95da22a | ||
|
|
180c337885 | ||
|
|
6d32e7e59b | ||
|
|
5669b2dd26 | ||
|
|
4d2515d6be | ||
|
|
89a2e1dbdb | ||
|
|
cb410a2f3c | ||
|
|
5bbddee81e | ||
|
|
4fb5088f89 | ||
|
|
8dad7a5cab | ||
|
|
573fe4346d | ||
|
|
81daa0899e | ||
|
|
0d8812b15c | ||
|
|
57a0fcbe00 | ||
|
|
3f6536d2b8 | ||
|
|
2ffdb3cda4 | ||
|
|
bfa301dfd0 | ||
|
|
ab111470ce | ||
|
|
abdc36cafd | ||
|
|
4eb2481830 | ||
|
|
795083a15c | ||
|
|
dd0ade23cf | ||
|
|
12adebbc3a | ||
|
|
4647bbb71a | ||
|
|
20a6474eae | ||
|
|
eb32144902 | ||
|
|
3c45b97804 | ||
|
|
3fb701add0 | ||
|
|
6f59f8b078 | ||
|
|
81ddcd0b2b | ||
|
|
715774bed7 | ||
|
|
d57e56ab4c | ||
|
|
4a22d2e832 | ||
|
|
24633f5987 | ||
|
|
b83427db64 | ||
|
|
504d44366c | ||
|
|
0fd8685c64 | ||
|
|
be83e732af | ||
|
|
4a7f22123f | ||
|
|
951eb9079c | ||
|
|
a58406c030 | ||
|
|
6d53c16775 | ||
|
|
fd3a436bd3 | ||
|
|
89e6de2308 | ||
|
|
9a2726e208 | ||
|
|
efdd39207c | ||
|
|
ade2c31625 | ||
|
|
9f86ff884f | ||
|
|
5dca99232e | ||
|
|
60825fab88 | ||
|
|
95d92b8be0 | ||
|
|
388170ffa5 | ||
|
|
4396093666 | ||
|
|
b47050630b | ||
|
|
925f7854bb | ||
|
|
ed453cc9b4 | ||
|
|
96128460b7 | ||
|
|
43fefff150 | ||
|
|
6bfed632c7 | ||
|
|
07cfd5754e | ||
|
|
341a0d465a | ||
|
|
85181ac512 | ||
|
|
3ed5b2dadd | ||
|
|
2c051912b3 | ||
|
|
c33ddea610 | ||
|
|
b48b561b97 | ||
|
|
e5394bbafe | ||
|
|
6a5ee2a538 | ||
|
|
e47d4fe249 | ||
|
|
799a00f19a | ||
|
|
4a17400b0a | ||
|
|
f0962c33a1 | ||
|
|
1109b9ab57 | ||
|
|
da19ff78f3 | ||
|
|
03432bf61f | ||
|
|
6c6471b160 | ||
|
|
daf926cf5b | ||
|
|
b378ecda30 | ||
|
|
2183e2b0be | ||
|
|
48f13455be | ||
|
|
7089540ec7 | ||
|
|
ce71143fd0 | ||
|
|
89b77bfb47 | ||
|
|
f34430de8a | ||
|
|
7f8917932f | ||
|
|
ad95450fc4 | ||
|
|
a103b94876 | ||
|
|
c94933b2fa | ||
|
|
bdde2b4303 | ||
|
|
a6aef18606 | ||
|
|
436ca5d9bb | ||
|
|
a666910848 | ||
|
|
6ff7c9afd8 | ||
|
|
459052572f | ||
|
|
299d1295b6 | ||
|
|
cf8e389799 | ||
|
|
77b55ad07d | ||
|
|
570e7e9a13 | ||
|
|
97d509cc95 | ||
|
|
5bc9f72e85 | ||
|
|
8d7faf6c12 | ||
|
|
0240a571c8 | ||
|
|
622b72086b | ||
|
|
5f3d935920 | ||
|
|
a8656beb34 | ||
|
|
d6d8b51b2c | ||
|
|
92cfa27ff0 | ||
|
|
f2b0015c9b | ||
|
|
99a2d5856d | ||
|
|
8d5fe920a5 | ||
|
|
5029ae9fe2 | ||
|
|
2ad0310fd3 | ||
|
|
cd8af6aa44 | ||
|
|
607486391a | ||
|
|
d11012e2c9 | ||
|
|
1b5fff695d | ||
|
|
e065c308e9 | ||
|
|
df273c9d01 | ||
|
|
d60799bf6b | ||
|
|
fd49c6ff05 | ||
|
|
0a004934d4 | ||
|
|
f826cc3bdd | ||
|
|
3d95c23c96 | ||
|
|
7ee05bc6b0 | ||
|
|
27de50012b | ||
|
|
1bb90f5805 | ||
|
|
88979a11c1 | ||
|
|
1b282b3521 | ||
|
|
e8e5c9d97e | ||
|
|
be78a31e2b | ||
|
|
a2ea62d4c9 | ||
|
|
6e849e833f | ||
|
|
ed3c85261b | ||
|
|
6910e92132 | ||
|
|
0bc2bb05d4 | ||
|
|
99af3ed8ef | ||
|
|
a0084d5af9 | ||
|
|
4285af4244 | ||
|
|
0deb623127 | ||
|
|
0b33c074a6 | ||
|
|
74b394640d | ||
|
|
95ee791d97 | ||
|
|
3522012bb2 | ||
|
|
ca5e0330ca | ||
|
|
4a2fa70fc9 | ||
|
|
47f8af85f5 | ||
|
|
0e482b1b30 | ||
|
|
9d62ac18ce | ||
|
|
461f50d50d | ||
|
|
af71ec7915 | ||
|
|
168f1aacef | ||
|
|
694e04bb39 | ||
|
|
7e86b6b305 | ||
|
|
ee222667e3 | ||
|
|
56498d48b4 | ||
|
|
a15887434d | ||
|
|
3a10285392 | ||
|
|
e7f10a41f2 | ||
|
|
e97c8ff013 | ||
|
|
b1d4fcb33c | ||
|
|
1b4d8c0fb6 | ||
|
|
fad9bab629 | ||
|
|
83ba61245c | ||
|
|
4a915571f5 | ||
|
|
9aabb6c08d | ||
|
|
54e911aa4f | ||
|
|
69e2d48738 | ||
|
|
ed50eba46d | ||
|
|
32f6eeb3bd | ||
|
|
8a36eb220e | ||
|
|
5b2719d9b3 | ||
|
|
4c06a45dc5 | ||
|
|
b75610a9f3 | ||
|
|
6e10dc5456 | ||
|
|
fc3acfc4d5 | ||
|
|
0b719aa462 | ||
|
|
e783d75ed3 | ||
|
|
ecbc0255d9 | ||
|
|
827672cd78 | ||
|
|
490de54fb5 | ||
|
|
315f4f5658 | ||
|
|
7eeda99a05 | ||
|
|
390d1cd1b7 | ||
|
|
3f969d0b84 | ||
|
|
626fc9a773 | ||
|
|
ab458219ec | ||
|
|
eea3a56973 | ||
|
|
58abfc5426 | ||
|
|
0b8ca80e57 | ||
|
|
989203cf9c | ||
|
|
1f7b735290 | ||
|
|
39770d99ea | ||
|
|
66dfb8aac1 | ||
|
|
40404d7337 | ||
|
|
bf94671c3c | ||
|
|
c66bc46bb1 | ||
|
|
35a9a1878e | ||
|
|
2eb8688f29 | ||
|
|
b2cecd9d8b | ||
|
|
365edaddd4 | ||
|
|
b79db079a6 | ||
|
|
9d39ada3d0 | ||
|
|
f872296aaf | ||
|
|
280a79a319 | ||
|
|
70ef0577a3 | ||
|
|
d584491ddf | ||
|
|
0435c2e306 | ||
|
|
1192fe545f | ||
|
|
6a8440fb70 | ||
|
|
82d7c4294c | ||
|
|
0e6db7dc82 | ||
|
|
483c99ad73 | ||
|
|
a0b745a053 | ||
|
|
64b8ea5963 | ||
|
|
4f343428d1 | ||
|
|
9893e9316e | ||
|
|
c9b4568f3e | ||
|
|
4a474b8120 | ||
|
|
83d4cbf15e | ||
|
|
4df36948c8 | ||
|
|
c6cd319cd4 | ||
|
|
5905971122 | ||
|
|
ad04898e05 | ||
|
|
c1894bbf96 | ||
|
|
8a1db559b6 | ||
|
|
c708eefcd4 | ||
|
|
e0818297f1 | ||
|
|
f6e38a2e95 | ||
|
|
f1ec9035fc | ||
|
|
681f50bf4e | ||
|
|
03471b21ee | ||
|
|
6cbdaf985f | ||
|
|
b853731aaf | ||
|
|
b224dd96bd | ||
|
|
fbbc249f2b | ||
|
|
51856230d3 | ||
|
|
c542f9a3f4 | ||
|
|
3f97600862 | ||
|
|
b2c2220971 | ||
|
|
04855ca11c | ||
|
|
f08b599821 | ||
|
|
b6f0d041f9 | ||
|
|
681f6d53bb | ||
|
|
d33f42d53f | ||
|
|
7248d68d49 | ||
|
|
c9dfdd38a7 | ||
|
|
d4dd261436 | ||
|
|
9c86c11abf | ||
|
|
d7c43de3ce | ||
|
|
876bac4823 | ||
|
|
693180c1a2 | ||
|
|
a8be2cf641 | ||
|
|
ba4ddf32b4 | ||
|
|
7ca4354c22 | ||
|
|
0181cae318 | ||
|
|
4850e34bf3 | ||
|
|
5875af9372 | ||
|
|
39671d8915 | ||
|
|
9d4081896c | ||
|
|
2ec7ccdf4c | ||
|
|
4694c419cf | ||
|
|
d076f5f2d9 | ||
|
|
8a5ceac253 | ||
|
|
c8eb56cc59 | ||
|
|
a4cf34619d | ||
|
|
4e7ab5ec7b | ||
|
|
0508a61421 | ||
|
|
25b9ee5a74 | ||
|
|
96b221755a | ||
|
|
3cb026db73 | ||
|
|
b28f6eba38 | ||
|
|
2604cb987a | ||
|
|
91944be3f7 | ||
|
|
636c4e81e2 | ||
|
|
4ee0040869 | ||
|
|
bee5b60a22 | ||
|
|
ae49ebf198 | ||
|
|
adfbf4a92f | ||
|
|
1955412c3d | ||
|
|
d89c5b231c | ||
|
|
207814916d | ||
|
|
5d09d7d811 | ||
|
|
69b914e2dd | ||
|
|
3af4ba7e01 | ||
|
|
8ba5d5ef9c | ||
|
|
0222b7ab41 | ||
|
|
60676f19a5 | ||
|
|
d5e9318210 | ||
|
|
381d04e197 | ||
|
|
3c2ec3e5f3 | ||
|
|
b422c552d7 | ||
|
|
d22ebb3cb6 | ||
|
|
000773e7b9 | ||
|
|
3c049ddcdd | ||
|
|
4b1380e31c | ||
|
|
bac08af4cb | ||
|
|
03049aa8ac | ||
|
|
2011db174b | ||
|
|
479a96ed89 | ||
|
|
732f891f3c | ||
|
|
d0e48e92b6 | ||
|
|
3a1b4fda7e | ||
|
|
10247c67fa | ||
|
|
cb3ffd56eb | ||
|
|
7632bca956 | ||
|
|
542d2d623c | ||
|
|
0b686eaa2a | ||
|
|
e4b2f8351e | ||
|
|
c8443dc1b9 |
No files matched your search
+89
-19
@@ -5,8 +5,9 @@ PHP Coding Standards
|
||||
This file lists several standards that any programmer, adding or changing
|
||||
code in PHP, should follow. Since this file was added at a very late
|
||||
stage of the development of PHP v3.0, the code base does not (yet) fully
|
||||
follow it, but it's going in that general direction.
|
||||
This is an initial version - it'll most probably grow as time passes.
|
||||
follow it, but it's going in that general direction. Since we are now
|
||||
well into the version 4 releases, many sections have been recoded to use
|
||||
these rules.
|
||||
|
||||
|
||||
Code Implementation
|
||||
@@ -43,9 +44,9 @@ Exceptions:
|
||||
for efficiency and in order for them to be binary-safe.
|
||||
Functions that change strings and obtain their new lengths while
|
||||
doing so, should return that new length, so it doesn't have to be
|
||||
recalculated with strlen() (e.g. _php3_addslashes())
|
||||
recalculated with strlen() (e.g. php_addslashes())
|
||||
|
||||
[5] Use php3_error() to report any errors/warnings during code execution.
|
||||
[5] Use php_error() to report any errors/warnings during code execution.
|
||||
Use descriptive error messages, and try to avoid using identical
|
||||
error strings for different stages of an error. For example,
|
||||
if in order to obtain a URL you have to parse the URL, connect,
|
||||
@@ -63,24 +64,57 @@ Exceptions:
|
||||
Naming Conventions
|
||||
------------------
|
||||
|
||||
[1] Function names for user functions implementation should be prefixed with
|
||||
"php3_", and followed by a word or an underscore-delimited list of words,
|
||||
in lowercase letters, that describes the function.
|
||||
[1] Function names for user-level functions should be enclosed with in
|
||||
the PHP_FUNCTION() macro. They should be in lowercase, with words
|
||||
underscore delimited, with care taken to minimize the letter count.
|
||||
Abbreviations should not be used when they greatly decrease the
|
||||
readability of the function name itself.
|
||||
|
||||
[2] Function names used by user functions implementations should be prefixed
|
||||
with "_php3_", and followed by a word or an underscore-delimited list of
|
||||
Good:
|
||||
'mcrypt_enc_self_test'
|
||||
'mysql_list_fields'
|
||||
|
||||
Ok:
|
||||
'mcrypt_module_get_algo_supported_key_sizes'
|
||||
(could be 'mcrypt_mod_get_algo_sup_key_sizes'?)
|
||||
'get_html_translation_table'
|
||||
(could be 'html_get_trans_table'?)
|
||||
|
||||
Bad:
|
||||
'hw_GetObjectByQueryCollObj'
|
||||
'pg_setclientencoding'
|
||||
'jf_n_s_i'
|
||||
|
||||
|
||||
[2] If they are part of a "parent set" of functions, that parent should
|
||||
be included in the user function name, and should be clearly related
|
||||
to the parent program or function family. This should be in the form
|
||||
of parent_*.
|
||||
|
||||
A family of 'foo' functions, for example:
|
||||
Good:
|
||||
'foo_select_bar'
|
||||
'foo_insert_baz'
|
||||
'foo_delete_baz'
|
||||
|
||||
Bad:
|
||||
'fooselect_bar'
|
||||
'fooinsertbaz'
|
||||
'delete_foo_baz'
|
||||
|
||||
[3] Function names used by user functions should be prefixed
|
||||
with "_php_", and followed by a word or an underscore-delimited list of
|
||||
words, in lowercase letters, that describes the function. If applicable,
|
||||
they should be declared 'static'.
|
||||
|
||||
[3] Variable names must be meaningful. One letter variable names must be
|
||||
[4] Variable names must be meaningful. One letter variable names must be
|
||||
avoided, except for places where the variable has no real meaning or
|
||||
a trivial meaning (e.g. for (i=0; i<100; i++) ...).
|
||||
|
||||
[4] Variable names should be in lowercase; Use underscores to seperate
|
||||
[5] Variable names should be in lowercase; Use underscores to seperate
|
||||
between words.
|
||||
|
||||
|
||||
|
||||
Syntax and indentation
|
||||
----------------------
|
||||
|
||||
@@ -94,25 +128,32 @@ Syntax and indentation
|
||||
is known to accept C++-style comments in C code.
|
||||
|
||||
[2] Use K&R-style. Of course, we can't and don't want to
|
||||
force anybody to use a style she's not used to, but
|
||||
force anybody to use a style he or she is not used to, but,
|
||||
at the very least, when you write code that goes into the core
|
||||
of PHP or one of its standard modules, please maintain the K&R
|
||||
style. This applies to just about everything, starting with
|
||||
indentation and comment styles and up to function decleration
|
||||
syntax.
|
||||
|
||||
[3] Be generous with whitespace and braces. Always prefer
|
||||
if (foo) {
|
||||
[3] Be generous with whitespace and braces. Always prefer:
|
||||
|
||||
if (foo) {
|
||||
bar;
|
||||
}
|
||||
to
|
||||
|
||||
to:
|
||||
|
||||
if(foo)bar;
|
||||
|
||||
|
||||
Keep one empty line between the variable decleration section and
|
||||
the statements in a block, as well as between logical statement
|
||||
groups in a block. Maintain at least one empty line between
|
||||
two functions, preferably two.
|
||||
|
||||
[4] When indenting, use the tab character. A tab is expected to represent
|
||||
four spaces. It is important to maintain consistency in indenture so
|
||||
that definitions, comments, and control structures line up correctly.
|
||||
|
||||
Documentation and Folding Hooks
|
||||
-------------------------------
|
||||
|
||||
@@ -123,7 +164,8 @@ function does. It would look like this:
|
||||
|
||||
/* {{{ proto int abs(int number)
|
||||
Return the absolute value of the number */
|
||||
void php3_abs(INTERNAL_FUNCTION_PARAMETERS) {
|
||||
PHP_FUNCTION(abs)
|
||||
{
|
||||
...
|
||||
}
|
||||
/* }}} */
|
||||
@@ -143,7 +185,35 @@ messing up the function summary.
|
||||
Optional arguments are written like this:
|
||||
|
||||
/* {{{ proto object imap_header(int stream_id, int msg_no [, int from_length [, int subject_length [, string default_host]]])
|
||||
Returns a header object with the defined parameters. */
|
||||
|
||||
And yes, please keep everything on a single line, even if that line is massive.
|
||||
And yes, please keep the prototype on a single line, even if that line
|
||||
is massive.
|
||||
|
||||
New and Experimental Functions
|
||||
-----------------------------------
|
||||
To reduce the problems normally associated with the first public
|
||||
implementation of a new set of functions, it has been suggested
|
||||
that the first implementation include a file labeled 'EXPERIMENTAL'
|
||||
in the function directory, and that the functions follow the
|
||||
standard prefixing conventions during their initial implementation.
|
||||
|
||||
The file labelled 'EXPERIMENTAL' should include the following
|
||||
information:
|
||||
Any authoring infomration (known bugs, future directions of the module).
|
||||
Ongoing status notes which may not be appropriate for CVS comments.
|
||||
|
||||
Aliases & Legacy Documentation
|
||||
-----------------------------------
|
||||
You may also have some deprecated aliases with close to duplicate
|
||||
names, for example, somedb_select_result and somedb_selectresult. For
|
||||
documentation puposes, these will only be documented by the most
|
||||
current name, with the aliases listed in the documentation for
|
||||
the parent function. For ease of reference, user-functions with
|
||||
completely different names, that alias to the same function (such as
|
||||
highlight_file and show_source), will be separately documented. The
|
||||
proto should still be included, describing which function is aliased.
|
||||
|
||||
Backwards compatible functions and names should be maintained as long
|
||||
as the code can be reasonably be kept as part of the codebase. See
|
||||
/phpdoc/README for me information on documentation.
|
||||
@@ -1,3 +1,2 @@
|
||||
For the list of people who've put work into PHP 4.0, please see
|
||||
http://www.php.net/version4/credits.php
|
||||
|
||||
http://www.php.net/credits.php
|
||||
+99
-19
@@ -65,8 +65,9 @@ MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: servlet
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
PRIMARY MAINTAINER: Sam Ruby <rubys@us.ibm.com>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: thttpd
|
||||
MAINTENANCE: Unknown
|
||||
@@ -108,7 +109,7 @@ STATUS: Experimental
|
||||
SINCE: 4.0.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: interbase
|
||||
PRIMARY MAINTAINER: Jouni Ahto <jah@mork.net>
|
||||
PRIMARY MAINTAINER: Jouni Ahto <jouni.ahto@exdec.fi>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -127,7 +128,7 @@ MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pgsql
|
||||
PRIMARY MAINTAINER: Jouni Ahto <jah@mork.net>
|
||||
PRIMARY MAINTAINER: Jouni Ahto <jouni.ahto@exdec.fi>
|
||||
MAINTENANCE: Odd fixes
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -140,7 +141,7 @@ MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: oci8
|
||||
PRIMARY MAINTAINER: Thies C. Arntzen <thies@digicol.de>
|
||||
PRIMARY MAINTAINER: Thies C. Arntzen <thies@thieso.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -151,7 +152,7 @@ STATUS: Working
|
||||
COMMENT: Working except for persistent connections
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: oracle
|
||||
PRIMARY MAINTAINER: Thies C. Arntzen <thies@digicol.de>
|
||||
PRIMARY MAINTAINER: Thies C. Arntzen <thies@thieso.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
COMMENT: Using the new OCI8 driver is encouraged where possible.
|
||||
@@ -170,6 +171,12 @@ EXTENSION: bcmath
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: bz2
|
||||
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.3
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: calendar
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
@@ -183,10 +190,15 @@ PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: CURL
|
||||
EXTENSION: crack
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.5
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: curl
|
||||
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
STATUS: Working
|
||||
SINCE: 4.0.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: cybercash
|
||||
@@ -199,6 +211,11 @@ PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: dotnet
|
||||
PRIMARY MAINTAINER: Sam Ruby <rubys@us.ibm.com>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: exif
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
@@ -222,18 +239,24 @@ EXTENSION: gettext
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: icap
|
||||
EXTENSION: gmp
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
SINCE: 4.0.4
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: icap
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Obsolete
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: imap
|
||||
MAINTENANCE: Unknown
|
||||
PRIMARY MAINTAINER: Chuck Hagenbuch <chuck@horde.org>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: java
|
||||
PRIMARY MAINTAINER: Sam Ruby <rubys@us.ibm.com>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ldap
|
||||
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
|
||||
@@ -241,20 +264,33 @@ MAINTENANCE: Odd Fixes
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mcal
|
||||
MAINTENANCE: Unknown
|
||||
PRIMARY MAINTAINER: Chuck Hagenbuch <chuck@horde.org>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mcrypt
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
COMMENT: Currently working only with libmcrypt 2.7.7 and earlier
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mhash
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: muscat
|
||||
PRIMARY MAINTAINER: Sam Liddicott <sam@ananova.com>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 4.0.5
|
||||
COMMENT: Not tested against windows, only core API completed, rest under development
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: openssl
|
||||
PRIMARY MAINTAINER: Stig Venaas <venaas@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.4
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pcre
|
||||
PRIMARY MAINTAINER: Andrei Zmievski <andrei@ispi.net>
|
||||
MAINTENANCE: Maintained
|
||||
@@ -276,12 +312,23 @@ PRIMARY MAINTAINER: Kristian K
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: printer
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.4
|
||||
COMMENT: Only for Win32
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pspell
|
||||
PRIMARY MAINTAINER: Vlad Krupin <phpdevel@echospace.com>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
SINCE: 4.0.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: qtdom
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.4
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: readline
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
@@ -291,11 +338,29 @@ PRIMARY MAINTAINER: Kristian K
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: sablot
|
||||
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.3
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: satellite
|
||||
PRIMARY MAINTAINER: David Eriksson <eriksson@php.net>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.3
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: session
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: shmop
|
||||
PRIMARY MAINTAINER: Unknown
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.3
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: snmp
|
||||
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
|
||||
MAINTENANCE: Odd Fixes
|
||||
@@ -303,14 +368,15 @@ STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: sockets
|
||||
PRIMARY MAINTAINER: Chris Vandomelen <chrisv@b0rked.dhs.org>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: swf
|
||||
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Unix (won't change)
|
||||
STATUS: Unknown
|
||||
COMMENT: Only for Unix (won't change)
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: sysvsem
|
||||
MAINTENANCE: Unknown
|
||||
@@ -320,15 +386,20 @@ EXTENSION: sysvshm
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: vpopmail
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.5
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: wddx
|
||||
PRIMARY MAINTAINER: Andrei Zmievski <andrei@ispi.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: xml
|
||||
PRIMARY MAINTAINER: Thies C. Arntzen <thies@digicol.de>
|
||||
PRIMARY MAINTAINER: Thies C. Arntzen <thies@thieso.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: yaz
|
||||
PRIMARY MAINTAINER: Adam Dickmeiss <adam@indexdata.dk>
|
||||
@@ -336,10 +407,19 @@ MAINTENANCE: Maintained
|
||||
STATUS: Unknown
|
||||
SINCE: 4.0.1
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: yp
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: zlib
|
||||
PRIMARY MAINTAINER: Stefan Roehrich <sr@linux.de>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
EXTENSION: zziplib
|
||||
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.5
|
||||
-------------------------------------------------------------------------------
|
||||
# iptc?
|
||||
@@ -5,6 +5,15 @@ 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.
|
||||
|
||||
For installing PHP on other web servers, refer to one of the following
|
||||
files:
|
||||
|
||||
sapi/aolserver/README
|
||||
sapi/pi3web/README
|
||||
sapi/servlet/README
|
||||
sapi/thttpd/README
|
||||
README.Zeus
|
||||
|
||||
Note! Only install either the static module or the dynamic one. Do not
|
||||
install both.
|
||||
|
||||
@@ -85,7 +94,8 @@ $ ./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)
|
||||
(you should now have an httpd binary which you can copy to your Apache bin dir if
|
||||
is is your first install then you need to "make install" as well)
|
||||
$ 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.
|
||||
@@ -379,6 +389,7 @@ USING PHP 3 AND PHP 4 AS CONCURRENT APACHE MODULES
|
||||
- Linux with recent binutils (binutils 2.9.1.0.25 tested)
|
||||
- Solaris 2.5 or better
|
||||
- FreeBSD (3.2, 4.0 tested)
|
||||
- IRIX64 6.5
|
||||
|
||||
To enable it, configure PHP 3 and PHP 4 to use APXS (--with-apxs) and the
|
||||
necessary link extensions (--enable-versioning). Otherwise, all standard
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ LTLIBRARY_LIBADD = $(LTLIBRARY_DEPENDENCIES) $(EXTRA_LIBS)
|
||||
|
||||
PROGRAM_NAME = php
|
||||
PROGRAM_SOURCES = stub.c
|
||||
PROGRAM_LDADD = libphp4.la
|
||||
PROGRAM_LDADD = libphp4.la $(EXT_PROGRAM_LDADD)
|
||||
PROGRAM_LDFLAGS = -export-dynamic
|
||||
PROGRAM_DEPENDENCIES = $(PROGRAM_LDADD)
|
||||
|
||||
|
||||
@@ -1,8 +1,385 @@
|
||||
PHP 4.0 NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
|
||||
?? ??? 2000, Version 4.0.2
|
||||
- Fix by-reference parameters passing for xml_ functions and for scanf functions (Stas)
|
||||
?? ??? 200?, Version 4.0.5
|
||||
- IMPORTANT: removed /F modifier handling from preg_replace(). Instead
|
||||
one should use new preg_replace_callback() function. (Andrei)
|
||||
- Added array_reduce(), which allows iterative reduction of an array
|
||||
to a single value via a callback function. (Andrei)
|
||||
- The imageloadfont function of the gd extension should be not platform
|
||||
dependent after this fix. (alex@zend.com)
|
||||
- Fixed a compatibility problem in some file functions (fgets, fputs, fread,
|
||||
fwrite). The ANSI standard says that if a file is opened in read/write
|
||||
mode, fseek() should be called before switching from reading to writing
|
||||
and vice versa. (alex@zend.com)
|
||||
- Fixed argument checking for call_user_func* functions and allowed
|
||||
specifying array($obj, 'method') syntax for call_user_func_array. (Andrei)
|
||||
- Fixed parent::method() to also work with runtime bindings (Zeev, Zend Engine)
|
||||
- Implemented high-performance zlib-based output compression - see
|
||||
zlib.output_compression INI directive (Zeev)
|
||||
- Improved ob_gzhandler() to support chunked output buffering - it's recommended
|
||||
to use it with 4KB chunks (Zeev)
|
||||
- Fixed chunked output buffering (Zeev)
|
||||
- Forced call_user_method() and call_user_method_array() to take the
|
||||
object argument by reference. (Andrei)
|
||||
- Fixed binding of ROWIDs in OCI8. (Thies)
|
||||
- Added PEAR/Cache as a generic Caching System. (Sebastian, PEAR/Cache)
|
||||
- IMAP quota support (imap_set_quota, imap_get_quota) enabled/added via
|
||||
c-client2000 (kalowsky)
|
||||
- Upgraded PCRE to version 3.4. (Andrei)
|
||||
- Added array_search which works similar to in_array but returns
|
||||
the key instead of a boolean. (jason@php.net)
|
||||
- Fixed pgsql transaction support (Stig, PEAR/DB)
|
||||
- Added new object VARIANT() to encapsulate values for use with
|
||||
the COM and DOTNET module. Therefore it is now possible to pass
|
||||
values by reference, convert php values to extended variant types (currency,
|
||||
date, idispatch, iunknown, ...) and define the codepage that should
|
||||
be used for unicode - conversion.
|
||||
- Improved overall speed of IRCG, added URL handling to message scanner (Sascha)
|
||||
- Fixed some modules to allow using output-buffering. (Thies)
|
||||
- Added the chroot() function (Derick)
|
||||
- PostgreSQL now does a rollback at the end of a request on every
|
||||
persistent connection. This is done by doing an "empty" transaction
|
||||
on the connection. This was advised by someone from the PostgreSQL
|
||||
core-team. (Thies)
|
||||
- Fixed PostgeSQL pg_connect() bug. We would sometimes close the default
|
||||
link by accident. (Patch by: aja@nlgroup.ca)
|
||||
- Improved OCI8 dead-session detection. (Patch by: George Schlossnagle)
|
||||
- Fixed get_meta_tags() multiline bug #4556 (Sean)
|
||||
- Prefer random() over *rand48() (JimJag)
|
||||
- Sped up WDDX serialization 2x. (Andrei)
|
||||
- Added a new parameter to mail() which appends aditional command line
|
||||
parameters to the mail program. (Derick)
|
||||
- Added Udm_Clear_Search_Limits mnoGoSearch extension function. (gluke)
|
||||
- Fixed mnogosearch protos. Fixed mnogosearch functions return values.
|
||||
A bug with capital letters break search has been fixed. (gluke)
|
||||
- Static methods can now be called via call_user_method_* functions, e.g.
|
||||
call_user_method('method', 'class'), and also array('class', 'method')
|
||||
constructs (for array_walk(), for example). (Andrei, Zend Engine)
|
||||
- microtime under windows now returns accurate values (James)
|
||||
- Added PREG_SPLIT_DELIM_CAPTURE flag to preg_split() that allows for Perl-like
|
||||
functionality of capturing parenthesized delimiter expression. (Andrei)
|
||||
- Fixed strip_tags() to not strip a lone > character. (Rasmus)
|
||||
- When using the ob_gzhandler() PHP now automagically also sets the
|
||||
Content-Lengh correctly which enables browsers to use the HTTP
|
||||
Keep-Alive feature. (Thies)
|
||||
- Improved handling of preg_replace() /F modifier so that it's possible to
|
||||
specify array($obj, 'method') construct as a replacement function. (Andrei)
|
||||
- Added mysql_get_client_info(), mysql_get_server_info(),
|
||||
mysql_get_proto_info(), and mysql_get_host_info() functions. (Sean)
|
||||
- Major change of the php pdf api. It could break some functions though
|
||||
backwards compatibility was tried to maintain. Adding some still
|
||||
missing functions as well. (Uwe)
|
||||
- Added mnoGoSearch extension - http://search.mnogo.ru (Sergey K)
|
||||
- Allow url encoding in DB usernames and passwords (Stig, PEAR)
|
||||
- Added raiseError and setErrorHandling methods to PEAR class (Stig, PEAR)
|
||||
- Added support for converting images from JPG/PNG on the fly with the GD
|
||||
extension, which is usefull for creating dynamic WAP-sites (Derick)
|
||||
- Updated ext/mysql/libmysql to version 3.23.32; bug fixes (tim@mysql.com)
|
||||
- Fixed possible crash in all (non-pcre) regex functions. (Thies)
|
||||
- Improved str_replace() to accept an array for any parameter - similar
|
||||
to preg_replace(). (Andrei)
|
||||
- Fixed extract() to properly prefix numeric keys when EXTR_PREFIX_ALL is
|
||||
used. (Andrei)
|
||||
- Added EXTR_PREFIX_INVALID flag to extract() to automatically prefix
|
||||
string keys that do not constitute valid variable names. (Andrei)
|
||||
- BeOS patch from svanegmond@bang.dhs.org modified somewhat by Rasmus
|
||||
- Fixed the Apache module to overwrite PATH_TRANSLATED with SCRIPT_FILENAME,
|
||||
only if PATH_TRANSLATED is not previously set (Zeev)
|
||||
- Fixed crash bug in highlight_string() (Rasmus)
|
||||
- Added URL support for getimagesize() function (Jani)
|
||||
- Added xslt_set_scheme_handler() function (carmelo@akooe.com)
|
||||
- Added the pg_lolseek and pg_lotell functions (Derick)
|
||||
- Fixed wrong breaking with the wordwrap function (Derick)
|
||||
- Fixed 'O' and 'r' flags of date() to have correct sign for timezone
|
||||
offset. (Andrei)
|
||||
- Changed 'Z' flag to date() to always return timezone offset with
|
||||
negative sign if it's west of UTC. (Andrei)
|
||||
- Added the HTML_Processor class which provides common functions for processing HTML.
|
||||
(Sterling)
|
||||
- Added localeconv() and strcoll() functions for localization. (Sean)
|
||||
- Added the xslt_set_base function. (Sterling)
|
||||
- Support Zeus 3.3.8
|
||||
- Added odbc_error() and odbc_errormsg() functions (Stig)
|
||||
- vpopmail extension updated to working alfa. give it a try but keep in
|
||||
mind that it is not ready for production environments (Boian Bonev)
|
||||
- New extension for vpopmail - http://www.inter7.com/vpopmail (David Croft)
|
||||
- Added sybase_get_last_message() to the Sybase CT module (Jan Fedak)
|
||||
- Made ldap_list(), ldap_read() and ldap_search() do parallel search when
|
||||
first parameter is an array of link identifiers (Stig Venaas)
|
||||
- Made fopen() of HTTP URL follow redirects, $http_response_header will
|
||||
contain all headers with empty string as delimiter (Stig Venaas)
|
||||
- Added Console_Getopt class for parsing command-line args. (Andrei, PEAR)
|
||||
- Added an experimental version of the ZZipLib extension which provides the
|
||||
ability to read zip files. (Sterling)
|
||||
- Allow access to uploaded files in safe_mode. Beware that you can only
|
||||
read the file. If you copy it to new location the copy will not have the
|
||||
right UID and you script won't be able to access that copy. (Thies)
|
||||
- Changed extract() to check that prefixed name is a valid one. (Andrei)
|
||||
- Changed extract() to return the number of variables extracted. (Andrei)
|
||||
- Added ldap_rename() function (Stig Venaas)
|
||||
- Made ldap_set_option() support controls (Stig Venaas)
|
||||
- Changed ldap_search() and added functions ldap_parse_result(),
|
||||
ldap_first_reference(), ldap_next_reference() and ldap_parse_reference()
|
||||
to cope with LDAPv3 stuff like referrals and references. (Stig Venaas)
|
||||
- Fixed date('r') overflow
|
||||
- Made the php.ini path reported in phpinfo() always point to the absolute
|
||||
path that was opened (Zeev)
|
||||
- Made the INI mechanism thread safe (Zeev, Zend engine)
|
||||
- Changed setlocale() to use LC_* constants. (Jani)
|
||||
- ctype functions now follow the extension naming conventions (Hartmut)
|
||||
- Added iconv() function (using libc or libiconv) (Stig)
|
||||
- Added ODBC_TYPE constant (Stig)
|
||||
- Added the call_user_method_array function which allows you to call a method
|
||||
with an arbitrary number of parameters. (Sterling)
|
||||
- ext/odbc: IBM DB2 patch by Walter Franzini <walter@sys-net.it>
|
||||
- Added extension for the cracklib library. (Alexander Feldman)
|
||||
|
||||
19 Dec. 2000, Version 4.0.4
|
||||
- Allow assigning a newly created object by reference. This is needed only if
|
||||
your constructor makes other data structures reference the $this object (for
|
||||
example, $GLOBALS["foobar"] =& $this;)
|
||||
The new syntax is $obj =& new MyClass(); (Andi, Zend Engine)
|
||||
- Allow for three expression types to be sent to functions which are requesting
|
||||
the function argument to be passed by reference (only c. was previously
|
||||
supported):
|
||||
a. func(new myclass());
|
||||
b. func(func2()); where func2() returns a reference, i.e. is defined as
|
||||
function &func2(...)
|
||||
{
|
||||
...
|
||||
}
|
||||
c. func($var); where func() is defined as function func(&$var) {...}
|
||||
You CAN'T count on any other expressions to be passable by reference.
|
||||
(Andi, Zend Engine)
|
||||
- Made ldap_get_entries() return an array even if there are no entries
|
||||
in search result. (Jani)
|
||||
- Fixed bad mod_perl interaction which caused segfaults when using LFS (Sascha)
|
||||
- const CONSTNAME now gets recognized. Before the patch only @const CONSTNAME
|
||||
description was recognized.
|
||||
- Added the is_null() function that will return true if a variable is of
|
||||
type null. (Sterling)
|
||||
- Fixed a bug which made readdir() unusable in some systems. (Jani)
|
||||
- Added the get_defined_functions() function which returns a list of all
|
||||
currently defined functions. (Sterling)
|
||||
- Added the get_defined_vars() function which returns an associative array
|
||||
of all variables defined in the current scope and their subsequent values.
|
||||
(Sterling)
|
||||
- Added the call_user_func_array() function which gives you the ability to
|
||||
call a user function by passing an array of parameters as the second
|
||||
argument. (Sterling)
|
||||
- Added the constant() function which returns the value of a constant given
|
||||
the constant's name. (Sterling)
|
||||
- Implemented support for Perl-style matching regexp delimiters in PCRE.
|
||||
You can use <{[( and )]}> to delimit your expressions now. (Andrei)
|
||||
- Introduced new 'F' modifier in PCRE that lets you specify a function
|
||||
name in the replacement argument to preg_replace() that will be called
|
||||
at run-time to provide the replacement string. It is passed an array of
|
||||
matched pattern and subpatterns. (Andrei)
|
||||
- Put an end to BUG#4615 (kalowsky & Eric Veldhuyzen)
|
||||
- Added the IRCG extension (Sascha)
|
||||
- Fixed realpath() in Virtual Directory mode (Daniel)
|
||||
- Integrated the Phil Nelson's bc math library routines into PHP, now that
|
||||
the license allows it (Phil Nelson <phil@cs.wwu.edu>)
|
||||
- Added the xslt_set_error_handler() function to the Sablotron extension.
|
||||
(Sterling)
|
||||
- Improved Sablotron's error handling system allowing you to catch all
|
||||
errors before they are outputted to the screen. (Sterling)
|
||||
- Added OpenSSL extension (Stig Venaas)
|
||||
- Fixed/created support for Solid 3.0 databases (kalowsky)
|
||||
- Fixed support for Solid 2.3 databases (kalowsky)
|
||||
- quoted_printable_decode() function is made RFC-2045 compliant. (Kir)
|
||||
- Modified preg_grep() to always return the results with keys from the original
|
||||
array. (Andrei)
|
||||
- Modified preg_replace() to accept Perl-style $n backreferences in addition
|
||||
to \\n ones. (Andrei)
|
||||
- Modified preg_replace() to ignore backreferences that refer to
|
||||
non-existing subpatterns. (Andrei)
|
||||
- Fixed column-title buffer-overflow in OCIFetchStatement(). (Thies)
|
||||
- Added 'output_handler' INI directive (Zeev)
|
||||
- Fixed some buglets in the output buffering mechanism (Zeev)
|
||||
- Added transparent gzip compression support (Jade Nicoletti, Zeev)
|
||||
- Major overhaul of domxml. Added basic XPath support as well (Uwe)
|
||||
- Added 'r' flag to date() which generates an RFC822 formatted date, e.g.
|
||||
"Thu, 9 Nov 2000 16:33:01 -0500" (Colin)
|
||||
- In CGI mode, $HTTP_SERVER_VARS now includes all of the environment variables
|
||||
as well (Zeev)
|
||||
- Allow user to use mysql_use_result in mysql queries (Stas)
|
||||
- Fixed a memory leak that would occur when restarting Apache often
|
||||
(mookid@sigent.ru)
|
||||
- Fixed a bug that prevented $argv and $argc from being defined in the command
|
||||
line version of PHP (Stas)
|
||||
- Fixed a bug that prevented a changed compile-time extension_dir from
|
||||
affecting modules that were loaded via php.ini (Zeev)
|
||||
- Fixed a bug in ftp_mkdir() when used on ftp server which doesn't return
|
||||
the full path (Jani)
|
||||
- Added ImageCreateFromString() which creates an image stream out of
|
||||
e.g. a MySQL blob. (Mathieu)
|
||||
- Fixed a crash bug in imagewbmp() (Jani)
|
||||
- Changed the sablot configuration file so that if you use any version of
|
||||
Sablotron below 0.44 you must use Sablotron's built-in Expat libraries.
|
||||
(Sterling)
|
||||
- Added basic authentication support to thttpd (Sascha)
|
||||
- Added support for the Caudium webserver (http://caudium.net/). It's based
|
||||
on the Roxen SAPI module. Many bugs have been identified and fixed. (David)
|
||||
- Fixed mysql_close(), pg_close(), msql_close() and sybase_close() - they
|
||||
weren't properly closing the SQL connections (Zeev)
|
||||
- Fixed crypt() to supply random seed if none is given (Andi)
|
||||
- Made print_r() support recursive data structures, e.g. $GLOBALS. (Zeev)
|
||||
- Fixed a bug that caused PHP not to properly flush its output buffer, if more
|
||||
than one output buffer was used. (Zeev)
|
||||
- Fixed a bug that could draw the shutdown sequence of the PHP Apache module
|
||||
into an endless loop, under certain circumstances. It could cause Apache
|
||||
processes under Solaris to get stuck, especially when using output
|
||||
buffering. (Zeev)
|
||||
- Added support for serializing references (Stas)
|
||||
- Fixed conflict with OpenLDAP and Oracle 8.1.x (Jani)
|
||||
- parse_ini_file() supports a new optional 2nd argument that instructs it
|
||||
to divide the directives to arrays according to the sections in which they
|
||||
reside (Zeev)
|
||||
- parse_ini_file() is now thread-safe, and supported under Windows (Zeev)
|
||||
- Unified aborted-connection semantics of all SAPI modules (Sascha)
|
||||
- URL-opened files now store the HTTP response header in $http_response_header
|
||||
(Zeev)
|
||||
- Fixed array_rand() to shuffle results when the number of requested
|
||||
elements is the same as the number of elements in the array. (Andrei)
|
||||
- Added replace parameter to header() (Sascha)
|
||||
- Fixed handling of single quotes in transparent session-id mode (Sascha)
|
||||
- Fixed "php://*" fopen handler (Sascha)
|
||||
- Made rename work in threadsafe enviroments (Daniel)
|
||||
- Made session_destroy() close files before unlinking (Daniel)
|
||||
- Added array_sum() function. (Andrei)
|
||||
- Fixed a bug in session.c. The php_session_save_current_state did not check
|
||||
if mod_data is NULL and such situation is possible if the user calls
|
||||
session_module_name with a parameter. (alex@zend.com)
|
||||
- Added IIS Admin extension. (Frank)
|
||||
- OCIBindByName() now does better parameter-checking. (Thies)
|
||||
- Made read() binary-safe in sockets.c (Chris Vandomelen)
|
||||
- Made array_intersect() and array_diff() not alter order (Stig Venaas)
|
||||
- Made ldap_connect() accept URL in host parameter when using OpenLDAP
|
||||
2.x. To use SSL, use ldaps://host/ as URL. (Stig Venaas)
|
||||
- Made resource type names visible, e.g. var_dump() and
|
||||
get_resource_type() display "file" for file resources. (Andrei)
|
||||
- Added the curl_getinfo() function to find out information about a CURL
|
||||
transfer. This function requires cURL 7.4.0 or above. (Sterling)
|
||||
- Added the CURLOPT_KRB4, CURLOPT_INTERFACE, CURLOPT_QUOTE, CURLOPT_POSTQUOTE,
|
||||
CURLOPT_QUOTE and CURLOPT_HTTPPROXYTUNNELL options. (Sterling)
|
||||
- Renamed the shm_* functions to shmop_* (Derick)
|
||||
- Updated ext/mysql/libmysql to version 3.23 (tim@mysql.com)
|
||||
- Added ldap_get_option() and ldap_set_option() functions (Stig Venaas)
|
||||
- Fixed a crash in CGI mode, in case no file was provided
|
||||
(Daniel Beulshausen& Zeev)
|
||||
- Fixed possible crash bug in imap_fetchstructure() (Jani)
|
||||
- Fixed possible crash bug in imap_open() (Jani & Mark Musone)
|
||||
- Added url_rewriter.tags configuration directive (Sascha)
|
||||
- Added CORBA client extension, ready for use (eriksson@php.net)
|
||||
- Fixed memory leak in x-httpd-source mode (Jason Greene)
|
||||
- Changed ext/gd not to be enabled by default (Jani)
|
||||
- Make increment of empty string ("") behave like in PHP 3 and result in "1"
|
||||
(Andi, Zend Engine)
|
||||
- Added POST handler for Adobe FDF format (Hartmut)
|
||||
- Added transparent read and write .gz-files on glibc based systems
|
||||
using the 'zlib:' fopen wrapper (Hartmut)
|
||||
- Fixed a problem in the configuration parser (two null bytes were added
|
||||
to each ENCAPSULATED TC_STRING) (alex@zend.com)
|
||||
- Added HMAC support in the mhash module (nmav@altera.gr)
|
||||
- Added module for Ovrimos sql server (nmav@altera.gr)
|
||||
|
||||
11 Oct 2000, Version 4.0.3
|
||||
- Fixed a possible crash in -a interactive mode (Zeev, Zend Engine)
|
||||
- Added mysql_escape_string() (Peter A. Savitch and & Brian Wang)
|
||||
- Fixed many possible crash bugs with improper use of the printf() family of
|
||||
functions (Andi)
|
||||
- Fixed a problem that allowed users to override admin_value's and admin_flag's
|
||||
(Zeev)
|
||||
- Fixed PostgreSQL module to work when the link handle is omitted (Zeev)
|
||||
- Fixed returning of empty LOB fields in OCI8. (Thies)
|
||||
- Added Calendar module to default Win32 build (Andi)
|
||||
- Added FTP module to default Win32 build (Andi)
|
||||
- Fixed crash in the POSIX getrlimit() function (alex@zend.com)
|
||||
- Fixed dirname() under certain conditions (Andi)
|
||||
- Added --with-imap-ssl to support SSL'ized imap library in RH7 and others
|
||||
(Rasmus)
|
||||
- Fixed possible crash bug in parse_url() (Andi)
|
||||
- Added support for trans sid under Win32 (Daniel)
|
||||
- Added IPv6 support in fopen (Stig Venaas)
|
||||
- Added the shmop extension. It allows more general ways of shared memory
|
||||
access. (thanks to Ilia Alshanestky <iliaa@home.com> and Slava Poliakov
|
||||
<slavapl@mailandnews.com> (Derick)
|
||||
- Added the ability for CURLOPT_POSTFIELDS to accept an associative array of
|
||||
HTTP POST variables and values. (Sterling)
|
||||
- Added the CURLOPT_HTTPHEADER option to curl_setopt(). (Sterling)
|
||||
- Added the curl_error() and curl_errno() functions. (Sterling)
|
||||
- Changed ext/db not to be enabled by default (Jani)
|
||||
- Fixed building Apache SAPI module on SCO UnixWare (Sascha)
|
||||
- Fixed writing empty session sets to shared memory (tcarroll@chc-chimes.com)
|
||||
- Added support for BSD/OS make (Sascha)
|
||||
- Added improved URL rewriter (Sascha)
|
||||
- Fixed readdir_r() use on Solaris (Sascha)
|
||||
- Improved HTTP headers for private-caching (jon@csh.rit.edu, Sascha)
|
||||
- Added new function session_cache_limiter (jon@csh.rit.edu, Sascha)
|
||||
- Added ftp_exec to the ftp functions (thanks to <jhennebicq@i-d.net>)
|
||||
(Derick)
|
||||
- PEAR: add last executed query as debug info in DB errors (Stig)
|
||||
- PEAR: allow multiple modes in PEAR_Error (Stig)
|
||||
- Made the Sybase CT module thread safe (Zeev)
|
||||
- Added second argument to array_reverse() that indicatese whether
|
||||
the original array keys should be preserved. (Andrei)
|
||||
- Clean up htmlspecialchars/htmlentities inconsistencies. (Rasmus)
|
||||
- PEAR: renamed DB_GETMODE_* to DB_FETCHMODE_*, added setFetchMode()
|
||||
in DB_common to set the default mode, added some MySQL tests (Stig)
|
||||
- Made eval() and several other runtime-evaluated code portions report the
|
||||
nature and location of errors more accurately (Stas)
|
||||
- Added an optional parameter to wordwrap that cuts a string if the length of a
|
||||
word is longer than the maximum allowed. (Derick)
|
||||
- Added functions pg_put_line and pg_end_copy (Dirk Elmendorf)
|
||||
- Added second parameter for parse_str to save result (John Bafford)
|
||||
- Fixed bug with curl places extra data in the output. (medvitz@medvitz.net)
|
||||
- Added the pathinfo() function. (Sterling)
|
||||
- Updated sybase_ct module and its sybase_query to use high performance API.
|
||||
(Joey)
|
||||
- Added a more configurable error reporting interface to DB. (Stig)
|
||||
- Added is_uploaded_file() and move_uploaded_file() (Zeev)
|
||||
- Added several directives to php.ini - post_max_size, file_uploads,
|
||||
display_startup_errors - see php.ini-dist for further information (Zeev)
|
||||
- Worked around a bug in the libc5 implementation of readdir() (Stas)
|
||||
- Fixed some potential OpenBSD and NetBSD crash bugs when opening files. (Andi)
|
||||
- Added EscapeShellArg() function (Rasmus)
|
||||
- Added a php.ini option session.use_trans_sid to enable/disable trans-sid.
|
||||
(Sterling)
|
||||
- Added the Sablotron extension for XSL parsing. (Sterling)
|
||||
- Fixed a bug in checkdate() which caused < 1 years to be valid (Jani)
|
||||
- Added support for an optional output handler function for output
|
||||
buffering. This enables transparent rendering of XML through XSL,
|
||||
transparent compression, etc. (Zeev)
|
||||
- Added support for user defined 'tick' callback functions. This helps
|
||||
emulate background processing. (Andrei)
|
||||
- Fixed problem with having $this as the XML parser object. (Andrei)
|
||||
- Internal opened_path variable now uses the Zend memory manager so that full
|
||||
paths of files won't leak on unclean shutdown (Andi)
|
||||
- Removed support of print $obj automatically calling the __string_value()
|
||||
method. Instead define yourself a method such as toString() and use
|
||||
print $obj->toString() (Andi, Zend Engine)
|
||||
|
||||
29 Aug 2000, Version 4.0.2
|
||||
- Added PHP API for Zend's ticks. (Stig)
|
||||
- PHP 3 regression testing framework re-born (Stig)
|
||||
- Added php_uname() function (Stig)
|
||||
- Made a minor change to allow building with OpenLDAP 2.0 (Stig Venaas)
|
||||
- Fixed a bug in preg_replace() that would truncate subject string if the
|
||||
first argument was en empty array. (Andrei)
|
||||
- Added ob_get_length function (Stig)
|
||||
- Fixed a bug that did not respect limit parameter in preg_replace() when
|
||||
using /e modifier. (Andrei)
|
||||
- Added ability for each xml_set_*_handler() function to take the
|
||||
array($obj, 'method') syntax for the handler argument as well
|
||||
as the normal function name. (Andrei)
|
||||
- Updated array_walk() to be able to accept array($obj, 'method')
|
||||
syntax for the walk function. (Andrei)
|
||||
- Fixed segfault with fgets(), fgetcsv(), fgetss(), and fread() when
|
||||
called with negative length argument. (Torben)
|
||||
- Fixed by-reference parameters passing for xml_ functions and for scanf
|
||||
functions (Stas)
|
||||
- Added experimental Oracle LDAP SDK support. 8.1.6 or later needed. Configure
|
||||
with something like --with-ldap=/usr/local/oracle/product/8.1.6 (Stig Venaas)
|
||||
- Fixed memory leaks in eval(); A script that used eval() extensively, could
|
||||
@@ -32,6 +409,8 @@ PHP 4.0 NEWS
|
||||
- Added 4th optional parameter to sybase_[p]connect to specify the charset
|
||||
for the connection (alf@alpha.ulatina.ac.cr)
|
||||
- Fixed support for current thttpd releases. (Sascha)
|
||||
- Added support for kerberized IMAP library using --with-kerberos
|
||||
(Rasmus, Sascha)
|
||||
- Virtualize realpath, chmod, chown and utime (Stas)
|
||||
- Support content-encoding headers in file upload MIME parts
|
||||
(Ragnar Kjørstad)
|
||||
@@ -292,7 +671,7 @@ PHP 4.0 NEWS
|
||||
(Patch by daniel.braun@ercom.fr)
|
||||
- Added extension YAZ (dickmeiss).
|
||||
- Fixed a crash bug triggered by certain cases of class redeclarations
|
||||
(Stanislav & Zeev, Zend Engine)
|
||||
(Stas & Zeev, Zend Engine)
|
||||
- Fixed min()/max() segfault. (Andrei)
|
||||
- New module for reading EXIF header data from JPEG files. Most digital
|
||||
cameras will embed all sorts of information about a picture inside the
|
||||
|
||||
+2
-1
@@ -64,7 +64,8 @@ NEWS file. Everything else goes into the ChangeLog.
|
||||
It is important to note that if your comment or news logline spans multiple
|
||||
lines, you have to put # or @ at the beginning of _every_ such line. Every
|
||||
entry in NEWS has to have a name after it, so if you did it with someone's
|
||||
help, put both your names there.
|
||||
help, put both your names there. Your name WILL NOT be automatically put
|
||||
at the end of the NEWS entry - so, please provide it yourself.
|
||||
|
||||
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
|
||||
|
||||
+5
-1
@@ -51,9 +51,13 @@ FORMAT OF FUNCTION DEFINITIONS FILE
|
||||
']'s as there where '['s. Currently, it does not harm if you forget to do it
|
||||
or there is a wrong amount of ']'s, but this may change in the future.
|
||||
|
||||
An additional short description may be added after the parameters.
|
||||
If present it will be filled into the 'proto' header comments in the stubs
|
||||
code and the <refpurpose> tag in the XML documentation.
|
||||
|
||||
An example:
|
||||
|
||||
my_function(int arg1, int arg2 [, int arg3 [, int arg4]])
|
||||
my_function(int arg1, int arg2 [, int arg3 [, int arg4]]) this is my 1st
|
||||
|
||||
Arguments arg3 and arg4 are optional.
|
||||
|
||||
|
||||
+103
-79
@@ -1,102 +1,126 @@
|
||||
Using PHP4 with the Zeus Web Server
|
||||
-----------------------------------
|
||||
|
||||
Zeus fully supports running PHP in combination with our webserver. A
|
||||
significant improvement in PHP 4 is that you can now run PHP as an
|
||||
ISAPI module, giving great performance benefits over traditional CGI
|
||||
code.
|
||||
Zeus fully supports running PHP in combination with our
|
||||
webserver. There are three different interfaces that can be used to
|
||||
enable PHP:
|
||||
|
||||
Note that you will need to be running at least version 3.3.6 of the
|
||||
webserver. If you are running an earlier version, please see our
|
||||
website (http://www.zeus.com) for upgrade instructions.
|
||||
* CGI
|
||||
* ISAPI
|
||||
* FastCGI
|
||||
|
||||
Of the three, we recommend using FastCGI, which has been tested and
|
||||
benchmarked as providing the best performance and reliability.
|
||||
|
||||
Full details of how to install PHP are available from our
|
||||
website, at:
|
||||
|
||||
http://support.zeus.com/products/php.html
|
||||
|
||||
If you have any problems, please check the support site for more
|
||||
up-to-date information and advice.
|
||||
|
||||
|
||||
To build the ISAPI version of PHP, start the configuration with:
|
||||
Quick guide to installing FastCGI with Zeus
|
||||
-------------------------------------------
|
||||
|
||||
./configure --with-zeus=/usr/local/zeus
|
||||
Step 1 - obtain and install FastCGI development kit.
|
||||
|
||||
Obviously, replace /usr/local/zeus with the location of where you have
|
||||
installed Zeus on your machine. For PHP to build successfully, you
|
||||
need to have 3.3.6 already installed, because the code relies on the
|
||||
presence of header files provided with the latest version.
|
||||
Grab the package from:
|
||||
http://www.fastcgi.com/dist/devkit_2.2.0.tar.gz
|
||||
|
||||
You may have to adjust the environment variable LDFLAGS and EXTRA_LIBS
|
||||
in order to link in extra libraries. This depends on the platform on
|
||||
which you are building and also on the compiler used (see below). A
|
||||
standard GNU/Linux install with GCC should build fine with no changes.
|
||||
Extract the package and follow the instructions:
|
||||
./configure
|
||||
make
|
||||
make export
|
||||
(run the last as root)
|
||||
|
||||
This will install to /usr/local/lib/libfcgi.a
|
||||
and /usr/local/include/*fcgi*
|
||||
|
||||
|
||||
Configuring the webserver
|
||||
-------------------------
|
||||
|
||||
After running 'make' and 'make install', you will have a 'libphp4.so'
|
||||
file. Copy this file into a directory reserved for ISAPI
|
||||
binaries. Now, perform the following steps for each virtual server
|
||||
that you wish to run PHP on:
|
||||
Step 2 - Compile PHP as FastCGI.
|
||||
|
||||
1) On the Admin server, go to 'edit server->path mapping'
|
||||
2) Add an alias to the directory with libphp4.so in it, mapped to
|
||||
/isapi/ (or a location of your choice). Make sure you set the alias
|
||||
type to ISAPI.
|
||||
3) Click 'update'
|
||||
4) Add a handler for file extension 'php' to be run by /isapi/libphp4.so
|
||||
5) Click 'update', then go back to the previous page.
|
||||
6) Click on the 'module configuration' button, ensure that ISAPI
|
||||
support is ticked.
|
||||
7) Click on the ISAPI link. At the bottom of the page, click the
|
||||
checkbox for running ISAPI extensions 'out of process'.
|
||||
8) Click 'update'. Then restart the virtual server. Done!
|
||||
Compile as follows:
|
||||
./configure --with-fastcgi
|
||||
make
|
||||
|
||||
Note that PHP has many options to the configure script -
|
||||
e.g. --with-mysql. You will probably want to select your usual options
|
||||
before compiling; the above is just a bare minimum, for illustration.
|
||||
|
||||
After compilation finishes, you will be left with an executable
|
||||
program called 'php'. Copy this into your document root, under a
|
||||
dedicated FastCGI directory (e.g. $DOCROOT/fcgi-bin/php)
|
||||
|
||||
|
||||
Troubleshooting
|
||||
---------------
|
||||
Step 3 - configure Zeus
|
||||
|
||||
*) Why does the compile fail at Zend/zend-scanner-cc.cc
|
||||
or Zend/zend-parser.c ?
|
||||
Four stages:
|
||||
- enable FastCGI
|
||||
- configure FastCGI
|
||||
- setup alias for FastCGI
|
||||
- setup alias for PHP
|
||||
|
||||
These source files are auto-generated from the corresponding .y files.
|
||||
The default distribution of PHP contains pre-generated versions of these
|
||||
files that have caused problems for some people. The simplest solution is
|
||||
to delete the files. They will then be rebuilt correctly. You must have the
|
||||
following GNU tools to do this:
|
||||
1) Using the admin server, go to the 'module configuration' page for
|
||||
your virtual server, and ensure that 'fastcgi' is enabled (select the
|
||||
tickbox to the left).
|
||||
|
||||
bison 1.28 or later
|
||||
flex 2.5.4 or later
|
||||
2) While we can run FastCGI's locally, there are known problems with
|
||||
some OS's (specifically, the communication between web server and
|
||||
FastCGI happens over a unix domain socket, and some OS's have trouble
|
||||
sustaining high connection rates over these sockets). So instead, we
|
||||
are going to set up the PHP FastCGI to run 'remotely' over localhost
|
||||
(this uses TCP sockets, which do not suffer this problem). Go to the
|
||||
'fastcgi configuration' page, and under 'add remote fastcgi':
|
||||
Add Remote FastCGI
|
||||
Docroot path /fcgi-bin/php
|
||||
Remote machine localhost:8002
|
||||
The first entry is where you saved PHP, above.
|
||||
The second entry is localhost:<any unused port>
|
||||
We will start the FastCGI listening on this port shortly.
|
||||
Click 'update' to commit these changes.
|
||||
|
||||
*) Why does my PHP library fail to load?
|
||||
3) Go to the path mapping module and add an alias for FastCGI:
|
||||
Add Alias
|
||||
Docroot path /fcgi-bin
|
||||
Filesystem directory /path/to/docroot/fcgi-bin
|
||||
Alias type fastcgi
|
||||
Click 'update' to commit these changes
|
||||
|
||||
After configuring Zeus, if you get a '502 Bad Gateway' error when
|
||||
accessing a PHP page, there are problems loading the PHP
|
||||
library. Check the error log ($ZEUSHOME/web/log/errors) for errors.
|
||||
4) Also on the path mapping module, add a handler for PHP:
|
||||
Add handler
|
||||
File extension php
|
||||
Handler /fcgi-bin/php
|
||||
Click 'update' to commit these changes
|
||||
|
||||
Failing to load the PHP ISAPI module is likely to be due to unresolved
|
||||
symbols in the module. A way to check for this is to visit our support
|
||||
page at http://support.zeus.com/faq/entries/isapi_error.html and run
|
||||
the program there on your libphp4.so. It will list any unresolved
|
||||
symbols.
|
||||
|
||||
*) My libphp4.so has unresolved symbols. How do I fix this?
|
||||
|
||||
You must ensure that the PHP build process links in the appropriate
|
||||
libraries that contain these symbols! The libraries required will
|
||||
depend on the platform you are running PHP on.
|
||||
|
||||
You may need to set one or two environment variables before running
|
||||
the 'configure' program to set up PHP; LDFLAGS and EXTRA_LIBS. Make
|
||||
sure that you also export these variables to the build process.
|
||||
(Type 'export LDFLAGS EXTRA_LIBS' in the shell to do this.)
|
||||
|
||||
Specific examples:
|
||||
|
||||
Solaris + gcc:
|
||||
Ensure you run ./configure with the `--enable-libgcc' parameter. You
|
||||
may need to set LDFLAGS to '-L/usr/local/egcs/lib' (path depends on
|
||||
your gcc installation)
|
||||
|
||||
FreeBSD 4.0:
|
||||
Some people may find they need to run ./configure with the
|
||||
'--enable-libgcc' compile option too.
|
||||
Finally restart your virtual server for these changes to take effect.
|
||||
|
||||
|
||||
For more information and help with Zeus, please visit our website:
|
||||
http://www.zeus.com
|
||||
Step 4 - start PHP as a FastCGI runner
|
||||
|
||||
When you start PHP, it will pre-fork a given number of child processes
|
||||
to handle incoming PHP requests. Each process will handle a given
|
||||
number of requests before exiting (and being replaced by a newly
|
||||
forked process). You can control these two parameters by setting the
|
||||
following environment variables BEFORE starting the FastCGI runner:
|
||||
|
||||
PHP_FCGI_CHILDREN - the number of child processes to pre-fork. If not
|
||||
set, defaults to 8.
|
||||
|
||||
PHP_FCGI_MAX_REQUESTS - the number of requests each PHP child process
|
||||
handles before exiting. If not set, defaults to 500.
|
||||
|
||||
To start the FastCGI runner, execute '$ZEUSHOME/web/bin/fcgirunner
|
||||
8002 $DOCROOT/fcgi-bin/php'. Substitute the appropriate values for
|
||||
$ZEUSHOME and $DOCROOT; also substitute for 8002 the port you chose,
|
||||
above.
|
||||
|
||||
To stop the runner (e.g. to experiment with the above environment
|
||||
variables) you will need to manually stop and running PHP
|
||||
processes. (Use 'ps' and 'kill'). As it is PHP which is forking lots
|
||||
of children and not the runner, Zeus unfortunately cannot keep track
|
||||
of what processes are running, sorry. A typical command line may look
|
||||
like 'ps -efl | grep $DOCROOT/fcgi-bin/php | grep -v grep | awk
|
||||
'{print $4}' | xargs kill'
|
||||
+186
@@ -0,0 +1,186 @@
|
||||
Advisory on the PHP Release Cycle
|
||||
|
||||
|
||||
Copyright & Liciencing
|
||||
|
||||
This Document is (c) Copyright 2000,2001 by The PHP Group
|
||||
|
||||
This Document is distributed under the terms of the GNU General
|
||||
Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
|
||||
Table of Contents
|
||||
|
||||
1. Introduction
|
||||
2. Dealing with bugs
|
||||
2.1 As a QA Team Member
|
||||
2.2 As a Developer
|
||||
3. Releaseing another RC
|
||||
4. CVS During the Release Process
|
||||
4.1 Useful CVS Commands
|
||||
5 The Final Release
|
||||
6 Summary
|
||||
|
||||
|
||||
1. Introduction
|
||||
|
||||
This cycle should take place over roughly 10 days. When it is
|
||||
decided it is time for an Release to occur Andi/Zeev (Or
|
||||
Whoever) will tarball RC1, Tag & Branch CVS (see section 4)
|
||||
and then announce the RC on PHP-QA and PHP-DEV. At this
|
||||
point the build tracker and QA Bug System come into play.
|
||||
If you successfully build PHP then report it in the build
|
||||
tracker, If you then run and complete all the tests you
|
||||
should report this too in the build tracker when
|
||||
these features become avalible.
|
||||
|
||||
2. Dealing with Bugs
|
||||
|
||||
2.1 As a QA Team member
|
||||
|
||||
If you find a bug in an RC that you think is a showstopper
|
||||
then, even if it is a known bug, you should report it in the
|
||||
QA Bug system. This marks the bug for discussion at least,
|
||||
and preferably fixing before the actual release. This system
|
||||
is separate from the main bugs system so that important bugs
|
||||
dont get lost in the midst if lots of feature/change request
|
||||
in the approach to a release. It is imperitive where
|
||||
appropraite that as a QA'er a test script, Configure options
|
||||
and PHP.ini files are provided to enable the developer to
|
||||
reproduce the bug, this is an important part of our job. If
|
||||
you have a serious bug then you should also create a test
|
||||
script to be added to the tests dir of the php source so
|
||||
that at the end of the process to enable us to make sure bug
|
||||
does not return. It is not difficult to create these test
|
||||
scripts and a readme on it can be found in
|
||||
php4/tests/README.
|
||||
|
||||
|
||||
2.2 As a Developer
|
||||
|
||||
What should happen is that when a bug is reported it
|
||||
is send to php-dev and php-qa as with other bugs. We should
|
||||
have far stricter assignment system in this bug cycle rather
|
||||
than just leaving them. Once again bugs should be able to be
|
||||
marked as To Be Fixed Before release or moved to other bug
|
||||
system. (This is currently the Release Masters responsibility)
|
||||
|
||||
Then before the actual release the qa bugs system can be
|
||||
checked and if there are outstanding To Be Fixed Before
|
||||
release bugs the Developers can see this easyly rather than
|
||||
show stoppers being dismissed and not worried about.
|
||||
|
||||
When a bug is fixed the QAer who reported the bug is emailed
|
||||
and asked to test again and see if the bug is fixed.
|
||||
|
||||
3 Releasing another RC
|
||||
|
||||
If it is felt necessary that a 2nd RC is needed then it
|
||||
should be packaged as before and announced to both lists
|
||||
again. The testing process then starts again, the RC2 is
|
||||
added to the build tracker and QA'ers are asked to build and
|
||||
retest the scripts as appropriate, espectially if you
|
||||
reported a bug, you should test thourghly for your
|
||||
bug and make sure it no longer occurs. This will normally
|
||||
add anouther 3 days to the cycle, giving QA'ers time to
|
||||
build test and report back, then for developers to
|
||||
fix any problems.
|
||||
|
||||
4 CVS during the release process
|
||||
|
||||
At the point where the first RC is create a branch is
|
||||
formed. This branch is not altered form that point onward
|
||||
other than major bug fixes. Minor non important bug
|
||||
fixes should not be applied to this branch but to the main
|
||||
tree instead. Any major bug fixes should be applied to both
|
||||
trees. The developer should test and check the RC tree then
|
||||
also test and check the MAIN tree. This is their
|
||||
responsibility to make sure (as far as possible) that the
|
||||
bug fix works on both trees.
|
||||
|
||||
4.1 Useful CVS Commands
|
||||
|
||||
To create a Branch <Should only be done by person tarballing
|
||||
the RC (The Release Master)>:
|
||||
|
||||
$ cvs tag -b php_4_0_<Version>RC<NUMBER>
|
||||
IE:
|
||||
$ cvs tag -b php_4_0_1RC1
|
||||
|
||||
This should be executed in the PHP directory of an up to
|
||||
date checkout. Remember to also tag the Zend and TSRM repositories.
|
||||
|
||||
You can retrieve a branch in one of two ways: by checking it
|
||||
out fresh from the repository, or by switching an existing
|
||||
working copy over to the branch, I would suggest you
|
||||
checkout a new copy.
|
||||
|
||||
To check out a new copy:
|
||||
$ cvs checkout -r php_4_0_<Version>RC<NUMBER> php4
|
||||
IE:
|
||||
$ cvs checkout -r php_4_0_1RC1 php4
|
||||
|
||||
|
||||
To switch a working copy (Not recomended due to possible
|
||||
commiting to wrong branch)
|
||||
$ cvs update -r php_4_0_<Version>RC<NUMBER> php4
|
||||
IE:
|
||||
$ cvs update -r php_4_0_1RC1 php4
|
||||
|
||||
This should be done in the PHP4 directory itself.
|
||||
|
||||
To revert back to normal branch you should use the
|
||||
following:
|
||||
$ cvs update -A
|
||||
|
||||
To Commit to the branch you follow exactly the same
|
||||
procedure as normal
|
||||
$ cvs commit file.c
|
||||
|
||||
MAKE SURE YOU DO NOT COMMIT TO THE WRONG BRANCH.
|
||||
|
||||
5 The Final Release
|
||||
|
||||
When it is time to make the final release the following
|
||||
proceedure should be followed. The person who is tarballing
|
||||
the final release should check the QA bugs system and make
|
||||
sure there are no showstoppers left unfixed. If there are
|
||||
then bug the person the bug is assigned to until they fix
|
||||
it. If there are no more qa bugs then they should tag the
|
||||
branch as php_4_0_<Version> and tarball as usual. An email
|
||||
should be sent to PHP-GEN, PHP_DEV and PHP-QA about the new
|
||||
release and it should be added to php.net. The windows
|
||||
binaries and servelets should be built as soon as possible
|
||||
and added too, as should the windows installer.
|
||||
|
||||
6 Summary
|
||||
|
||||
Here is a summary of what a release cycle might look like:
|
||||
|
||||
Thurs: RC is agreed on and packaged, an email is sent to
|
||||
PHP_QA and PHP-DEV, the CVS is Branched and the
|
||||
Release Cycle Begins.
|
||||
|
||||
Mon: After a weekends testing most show stoppers should
|
||||
have been found (Hopefully) and the developers get to
|
||||
work on fixing them.
|
||||
|
||||
Thurs: A second RC is released if needed with the new bug
|
||||
fixes in and the QAers test again.
|
||||
|
||||
Sun: A review is made of all outstanding bugs and any show
|
||||
stoppers should be fixed. if there are no show
|
||||
stoppers then the final release is packaged and
|
||||
released on the monday morning on php.net
|
||||
|
||||
Mon: Release is made.
|
||||
|
||||
|
||||
James
|
||||
--
|
||||
James Moore
|
||||
PHP QA Team
|
||||
jmoore@php.net
|
||||
|
||||
@@ -5,16 +5,29 @@ Zend
|
||||
----
|
||||
* allow foreach ($array as $k => &$val) syntax. right now we cannot
|
||||
traverse an array without copying each element.
|
||||
* allow foreach ($array as $k => list($a, $b)) syntax for multi
|
||||
dimensional arrays.
|
||||
* look at replacing c-lib call tolower().
|
||||
* make hash API functions work with HASH_OF() to save time.
|
||||
* native large number support (probably with GNU GMP)
|
||||
* Const'ify APIs. Right now, many functions leave parameters untouched,
|
||||
but don't declare those as const. This makes interaction with other
|
||||
interfaces difficult which pass const parameters to us.
|
||||
* add try..catch/throw exception handling
|
||||
* make UNC filenames work with V_CD layer
|
||||
|
||||
global
|
||||
------
|
||||
* when used in standalone (skell-script like) mode don't urldecode
|
||||
arguments passed to php. right now it's not possible to say
|
||||
/usr/local/bin/php somescript.php dog+cat.txt
|
||||
as "dog+cat.txt" will arrive in php as "dog cat.txt".
|
||||
* make everything on the language-level independent of your locale setings.
|
||||
* always build the standalone executable as well as the chosen SAPI
|
||||
target.
|
||||
* make sure all source files have the "right" copyright.
|
||||
* the following modules still use PHP3_TLS_*() macros (and thereby don't
|
||||
work in ZTS mode): ext/dav/dav.c, ext/db/db.c, ext/gd/gd.c, ext/ldap/ldap.c
|
||||
work in ZTS mode): ext/db/db.c, ext/gd/gd.c
|
||||
* make sure that all ZTS globals get destructed. Most ts_allocate_id()
|
||||
calls should have a dtor entry.
|
||||
* activate all extensions by default that don't rely on external
|
||||
@@ -22,7 +35,7 @@ global
|
||||
* --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
|
||||
reentrancy-safe functions.
|
||||
reentrancy-safe functions (DONE?).
|
||||
* on some platforms unimplemented function will just do nothing (e.g. symlink)
|
||||
they should print a warning or not even be defined!
|
||||
* implement javadoc based function docs template system.
|
||||
@@ -43,58 +56,62 @@ documentation
|
||||
-------------
|
||||
* add remarks in the documentation which functions are not implemented on win32.
|
||||
* add remarks in the documentation which functions are not binary-safe.
|
||||
* improve documentation for the sablotron extension
|
||||
* update curl documentation
|
||||
* write documentation for the bzip2 extension
|
||||
* write documentation for the zziplib extension
|
||||
|
||||
ext/curl
|
||||
--------
|
||||
* Use the cURL write handler to save data for use when returning data or outputting
|
||||
data.
|
||||
* Have a warning scheme for when people use unsupported features.
|
||||
|
||||
ext/dav
|
||||
--------
|
||||
* rewrite.
|
||||
|
||||
ext/mcrypt
|
||||
----------
|
||||
* port to mcrypt-2.6 or later
|
||||
|
||||
ext/oci8
|
||||
--------
|
||||
* all OCIFetch*() functions should return 0 for no more data and false on error.
|
||||
* have a flag that trims trailing spaces from CHAR fields on retrieval.
|
||||
* make allow_call_time_pass_reference=Off working.
|
||||
* make allow_call_time_pass_reference=Off working.
|
||||
* for additional todo information, see oci8.c, in ext/oci8
|
||||
|
||||
ext/pcre
|
||||
--------
|
||||
* have an option for preg_grep() to return keys as well.
|
||||
* update the online docs from version 3.1 man page
|
||||
* Allow user to set PCRE_NOTEMPTY, PCRE_ANCHORED at execution time, maybe
|
||||
* add option to preg_grep() to return entries that _don't_ match
|
||||
|
||||
ext/sablot
|
||||
----------
|
||||
* Re-write the error handling and reporting interface
|
||||
* Cleanup the underlying code a bit
|
||||
* Add proper support for the message handlers
|
||||
|
||||
ext/session
|
||||
-----------
|
||||
* implement a call to set a session read-only to overcome
|
||||
the need to serialize frame-loads.
|
||||
* maybe implement finer-grained session variables that could be
|
||||
locked individually.
|
||||
* write a network-transparent storage back-end with fallover
|
||||
facilities
|
||||
* provide a callback facility which is executed upon encountering
|
||||
an unknown classname during deserialization
|
||||
|
||||
ext/sockets
|
||||
-----------
|
||||
* Make the extension work on windows (Daniel Beulshausen)
|
||||
* Make the extension work with Solaris and the Sun GCC
|
||||
|
||||
ext/standard
|
||||
------------
|
||||
* add a version number to data serialized via serialize().
|
||||
* array_add(). (Andrei)
|
||||
* implement pathinfo()
|
||||
$a = pathinfo("/some/file.bla");
|
||||
|
||||
=> array("dirname" => "/some/",
|
||||
"basename" => "file.bla",
|
||||
"extension" => "bla");
|
||||
|
||||
|
||||
We could also make it return just one part as a sting if used
|
||||
like this:
|
||||
|
||||
$a = pathinfo("/some/file.bla", PATHINFO_BASENAME);
|
||||
|
||||
* possibly modify parsing of GPC data to automatically create arrays if
|
||||
variable name is seen more than once.
|
||||
* implement regex-cache for url-functions.
|
||||
* strcase_replace(). (Andrei)
|
||||
* stri_replace(). (Andrei)
|
||||
* move socket related functions to fsock.c.
|
||||
* get_defined_funcs(), get_defined_vars().
|
||||
* NOT binary safe:
|
||||
strtok()
|
||||
basename()
|
||||
@@ -102,6 +119,12 @@ ext/standard
|
||||
strrpos()
|
||||
strrchr()
|
||||
strip_tags()
|
||||
* rewrite win32 SMTP code to be useable for *ix to, maybe as a (default)
|
||||
module of its own (Hartmut)
|
||||
|
||||
ext/zziplib
|
||||
------------
|
||||
* more fully support the zziplib api
|
||||
|
||||
ext/wddx
|
||||
--------
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
Copyright (c) 1999,2000, Andi Gutmans, Sascha Schumann, Zeev Suraski.
|
||||
Copyright (c) 1999, 2000, Andi Gutmans, Sascha Schumann, Zeev Suraski.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
||||
+3
-1
@@ -1,4 +1,6 @@
|
||||
## process this file with automake to produce Makefile.am
|
||||
AUTOMAKE_OPTIONS=foreign
|
||||
noinst_LTLIBRARIES=libtsrm.la
|
||||
libtsrm_la_SOURCES = TSRM.c
|
||||
libtsrm_la_SOURCES = TSRM.c tsrm_strtok_r.c tsrm_virtual_cwd.c
|
||||
|
||||
depend:
|
||||
@@ -0,0 +1,2 @@
|
||||
- Improve the lock in ts_resource_ex() in order to cover less code.
|
||||
This can probably be done by more careful hash table access
|
||||
+150
-58
@@ -2,18 +2,18 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Thread Safe Resource Manager |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Zeev Suraski |
|
||||
| Copyright (c) 1999, 2000, Andi Gutmans, Sascha Schumann, Zeev Suraski|
|
||||
| This source file is subject to the TSRM license, that is bundled |
|
||||
| with this package in the file LICENSE |
|
||||
+----------------------------------------------------------------------+
|
||||
| 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. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Author: Zeev Suraski <zeev@zend.com> |
|
||||
| Authors: Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include "TSRM.h"
|
||||
|
||||
#ifdef ZTS
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -38,13 +38,16 @@ typedef struct {
|
||||
} tsrm_resource_type;
|
||||
|
||||
|
||||
#define TSRM_SHUFFLE_RSRC_ID(rsrc_id) ((rsrc_id)+1)
|
||||
#define TSRM_UNSHUFFLE_RSRC_ID(rsrc_id) ((rsrc_id)-1)
|
||||
|
||||
/* The memory manager table */
|
||||
static tsrm_tls_entry **tsrm_tls_table;
|
||||
static tsrm_tls_entry **tsrm_tls_table=NULL;
|
||||
static int tsrm_tls_table_size;
|
||||
static ts_rsrc_id id_count;
|
||||
|
||||
/* The resource sizes table */
|
||||
static tsrm_resource_type *resource_types_table;
|
||||
static tsrm_resource_type *resource_types_table=NULL;
|
||||
static int resource_types_table_size;
|
||||
|
||||
|
||||
@@ -55,20 +58,42 @@ 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;
|
||||
int tsrm_error(int level, const char *format, ...);
|
||||
|
||||
/* Read a resource from a thread's resource storage */
|
||||
void *ts_resource_read( tsrm_tls_entry *thread_resources, ts_rsrc_id id );
|
||||
static int tsrm_error_level;
|
||||
static FILE *tsrm_error_file;
|
||||
#if TSRM_DEBUG
|
||||
#define TSRM_ERROR tsrm_error
|
||||
#define TSRM_SAFE_ARRAY_OFFSET(array, offset, range) (((offset)>=0 && (offset)<(range)) ? array[offset] : NULL)
|
||||
#else
|
||||
#define TSRM_ERROR
|
||||
#define TSRM_SAFE_ARRAY_OFFSET(array, offset, range) array[offset]
|
||||
#endif
|
||||
|
||||
#if defined(PTHREADS)
|
||||
/* Thread local storage */
|
||||
static pthread_key_t tls_key;
|
||||
#endif
|
||||
|
||||
|
||||
/* Startup TSRM (call once for the entire process) */
|
||||
TSRM_API int tsrm_startup(int expected_threads, int expected_resources, int debug_status)
|
||||
TSRM_API int tsrm_startup(int expected_threads, int expected_resources, int debug_level, char *debug_filename)
|
||||
{
|
||||
#if defined(GNUPTH)
|
||||
pth_init();
|
||||
#elif defined(PTHREADS)
|
||||
pthread_key_create( &tls_key, 0 );
|
||||
#endif
|
||||
|
||||
tsrm_error_file = stderr;
|
||||
tsrm_error_set(debug_level, debug_filename);
|
||||
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) {
|
||||
TSRM_ERROR(TSRM_ERROR_LEVEL_ERROR, "Unable to allocate TLS table");
|
||||
return 0;
|
||||
}
|
||||
id_count=0;
|
||||
@@ -76,7 +101,9 @@ TSRM_API int tsrm_startup(int expected_threads, int expected_resources, int debu
|
||||
resource_types_table_size = expected_resources;
|
||||
resource_types_table = (tsrm_resource_type *) calloc(resource_types_table_size, sizeof(tsrm_resource_type));
|
||||
if (!resource_types_table) {
|
||||
TSRM_ERROR(TSRM_ERROR_LEVEL_ERROR, "Unable to allocate resource types table");
|
||||
free(tsrm_tls_table);
|
||||
tsrm_tls_table = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -84,9 +111,7 @@ TSRM_API int tsrm_startup(int expected_threads, int expected_resources, int debu
|
||||
|
||||
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);
|
||||
TSRM_ERROR(TSRM_ERROR_LEVEL_CORE, "Started up TSRM, %d expected threads, %d expected resources", expected_threads, expected_resources);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -113,14 +138,22 @@ TSRM_API void tsrm_shutdown(void)
|
||||
}
|
||||
}
|
||||
free(tsrm_tls_table);
|
||||
tsrm_tls_table = NULL;
|
||||
}
|
||||
if (resource_types_table) {
|
||||
free(resource_types_table);
|
||||
resource_types_table=NULL;
|
||||
}
|
||||
tsrm_mutex_free(tsmm_mutex);
|
||||
tsrm_debug("Shutdown TSRM\n");
|
||||
tsmm_mutex = NULL;
|
||||
TSRM_ERROR(TSRM_ERROR_LEVEL_CORE, "Shutdown TSRM");
|
||||
if (tsrm_error_file!=stderr) {
|
||||
fclose(tsrm_error_file);
|
||||
}
|
||||
#if defined(GNUPTH)
|
||||
pth_kill();
|
||||
#elif defined(PTHREADS)
|
||||
pthread_key_delete( tls_key );
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -131,19 +164,21 @@ TSRM_API ts_rsrc_id ts_allocate_id(size_t size, ts_allocate_ctor ctor, ts_alloca
|
||||
ts_rsrc_id new_id;
|
||||
int i;
|
||||
|
||||
tsrm_debug("Obtaining a new resource id, %d bytes\n", size);
|
||||
TSRM_ERROR(TSRM_ERROR_LEVEL_CORE, "Obtaining a new resource id, %d bytes", size);
|
||||
|
||||
tsrm_mutex_lock(tsmm_mutex);
|
||||
|
||||
/* obtain a resource id */
|
||||
new_id = id_count++;
|
||||
tsrm_debug("Obtained resource id %d\n", new_id);
|
||||
TSRM_ERROR(TSRM_ERROR_LEVEL_CORE, "Obtained resource id %d", TSRM_SHUFFLE_RSRC_ID(new_id));
|
||||
|
||||
/* store the new resource type in the resource sizes table */
|
||||
if (resource_types_table_size < id_count) {
|
||||
resource_types_table = (tsrm_resource_type *) realloc(resource_types_table, sizeof(tsrm_resource_type)*id_count);
|
||||
if (!resource_types_table) {
|
||||
return -1;
|
||||
tsrm_mutex_unlock(tsmm_mutex);
|
||||
TSRM_ERROR(TSRM_ERROR_LEVEL_ERROR, "Unable to allocate storage for resource");
|
||||
return 0;
|
||||
}
|
||||
resource_types_table_size = id_count;
|
||||
}
|
||||
@@ -173,8 +208,8 @@ TSRM_API ts_rsrc_id ts_allocate_id(size_t size, ts_allocate_ctor ctor, ts_alloca
|
||||
}
|
||||
tsrm_mutex_unlock(tsmm_mutex);
|
||||
|
||||
tsrm_debug("Successfully allocated new resource id %d\n", new_id);
|
||||
return new_id;
|
||||
TSRM_ERROR(TSRM_ERROR_LEVEL_CORE, "Successfully allocated new resource id %d", TSRM_SHUFFLE_RSRC_ID(new_id));
|
||||
return TSRM_SHUFFLE_RSRC_ID(new_id);
|
||||
}
|
||||
|
||||
|
||||
@@ -182,13 +217,17 @@ static void allocate_new_resource(tsrm_tls_entry **thread_resources_ptr, THREAD_
|
||||
{
|
||||
int i;
|
||||
|
||||
TSRM_ERROR(TSRM_ERROR_LEVEL_CORE, "Creating data structures for thread %x", thread_id);
|
||||
(*thread_resources_ptr) = (tsrm_tls_entry *) malloc(sizeof(tsrm_tls_entry));
|
||||
(*thread_resources_ptr)->storage = (void **) malloc(sizeof(void *)*id_count);
|
||||
(*thread_resources_ptr)->count = id_count;
|
||||
(*thread_resources_ptr)->thread_id = thread_id;
|
||||
(*thread_resources_ptr)->next = NULL;
|
||||
|
||||
tsrm_mutex_unlock(tsmm_mutex);
|
||||
#if defined(PTHREADS)
|
||||
/* Set thread local storage to this new thread resources structure */
|
||||
pthread_setspecific( tls_key, (void *)*thread_resources_ptr );
|
||||
#endif
|
||||
|
||||
if (tsrm_new_thread_begin_handler) {
|
||||
tsrm_new_thread_begin_handler(thread_id);
|
||||
@@ -199,6 +238,9 @@ static void allocate_new_resource(tsrm_tls_entry **thread_resources_ptr, THREAD_
|
||||
resource_types_table[i].ctor((*thread_resources_ptr)->storage[i]);
|
||||
}
|
||||
}
|
||||
|
||||
tsrm_mutex_unlock(tsmm_mutex);
|
||||
|
||||
if (tsrm_new_thread_end_handler) {
|
||||
tsrm_new_thread_end_handler(thread_id);
|
||||
}
|
||||
@@ -211,14 +253,26 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
|
||||
THREAD_T thread_id;
|
||||
int hash_value;
|
||||
tsrm_tls_entry *thread_resources;
|
||||
void *resource;
|
||||
|
||||
if (th_id) {
|
||||
thread_id = *th_id;
|
||||
} else {
|
||||
if( !th_id ) {
|
||||
#if defined(PTHREADS)
|
||||
/* Fast path for looking up the resources for the current
|
||||
* thread. Its used by just about every call to
|
||||
* ts_resource_ex(). This avoids the need for a mutex lock
|
||||
* and our hashtable lookup.
|
||||
*/
|
||||
thread_resources = pthread_getspecific( tls_key );
|
||||
if( thread_resources ) {
|
||||
TSRM_ERROR(TSRM_ERROR_LEVEL_INFO, "Fetching resource id %d for current thread %d", id, (long) thread_resources->thread_id );
|
||||
return ts_resource_read( thread_resources, id );
|
||||
}
|
||||
#endif
|
||||
thread_id = tsrm_thread_id();
|
||||
}
|
||||
tsrm_debug("Fetching resource id %d for thread %ld\n", id, (long) thread_id);
|
||||
} else {
|
||||
thread_id = *th_id;
|
||||
}
|
||||
|
||||
TSRM_ERROR(TSRM_ERROR_LEVEL_INFO, "Fetching resource id %d for thread %ld", id, (long) thread_id);
|
||||
tsrm_mutex_lock(tsmm_mutex);
|
||||
|
||||
hash_value = THREAD_HASH_OF(thread_id, tsrm_tls_table_size);
|
||||
@@ -226,8 +280,7 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
|
||||
|
||||
if (!thread_resources) {
|
||||
allocate_new_resource(&tsrm_tls_table[hash_value], thread_id);
|
||||
return ts_resource(id);
|
||||
/* thread_resources = tsrm_tls_table[hash_value]; */
|
||||
return ts_resource_ex(id, &thread_id);
|
||||
} else {
|
||||
do {
|
||||
if (thread_resources->thread_id == thread_id) {
|
||||
@@ -237,7 +290,7 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
|
||||
thread_resources = thread_resources->next;
|
||||
} else {
|
||||
allocate_new_resource(&thread_resources->next, thread_id);
|
||||
return ts_resource(id);
|
||||
return ts_resource_ex(id, &thread_id);
|
||||
/*
|
||||
* thread_resources = thread_resources->next;
|
||||
* break;
|
||||
@@ -245,12 +298,26 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
|
||||
}
|
||||
} while (thread_resources);
|
||||
}
|
||||
|
||||
resource = thread_resources->storage[id];
|
||||
|
||||
tsrm_mutex_unlock(tsmm_mutex);
|
||||
return ts_resource_read( thread_resources, id );
|
||||
}
|
||||
|
||||
tsrm_debug("Successfully fetched resource id %d for thread id %ld - %x\n", id, (long) thread_id, (long) resource);
|
||||
|
||||
/* Read a specific resource from the thread's resources.
|
||||
* This is called outside of a mutex, so have to be aware about external
|
||||
* changes to the structure as we read it.
|
||||
*/
|
||||
void *ts_resource_read( tsrm_tls_entry *thread_resources, ts_rsrc_id id )
|
||||
{
|
||||
void *resource;
|
||||
|
||||
resource = TSRM_SAFE_ARRAY_OFFSET(thread_resources->storage, TSRM_UNSHUFFLE_RSRC_ID(id), thread_resources->count);
|
||||
if (resource) {
|
||||
TSRM_ERROR(TSRM_ERROR_LEVEL_INFO, "Successfully fetched resource id %d for thread id %ld - %x", id, (long) thread_resources->thread_id, (long) resource);
|
||||
} else {
|
||||
TSRM_ERROR(TSRM_ERROR_LEVEL_ERROR, "Resource id %d is out of range (%d..%d)", id, TSRM_SHUFFLE_RSRC_ID(0), TSRM_SHUFFLE_RSRC_ID(thread_resources->count-1));
|
||||
abort();
|
||||
}
|
||||
return resource;
|
||||
}
|
||||
|
||||
@@ -258,9 +325,10 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
|
||||
/* frees all resources allocated for the current thread */
|
||||
void ts_free_thread(void)
|
||||
{
|
||||
tsrm_tls_entry *thread_resources;
|
||||
int i;
|
||||
THREAD_T thread_id = tsrm_thread_id();
|
||||
int hash_value;
|
||||
tsrm_tls_entry *thread_resources;
|
||||
tsrm_tls_entry *last=NULL;
|
||||
|
||||
tsrm_mutex_lock(tsmm_mutex);
|
||||
@@ -269,20 +337,26 @@ void ts_free_thread(void)
|
||||
|
||||
while (thread_resources) {
|
||||
if (thread_resources->thread_id == thread_id) {
|
||||
int i;
|
||||
tsrm_mutex_unlock(tsmm_mutex);
|
||||
|
||||
for (i=0; i<thread_resources->count; i++) {
|
||||
if (resource_types_table[i].dtor) {
|
||||
resource_types_table[i].dtor(thread_resources->storage[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (i=0; i<thread_resources->count; i++) {
|
||||
free(thread_resources->storage[i]);
|
||||
}
|
||||
tsrm_mutex_lock(tsmm_mutex);
|
||||
free(thread_resources->storage);
|
||||
if (last) {
|
||||
last->next = thread_resources->next;
|
||||
} else {
|
||||
tsrm_tls_table[hash_value]=NULL;
|
||||
}
|
||||
#if defined(PTHREADS)
|
||||
pthread_setspecific( tls_key, 0 );
|
||||
#endif
|
||||
free(thread_resources);
|
||||
break;
|
||||
}
|
||||
@@ -310,7 +384,7 @@ void ts_free_id(ts_rsrc_id id)
|
||||
/* Obtain the current thread id */
|
||||
TSRM_API THREAD_T tsrm_thread_id(void)
|
||||
{
|
||||
#ifdef WIN32
|
||||
#ifdef TSRM_WIN32
|
||||
return GetCurrentThreadId();
|
||||
#elif defined(GNUPTH)
|
||||
return pth_self();
|
||||
@@ -325,11 +399,11 @@ TSRM_API THREAD_T tsrm_thread_id(void)
|
||||
|
||||
|
||||
/* Allocate a mutex */
|
||||
TSRM_API MUTEX_T tsrm_mutex_alloc( void )
|
||||
TSRM_API MUTEX_T tsrm_mutex_alloc(void)
|
||||
{
|
||||
MUTEX_T mutexp;
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef TSRM_WIN32
|
||||
mutexp = malloc(sizeof(CRITICAL_SECTION));
|
||||
InitializeCriticalSection(mutexp);
|
||||
#elif defined(GNUPTH)
|
||||
@@ -351,10 +425,10 @@ TSRM_API MUTEX_T tsrm_mutex_alloc( void )
|
||||
|
||||
|
||||
/* Free a mutex */
|
||||
TSRM_API void tsrm_mutex_free( MUTEX_T mutexp )
|
||||
TSRM_API void tsrm_mutex_free(MUTEX_T mutexp)
|
||||
{
|
||||
if (mutexp) {
|
||||
#ifdef WIN32
|
||||
#ifdef TSRM_WIN32
|
||||
DeleteCriticalSection(mutexp);
|
||||
#elif defined(GNUPTH)
|
||||
free(mutexp);
|
||||
@@ -374,12 +448,10 @@ TSRM_API void tsrm_mutex_free( MUTEX_T mutexp )
|
||||
|
||||
|
||||
/* Lock a mutex */
|
||||
TSRM_API int tsrm_mutex_lock( MUTEX_T mutexp )
|
||||
TSRM_API int tsrm_mutex_lock(MUTEX_T mutexp)
|
||||
{
|
||||
#if 0
|
||||
tsrm_debug("Mutex locked thread: %ld\n",tsrm_thread_id());
|
||||
#endif
|
||||
#ifdef WIN32
|
||||
TSRM_ERROR(TSRM_ERROR_LEVEL_INFO, "Mutex locked thread: %ld", tsrm_thread_id());
|
||||
#ifdef TSRM_WIN32
|
||||
EnterCriticalSection(mutexp);
|
||||
return 1;
|
||||
#elif defined(GNUPTH)
|
||||
@@ -395,12 +467,10 @@ TSRM_API int tsrm_mutex_lock( MUTEX_T mutexp )
|
||||
|
||||
|
||||
/* Unlock a mutex */
|
||||
TSRM_API int tsrm_mutex_unlock( MUTEX_T mutexp )
|
||||
TSRM_API int tsrm_mutex_unlock(MUTEX_T mutexp)
|
||||
{
|
||||
#if 0
|
||||
tsrm_debug("Mutex unlocked thread: %ld\n",tsrm_thread_id());
|
||||
#endif
|
||||
#ifdef WIN32
|
||||
TSRM_ERROR(TSRM_ERROR_LEVEL_INFO, "Mutex unlocked thread: %ld", tsrm_thread_id());
|
||||
#ifdef TSRM_WIN32
|
||||
LeaveCriticalSection(mutexp);
|
||||
return 1;
|
||||
#elif defined(GNUPTH)
|
||||
@@ -438,23 +508,45 @@ TSRM_API void *tsrm_set_new_thread_end_handler(void (*new_thread_end_handler)(TH
|
||||
* Debug support
|
||||
*/
|
||||
|
||||
static int tsrm_debug(const char *format, ...)
|
||||
#if TSRM_DEBUG
|
||||
int tsrm_error(int level, const char *format, ...)
|
||||
{
|
||||
if (tsrm_debug_status) {
|
||||
if (level<=tsrm_error_level) {
|
||||
va_list args;
|
||||
int size;
|
||||
|
||||
fprintf(tsrm_error_file, "TSRM: ");
|
||||
va_start(args, format);
|
||||
size = vprintf(format, args);
|
||||
size = vfprintf(tsrm_error_file, format, args);
|
||||
va_end(args);
|
||||
fprintf(tsrm_error_file, "\n");
|
||||
fflush(tsrm_error_file);
|
||||
return size;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void tsrm_debug_set(int status)
|
||||
void tsrm_error_set(int level, char *debug_filename)
|
||||
{
|
||||
tsrm_debug_status = status;
|
||||
tsrm_error_level = level;
|
||||
|
||||
#if TSRM_DEBUG
|
||||
if (tsrm_error_file!=stderr) { /* close files opened earlier */
|
||||
fclose(tsrm_error_file);
|
||||
}
|
||||
|
||||
if (debug_filename) {
|
||||
tsrm_error_file = fopen(debug_filename, "w");
|
||||
if (!tsrm_error_file) {
|
||||
tsrm_error_file = stderr;
|
||||
}
|
||||
} else {
|
||||
tsrm_error_file = stderr;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* ZTS */
|
||||
+52
-3
@@ -20,6 +20,7 @@ CFG=TSRM - Win32 Debug_TS
|
||||
!MESSAGE "TSRM - Win32 Debug_TS" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "TSRM - Win32 Release_TS" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "TSRM - Win32 Release_TS_inline" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "TSRM - Win32 Release_TSDbg" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
@@ -42,7 +43,7 @@ RSC=rc.exe
|
||||
# PROP Intermediate_Dir "Debug_TS"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "C:\Projects\TSRM" /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 "TSRM_EXPORTS" /D "_LIB" /D "WIN32" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_DEBUG" /D "ZTS" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D TSRM_DEBUG=1 /YX /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x40d /d "_DEBUG"
|
||||
# ADD RSC /l 0x40d /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
@@ -65,7 +66,7 @@ LIB32=link.exe -lib
|
||||
# PROP Intermediate_Dir "Release_TS"
|
||||
# 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 "WIN32" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "ZTS" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D TSRM_DEBUG=0 /YX /FD /c
|
||||
# ADD BASE RSC /l 0x40d /d "NDEBUG"
|
||||
# ADD RSC /l 0x40d /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
@@ -88,7 +89,30 @@ LIB32=link.exe -lib
|
||||
# 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 "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "ZTS" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D TSRM_DEBUG=0 /YX /FD /c
|
||||
# ADD 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)" == "TSRM - Win32 Release_TSDbg"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "TSRM___Win32_Release_TSDbg"
|
||||
# PROP BASE Intermediate_Dir "TSRM___Win32_Release_TSDbg"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_TSDbg"
|
||||
# PROP Intermediate_Dir "Release_TSDbg"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "ZTS" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D TSRM_DEBUG=0 /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /Zi /Od /I "." /D "NDEBUG" /D "ZTS" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D TSRM_DEBUG=0 /YX /FD /c
|
||||
# ADD BASE RSC /l 0x40d /d "NDEBUG"
|
||||
# ADD RSC /l 0x40d /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
@@ -105,6 +129,7 @@ LIB32=link.exe -lib
|
||||
# Name "TSRM - Win32 Debug_TS"
|
||||
# Name "TSRM - Win32 Release_TS"
|
||||
# Name "TSRM - Win32 Release_TS_inline"
|
||||
# Name "TSRM - Win32 Release_TSDbg"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
@@ -112,6 +137,14 @@ LIB32=link.exe -lib
|
||||
|
||||
SOURCE=.\TSRM.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\tsrm_strtok_r.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\tsrm_virtual_cwd.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
@@ -120,6 +153,22 @@ SOURCE=.\TSRM.c
|
||||
|
||||
SOURCE=.\TSRM.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\tsrm_config.w32.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\tsrm_config_common.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\tsrm_strtok_r.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\tsrm_virtual_cwd.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
+22
-17
@@ -2,30 +2,29 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Thread Safe Resource Manager |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998, 1999 Zeev Suraski |
|
||||
| Copyright (c) 1999, 2000, Andi Gutmans, Sascha Schumann, Zeev Suraski|
|
||||
| This source file is subject to the TSRM license, that is bundled |
|
||||
| with this package in the file LICENSE |
|
||||
+----------------------------------------------------------------------+
|
||||
| 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. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Author: Zeev Suraski <zeev@zend.com> |
|
||||
| Authors: Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#ifndef TSRM_H
|
||||
#define TSRM_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# undef PACKAGE
|
||||
# undef VERSION
|
||||
# include "tsrm_config.h"
|
||||
# undef PACKAGE
|
||||
# undef VERSION
|
||||
#endif
|
||||
|
||||
#if WIN32||WINNT
|
||||
/* Only compile multi-threading functions if we're in ZTS mode */
|
||||
#ifdef ZTS
|
||||
|
||||
#ifdef WIN32
|
||||
# define TSRM_WIN32
|
||||
#endif
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
# include <windows.h>
|
||||
#elif defined(GNUPTH)
|
||||
# include <pth.h>
|
||||
@@ -35,7 +34,7 @@
|
||||
|
||||
typedef int ts_rsrc_id;
|
||||
|
||||
#if WIN32||WINNT
|
||||
#ifdef TSRM_WIN32
|
||||
# ifdef TSRM_EXPORTS
|
||||
# define TSRM_API __declspec(dllexport)
|
||||
# else
|
||||
@@ -47,7 +46,7 @@ typedef int ts_rsrc_id;
|
||||
|
||||
|
||||
/* Define THREAD_T and MUTEX_T */
|
||||
#if defined(WIN32)
|
||||
#ifdef TSRM_WIN32
|
||||
# define THREAD_T DWORD
|
||||
# define MUTEX_T CRITICAL_SECTION *
|
||||
#elif defined(GNUPTH)
|
||||
@@ -74,7 +73,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/* startup/shutdown */
|
||||
TSRM_API 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_level, char *debug_filename);
|
||||
TSRM_API void tsrm_shutdown(void);
|
||||
|
||||
/* allocates a new thread-safe-resource id */
|
||||
@@ -92,7 +91,11 @@ TSRM_API void ts_free_id(ts_rsrc_id id);
|
||||
|
||||
|
||||
/* Debug support */
|
||||
TSRM_API void tsrm_debug_set(int status);
|
||||
#define TSRM_ERROR_LEVEL_ERROR 1
|
||||
#define TSRM_ERROR_LEVEL_CORE 2
|
||||
#define TSRM_ERROR_LEVEL_INFO 3
|
||||
TSRM_API int tsrm_error(int level, const char *format, ...);
|
||||
TSRM_API void tsrm_error_set(int level, char *debug_filename);
|
||||
|
||||
/* utility functions */
|
||||
TSRM_API THREAD_T tsrm_thread_id(void);
|
||||
@@ -108,4 +111,6 @@ TSRM_API void *tsrm_set_new_thread_end_handler(void (*new_thread_end_handler)(TH
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ZTS */
|
||||
|
||||
#endif /* TSRM_H */
|
||||
+14
-2
@@ -4,18 +4,30 @@ dnl Minimalistic configure.in for TSRM.
|
||||
dnl
|
||||
|
||||
AC_INIT(TSRM.c)
|
||||
AM_INIT_AUTOMAKE(TSRM, 1.0)
|
||||
AM_INIT_AUTOMAKE(TSRM, 1.0, nodefine)
|
||||
AM_CONFIG_HEADER(tsrm_config.h)
|
||||
|
||||
sinclude(tsrm.m4)
|
||||
|
||||
TSRM_BASIC_CHECKS
|
||||
TSRM_THREADS_CHECKS
|
||||
|
||||
AM_PROG_LIBTOOL
|
||||
if test "$enable_debug" != "yes"; then
|
||||
AM_SET_LIBTOOL_VARIABLE([--silent])
|
||||
fi
|
||||
|
||||
TSRM_PTHREAD
|
||||
dnl TSRM_PTHREAD
|
||||
|
||||
AC_CHECK_HEADERS(
|
||||
utime.h \
|
||||
dirent.h \
|
||||
stdarg.h \
|
||||
alloca.h \
|
||||
unistd.h \
|
||||
limits.h
|
||||
)
|
||||
|
||||
AC_DEFINE(ZTS,1,[ ])
|
||||
|
||||
AC_OUTPUT(Makefile)
|
||||
@@ -0,0 +1,44 @@
|
||||
#ifndef READDIR_H
|
||||
#define READDIR_H
|
||||
|
||||
|
||||
/*
|
||||
* Structures and types used to implement opendir/readdir/closedir
|
||||
* on Windows 95/NT.
|
||||
*/
|
||||
|
||||
#include <io.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
|
||||
/* struct dirent - same as Unix */
|
||||
|
||||
struct dirent {
|
||||
long d_ino; /* inode (always 1 in WIN32) */
|
||||
off_t d_off; /* offset to this dirent */
|
||||
unsigned short d_reclen; /* length of d_name */
|
||||
char d_name[_MAX_FNAME + 1]; /* filename (null terminated) */
|
||||
};
|
||||
|
||||
|
||||
/* typedef DIR - not the same as Unix */
|
||||
typedef struct {
|
||||
long handle; /* _findfirst/_findnext handle */
|
||||
short offset; /* offset into directory */
|
||||
short finished; /* 1 if there are not more files */
|
||||
struct _finddata_t fileinfo; /* from _findfirst/_findnext */
|
||||
char *dir; /* the dir we are reading */
|
||||
struct dirent dent; /* the dirent to return */
|
||||
} DIR;
|
||||
|
||||
/* Function prototypes */
|
||||
DIR *opendir(const char *);
|
||||
struct dirent *readdir(DIR *);
|
||||
int readdir_r(DIR *, struct dirent *, struct dirent **);
|
||||
int closedir(DIR *);
|
||||
void rewinddir(DIR *);
|
||||
|
||||
|
||||
#endif /* READDIR_H */
|
||||
+1
-1
@@ -68,7 +68,7 @@ AC_MSG_RESULT(yes)
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN(TSRM_OTHER_CHECKS,[
|
||||
AC_DEFUN(TSRM_THREADS_CHECKS,[
|
||||
|
||||
dnl For the thread implementations, we always use --with-*
|
||||
dnl to maintain consistency
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#ifndef TSRM_CONFIG_W32_H
|
||||
#define TSRM_CONFIG_W32_H
|
||||
|
||||
#define HAVE_UTIME 1
|
||||
#define HAVE_ALLOCA 1
|
||||
|
||||
#undef inline
|
||||
#ifdef ZEND_WIN32_FORCE_INLINE
|
||||
# define inline __forceinline
|
||||
#else
|
||||
# define inline
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,47 @@
|
||||
#ifndef TSRM_CONFIG_COMMON_H
|
||||
#define TSRM_CONFIG_COMMON_H
|
||||
|
||||
#if WINNT|WIN32
|
||||
# define TSRM_WIN32
|
||||
#endif
|
||||
|
||||
#ifndef TSRM_WIN32
|
||||
# include "tsrm_config.h"
|
||||
# include <sys/param.h>
|
||||
#else
|
||||
# include "tsrm_config.w32.h"
|
||||
#endif
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_ALLOCA_H
|
||||
#include <alloca.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_LIMITS_H
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
# ifdef PATH_MAX
|
||||
# define MAXPATHLEN PATH_MAX
|
||||
# else
|
||||
# define MAXPATHLEN 256
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2))
|
||||
# define tsrm_do_alloca(p) alloca(p)
|
||||
# define tsrm_free_alloca(p)
|
||||
#else
|
||||
# define tsrm_do_alloca(p) malloc(p)
|
||||
# define tsrm_free_alloca(p) free(p)
|
||||
#endif
|
||||
|
||||
#endif /* TSRM_CONFIG_COMMON_H */
|
||||
@@ -0,0 +1,63 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "tsrm_config_common.h"
|
||||
#include "tsrm_strtok_r.h"
|
||||
|
||||
static inline int in_character_class(char ch, const char *delim)
|
||||
{
|
||||
while (*delim) {
|
||||
if (*delim == ch) {
|
||||
return 1;
|
||||
}
|
||||
delim++;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
char *tsrm_strtok_r(char *s, const char *delim, char **last)
|
||||
{
|
||||
char *token;
|
||||
|
||||
if (s == NULL) {
|
||||
s = *last;
|
||||
}
|
||||
|
||||
while (*s && in_character_class(*s, delim)) {
|
||||
s++;
|
||||
}
|
||||
if (!*s) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
token = s;
|
||||
|
||||
while (*s && !in_character_class(*s, delim)) {
|
||||
s++;
|
||||
}
|
||||
if (!*s) {
|
||||
*last = s;
|
||||
} else {
|
||||
*s = '\0';
|
||||
*last = s + 1;
|
||||
}
|
||||
return token;
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
main()
|
||||
{
|
||||
char foo[] = "/foo/bar//\\barbara";
|
||||
char *last;
|
||||
char *token;
|
||||
|
||||
token = tsrm_strtok_r(foo, "/\\", &last);
|
||||
while (token) {
|
||||
printf ("Token = '%s'\n", token);
|
||||
token = tsrm_strtok_r(NULL, "/\\", &last);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,6 @@
|
||||
#ifndef TSRM_STRTOK_R
|
||||
#define TSRM_STRTOK_R
|
||||
|
||||
char *tsrm_strtok_r(char *s, const char *delim, char **last);
|
||||
|
||||
#endif
|
||||
@@ -26,15 +26,14 @@
|
||||
#include <limits.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#ifdef ZEND_WIN32
|
||||
#include "win95nt.h"
|
||||
#endif
|
||||
#include "tsrm_virtual_cwd.h"
|
||||
#include "tsrm_strtok_r.h"
|
||||
|
||||
#include "php_virtual_cwd.h"
|
||||
#include "php_reentrancy.h" /* for php_strtok_r */
|
||||
#ifdef TSRM_WIN32
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
#define VIRTUAL_CWD_DEBUG 0
|
||||
|
||||
@@ -43,15 +42,19 @@
|
||||
#endif
|
||||
|
||||
/* Only need mutex for popen() in Windows because it doesn't chdir() on UNIX */
|
||||
#if defined(ZEND_WIN32) && defined(ZTS)
|
||||
#if defined(TSRM_WIN32) && defined(ZTS)
|
||||
MUTEX_T cwd_mutex;
|
||||
#endif
|
||||
|
||||
ZEND_DECLARE_MODULE_GLOBALS(cwd);
|
||||
#ifdef ZTS
|
||||
static ts_rsrc_id cwd_globals_id;
|
||||
#else
|
||||
static virtual_cwd_globals cwd_globals;
|
||||
#endif
|
||||
|
||||
cwd_state main_cwd_state; /* True global */
|
||||
|
||||
#ifndef ZEND_WIN32
|
||||
#ifndef TSRM_WIN32
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include <direct.h>
|
||||
@@ -65,16 +68,9 @@ cwd_state main_cwd_state; /* True global */
|
||||
#define S_ISREG(mode) ((mode) & _S_IFREG)
|
||||
#endif
|
||||
|
||||
#ifdef ZEND_WIN32
|
||||
#define php_strtok_r(a,b,c) strtok((a),(b))
|
||||
#define IS_SLASH(c) ((c) == '/' || (c) == '\\')
|
||||
#define DEFAULT_SLASH '\\'
|
||||
#ifdef TSRM_WIN32
|
||||
#define tsrm_strtok_r(a,b,c) strtok((a),(b))
|
||||
#define TOKENIZER_STRING "/\\"
|
||||
|
||||
#define IS_ABSOLUTE_PATH(path, len) \
|
||||
(len >= 2 && isalpha(path[0]) && path[1] == ':')
|
||||
|
||||
#define COPY_WHEN_ABSOLUTE 2
|
||||
|
||||
static int php_check_dots(const char *element, int n)
|
||||
{
|
||||
@@ -91,19 +87,12 @@ static int php_check_dots(const char *element, int n)
|
||||
|
||||
|
||||
#else
|
||||
#define IS_SLASH(c) ((c) == '/')
|
||||
#define DEFAULT_SLASH '/'
|
||||
#define TOKENIZER_STRING "/"
|
||||
#endif
|
||||
|
||||
|
||||
/* default macros */
|
||||
|
||||
#ifndef IS_ABSOLUTE_PATH
|
||||
#define IS_ABSOLUTE_PATH(path, len) \
|
||||
(IS_SLASH(path[0]))
|
||||
#endif
|
||||
|
||||
#ifndef IS_DIRECTORY_UP
|
||||
#define IS_DIRECTORY_UP(element, len) \
|
||||
(len == 2 && memcmp(element, "..", 2) == 0)
|
||||
@@ -114,10 +103,6 @@ static int php_check_dots(const char *element, int n)
|
||||
(len == 1 && ptr[0] == '.')
|
||||
#endif
|
||||
|
||||
#ifndef COPY_WHEN_ABSOLUTE
|
||||
#define COPY_WHEN_ABSOLUTE 0
|
||||
#endif
|
||||
|
||||
/* define this to check semantics */
|
||||
#define IS_DIR_OK(s) (1)
|
||||
|
||||
@@ -154,16 +139,31 @@ static int php_is_file_ok(const cwd_state *state)
|
||||
return (1);
|
||||
}
|
||||
|
||||
static void cwd_globals_ctor(zend_cwd_globals *cwd_globals)
|
||||
static void cwd_globals_ctor(virtual_cwd_globals *cwd_globals)
|
||||
{
|
||||
CWD_STATE_COPY(&cwd_globals->cwd, &main_cwd_state);
|
||||
}
|
||||
|
||||
static void cwd_globals_dtor(zend_cwd_globals *cwd_globals)
|
||||
static void cwd_globals_dtor(virtual_cwd_globals *cwd_globals)
|
||||
{
|
||||
CWD_STATE_FREE(&cwd_globals->cwd);
|
||||
}
|
||||
|
||||
static char *tsrm_strndup(const char *s, size_t length)
|
||||
{
|
||||
char *p;
|
||||
|
||||
p = (char *) malloc(length+1);
|
||||
if (!p) {
|
||||
return (char *)NULL;
|
||||
}
|
||||
if (length) {
|
||||
memcpy(p,s,length);
|
||||
}
|
||||
p[length]=0;
|
||||
return p;
|
||||
}
|
||||
|
||||
CWD_API void virtual_cwd_startup(void)
|
||||
{
|
||||
char cwd[MAXPATHLEN];
|
||||
@@ -176,8 +176,13 @@ CWD_API void virtual_cwd_startup(void)
|
||||
main_cwd_state.cwd = strdup(cwd);
|
||||
main_cwd_state.cwd_length = strlen(cwd);
|
||||
|
||||
ZEND_INIT_MODULE_GLOBALS(cwd, cwd_globals_ctor, cwd_globals_dtor);
|
||||
#if defined(ZEND_WIN32) && defined(ZTS)
|
||||
#ifdef ZTS
|
||||
cwd_globals_id = ts_allocate_id(sizeof(virtual_cwd_globals), (ts_allocate_ctor) cwd_globals_ctor, (ts_allocate_dtor) cwd_globals_dtor);
|
||||
#else
|
||||
cwd_globals_ctor(&cwd_globals);
|
||||
#endif
|
||||
|
||||
#if defined(TSRM_WIN32) && defined(ZTS)
|
||||
cwd_mutex = tsrm_mutex_alloc();
|
||||
#endif
|
||||
}
|
||||
@@ -187,14 +192,14 @@ CWD_API void virtual_cwd_shutdown(void)
|
||||
#ifndef ZTS
|
||||
cwd_globals_dtor(&cwd_globals);
|
||||
#endif
|
||||
#if defined(ZEND_WIN32) && defined(ZTS)
|
||||
#if defined(TSRM_WIN32) && defined(ZTS)
|
||||
tsrm_mutex_free(cwd_mutex);
|
||||
#endif
|
||||
|
||||
free(main_cwd_state.cwd); /* Don't use CWD_STATE_FREE because the non global states will probably use emalloc()/efree() */
|
||||
}
|
||||
|
||||
CWD_API char *virtual_getcwd_ex(int *length)
|
||||
CWD_API char *virtual_getcwd_ex(size_t *length)
|
||||
{
|
||||
cwd_state *state;
|
||||
CWDLS_FETCH();
|
||||
@@ -211,7 +216,7 @@ CWD_API char *virtual_getcwd_ex(int *length)
|
||||
return retval;
|
||||
}
|
||||
|
||||
#ifdef ZEND_WIN32
|
||||
#ifdef TSRM_WIN32
|
||||
/* If we have something like C: */
|
||||
if (state->cwd_length == 2 && state->cwd[state->cwd_length-1] == ':') {
|
||||
char *retval;
|
||||
@@ -262,15 +267,15 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
|
||||
int ret = 0;
|
||||
int copy_amount = -1;
|
||||
char *free_path;
|
||||
zend_bool is_absolute = 0;
|
||||
#ifndef ZEND_WIN32
|
||||
unsigned char is_absolute = 0;
|
||||
#ifndef TSRM_WIN32
|
||||
char resolved_path[MAXPATHLEN];
|
||||
#endif
|
||||
|
||||
if (path_length == 0)
|
||||
return (0);
|
||||
|
||||
#ifndef ZEND_WIN32
|
||||
#if !defined(TSRM_WIN32) && !defined(__BEOS__)
|
||||
if (IS_ABSOLUTE_PATH(path, path_length)) {
|
||||
if (realpath(path, resolved_path)) {
|
||||
path = resolved_path;
|
||||
@@ -297,7 +302,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
|
||||
free(tmp);
|
||||
}
|
||||
#endif
|
||||
free_path = path_copy = estrndup(path, path_length);
|
||||
free_path = path_copy = tsrm_strndup(path, path_length);
|
||||
|
||||
old_state = (cwd_state *) malloc(sizeof(cwd_state));
|
||||
CWD_STATE_COPY(old_state, state);
|
||||
@@ -307,7 +312,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
|
||||
if (IS_ABSOLUTE_PATH(path_copy, path_length)) {
|
||||
copy_amount = COPY_WHEN_ABSOLUTE;
|
||||
is_absolute = 1;
|
||||
#ifdef ZEND_WIN32
|
||||
#ifdef TSRM_WIN32
|
||||
} else if(IS_SLASH(path_copy[0])) {
|
||||
copy_amount = 2;
|
||||
#endif
|
||||
@@ -328,7 +333,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
|
||||
}
|
||||
|
||||
|
||||
ptr = php_strtok_r(path_copy, TOKENIZER_STRING, &tok);
|
||||
ptr = tsrm_strtok_r(path_copy, TOKENIZER_STRING, &tok);
|
||||
while (ptr) {
|
||||
ptr_length = strlen(ptr);
|
||||
|
||||
@@ -359,7 +364,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
|
||||
memcpy(&state->cwd[state->cwd_length+1], ptr, ptr_length+1);
|
||||
state->cwd_length += (ptr_length+1);
|
||||
}
|
||||
ptr = php_strtok_r(NULL, TOKENIZER_STRING, &tok);
|
||||
ptr = tsrm_strtok_r(NULL, TOKENIZER_STRING, &tok);
|
||||
}
|
||||
|
||||
if (state->cwd_length == COPY_WHEN_ABSOLUTE) {
|
||||
@@ -382,7 +387,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
|
||||
|
||||
free(old_state);
|
||||
|
||||
efree(free_path);
|
||||
free(free_path);
|
||||
#if VIRTUAL_CWD_DEBUG
|
||||
fprintf (stderr, "virtual_file_ex() = %s\n",state->cwd);
|
||||
#endif
|
||||
@@ -396,7 +401,7 @@ CWD_API int virtual_chdir(const char *path)
|
||||
return virtual_file_ex(&CWDG(cwd), path, php_is_dir_ok)?-1:0;
|
||||
}
|
||||
|
||||
CWD_API int virtual_chdir_file(const char *path)
|
||||
CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path))
|
||||
{
|
||||
int length = strlen(path);
|
||||
char *temp;
|
||||
@@ -409,20 +414,22 @@ CWD_API int virtual_chdir_file(const char *path)
|
||||
}
|
||||
|
||||
if (length == -1) {
|
||||
return virtual_chdir(path);
|
||||
/* No directory only file name */
|
||||
errno = ENOENT;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (length == COPY_WHEN_ABSOLUTE && IS_ABSOLUTE_PATH(path, length+1)) { /* Also use trailing slash if this is absolute */
|
||||
length++;
|
||||
}
|
||||
temp = (char *) malloc(length+1);
|
||||
temp = (char *) tsrm_do_alloca(length+1);
|
||||
memcpy(temp, path, length);
|
||||
temp[length] = 0;
|
||||
#if VIRTUAL_CWD_DEBUG
|
||||
fprintf (stderr, "Changing directory to %s\n", temp);
|
||||
#endif
|
||||
retval = virtual_chdir(temp);
|
||||
free(temp);
|
||||
retval = p_chdir(temp);
|
||||
tsrm_free_alloca(temp);
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -435,7 +442,7 @@ CWD_API char *virtual_realpath(const char *path, char *real_path)
|
||||
CWD_STATE_COPY(&new_state, &CWDG(cwd));
|
||||
retval = virtual_file_ex(&new_state, path, NULL);
|
||||
|
||||
if(retval) {
|
||||
if (!retval) {
|
||||
int len = new_state.cwd_length>MAXPATHLEN-1?MAXPATHLEN-1:new_state.cwd_length;
|
||||
memcpy(real_path, new_state.cwd, len);
|
||||
real_path[len] = '\0';
|
||||
@@ -445,18 +452,24 @@ CWD_API char *virtual_realpath(const char *path, char *real_path)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
CWD_API int virtual_filepath(const char *path, char **filepath)
|
||||
CWD_API int virtual_filepath_ex(const char *path, char **filepath, verify_path_func verify_path)
|
||||
{
|
||||
cwd_state new_state;
|
||||
int retval;
|
||||
CWDLS_FETCH();
|
||||
|
||||
CWD_STATE_COPY(&new_state, &CWDG(cwd));
|
||||
retval = virtual_file_ex(&new_state, path, php_is_file_ok);
|
||||
retval = virtual_file_ex(&new_state, path, verify_path);
|
||||
|
||||
*filepath = new_state.cwd;
|
||||
|
||||
return retval;
|
||||
|
||||
}
|
||||
|
||||
CWD_API int virtual_filepath(const char *path, char **filepath)
|
||||
{
|
||||
return virtual_filepath_ex(path, filepath, php_is_file_ok);
|
||||
}
|
||||
|
||||
CWD_API FILE *virtual_fopen(const char *path, const char *mode)
|
||||
@@ -510,7 +523,7 @@ CWD_API int virtual_chmod(const char *filename, mode_t mode)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifndef PHP_WIN32
|
||||
#ifndef TSRM_WIN32
|
||||
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group)
|
||||
{
|
||||
cwd_state new_state;
|
||||
@@ -567,6 +580,28 @@ CWD_API int virtual_creat(const char *path, mode_t mode)
|
||||
return f;
|
||||
}
|
||||
|
||||
CWD_API int virtual_rename(char *oldname, char *newname)
|
||||
{
|
||||
cwd_state old_state;
|
||||
cwd_state new_state;
|
||||
int retval;
|
||||
CWDLS_FETCH();
|
||||
|
||||
CWD_STATE_COPY(&old_state, &CWDG(cwd));
|
||||
virtual_file_ex(&old_state, oldname, NULL);
|
||||
oldname = old_state.cwd;
|
||||
|
||||
CWD_STATE_COPY(&new_state, &CWDG(cwd));
|
||||
virtual_file_ex(&new_state, newname, NULL);
|
||||
newname = new_state.cwd;
|
||||
|
||||
retval = rename(oldname, newname);
|
||||
|
||||
CWD_STATE_FREE(&old_state);
|
||||
CWD_STATE_FREE(&new_state);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
CWD_API int virtual_stat(const char *path, struct stat *buf)
|
||||
{
|
||||
@@ -583,7 +618,7 @@ CWD_API int virtual_stat(const char *path, struct stat *buf)
|
||||
return retval;
|
||||
}
|
||||
|
||||
#ifndef ZEND_WIN32
|
||||
#ifndef TSRM_WIN32
|
||||
|
||||
CWD_API int virtual_lstat(const char *path, struct stat *buf)
|
||||
{
|
||||
@@ -626,8 +661,11 @@ CWD_API int virtual_mkdir(const char *pathname, mode_t mode)
|
||||
CWD_STATE_COPY(&new_state, &CWDG(cwd));
|
||||
virtual_file_ex(&new_state, pathname, NULL);
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
retval = mkdir(new_state.cwd);
|
||||
#else
|
||||
retval = mkdir(new_state.cwd, mode);
|
||||
|
||||
#endif
|
||||
CWD_STATE_FREE(&new_state);
|
||||
return retval;
|
||||
}
|
||||
@@ -647,6 +685,10 @@ CWD_API int virtual_rmdir(const char *pathname)
|
||||
return retval;
|
||||
}
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
DIR *opendir(const char *name);
|
||||
#endif
|
||||
|
||||
CWD_API DIR *virtual_opendir(const char *pathname)
|
||||
{
|
||||
cwd_state new_state;
|
||||
@@ -662,7 +704,7 @@ CWD_API DIR *virtual_opendir(const char *pathname)
|
||||
return retval;
|
||||
}
|
||||
|
||||
#ifndef ZEND_WIN32
|
||||
#ifndef TSRM_WIN32
|
||||
|
||||
CWD_API FILE *virtual_popen(const char *command, const char *type)
|
||||
{
|
||||
@@ -693,7 +735,11 @@ CWD_API FILE *virtual_popen(const char *command, const char *type)
|
||||
*ptr++ = ' ';
|
||||
|
||||
memcpy(ptr, command, command_length+1);
|
||||
#ifdef TSRM_WIN32
|
||||
retval = _popen(command_line, type);
|
||||
#else
|
||||
retval = popen(command_line, type);
|
||||
#endif
|
||||
free(command_line);
|
||||
return retval;
|
||||
}
|
||||
@@ -720,7 +766,7 @@ CWD_API FILE *virtual_popen(const char *command, const char *type)
|
||||
#endif
|
||||
|
||||
chdir(CWDG(cwd).cwd);
|
||||
retval = popen(command, type);
|
||||
retval = _popen(command, type);
|
||||
chdir(prev_cwd);
|
||||
|
||||
#ifdef ZTS
|
||||
@@ -732,67 +778,6 @@ CWD_API FILE *virtual_popen(const char *command, const char *type)
|
||||
|
||||
#endif
|
||||
|
||||
/* taken from Apache 1.3 */
|
||||
|
||||
CWD_API void virtual_real_chdir_file(const char *file)
|
||||
{
|
||||
const char *x;
|
||||
char buf[4096];
|
||||
|
||||
x = strrchr(file, '/');
|
||||
if (x == NULL) {
|
||||
chdir(file);
|
||||
}
|
||||
else if (x - file < sizeof(buf) - 1) {
|
||||
memcpy(buf, file, x - file);
|
||||
buf[x - file] = '\0';
|
||||
chdir(buf);
|
||||
}
|
||||
/* XXX: well, this is a silly function, no method of reporting an
|
||||
* error... ah well. */
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
main(void)
|
||||
{
|
||||
cwd_state state;
|
||||
int length;
|
||||
|
||||
#ifndef ZEND_WIN32
|
||||
state.cwd = malloc(PATH_MAX + 1);
|
||||
state.cwd_length = PATH_MAX;
|
||||
|
||||
while (getcwd(state.cwd, state.cwd_length) == NULL && errno == ERANGE) {
|
||||
state.cwd_length <<= 1;
|
||||
state.cwd = realloc(state.cwd, state.cwd_length + 1);
|
||||
}
|
||||
#else
|
||||
state.cwd = strdup("d:\\foo\\bar");
|
||||
#endif
|
||||
state.cwd_length = strlen(state.cwd);
|
||||
|
||||
#define T(a) \
|
||||
printf("[%s] $ cd %s\n", virtual_getcwd_ex(&state, &length), a); \
|
||||
virtual_chdir(&state, strdup(a)); \
|
||||
printf("new path is %s\n", virtual_getcwd_ex(&state, &length));
|
||||
|
||||
T("..")
|
||||
T("...")
|
||||
T("foo")
|
||||
T("../bar")
|
||||
T(".../slash/../dot")
|
||||
T("//baz")
|
||||
T("andi/././././././///bar")
|
||||
T("../andi/../bar")
|
||||
T("...foo")
|
||||
T("D:/flash/zone")
|
||||
T("../foo/bar/../baz")
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
@@ -0,0 +1,212 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP version 4.0 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.02 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.php.net/license/2_02.txt. |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Sascha Schumann <sascha@schumann.cx> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
#ifndef VIRTUAL_CWD_H
|
||||
#define VIRTUAL_CWD_H
|
||||
|
||||
#include "tsrm_config_common.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef HAVE_UTIME_H
|
||||
#include <utime.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDARG_H
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
|
||||
#ifndef TSRM_WIN32
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
#include "readdir.h"
|
||||
#include <sys/utime.h>
|
||||
/* mode_t isn't defined on Windows */
|
||||
typedef unsigned short mode_t;
|
||||
|
||||
#define DEFAULT_SLASH '\\'
|
||||
#define IS_SLASH(c) ((c) == '/' || (c) == '\\')
|
||||
#define COPY_WHEN_ABSOLUTE 2
|
||||
#define IS_ABSOLUTE_PATH(path, len) \
|
||||
(len >= 2 && isalpha(path[0]) && path[1] == ':')
|
||||
|
||||
#else
|
||||
#ifdef HAVE_DIRENT_H
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
|
||||
#define DEFAULT_SLASH '/'
|
||||
#define IS_SLASH(c) ((c) == '/')
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef COPY_WHEN_ABSOLUTE
|
||||
#define COPY_WHEN_ABSOLUTE 0
|
||||
#endif
|
||||
|
||||
#ifndef IS_ABSOLUTE_PATH
|
||||
#define IS_ABSOLUTE_PATH(path, len) \
|
||||
(IS_SLASH(path[0]))
|
||||
#endif
|
||||
|
||||
#ifdef TSRM_EXPORTS
|
||||
#define CWD_EXPORTS
|
||||
#endif
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
# ifdef CWD_EXPORTS
|
||||
# define CWD_API __declspec(dllexport)
|
||||
# else
|
||||
# define CWD_API __declspec(dllimport)
|
||||
# endif
|
||||
#else
|
||||
#define CWD_API
|
||||
#endif
|
||||
|
||||
typedef struct _cwd_state {
|
||||
char *cwd;
|
||||
int cwd_length;
|
||||
} cwd_state;
|
||||
|
||||
typedef int (*verify_path_func)(const cwd_state *);
|
||||
|
||||
CWD_API void virtual_cwd_startup(void);
|
||||
CWD_API void virtual_cwd_shutdown(void);
|
||||
CWD_API char *virtual_getcwd_ex(size_t *length);
|
||||
CWD_API char *virtual_getcwd(char *buf, size_t size);
|
||||
CWD_API int virtual_chdir(const char *path);
|
||||
CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path));
|
||||
CWD_API int virtual_filepath(const char *path, char **filepath);
|
||||
CWD_API int virtual_filepath_ex(const char *path, char **filepath, verify_path_func verify_path);
|
||||
CWD_API char *virtual_realpath(const char *path, char *real_path);
|
||||
CWD_API FILE *virtual_fopen(const char *path, const char *mode);
|
||||
CWD_API int virtual_open(const char *path, int flags, ...);
|
||||
CWD_API int virtual_creat(const char *path, mode_t mode);
|
||||
CWD_API int virtual_rename(char *oldname, char *newname);
|
||||
CWD_API int virtual_stat(const char *path, struct stat *buf);
|
||||
#ifndef TSRM_WIN32
|
||||
CWD_API int virtual_lstat(const char *path, struct stat *buf);
|
||||
#endif
|
||||
CWD_API int virtual_unlink(const char *path);
|
||||
CWD_API int virtual_mkdir(const char *pathname, mode_t mode);
|
||||
CWD_API int virtual_rmdir(const char *pathname);
|
||||
CWD_API DIR *virtual_opendir(const char *pathname);
|
||||
CWD_API FILE *virtual_popen(const char *command, const char *type);
|
||||
#if HAVE_UTIME
|
||||
CWD_API int virtual_utime(const char *filename, struct utimbuf *buf);
|
||||
#endif
|
||||
CWD_API int virtual_chmod(const char *filename, mode_t mode);
|
||||
#ifndef TSRM_WIN32
|
||||
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group);
|
||||
#endif
|
||||
|
||||
CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func verify_path);
|
||||
|
||||
typedef struct _virtual_cwd_globals {
|
||||
cwd_state cwd;
|
||||
} virtual_cwd_globals;
|
||||
|
||||
#ifdef ZTS
|
||||
# define CWDLS_D virtual_cwd_globals *cwd_globals
|
||||
# define CWDLS_DC , CWDLS_D
|
||||
# define CWDLS_C cwd_globals
|
||||
# define CWDLS_CC , CWDLS_C
|
||||
# define CWDG(v) (cwd_globals->v)
|
||||
# define CWDLS_FETCH() virtual_cwd_globals *cwd_globals = ts_resource(cwd_globals_id)
|
||||
#else
|
||||
# define CWDLS_D void
|
||||
# define CWDLS_DC
|
||||
# define CWDLS_C
|
||||
# define CWDLS_CC
|
||||
# define CWDG(v) (cwd_globals.v)
|
||||
# define CWDLS_FETCH()
|
||||
#endif
|
||||
|
||||
/* The actual macros to be used in programs using TSRM
|
||||
* If the program defines VIRTUAL_DIR it will use the
|
||||
* virtual_* functions
|
||||
*/
|
||||
|
||||
#ifdef VIRTUAL_DIR
|
||||
|
||||
#define V_GETCWD(buff, size) virtual_getcwd(buff,size)
|
||||
#define V_FOPEN(path, mode) virtual_fopen(path, mode)
|
||||
/* The V_OPEN macro will need to be used as V_OPEN((path, flags, ...)) */
|
||||
#define V_OPEN(open_args) virtual_open open_args
|
||||
#define V_CREAT(path, mode) virtual_creat(path, mode)
|
||||
#define V_CHDIR(path) virtual_chdir(path)
|
||||
#define V_CHDIR_FILE(path) virtual_chdir_file(path, virtual_chdir)
|
||||
#define V_GETWD(buf)
|
||||
#define V_REALPATH(path,real_path) virtual_realpath(path,real_path)
|
||||
#define V_RENAME(oldname,newname) virtual_rename(oldname,newname)
|
||||
#define V_STAT(path, buff) virtual_stat(path, buff)
|
||||
#ifdef TSRM_WIN32
|
||||
#define V_LSTAT(path, buff) virtual_stat(path, buff)
|
||||
#else
|
||||
#define V_LSTAT(path, buff) virtual_lstat(path, buff)
|
||||
#endif
|
||||
#define V_UNLINK(path) virtual_unlink(path)
|
||||
#define V_MKDIR(pathname, mode) virtual_mkdir(pathname, mode)
|
||||
#define V_RMDIR(pathname) virtual_rmdir(pathname)
|
||||
#define V_OPENDIR(pathname) virtual_opendir(pathname)
|
||||
#define V_POPEN(command, type) virtual_popen(command, type)
|
||||
#if HAVE_UTIME
|
||||
#define V_UTIME(path,time) virtual_utime(path,time)
|
||||
#endif
|
||||
#define V_CHMOD(path,mode) virtual_chmod(path,mode)
|
||||
#ifndef TSRM_WIN32
|
||||
#define V_CHOWN(path,owner,group) virtual_chown(path,owner,group)
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#define V_GETCWD(buff, size) getcwd(buff,size)
|
||||
#define V_FOPEN(path, mode) fopen(path, mode)
|
||||
#define V_OPEN(open_args) open open_args
|
||||
#define V_CREAT(path, mode) creat(path, mode)
|
||||
#define V_RENAME(oldname,newname) rename(oldname,newname)
|
||||
#define V_CHDIR(path) chdir(path)
|
||||
#define V_CHDIR_FILE(path) virtual_chdir_file(path, chdir)
|
||||
#define V_GETWD(buf) getwd(buf)
|
||||
#define V_STAT(path, buff) stat(path, buff)
|
||||
#define V_LSTAT(path, buff) lstat(path, buff)
|
||||
#define V_UNLINK(path) unlink(path)
|
||||
#define V_MKDIR(pathname, mode) mkdir(pathname, mode)
|
||||
#define V_RMDIR(pathname) rmdir(pathname)
|
||||
#define V_OPENDIR(pathname) opendir(pathname)
|
||||
#define V_POPEN(command, type) popen(command, type)
|
||||
#define V_REALPATH(path,real_path) realpath(path,real_path)
|
||||
#if HAVE_UTIME
|
||||
#define V_UTIME(path,time) utime(path,time)
|
||||
#endif
|
||||
#define V_CHMOD(path,mode) chmod(path,mode)
|
||||
#ifndef TSRM_WIN32
|
||||
#define V_CHOWN(path,owner,group) chown(path,owner,group)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* VIRTUAL_CWD_H */
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
---------------------------------------------------------------------------
|
||||
The Zend License, version 0.92
|
||||
Copyright (C) 1999-2000 Zend Technologies Ltd.
|
||||
Copyright (C) 1999-2001 Zend Technologies Ltd.
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
The Zend scripting engine library is a product of Zend Technologies Ltd.
|
||||
|
||||
+37
-20
@@ -1,43 +1,60 @@
|
||||
## Process this file with automake to produce Makefile.in -*- makefile -*-
|
||||
|
||||
#CLEANFILES = zend-parser.c zend-parser.h zend-scanner.c zend-parser.output
|
||||
#CLEANFILES = zend_language_parser.c zend_language_parser.h zend_language_scanner.c zend_language_parser.output zend_ini_parser.c zend_ini_parser.h zend_ini_scanner.c zend_ini_parser.output
|
||||
|
||||
AUTOMAKE_OPTIONS=foreign
|
||||
EXTRA_LTLIBRARIES=libZend_cc.la libZend_c.la libZend_gcc.la
|
||||
noinst_LTLIBRARIES=$(ZEND_SCANNER) $(ZEND_GCC) libZend.la
|
||||
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_gcc_la_SOURCES=zend_gcc_inline.c
|
||||
libZend_cc_la_SOURCES=zend_language_scanner_cc.cc zend_ini_scanner_cc.cc
|
||||
libZend_c_la_SOURCES=zend_language_scanner.c zend_ini_scanner.c
|
||||
|
||||
libZend_la_SOURCES=\
|
||||
zend-parser.y \
|
||||
zend_language_parser.y \
|
||||
zend_ini_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_builtin_functions.c zend_sprintf.c
|
||||
zend_list.c zend_indent.c zend_builtin_functions.c zend_sprintf.c \
|
||||
zend_ini.c
|
||||
|
||||
libZend_la_LIBADD = $(ZEND_SCANNER) $(ZEND_GCC)
|
||||
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
|
||||
|
||||
$(libZend_la_OBJECTS) zend-scanner.lo zend-scanner-cc.lo: zend-parser.h
|
||||
$(libZend_la_OBJECTS) zend_language_scanner.lo zend_language_scanner_cc.lo: zend_language_parser.h
|
||||
|
||||
zend-scanner.c: $(srcdir)/zend-scanner.l
|
||||
$(LEX) -Pzend -o$@ -i $(srcdir)/zend-scanner.l
|
||||
zend_ini_scanner.lo zend_ini_scanner_cc.lo: zend_ini_parser.h
|
||||
|
||||
zend-scanner-cc.cc: $(srcdir)/zend-scanner.l
|
||||
$(LEX) -+ -B -i -S$(srcdir)/flex.skl -Pzend -o$@ $(srcdir)/zend-scanner.l
|
||||
# Language parser/scanner rules
|
||||
|
||||
zend-parser.h: zend-parser.c
|
||||
zend-parser.c: $(srcdir)/zend-parser.y
|
||||
$(YACC) -p zend -v -d $(srcdir)/zend-parser.y -o zend-parser.c
|
||||
zend_language_scanner.c: $(srcdir)/zend_language_scanner.l
|
||||
$(LEX) -Pzend -o$@ -i $(srcdir)/zend_language_scanner.l
|
||||
|
||||
zend_language_scanner_cc.cc: $(srcdir)/zend_language_scanner.l
|
||||
$(LEX) -+ -B -i -S$(srcdir)/flex.skl -Pzend -o$@ $(srcdir)/zend_language_scanner.l
|
||||
|
||||
zend_language_parser.h: zend_language_parser.c
|
||||
zend_language_parser.c: $(srcdir)/zend_language_parser.y
|
||||
$(YACC) -p zend -v -d $(srcdir)/zend_language_parser.y -o zend_language_parser.c
|
||||
|
||||
# INI parser/scanner rules
|
||||
|
||||
zend_ini_parser.c: $(srcdir)/zend_ini_parser.y
|
||||
$(YACC) -p ini_ -v -d $(srcdir)/zend_ini_parser.y -o zend_ini_parser.c
|
||||
|
||||
zend_ini_scanner.c: $(srcdir)/zend_ini_scanner.l
|
||||
$(LEX) -Pini_ -o$@ -i $(srcdir)/zend_ini_scanner.l
|
||||
|
||||
zend_ini_scanner_cc.cc: $(srcdir)/zend_ini_scanner.l
|
||||
$(LEX) -+ -B -i -S$(srcdir)/flex.skl -Pini_ -o$@ $(srcdir)/zend_ini_scanner.l
|
||||
zend_ini_parser.h: zend_ini_parser.c
|
||||
|
||||
depend:
|
||||
|
||||
|
||||
zend_execute.lo: $(srcdir)/zend_execute.c
|
||||
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(INLINE_CFLAGS) -c $(srcdir)/zend_execute.c
|
||||
|
||||
@@ -109,3 +109,4 @@ shamelessly lying about it. Here's why:
|
||||
This incompatability is due to the full variable reference
|
||||
within quoted strings feature added in Zend.
|
||||
|
||||
|
||||
+105
-47
@@ -107,14 +107,6 @@ LIB32=link.exe -lib
|
||||
# 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
|
||||
@@ -151,10 +143,6 @@ SOURCE=.\zend_extensions.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_gcc_inline.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_hash.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -167,6 +155,26 @@ SOURCE=.\zend_indent.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini_parser.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini_scanner.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_parser.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_scanner.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_list.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -207,15 +215,7 @@ 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"
|
||||
SOURCE=.\zend_modules.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
@@ -279,6 +279,18 @@ SOURCE=.\zend_indent.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_parser.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_scanner.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_list.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -307,23 +319,50 @@ SOURCE=.\zend_variables.h
|
||||
# PROP Default_Filter "y"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend-parser.y"
|
||||
SOURCE=.\zend_ini_parser.y
|
||||
|
||||
!IF "$(CFG)" == "Zend - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=.\zend_ini_parser.y
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y \
|
||||
|
||||
|
||||
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend_ini_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_parser.y"
|
||||
|
||||
!IF "$(CFG)" == "Zend - Win32 Release"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend-parser.y"
|
||||
InputPath=".\zend_language_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 \
|
||||
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y \
|
||||
|
||||
|
||||
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
@@ -331,17 +370,16 @@ BuildCmds= \
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend-parser.y"
|
||||
InputPath=".\zend_language_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 \
|
||||
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y \
|
||||
|
||||
|
||||
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
@@ -349,17 +387,16 @@ BuildCmds= \
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend-parser.y"
|
||||
InputPath=".\zend_language_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 \
|
||||
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y \
|
||||
|
||||
|
||||
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
@@ -372,35 +409,56 @@ BuildCmds= \
|
||||
# PROP Default_Filter "l"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend-scanner.l"
|
||||
SOURCE=.\zend_ini_scanner.l
|
||||
|
||||
!IF "$(CFG)" == "Zend - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=.\zend_ini_scanner.l
|
||||
|
||||
"zend_ini_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.c zend_ini_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_scanner.l"
|
||||
|
||||
!IF "$(CFG)" == "Zend - Win32 Release"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend-scanner.l"
|
||||
InputPath=".\zend_language_scanner.l"
|
||||
|
||||
"zend-scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -i -Pzend -ozend-scanner.c zend-scanner.l
|
||||
"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -i -Pzend -ozend_language_scanner.c zend_language_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend-scanner.l"
|
||||
InputPath=".\zend_language_scanner.l"
|
||||
|
||||
"zend-scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -i -Pzend -ozend-scanner.c zend-scanner.l
|
||||
"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -i -Pzend -ozend_language_scanner.c zend_language_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend-scanner.l"
|
||||
InputPath=".\zend_language_scanner.l"
|
||||
|
||||
"zend-scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -i -Pzend -ozend-scanner.c zend-scanner.l
|
||||
"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -i -Pzend -ozend_language_scanner.c zend_language_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
|
||||
+8
-22
@@ -6,8 +6,8 @@ if test "$YACC" != "bison -y"; then
|
||||
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}).)
|
||||
if test "${1}" = "1" -a "${2}" -lt "28"; then
|
||||
AC_MSG_WARN(You will need bison 1.28 if you want to regenerate the Zend parser (found ${1}.${2}).)
|
||||
fi
|
||||
AC_MSG_RESULT(${1}.${2} (ok))
|
||||
fi
|
||||
@@ -19,7 +19,7 @@ AC_DEFUN(LIBZEND_BASIC_CHECKS,[
|
||||
AC_REQUIRE([AC_PROG_YACC])
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_PROG_CC_C_O])
|
||||
AC_REQUIRE([AM_PROG_LEX])
|
||||
AC_REQUIRE([AC_PROG_LEX])
|
||||
AC_REQUIRE([AC_HEADER_STDC])
|
||||
|
||||
LIBZEND_BISON_CHECK
|
||||
@@ -62,7 +62,7 @@ dnl Checks for library functions.
|
||||
AC_FUNC_VPRINTF
|
||||
AC_FUNC_MEMCMP
|
||||
AC_FUNC_ALLOCA
|
||||
AC_CHECK_FUNCS(memcpy strdup getpid kill strtod strtol finite)
|
||||
AC_CHECK_FUNCS(memcpy strdup getpid kill strtod strtol finite fpclass)
|
||||
AC_ZEND_BROKEN_SPRINTF
|
||||
|
||||
AC_CHECK_FUNCS(finite isfinite isinf isnan)
|
||||
@@ -101,13 +101,6 @@ AC_ARG_ENABLE(debug,
|
||||
|
||||
AC_DEFUN(LIBZEND_OTHER_CHECKS,[
|
||||
|
||||
AC_ARG_ENABLE(c9x-inline,
|
||||
[ --enable-c9x-inline Enable C9x-inline semantics],[
|
||||
ZEND_C9X_INLINE=$enableval
|
||||
],[
|
||||
ZEND_C9X_INLINE=no
|
||||
])
|
||||
|
||||
AC_ARG_ENABLE(experimental-zts,
|
||||
[ --enable-experimental-zts This will most likely break your build],[
|
||||
ZEND_EXPERIMENTAL_ZTS=$enableval
|
||||
@@ -130,9 +123,6 @@ AC_ARG_ENABLE(memory-limit,
|
||||
ZEND_MEMORY_LIMIT=no
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING(whether to enable C9x-inline semantics)
|
||||
AC_MSG_RESULT($ZEND_C9X_INLINE)
|
||||
|
||||
AC_MSG_CHECKING(whether to enable experimental ZTS)
|
||||
AC_MSG_RESULT($ZEND_EXPERIMENTAL_ZTS)
|
||||
|
||||
@@ -148,6 +138,9 @@ 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"
|
||||
if test "$CFLAGS" = "-g -O2"; then
|
||||
CFLAGS=-g
|
||||
fi
|
||||
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"
|
||||
@@ -166,13 +159,6 @@ else
|
||||
ZEND_SCANNER_TYPE=c
|
||||
fi
|
||||
|
||||
if test "$ZEND_C9X_INLINE" = "yes"; then
|
||||
AC_DEFINE(C9X_INLINE_SEMANTICS, 1, [whether to enable C9x-inline semantics])
|
||||
else
|
||||
ZEND_GCC=libZend_gcc.la
|
||||
AC_SUBST(ZEND_GCC)
|
||||
fi
|
||||
|
||||
ZEND_SCANNER="libZend_${ZEND_SCANNER_TYPE}.la"
|
||||
|
||||
if test "$ZEND_MEMORY_LIMIT" = "yes"; then
|
||||
@@ -183,7 +169,7 @@ fi
|
||||
|
||||
changequote({,})
|
||||
if test -n "$GCC" && test "$ZEND_INLINE_OPTIMIZATION" != "yes"; then
|
||||
INLINE_CFLAGS=`echo $ac_n "$CFLAGS $ac_c" | sed s/-O[0-9]*//`
|
||||
INLINE_CFLAGS=`echo $ac_n "$CFLAGS $ac_c" | sed s/-O[0-9s]*//`
|
||||
else
|
||||
INLINE_CFLAGS="$CFLAGS"
|
||||
fi
|
||||
|
||||
+6
-6
@@ -30,7 +30,7 @@
|
||||
".\zend_config.w32.h"\
|
||||
".\zend_execute.h"\
|
||||
".\zend_llist.h"\
|
||||
".\modules.h"\
|
||||
".\zend_modules.h"\
|
||||
".\zend_operators.h"\
|
||||
".\zend_ptr_stack.h"\
|
||||
".\zend_stack.h"\
|
||||
@@ -63,7 +63,7 @@
|
||||
".\zend_constants.h"\
|
||||
".\zend_execute.h"\
|
||||
".\zend_llist.h"\
|
||||
".\modules.h"\
|
||||
".\zend_modules.h"\
|
||||
".\zend_operators.h"\
|
||||
".\zend_ptr_stack.h"\
|
||||
".\zend_stack.h"\
|
||||
@@ -86,7 +86,7 @@
|
||||
".\zend_llist.h"\
|
||||
".\zend_ptr_stack.h"\
|
||||
".\zend_stack.h"\
|
||||
".\zend-parser.tab.h"\
|
||||
".\zend_language_parser.tab.h"\
|
||||
".\zend.h"\
|
||||
".\zend_errors.h"\
|
||||
".\zend_globals.h"\
|
||||
@@ -110,7 +110,7 @@
|
||||
".\zend_config.w32.h"\
|
||||
".\zend_execute.h"\
|
||||
".\zend_llist.h"\
|
||||
".\modules.h"\
|
||||
".\zend_modules.h"\
|
||||
".\zend_operators.h"\
|
||||
".\zend_ptr_stack.h"\
|
||||
".\zend_stack.h"\
|
||||
@@ -168,7 +168,7 @@
|
||||
".\zend_constants.h"\
|
||||
".\zend_execute.h"\
|
||||
".\zend_llist.h"\
|
||||
".\modules.h"\
|
||||
".\zend_modules.h"\
|
||||
".\zend_ptr_stack.h"\
|
||||
".\zend_stack.h"\
|
||||
".\zend_variables.h"\
|
||||
@@ -200,7 +200,7 @@
|
||||
".\zend_constants.h"\
|
||||
".\zend_execute.h"\
|
||||
".\zend_llist.h"\
|
||||
".\modules.h"\
|
||||
".\zend_modules.h"\
|
||||
".\zend_operators.h"\
|
||||
".\zend_ptr_stack.h"\
|
||||
".\zend_stack.h"\
|
||||
|
||||
+245
-52
@@ -4,7 +4,7 @@
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
CFG=ZendTS - Win32 Release_TS_inline
|
||||
CFG=ZendTS - Win32 Release_TSDbg
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
@@ -13,13 +13,14 @@ CFG=ZendTS - Win32 Release_TS_inline
|
||||
!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 NMAKE /f "ZendTS.mak" CFG="ZendTS - Win32 Release_TSDbg"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "ZendTS - Win32 Release_TS" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "ZendTS - Win32 Debug_TS" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "ZendTS - Win32 Release_TS_inline" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "ZendTS - Win32 Release_TSDbg" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
@@ -40,7 +41,7 @@ RSC=rc.exe
|
||||
# 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 ZEND_DEBUG=0 /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x40d /d "NDebug_TS"
|
||||
# ADD RSC /l 0x40d /d "NDebug_TS"
|
||||
@@ -62,7 +63,7 @@ LIB32=link.exe -lib
|
||||
# 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 ZEND_DEBUG=1 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_Debug_TS" /D ZEND_DEBUG=1 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x40d /d "_Debug_TS"
|
||||
# ADD RSC /l 0x40d /d "_Debug_TS"
|
||||
BSC32=bscmake.exe
|
||||
@@ -84,7 +85,30 @@ LIB32=link.exe -lib
|
||||
# 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 ZEND_DEBUG=0 /D "ZEND_WIN32_FORCE_INLINE" /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D "ZEND_WIN32_FORCE_INLINE" /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x40d /d "NDebug_TS"
|
||||
# ADD RSC /l 0x40d /d "NDebug_TS"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Output_Dir "ZendTS___Win32_Release_TSDbg"
|
||||
# PROP BASE Intermediate_Dir "ZendTS___Win32_Release_TSDbg"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Output_Dir "Release_TSDbg"
|
||||
# PROP Intermediate_Dir "Release_TSDbg"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
|
||||
# SUBTRACT BASE CPP /YX
|
||||
# ADD CPP /nologo /MD /W3 /GX /Zi /Od /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x40d /d "NDebug_TS"
|
||||
# ADD RSC /l 0x40d /d "NDebug_TS"
|
||||
@@ -102,19 +126,12 @@ LIB32=link.exe -lib
|
||||
# Name "ZendTS - Win32 Release_TS"
|
||||
# Name "ZendTS - Win32 Debug_TS"
|
||||
# Name "ZendTS - Win32 Release_TS_inline"
|
||||
# Name "ZendTS - Win32 Release_TSDbg"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# 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
|
||||
@@ -155,10 +172,6 @@ SOURCE=.\zend_extensions.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_gcc_inline.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_hash.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -171,6 +184,26 @@ SOURCE=.\zend_indent.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini_parser.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini_scanner.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_parser.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_scanner.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_list.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -211,15 +244,7 @@ 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"
|
||||
SOURCE=.\zend_modules.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
@@ -295,6 +320,30 @@ SOURCE=.\zend_indent.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini_parser.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini_scanner.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_istdiostream.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_parser.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_scanner.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_list.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -323,23 +372,22 @@ SOURCE=.\zend_variables.h
|
||||
# PROP Default_Filter "y"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend-parser.y"
|
||||
SOURCE=.\zend_ini_parser.y
|
||||
|
||||
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend-parser.y"
|
||||
InputPath=.\zend_ini_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 \
|
||||
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y \
|
||||
|
||||
|
||||
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
"$(InputDir)\zend_ini_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
@@ -347,17 +395,16 @@ BuildCmds= \
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend-parser.y"
|
||||
InputPath=.\zend_ini_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 \
|
||||
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y \
|
||||
|
||||
|
||||
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
"$(InputDir)\zend_ini_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
@@ -365,17 +412,106 @@ BuildCmds= \
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend-parser.y"
|
||||
InputPath=.\zend_ini_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 \
|
||||
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y \
|
||||
|
||||
|
||||
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
"$(InputDir)\zend_ini_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=.\zend_ini_parser.y
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y
|
||||
|
||||
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend_ini_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_parser.y"
|
||||
|
||||
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend_language_parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y \
|
||||
|
||||
|
||||
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend_language_parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y \
|
||||
|
||||
|
||||
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend_language_parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y \
|
||||
|
||||
|
||||
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend_language_parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y
|
||||
|
||||
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
@@ -388,35 +524,92 @@ BuildCmds= \
|
||||
# PROP Default_Filter "l"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend-scanner.l"
|
||||
SOURCE=.\zend_ini_scanner.l
|
||||
|
||||
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend-scanner.l"
|
||||
InputPath=.\zend_ini_scanner.l
|
||||
|
||||
"zend-scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -+ -i -Sflex.skl -Pzend -ozend-scanner.cpp zend-scanner.l
|
||||
"zend_ini_scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -+ -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.cpp zend_ini_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend-scanner.l"
|
||||
InputPath=.\zend_ini_scanner.l
|
||||
|
||||
"zend-scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -+ -B -i -Sflex.skl -Pzend -ozend-scanner.cpp zend-scanner.l
|
||||
"zend_ini_scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -+ -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.cpp zend_ini_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend-scanner.l"
|
||||
InputPath=.\zend_ini_scanner.l
|
||||
|
||||
"zend-scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -+ -i -Sflex.skl -Pzend -ozend-scanner.cpp zend-scanner.l
|
||||
"zend_ini_scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -+ -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.cpp zend_ini_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=.\zend_ini_scanner.l
|
||||
|
||||
"zend_ini_scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -+ -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.cpp zend_ini_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_scanner.l"
|
||||
|
||||
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend_language_scanner.l"
|
||||
|
||||
"zend_language_scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -+ -B -i -Sflex.skl -Pzend -ozend_language_scanner.cpp zend_language_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend_language_scanner.l"
|
||||
|
||||
"zend_language_scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -+ -B -i -Sflex.skl -Pzend -ozend_language_scanner.cpp zend_language_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend_language_scanner.l"
|
||||
|
||||
"zend_language_scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -+ -B -i -Sflex.skl -Pzend -ozend_language_scanner.cpp zend_language_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend_language_scanner.l"
|
||||
|
||||
"zend_language_scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -+ -B -i -Sflex.skl -Pzend -ozend_language_scanner.cpp zend_language_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
|
||||
+8
-4
@@ -3,10 +3,6 @@
|
||||
|
||||
@TOP@
|
||||
|
||||
/* these are defined by automake */
|
||||
#undef PACKAGE
|
||||
#undef VERSION
|
||||
|
||||
#undef uint
|
||||
#undef ulong
|
||||
|
||||
@@ -23,6 +19,10 @@
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_IEEEFP_H
|
||||
# include <ieeefp.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#else
|
||||
@@ -41,6 +41,8 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
#define zend_isnan(a) isnan(a)
|
||||
#elif defined(NAN)
|
||||
#define zend_isnan(a) (((a)==NAN)?1:0)
|
||||
#elif defined(HAVE_FPCLASS)
|
||||
#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
|
||||
#else
|
||||
#define zend_isnan(a) 0
|
||||
#endif
|
||||
@@ -50,6 +52,8 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
#elif defined(INFINITY)
|
||||
/* Might not work, but is required by ISO C99 */
|
||||
#define zend_isinf(a) (((a)==INFINITY)?1:0)
|
||||
#elif defined(HAVE_FPCLASS)
|
||||
#define zend_isinf(a) ((fpclass(a) == FP_PINF) || (fpclass(a) == FP_NINF))
|
||||
#else
|
||||
#define zend_isinf(a) 0
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ dnl $Id$
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_INIT(zend.c)
|
||||
AM_INIT_AUTOMAKE(zend, 0.80A)
|
||||
AM_INIT_AUTOMAKE(zend, 0.80A, nodefine)
|
||||
AM_CONFIG_HEADER(zend_config.h)
|
||||
AM_SANITY_CHECK
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
/* A lexical scanner generated by flex */
|
||||
/* A Lexical scanner generated by flex */
|
||||
|
||||
/* Scanner skeleton version:
|
||||
* $Header$
|
||||
|
||||
@@ -1,725 +0,0 @@
|
||||
%{
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| 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> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/*
|
||||
* LALR shift/reduce conflicts and how they are resolved:
|
||||
*
|
||||
* - 2 shift/reduce conflicts due to the dangeling elseif/else ambiguity. Solved by shift.
|
||||
* - 1 shift/reduce conflict due to arrays within encapsulated strings. Solved by shift.
|
||||
* - 1 shift/reduce conflict due to objects within encapsulated strings. Solved by shift.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "zend_compile.h"
|
||||
#include "zend.h"
|
||||
#include "zend_list.h"
|
||||
#include "zend_globals.h"
|
||||
#include "zend_API.h"
|
||||
|
||||
#define YYERROR_VERBOSE
|
||||
#define YYSTYPE znode
|
||||
#ifdef ZTS
|
||||
# define YYPARSE_PARAM compiler_globals
|
||||
# define YYLEX_PARAM compiler_globals
|
||||
#endif
|
||||
|
||||
|
||||
%}
|
||||
|
||||
%pure_parser
|
||||
%expect 4
|
||||
|
||||
%left T_INCLUDE T_INCLUDE_ONCE T_EVAL T_REQUIRE T_REQUIRE_ONCE
|
||||
%left ','
|
||||
%left T_LOGICAL_OR
|
||||
%left T_LOGICAL_XOR
|
||||
%left T_LOGICAL_AND
|
||||
%right T_PRINT
|
||||
%left '=' T_PLUS_EQUAL T_MINUS_EQUAL T_MUL_EQUAL T_DIV_EQUAL T_CONCAT_EQUAL T_MOD_EQUAL T_AND_EQUAL T_OR_EQUAL T_XOR_EQUAL T_SL_EQUAL T_SR_EQUAL
|
||||
%left '?' ':'
|
||||
%left T_BOOLEAN_OR
|
||||
%left T_BOOLEAN_AND
|
||||
%left '|'
|
||||
%left '^'
|
||||
%left '&'
|
||||
%nonassoc T_IS_EQUAL T_IS_NOT_EQUAL T_IS_IDENTICAL T_IS_NOT_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 T_BOOL_CAST T_UNSET_CAST '@'
|
||||
%right '['
|
||||
%nonassoc T_NEW
|
||||
%token T_EXIT
|
||||
%token T_IF
|
||||
%left T_ELSEIF
|
||||
%left T_ELSE
|
||||
%left T_ENDIF
|
||||
%token T_LNUMBER
|
||||
%token T_DNUMBER
|
||||
%token T_STRING
|
||||
%token T_STRING_VARNAME
|
||||
%token T_VARIABLE
|
||||
%token T_NUM_STRING
|
||||
%token T_INLINE_HTML
|
||||
%token T_CHARACTER
|
||||
%token T_BAD_CHARACTER
|
||||
%token T_ENCAPSED_AND_WHITESPACE
|
||||
%token T_CONSTANT_ENCAPSED_STRING
|
||||
%token T_ECHO
|
||||
%token T_DO
|
||||
%token T_WHILE
|
||||
%token T_ENDWHILE
|
||||
%token T_FOR
|
||||
%token T_ENDFOR
|
||||
%token T_FOREACH
|
||||
%token T_ENDFOREACH
|
||||
%token T_DECLARE
|
||||
%token T_ENDDECLARE
|
||||
%token T_AS
|
||||
%token T_SWITCH
|
||||
%token T_ENDSWITCH
|
||||
%token T_CASE
|
||||
%token T_DEFAULT
|
||||
%token T_BREAK
|
||||
%token T_CONTINUE
|
||||
%token T_OLD_FUNCTION
|
||||
%token T_FUNCTION
|
||||
%token T_CONST
|
||||
%token T_RETURN
|
||||
%token T_USE
|
||||
%token T_GLOBAL
|
||||
%token T_STATIC
|
||||
%token T_VAR
|
||||
%token T_UNSET
|
||||
%token T_ISSET
|
||||
%token T_EMPTY
|
||||
%token T_CLASS
|
||||
%token T_EXTENDS
|
||||
%token T_OBJECT_OPERATOR
|
||||
%token T_DOUBLE_ARROW
|
||||
%token T_LIST
|
||||
%token T_ARRAY
|
||||
%token T_LINE
|
||||
%token T_FILE
|
||||
%token T_COMMENT
|
||||
%token T_ML_COMMENT
|
||||
%token T_OPEN_TAG
|
||||
%token T_OPEN_TAG_WITH_ECHO
|
||||
%token T_CLOSE_TAG
|
||||
%token T_WHITESPACE
|
||||
%token T_START_HEREDOC
|
||||
%token T_END_HEREDOC
|
||||
%token T_DOLLAR_OPEN_CURLY_BRACES
|
||||
%token T_CURLY_OPEN
|
||||
%token T_PAAMAYIM_NEKUDOTAYIM
|
||||
|
||||
%% /* Rules */
|
||||
|
||||
start:
|
||||
top_statement_list
|
||||
;
|
||||
|
||||
top_statement_list:
|
||||
top_statement_list { do_extended_info(CLS_C); } top_statement { HANDLE_INTERACTIVE(); }
|
||||
| /* empty */
|
||||
;
|
||||
|
||||
|
||||
top_statement:
|
||||
statement
|
||||
| declaration_statement { do_early_binding(CLS_C); }
|
||||
;
|
||||
|
||||
|
||||
inner_statement_list:
|
||||
inner_statement_list { do_extended_info(CLS_C); } inner_statement { HANDLE_INTERACTIVE(); }
|
||||
| /* empty */
|
||||
;
|
||||
|
||||
|
||||
inner_statement:
|
||||
statement
|
||||
| declaration_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 '(' { $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
|
||||
';' { do_free(&$3 CLS_CC); $4.u.opline_num = get_next_op_number(CG(active_op_array)); }
|
||||
for_expr
|
||||
';' { do_extended_info(CLS_C); do_for_cond(&$6, &$7 CLS_CC); }
|
||||
for_expr
|
||||
')' { do_free(&$9 CLS_CC); do_for_before_statement(&$4, &$7 CLS_CC); }
|
||||
for_statement { do_for_end(&$7 CLS_CC); }
|
||||
| T_SWITCH '(' expr ')' { do_switch_cond(&$3 CLS_CC); } switch_case_list { do_switch_end(&$6 CLS_CC); }
|
||||
| T_BREAK ';' { do_brk_cont(ZEND_BRK, NULL CLS_CC); }
|
||||
| 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, 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_USE use_filename ';' { zend_error(E_COMPILE_ERROR,"use: Not yet supported. Please use include_once() or require_once()"); zval_dtor(&$2.u.constant); }
|
||||
| T_UNSET '(' unset_variables ')' ';'
|
||||
| T_FOREACH '(' w_cvar T_AS { do_foreach_begin(&$1, &$3, &$2, &$4, 1 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_FOREACH '(' expr_without_variable T_AS { do_foreach_begin(&$1, &$3, &$2, &$4, 0 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 */
|
||||
;
|
||||
|
||||
unset_variables:
|
||||
unset_variable
|
||||
| unset_variables ',' unset_variable
|
||||
;
|
||||
|
||||
unset_variable:
|
||||
cvar { do_end_variable_parse(BP_VAR_UNSET, 0 CLS_CC); do_unset(&$1 CLS_CC); }
|
||||
;
|
||||
|
||||
use_filename:
|
||||
T_CONSTANT_ENCAPSED_STRING { $$ = $1; }
|
||||
| '(' T_CONSTANT_ENCAPSED_STRING ')' { $$ = $2; }
|
||||
;
|
||||
|
||||
|
||||
declaration_statement:
|
||||
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); } 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); }
|
||||
;
|
||||
|
||||
|
||||
foreach_optional_arg:
|
||||
/* empty */ { $$.op_type = IS_UNUSED; }
|
||||
| T_DOUBLE_ARROW w_cvar { $$ = $2; }
|
||||
;
|
||||
|
||||
|
||||
for_statement:
|
||||
statement
|
||||
| ':' inner_statement_list T_ENDFOR ';'
|
||||
;
|
||||
|
||||
|
||||
foreach_statement:
|
||||
statement
|
||||
| ':' inner_statement_list T_ENDFOREACH ';'
|
||||
;
|
||||
|
||||
|
||||
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; }
|
||||
| ':' case_list T_ENDSWITCH ';' { $$ = $2; }
|
||||
| ':' ';' case_list T_ENDSWITCH ';' { $$ = $3; }
|
||||
;
|
||||
|
||||
|
||||
case_list:
|
||||
/* empty */ { $$.op_type = IS_UNUSED; }
|
||||
| case_list T_CASE expr case_separator { do_extended_info(CLS_C); do_case_before_statement(&$1, &$2, &$3 CLS_CC); } inner_statement_list { do_case_after_statement(&$$, &$2 CLS_CC); $$.op_type = IS_CONST }
|
||||
| case_list T_DEFAULT case_separator { do_extended_info(CLS_C); do_default_before_statement(&$1, &$2 CLS_CC); } inner_statement_list { do_case_after_statement(&$$, &$2 CLS_CC); $$.op_type = IS_CONST; }
|
||||
;
|
||||
|
||||
|
||||
case_separator:
|
||||
':'
|
||||
| ';'
|
||||
;
|
||||
|
||||
|
||||
while_statement:
|
||||
statement
|
||||
| ':' inner_statement_list T_ENDWHILE ';'
|
||||
;
|
||||
|
||||
|
||||
|
||||
elseif_list:
|
||||
/* empty */
|
||||
| elseif_list T_ELSEIF '(' expr ')' { do_if_cond(&$4, &$5 CLS_CC); } statement { do_if_after_statement(&$5, 0 CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
new_elseif_list:
|
||||
/* empty */
|
||||
| new_elseif_list T_ELSEIF '(' expr ')' ':' { do_if_cond(&$4, &$5 CLS_CC); } inner_statement_list { do_if_after_statement(&$5, 0 CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
else_single:
|
||||
/* empty */
|
||||
| T_ELSE statement
|
||||
;
|
||||
|
||||
|
||||
new_else_single:
|
||||
/* empty */
|
||||
| T_ELSE ':' inner_statement_list
|
||||
;
|
||||
|
||||
|
||||
parameter_list:
|
||||
non_empty_parameter_list
|
||||
| /* empty */
|
||||
;
|
||||
|
||||
|
||||
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; 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); }
|
||||
;
|
||||
|
||||
|
||||
function_call_parameter_list:
|
||||
non_empty_function_call_parameter_list { $$ = $1; }
|
||||
| /* empty */ { $$.u.constant.value.lval = 0; }
|
||||
;
|
||||
|
||||
|
||||
non_empty_function_call_parameter_list:
|
||||
expr_without_variable { $$.u.constant.value.lval = 1; do_pass_param(&$1, ZEND_SEND_VAL, $$.u.constant.value.lval CLS_CC); }
|
||||
| cvar { $$.u.constant.value.lval = 1; do_pass_param(&$1, ZEND_SEND_VAR, $$.u.constant.value.lval CLS_CC); }
|
||||
| '&' w_cvar { $$.u.constant.value.lval = 1; do_pass_param(&$2, ZEND_SEND_REF, $$.u.constant.value.lval CLS_CC); }
|
||||
| non_empty_function_call_parameter_list ',' expr_without_variable { $$.u.constant.value.lval=$1.u.constant.value.lval+1; do_pass_param(&$3, ZEND_SEND_VAL, $$.u.constant.value.lval CLS_CC); }
|
||||
| non_empty_function_call_parameter_list ',' cvar { $$.u.constant.value.lval=$1.u.constant.value.lval+1; do_pass_param(&$3, ZEND_SEND_VAR, $$.u.constant.value.lval CLS_CC); }
|
||||
| non_empty_function_call_parameter_list ',' '&' w_cvar { $$.u.constant.value.lval=$1.u.constant.value.lval+1; do_pass_param(&$4, ZEND_SEND_REF, $$.u.constant.value.lval CLS_CC); }
|
||||
;
|
||||
|
||||
global_var_list:
|
||||
global_var_list ',' global_var { do_fetch_global_or_static_variable(&$3, NULL, ZEND_FETCH_GLOBAL CLS_CC); }
|
||||
| global_var { do_fetch_global_or_static_variable(&$1, NULL, ZEND_FETCH_GLOBAL CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
global_var:
|
||||
T_VARIABLE { $$ = $1; }
|
||||
| '$' r_cvar { $$ = $2; }
|
||||
| '$' '{' expr '}' { $$ = $3; }
|
||||
;
|
||||
|
||||
|
||||
static_var_list:
|
||||
static_var_list ',' T_VARIABLE { do_fetch_global_or_static_variable(&$3, NULL, ZEND_FETCH_STATIC CLS_CC); }
|
||||
| static_var_list ',' T_VARIABLE '=' static_scalar { do_fetch_global_or_static_variable(&$3, &$5, ZEND_FETCH_STATIC CLS_CC); }
|
||||
| T_VARIABLE { do_fetch_global_or_static_variable(&$1, NULL, ZEND_FETCH_STATIC CLS_CC); }
|
||||
| T_VARIABLE '=' static_scalar { do_fetch_global_or_static_variable(&$1, &$3, ZEND_FETCH_STATIC CLS_CC); }
|
||||
|
||||
;
|
||||
|
||||
|
||||
class_statement_list:
|
||||
class_statement_list class_statement
|
||||
| /* empty */
|
||||
;
|
||||
|
||||
|
||||
class_statement:
|
||||
T_VAR class_variable_decleration ';'
|
||||
| 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); } 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); }
|
||||
| class_variable_decleration ',' T_VARIABLE '=' static_scalar { do_declare_property(&$3, &$5 CLS_CC); }
|
||||
| T_VARIABLE { do_declare_property(&$1, NULL CLS_CC); }
|
||||
| T_VARIABLE '=' static_scalar { do_declare_property(&$1, &$3 CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
echo_expr_list:
|
||||
| echo_expr_list ',' expr { do_echo(&$3 CLS_CC); }
|
||||
| expr { do_echo(&$1 CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
for_expr:
|
||||
/* empty */ { $$.op_type = IS_CONST; $$.u.constant.type = IS_BOOL; $$.u.constant.value.lval = 1; }
|
||||
| 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(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 T_XOR_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); }
|
||||
| T_DEC rw_cvar { do_pre_incdec(&$$, &$2, ZEND_PRE_DEC CLS_CC); }
|
||||
| expr T_BOOLEAN_OR { do_boolean_or_begin(&$1, &$2 CLS_CC); } expr { do_boolean_or_end(&$$, &$1, &$4, &$2 CLS_CC); }
|
||||
| expr T_BOOLEAN_AND { do_boolean_and_begin(&$1, &$2 CLS_CC); } expr { do_boolean_and_end(&$$, &$1, &$4, &$2 CLS_CC); }
|
||||
| expr T_LOGICAL_OR { do_boolean_or_begin(&$1, &$2 CLS_CC); } expr { do_boolean_or_end(&$$, &$1, &$4, &$2 CLS_CC); }
|
||||
| expr T_LOGICAL_AND { do_boolean_and_begin(&$1, &$2 CLS_CC); } expr { do_boolean_and_end(&$$, &$1, &$4, &$2 CLS_CC); }
|
||||
| expr T_LOGICAL_XOR expr { do_binary_op(ZEND_BOOL_XOR, &$$, &$1, &$3 CLS_CC); }
|
||||
| expr '|' expr { do_binary_op(ZEND_BW_OR, &$$, &$1, &$3 CLS_CC); }
|
||||
| expr '&' expr { do_binary_op(ZEND_BW_AND, &$$, &$1, &$3 CLS_CC); }
|
||||
| expr '^' expr { do_binary_op(ZEND_BW_XOR, &$$, &$1, &$3 CLS_CC); }
|
||||
| expr '.' expr { do_binary_op(ZEND_CONCAT,&$$,&$1,&$3 CLS_CC); }
|
||||
| expr '+' expr { do_binary_op(ZEND_ADD,&$$,&$1,&$3 CLS_CC); }
|
||||
| expr '-' expr { do_binary_op(ZEND_SUB,&$$,&$1,&$3 CLS_CC); }
|
||||
| expr '*' expr { do_binary_op(ZEND_MUL,&$$,&$1,&$3 CLS_CC); }
|
||||
| expr '/' expr { do_binary_op(ZEND_DIV,&$$,&$1,&$3 CLS_CC); }
|
||||
| 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; 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_NOT_IDENTICAL expr { do_binary_op(ZEND_IS_NOT_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); }
|
||||
| expr T_IS_SMALLER_OR_EQUAL expr { do_binary_op(ZEND_IS_SMALLER_OR_EQUAL, &$$, &$1, &$3 CLS_CC); }
|
||||
| expr '>' expr { do_binary_op(ZEND_IS_SMALLER, &$$, &$3, &$1 CLS_CC); }
|
||||
| expr T_IS_GREATER_OR_EQUAL expr { do_binary_op(ZEND_IS_SMALLER_OR_EQUAL, &$$, &$3, &$1 CLS_CC); }
|
||||
| '(' expr ')' { $$ = $2; }
|
||||
| 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); }
|
||||
| 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; }
|
||||
| T_ARRAY '(' array_pair_list ')' { $$ = $3; }
|
||||
| '`' encaps_list '`' { do_shell_exec(&$$, &$2 CLS_CC); }
|
||||
| T_PRINT expr { do_print(&$$, &$2 CLS_CC); }
|
||||
;
|
||||
|
||||
function_call:
|
||||
T_STRING '(' { $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); }
|
||||
| cvar '(' { 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 */ { memset(&$$, 0, sizeof(znode)); $$.op_type = IS_UNUSED; }
|
||||
| '(' ')' { memset(&$$, 0, sizeof(znode)); $$.op_type = IS_UNUSED; }
|
||||
| '(' expr ')' { $$ = $2; }
|
||||
;
|
||||
|
||||
|
||||
ctor_arguments:
|
||||
/* empty */ { $$.u.constant.value.lval=0; }
|
||||
| '(' function_call_parameter_list ')' { $$ = $2; }
|
||||
;
|
||||
|
||||
|
||||
class_name:
|
||||
T_STRING { $$ = $1; }
|
||||
| r_cvar { $$ = $1; }
|
||||
;
|
||||
|
||||
|
||||
|
||||
common_scalar:
|
||||
T_LNUMBER { $$ = $1; }
|
||||
| T_DNUMBER { $$ = $1; }
|
||||
| T_CONSTANT_ENCAPSED_STRING { $$ = $1; }
|
||||
| T_LINE { $$ = $1; }
|
||||
| T_FILE { $$ = $1; }
|
||||
;
|
||||
|
||||
|
||||
static_scalar: /* compile-time evaluated scalars */
|
||||
common_scalar { $$ = $1; }
|
||||
| T_STRING { do_fetch_constant(&$$, &$1, ZEND_CT CLS_CC); }
|
||||
| '+' static_scalar { $$ = $1; }
|
||||
| '-' static_scalar { zval minus_one; minus_one.type = IS_LONG; minus_one.value.lval = -1; mul_function(&$2.u.constant, &$2.u.constant, &minus_one); $$ = $2; }
|
||||
| T_ARRAY '(' static_array_pair_list ')' { $$ = $3; $$.u.constant.type = IS_CONSTANT_ARRAY; }
|
||||
;
|
||||
|
||||
|
||||
scalar:
|
||||
T_STRING { do_fetch_constant(&$$, &$1, ZEND_RT CLS_CC); }
|
||||
| T_STRING_VARNAME { $$ = $1; }
|
||||
| common_scalar { $$ = $1; }
|
||||
| '"' encaps_list '"' { $$ = $2; }
|
||||
| '\'' encaps_list '\'' { $$ = $2; }
|
||||
| T_START_HEREDOC encaps_list T_END_HEREDOC { $$ = $2; do_end_heredoc(CLS_C); }
|
||||
;
|
||||
|
||||
|
||||
static_array_pair_list:
|
||||
/* 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(&$$, 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:
|
||||
r_cvar { $$ = $1; }
|
||||
| expr_without_variable { $$ = $1; }
|
||||
;
|
||||
|
||||
/*
|
||||
w_expr:
|
||||
w_cvar { $$ = $1; }
|
||||
| expr_without_variable { $$ = $1; }
|
||||
;
|
||||
*/
|
||||
|
||||
|
||||
r_cvar:
|
||||
cvar { do_end_variable_parse(BP_VAR_R, 0 CLS_CC); $$ = $1; }
|
||||
;
|
||||
|
||||
|
||||
w_cvar:
|
||||
cvar { do_end_variable_parse(BP_VAR_W, 0 CLS_CC); $$ = $1; }
|
||||
;
|
||||
|
||||
|
||||
rw_cvar:
|
||||
cvar { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); $$ = $1; }
|
||||
;
|
||||
|
||||
|
||||
cvar:
|
||||
cvar_without_objects { $$ = $1; }
|
||||
| cvar_without_objects T_OBJECT_OPERATOR { do_push_object(&$1 CLS_CC); } ref_list { $$ = $4; }
|
||||
;
|
||||
|
||||
|
||||
cvar_without_objects:
|
||||
reference_variable { $$ = $1; }
|
||||
| simple_indirect_reference reference_variable { do_indirect_references(&$$, &$1, &$2 CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
reference_variable:
|
||||
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); }
|
||||
;
|
||||
|
||||
|
||||
compound_variable:
|
||||
T_VARIABLE { $$ = $1; }
|
||||
| '$' '{' expr '}' { $$ = $3; }
|
||||
;
|
||||
|
||||
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:
|
||||
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);}
|
||||
;
|
||||
|
||||
object_dim_list:
|
||||
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; }
|
||||
;
|
||||
|
||||
|
||||
simple_indirect_reference:
|
||||
'$' { $$.u.constant.value.lval = 1; }
|
||||
| simple_indirect_reference '$' { $$.u.constant.value.lval++; }
|
||||
;
|
||||
|
||||
assignment_list:
|
||||
assignment_list ',' assignment_list_element
|
||||
| assignment_list_element
|
||||
;
|
||||
|
||||
|
||||
assignment_list_element:
|
||||
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, 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, 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, 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_string(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list '[' { $2.u.constant.value.lval = (long) '['; do_add_char(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list ']' { $2.u.constant.value.lval = (long) ']'; do_add_char(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list '{' { $2.u.constant.value.lval = (long) '{'; do_add_char(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list '}' { $2.u.constant.value.lval = (long) '}'; do_add_char(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list T_OBJECT_OPERATOR { znode tmp; $2.u.constant.value.lval = (long) '-'; do_add_char(&tmp, &$1, &$2 CLS_CC); $2.u.constant.value.lval = (long) '>'; do_add_char(&$$, &tmp, &$2 CLS_CC); }
|
||||
| /* empty */ { do_init_string(&$$ CLS_CC); }
|
||||
|
||||
;
|
||||
|
||||
|
||||
|
||||
encaps_var:
|
||||
T_VARIABLE { do_fetch_globals(&$1 CLS_CC); do_begin_variable_parse(CLS_C); fetch_simple_variable(&$$, &$1, 1 CLS_CC); }
|
||||
| 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_VARNAME '[' expr ']' '}' { do_begin_variable_parse(CLS_C); fetch_array_begin(&$$, &$2, &$4 CLS_CC); }
|
||||
| T_CURLY_OPEN cvar '}' { $$ = $2; }
|
||||
;
|
||||
|
||||
|
||||
encaps_var_offset:
|
||||
T_STRING { $$ = $1; }
|
||||
| T_NUM_STRING { $$ = $1; }
|
||||
| T_VARIABLE { fetch_simple_variable(&$$, &$1, 1 CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
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_ONCE expr { do_include_or_eval(ZEND_INCLUDE_ONCE, &$$, &$2 CLS_CC); }
|
||||
| T_EVAL '(' expr ')' { do_include_or_eval(ZEND_EVAL, &$$, &$3 CLS_CC); }
|
||||
| T_REQUIRE expr { do_include_or_eval(ZEND_REQUIRE, &$$, &$2 CLS_CC); }
|
||||
| T_REQUIRE_ONCE use_filename { do_include_or_eval(ZEND_REQUIRE_ONCE, &$$, &$2 CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
%%
|
||||
|
||||
+106
-44
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -20,11 +20,12 @@
|
||||
|
||||
#include "zend.h"
|
||||
#include "zend_extensions.h"
|
||||
#include "modules.h"
|
||||
#include "zend_modules.h"
|
||||
#include "zend_constants.h"
|
||||
#include "zend_list.h"
|
||||
#include "zend_API.h"
|
||||
#include "zend_builtin_functions.h"
|
||||
#include "zend_ini.h"
|
||||
|
||||
#ifdef ZTS
|
||||
# define GLOBAL_FUNCTION_TABLE global_function_table
|
||||
@@ -51,7 +52,7 @@ ZEND_API void (*zend_ticks_function)(int ticks);
|
||||
ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
|
||||
|
||||
static void (*zend_message_dispatcher_p)(long message, void *data);
|
||||
static int (*zend_get_ini_entry_p)(char *name, uint name_length, zval *contents);
|
||||
static int (*zend_get_configuration_directive_p)(char *name, uint name_length, zval *contents);
|
||||
|
||||
|
||||
#ifdef ZTS
|
||||
@@ -70,7 +71,7 @@ ZEND_API zval zval_used_for_init; /* True global variable */
|
||||
/* version information */
|
||||
static char *zend_version_info;
|
||||
static uint zend_version_info_length;
|
||||
#define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998-2000 Zend Technologies\n"
|
||||
#define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998-2001 Zend Technologies\n"
|
||||
|
||||
|
||||
#define PRINT_ZVAL_INDENT 4
|
||||
@@ -79,7 +80,8 @@ static void print_hash(HashTable *ht, int indent)
|
||||
{
|
||||
zval **tmp;
|
||||
char *string_key;
|
||||
unsigned long num_key;
|
||||
HashPosition iterator;
|
||||
unsigned long num_key, str_len;
|
||||
int i;
|
||||
|
||||
for (i=0; i<indent; i++) {
|
||||
@@ -87,16 +89,15 @@ static void print_hash(HashTable *ht, int indent)
|
||||
}
|
||||
ZEND_PUTS("(\n");
|
||||
indent += PRINT_ZVAL_INDENT;
|
||||
zend_hash_internal_pointer_reset(ht);
|
||||
while (zend_hash_get_current_data(ht, (void **) &tmp) == SUCCESS) {
|
||||
zend_hash_internal_pointer_reset_ex(ht, &iterator);
|
||||
while (zend_hash_get_current_data_ex(ht, (void **) &tmp, &iterator) == SUCCESS) {
|
||||
for (i=0; i<indent; i++) {
|
||||
ZEND_PUTS(" ");
|
||||
}
|
||||
ZEND_PUTS("[");
|
||||
switch (zend_hash_get_current_key(ht, &string_key, &num_key)) {
|
||||
switch (zend_hash_get_current_key_ex(ht, &string_key, &str_len, &num_key, 0, &iterator)) {
|
||||
case HASH_KEY_IS_STRING:
|
||||
ZEND_PUTS(string_key);
|
||||
efree(string_key);
|
||||
break;
|
||||
case HASH_KEY_IS_LONG:
|
||||
zend_printf("%ld",num_key);
|
||||
@@ -105,7 +106,7 @@ static void print_hash(HashTable *ht, int indent)
|
||||
ZEND_PUTS("] => ");
|
||||
zend_print_zval_r(*tmp, indent+PRINT_ZVAL_INDENT);
|
||||
ZEND_PUTS("\n");
|
||||
zend_hash_move_forward(ht);
|
||||
zend_hash_move_forward_ex(ht, &iterator);
|
||||
}
|
||||
indent -= PRINT_ZVAL_INDENT;
|
||||
for (i=0; i<indent; i++) {
|
||||
@@ -143,16 +144,9 @@ ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_cop
|
||||
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);
|
||||
}
|
||||
case IS_OBJECT:
|
||||
expr_copy->value.str.len = sizeof("Object")-1;
|
||||
expr_copy->value.str.val = estrndup("Object", expr_copy->value.str.len);
|
||||
break;
|
||||
default:
|
||||
*expr_copy = *expr;
|
||||
@@ -205,11 +199,23 @@ ZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval *expr, int
|
||||
switch(expr->type) {
|
||||
case IS_ARRAY:
|
||||
ZEND_PUTS("Array\n");
|
||||
if (++expr->value.ht->nApplyCount>1) {
|
||||
ZEND_PUTS(" *RECURSION*");
|
||||
expr->value.ht->nApplyCount=0;
|
||||
return;
|
||||
}
|
||||
print_hash(expr->value.ht,indent);
|
||||
expr->value.ht->nApplyCount--;
|
||||
break;
|
||||
case IS_OBJECT:
|
||||
if (++expr->value.obj.properties->nApplyCount>1) {
|
||||
ZEND_PUTS(" *RECURSION*");
|
||||
expr->value.obj.properties->nApplyCount=0;
|
||||
return;
|
||||
}
|
||||
zend_printf("%s Object\n", expr->value.obj.ce->name);
|
||||
print_hash(expr->value.obj.properties, indent);
|
||||
expr->value.obj.properties->nApplyCount--;
|
||||
break;
|
||||
default:
|
||||
zend_print_variable(expr);
|
||||
@@ -221,7 +227,7 @@ ZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval *expr, int
|
||||
static FILE *zend_fopen_wrapper(const char *filename, char **opened_path)
|
||||
{
|
||||
if (opened_path) {
|
||||
*opened_path = strdup(filename);
|
||||
*opened_path = estrdup(filename);
|
||||
}
|
||||
return fopen(filename, "rb");
|
||||
}
|
||||
@@ -295,6 +301,7 @@ static void executor_globals_ctor(zend_executor_globals *executor_globals)
|
||||
}
|
||||
zend_init_rsrc_plist(ELS_C);
|
||||
EG(lambda_count)=0;
|
||||
EG(user_error_handler) = NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -302,6 +309,7 @@ static void executor_globals_dtor(zend_executor_globals *executor_globals)
|
||||
{
|
||||
zend_shutdown_constants(ELS_C);
|
||||
zend_destroy_rsrc_plist(ELS_C);
|
||||
zend_ini_shutdown(ELS_C);
|
||||
}
|
||||
|
||||
|
||||
@@ -317,6 +325,17 @@ static void alloc_globals_ctor(zend_alloc_globals *alloc_globals)
|
||||
#include <floatingpoint.h>
|
||||
#endif
|
||||
|
||||
#ifdef ZTS
|
||||
static void zend_new_thread_end_handler(THREAD_T thread_id)
|
||||
{
|
||||
ELS_FETCH();
|
||||
|
||||
zend_copy_ini_directives(ELS_C);
|
||||
zend_ini_refresh_caches(ZEND_INI_STAGE_STARTUP ELS_CC);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
int zend_startup(zend_utility_functions *utility_functions, char **extensions, int start_builtin_functions)
|
||||
{
|
||||
#ifdef ZTS
|
||||
@@ -329,20 +348,12 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions, i
|
||||
#endif
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
{
|
||||
/* FreeBSD floating point precision fix */
|
||||
#ifdef HAVE_FP_EXCEPT
|
||||
fp_except
|
||||
#else
|
||||
fp_except_t
|
||||
/* FreeBSD floating point precision fix */
|
||||
fpsetmask(0);
|
||||
#endif
|
||||
mask;
|
||||
|
||||
mask = fpgetmask();
|
||||
fpsetmask(mask & ~FP_X_IMP);
|
||||
}
|
||||
#endif
|
||||
|
||||
zend_startup_extensions_mechanism();
|
||||
|
||||
/* Set up utility functions and values */
|
||||
zend_error_cb = utility_functions->error_function;
|
||||
zend_printf = utility_functions->printf_function;
|
||||
@@ -354,14 +365,12 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions, i
|
||||
zend_message_dispatcher_p = utility_functions->message_handler;
|
||||
zend_block_interruptions = utility_functions->block_interruptions;
|
||||
zend_unblock_interruptions = utility_functions->unblock_interruptions;
|
||||
zend_get_ini_entry_p = utility_functions->get_ini_entry;
|
||||
zend_get_configuration_directive_p = utility_functions->get_configuration_directive;
|
||||
zend_ticks_function = utility_functions->ticks_function;
|
||||
|
||||
zend_compile_file = compile_file;
|
||||
zend_execute = execute;
|
||||
|
||||
zend_startup_extensions();
|
||||
|
||||
/* set up version */
|
||||
zend_version_info = strdup(ZEND_CORE_VERSION_INFO);
|
||||
zend_version_info_length = sizeof(ZEND_CORE_VERSION_INFO)-1;
|
||||
@@ -393,6 +402,7 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions, i
|
||||
#else
|
||||
zend_startup_constants();
|
||||
zend_set_default_compile_time_values(CLS_C);
|
||||
EG(user_error_handler) = NULL;
|
||||
#endif
|
||||
zend_register_standard_constants(ELS_C);
|
||||
|
||||
@@ -404,6 +414,12 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions, i
|
||||
zend_startup_builtin_functions();
|
||||
}
|
||||
|
||||
zend_ini_startup(ELS_C);
|
||||
|
||||
#ifdef ZTS
|
||||
tsrm_set_new_thread_end_handler(zend_new_thread_end_handler);
|
||||
#endif
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@@ -502,7 +518,9 @@ void zend_deactivate_modules()
|
||||
ELS_FETCH();
|
||||
EG(opline_ptr) = NULL; /* we're no longer executing anything */
|
||||
|
||||
zend_hash_apply(&module_registry, (int (*)(void *)) module_registry_cleanup);
|
||||
if (setjmp(EG(bailout))==0) {
|
||||
zend_hash_apply(&module_registry, (int (*)(void *)) module_registry_cleanup);
|
||||
}
|
||||
}
|
||||
|
||||
void zend_deactivate(CLS_D ELS_DC)
|
||||
@@ -511,9 +529,18 @@ void zend_deactivate(CLS_D ELS_DC)
|
||||
EG(opline_ptr) = NULL;
|
||||
EG(active_symbol_table) = NULL;
|
||||
|
||||
shutdown_scanner(CLS_C);
|
||||
shutdown_executor(ELS_C);
|
||||
shutdown_compiler(CLS_C);
|
||||
if (setjmp(EG(bailout))==0) {
|
||||
shutdown_scanner(CLS_C);
|
||||
}
|
||||
if (setjmp(EG(bailout))==0) {
|
||||
shutdown_executor(ELS_C);
|
||||
}
|
||||
if (setjmp(EG(bailout))==0) {
|
||||
shutdown_compiler(CLS_C);
|
||||
}
|
||||
if (setjmp(EG(bailout))==0) {
|
||||
zend_ini_deactivate(ELS_C);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -527,10 +554,10 @@ 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)
|
||||
ZEND_API int zend_get_configuration_directive(char *name, uint name_length, zval *contents)
|
||||
{
|
||||
if (zend_get_ini_entry_p) {
|
||||
return zend_get_ini_entry_p(name, name_length, contents);
|
||||
if (zend_get_configuration_directive_p) {
|
||||
return zend_get_configuration_directive_p(name, name_length, contents);
|
||||
} else {
|
||||
return FAILURE;
|
||||
}
|
||||
@@ -614,9 +641,13 @@ ZEND_API void zend_error(int type, const char *format, ...)
|
||||
|
||||
#ifdef HAVE_VSNPRINTF
|
||||
z_error_message->value.str.len = vsnprintf(z_error_message->value.str.val, ZEND_ERROR_BUFFER_SIZE, format, args);
|
||||
if (z_error_message->value.str.len > ZEND_ERROR_BUFFER_SIZE-1) {
|
||||
z_error_message->value.str.len = ZEND_ERROR_BUFFER_SIZE-1;
|
||||
}
|
||||
#else
|
||||
strncpy(z_error_message->value.str.val, format, ZEND_ERROR_BUFFER_SIZE);
|
||||
/* This is risky... */
|
||||
z_error_message->value.str.len = vsprintf(z_error_message->value.str.val, format, args);
|
||||
/* z_error_message->value.str.len = vsprintf(z_error_message->value.str.val, format, args); */
|
||||
#endif
|
||||
z_error_message->type = IS_STRING;
|
||||
|
||||
@@ -725,3 +756,34 @@ ZEND_API int zend_execute_scripts(int type CLS_DC ELS_DC, int file_count, ...)
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
#define COMPILED_STRING_DESCRIPTION_FORMAT "%s(%d) : %s"
|
||||
|
||||
ZEND_API char *zend_make_compiled_string_description(char *name)
|
||||
{
|
||||
char *cur_filename;
|
||||
int cur_lineno;
|
||||
char *compiled_string_description;
|
||||
CLS_FETCH();
|
||||
ELS_FETCH();
|
||||
|
||||
if (zend_is_compiling()) {
|
||||
cur_filename = zend_get_compiled_filename(CLS_C);
|
||||
cur_lineno = zend_get_compiled_lineno(CLS_C);
|
||||
} else if (zend_is_executing()) {
|
||||
cur_filename = zend_get_executed_filename(ELS_C);
|
||||
cur_lineno = zend_get_executed_lineno(ELS_C);
|
||||
} else {
|
||||
cur_filename = "Unknown";
|
||||
cur_lineno = 0;
|
||||
}
|
||||
|
||||
compiled_string_description = emalloc(sizeof(COMPILED_STRING_DESCRIPTION_FORMAT)+strlen(name)+strlen(cur_filename)+MAX_LENGTH_OF_LONG);
|
||||
sprintf(compiled_string_description, COMPILED_STRING_DESCRIPTION_FORMAT, cur_filename, cur_lineno, name);
|
||||
return compiled_string_description;
|
||||
}
|
||||
|
||||
|
||||
void free_estring(char **str_p)
|
||||
{
|
||||
efree(*str_p);
|
||||
}
|
||||
+24
-5
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -21,7 +21,7 @@
|
||||
#ifndef ZEND_H
|
||||
#define ZEND_H
|
||||
|
||||
#define ZEND_VERSION "1.0.1"
|
||||
#define ZEND_VERSION "1.0.5"
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define BEGIN_EXTERN_C() extern "C" {
|
||||
@@ -39,8 +39,10 @@
|
||||
|
||||
#ifdef ZEND_WIN32
|
||||
# include "zend_config.w32.h"
|
||||
# define ZEND_PATHS_SEPARATOR ';'
|
||||
#else
|
||||
# include "zend_config.h"
|
||||
# define ZEND_PATHS_SEPARATOR ':'
|
||||
#endif
|
||||
|
||||
/* all HAVE_XXX test have to be after the include of zend_config above */
|
||||
@@ -232,7 +234,7 @@ typedef struct _zend_utility_functions {
|
||||
void (*message_handler)(long message, void *data);
|
||||
void (*block_interruptions)(void);
|
||||
void (*unblock_interruptions)(void);
|
||||
int (*get_ini_entry)(char *name, uint name_length, zval *contents);
|
||||
int (*get_configuration_directive)(char *name, uint name_length, zval *contents);
|
||||
void (*ticks_function)(int ticks);
|
||||
} zend_utility_functions;
|
||||
|
||||
@@ -307,6 +309,8 @@ ZEND_API void zend_output_debug_string(zend_bool trigger_break, char *format, ..
|
||||
|
||||
ZEND_API extern char *empty_string;
|
||||
|
||||
ZEND_API void free_estring(char **str_p);
|
||||
|
||||
#define STR_FREE(ptr) if (ptr && ptr!=empty_string) { efree(ptr); }
|
||||
#define STR_FREE_REL(ptr) if (ptr && ptr!=empty_string) { efree_rel(ptr); }
|
||||
|
||||
@@ -354,7 +358,7 @@ 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);
|
||||
ZEND_API int zend_get_configuration_directive(char *name, uint name_length, zval *contents);
|
||||
|
||||
|
||||
/* Messages for applications of Zend */
|
||||
@@ -421,7 +425,22 @@ ZEND_API int zend_get_ini_entry(char *name, uint name_length, zval *contents);
|
||||
} \
|
||||
INIT_PZVAL(&(zv));
|
||||
|
||||
#define ZEND_MAX_RESERVED_RESOURCES 2
|
||||
#define REPLACE_ZVAL_VALUE(ppzv_dest,pzv_src,copy) { \
|
||||
int is_ref,refcount; \
|
||||
\
|
||||
SEPARATE_ZVAL_IF_NOT_REF(ppzv_dest); \
|
||||
is_ref = (*ppzv_dest)->is_ref; \
|
||||
refcount = (*ppzv_dest)->refcount; \
|
||||
zval_dtor(*ppzv_dest); \
|
||||
**ppzv_dest = *pzv_src; \
|
||||
if(copy) { \
|
||||
zval_copy_ctor(*ppzv_dest); \
|
||||
} \
|
||||
(*ppzv_dest)->is_ref = is_ref; \
|
||||
(*ppzv_dest)->refcount = refcount; \
|
||||
}
|
||||
|
||||
#define ZEND_MAX_RESERVED_RESOURCES 4
|
||||
|
||||
#ifdef ZEND_WIN32
|
||||
/* Only use this macro if you know for sure that all of the switches values
|
||||
|
||||
+315
-293
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "zend.h"
|
||||
#include "zend_execute.h"
|
||||
#include "zend_API.h"
|
||||
#include "modules.h"
|
||||
#include "zend_modules.h"
|
||||
#include "zend_constants.h"
|
||||
|
||||
#ifdef HAVE_STDARG_H
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
/* these variables are true statics/globals, and have to be mutex'ed on every access */
|
||||
static int module_count=0;
|
||||
HashTable module_registry;
|
||||
ZEND_API HashTable module_registry;
|
||||
|
||||
/* this function doesn't check for too many parameters */
|
||||
ZEND_API int zend_get_parameters(int ht, int param_count, ...)
|
||||
@@ -227,95 +227,82 @@ ZEND_API inline int add_assoc_function(zval *arg, char *key,void (*function_ptr)
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_assoc_long(zval *arg, char *key, long n)
|
||||
ZEND_API inline int add_assoc_long_ex(zval *arg, char *key, uint key_len, long n)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_LONG;
|
||||
tmp->value.lval = n;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_LONG(tmp, n);
|
||||
|
||||
return zend_hash_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
ZEND_API inline int add_assoc_null_ex(zval *arg, char *key, uint key_len)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_NULL(tmp);
|
||||
|
||||
return zend_hash_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
ZEND_API inline int add_assoc_bool_ex(zval *arg, char *key, uint key_len, int b)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_BOOL(tmp, b);
|
||||
|
||||
return zend_hash_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
ZEND_API inline int add_assoc_resource_ex(zval *arg, char *key, uint key_len, int r)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_RESOURCE(tmp, r);
|
||||
|
||||
return zend_hash_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_assoc_unset(zval *arg, char *key)
|
||||
ZEND_API inline int add_assoc_double_ex(zval *arg, char *key, uint key_len, double d)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_DOUBLE(tmp, d);
|
||||
|
||||
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);
|
||||
return zend_hash_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_assoc_resource(zval *arg, char *key, int r)
|
||||
ZEND_API inline int add_assoc_string_ex(zval *arg, char *key, uint key_len, char *str, int duplicate)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_STRING(tmp, str, duplicate);
|
||||
|
||||
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);
|
||||
return zend_hash_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_assoc_double(zval *arg, char *key, double d)
|
||||
ZEND_API inline int add_assoc_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, int duplicate)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_STRINGL(tmp, str, length, duplicate);
|
||||
|
||||
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);
|
||||
return zend_hash_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_assoc_string(zval *arg, char *key, char *str, int duplicate)
|
||||
ZEND_API inline int add_assoc_zval_ex(zval *arg, char *key, uint key_len, zval *value)
|
||||
{
|
||||
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);
|
||||
return zend_hash_update(Z_ARRVAL_P(arg), key, key_len, (void *) &value, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -323,151 +310,136 @@ 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);
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_LONG(tmp, n);
|
||||
|
||||
return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *),NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_index_unset(zval *arg, uint index)
|
||||
ZEND_API inline int add_index_null(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);
|
||||
}
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_NULL(tmp);
|
||||
|
||||
return zend_hash_index_update(Z_ARRVAL_P(arg), 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);
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_BOOL(tmp, b);
|
||||
|
||||
return zend_hash_index_update(Z_ARRVAL_P(arg), 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);
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_RESOURCE(tmp, r);
|
||||
|
||||
return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *),NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_index_double(zval *arg, uint index, double d)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_DOUBLE;
|
||||
tmp->value.dval = d;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),NULL);
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_DOUBLE(tmp, d);
|
||||
|
||||
return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *),NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_index_string(zval *arg, uint index, char *str, int duplicate)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_STRING(tmp, str, duplicate);
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_STRING;
|
||||
tmp->value.str.len = strlen(str);
|
||||
if (duplicate) {
|
||||
tmp->value.str.val = estrndup(str,tmp->value.str.len);
|
||||
} else {
|
||||
tmp->value.str.val = str;
|
||||
}
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *), NULL);
|
||||
return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_index_stringl(zval *arg, uint index, char *str, uint length, int duplicate)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_STRINGL(tmp, str, length, duplicate);
|
||||
|
||||
return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_STRING;
|
||||
tmp->value.str.len = length;
|
||||
if (duplicate) {
|
||||
tmp->value.str.val = estrndup(str,tmp->value.str.len);
|
||||
} else {
|
||||
tmp->value.str.val = str;
|
||||
}
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),NULL);
|
||||
|
||||
ZEND_API inline int add_index_zval(zval *arg, uint index, zval *value)
|
||||
{
|
||||
return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &value, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_next_index_long(zval *arg, long n)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_LONG;
|
||||
tmp->value.lval = n;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *), NULL);
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_LONG(tmp, n);
|
||||
|
||||
return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_next_index_unset(zval *arg)
|
||||
ZEND_API inline int add_next_index_null(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);
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_NULL(tmp);
|
||||
|
||||
return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &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);
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_BOOL(tmp, b);
|
||||
|
||||
return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &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);
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_RESOURCE(tmp, r);
|
||||
|
||||
return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_next_index_double(zval *arg, double d)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_DOUBLE;
|
||||
tmp->value.dval = d;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *), NULL);
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_DOUBLE(tmp, d);
|
||||
|
||||
return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -475,16 +447,10 @@ ZEND_API inline int add_next_index_string(zval *arg, 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_next_index_insert(arg->value.ht, &tmp, sizeof(zval *),NULL);
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_STRING(tmp, str, duplicate);
|
||||
|
||||
return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *),NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -492,201 +458,162 @@ ZEND_API inline int add_next_index_stringl(zval *arg, char *str, uint length, in
|
||||
{
|
||||
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_next_index_insert(arg->value.ht, &tmp, sizeof(zval *),NULL);
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_STRINGL(tmp, str, length, duplicate);
|
||||
|
||||
return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *),NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_get_assoc_string(zval *arg, char *key, char *str, void **dest, int duplicate)
|
||||
ZEND_API inline int add_next_index_zval(zval *arg, zval *value)
|
||||
{
|
||||
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 *), dest);
|
||||
return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &value, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_get_assoc_stringl(zval *arg, char *key, char *str, uint length, void **dest, int duplicate)
|
||||
ZEND_API inline int add_get_assoc_string_ex(zval *arg, char *key, uint key_len, char *str, void **dest, int duplicate)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_STRING(tmp, str, duplicate);
|
||||
|
||||
return zend_hash_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), dest);
|
||||
}
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_STRING;
|
||||
tmp->value.str.len = length;
|
||||
if (duplicate) {
|
||||
tmp->value.str.val = estrndup(str,tmp->value.str.len);
|
||||
} else {
|
||||
tmp->value.str.val = str;
|
||||
}
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), dest);
|
||||
|
||||
ZEND_API inline int add_get_assoc_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, void **dest, int duplicate)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_STRINGL(tmp, str, length, duplicate);
|
||||
|
||||
return zend_hash_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), dest);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_get_index_long(zval *arg, uint index, long l, void **dest)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_LONG;
|
||||
tmp->value.lval = l;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),dest);
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_LONG(tmp, l);
|
||||
|
||||
return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), dest);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_get_index_double(zval *arg, uint index, double d, void **dest)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_DOUBLE;
|
||||
tmp->value.dval= d;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),dest);
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_DOUBLE(tmp, d);
|
||||
|
||||
return zend_hash_index_update(Z_ARRVAL_P(arg), 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;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_STRING;
|
||||
tmp->value.str.len = strlen(str);
|
||||
if (duplicate) {
|
||||
tmp->value.str.val = estrndup(str,tmp->value.str.len);
|
||||
} else {
|
||||
tmp->value.str.val = str;
|
||||
}
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),dest);
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_STRING(tmp, str, duplicate);
|
||||
|
||||
return zend_hash_index_update(Z_ARRVAL_P(arg), 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;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_STRING;
|
||||
tmp->value.str.len = length;
|
||||
if (duplicate) {
|
||||
tmp->value.str.val = estrndup(str,tmp->value.str.len);
|
||||
} else {
|
||||
tmp->value.str.val = str;
|
||||
}
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),dest);
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_STRINGL(tmp, str, length, duplicate);
|
||||
|
||||
return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), dest);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_property_long(zval *arg, char *key, long n)
|
||||
ZEND_API inline int add_property_long_ex(zval *arg, char *key, uint key_len, long n)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_LONG;
|
||||
tmp->value.lval = n;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_LONG(tmp, n);
|
||||
|
||||
return zend_hash_update(Z_OBJPROP_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
ZEND_API inline int add_property_bool(zval *arg, char *key, int b)
|
||||
ZEND_API inline int add_property_bool_ex(zval *arg, char *key, uint key_len, 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);
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_BOOL(tmp, b);
|
||||
|
||||
return zend_hash_update(Z_OBJPROP_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
ZEND_API inline int add_property_unset(zval *arg, char *key)
|
||||
ZEND_API inline int add_property_null_ex(zval *arg, char *key, uint key_len)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_NULL(tmp);
|
||||
|
||||
return zend_hash_update(Z_OBJPROP_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
ZEND_API inline int add_property_resource_ex(zval *arg, char *key, uint key_len, long n)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_RESOURCE(tmp, n);
|
||||
|
||||
return zend_hash_update(Z_OBJPROP_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_property_double_ex(zval *arg, char *key, uint key_len, double d)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_DOUBLE(tmp, d);
|
||||
|
||||
return zend_hash_update(Z_OBJPROP_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_property_string_ex(zval *arg, char *key, uint key_len, char *str, int duplicate)
|
||||
{
|
||||
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);
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_STRING(tmp, str, duplicate);
|
||||
|
||||
return zend_hash_update(Z_OBJPROP_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
ZEND_API inline int add_property_resource(zval *arg, char *key, long n)
|
||||
ZEND_API inline int add_property_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, int duplicate)
|
||||
{
|
||||
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);
|
||||
MAKE_STD_ZVAL(tmp);
|
||||
ZVAL_STRINGL(tmp, str, length, duplicate);
|
||||
|
||||
return zend_hash_update(Z_OBJPROP_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_property_double(zval *arg, char *key, double d)
|
||||
ZEND_API inline int add_property_zval_ex(zval *arg, char *key, uint key_len, zval *value)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_DOUBLE;
|
||||
tmp->value.dval = d;
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
return zend_hash_update(Z_OBJPROP_P(arg), key, key_len, (void *) &value, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_property_string(zval *arg, char *key, char *str, int duplicate)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_STRING;
|
||||
tmp->value.str.len = strlen(str);
|
||||
if (duplicate) {
|
||||
tmp->value.str.val = estrndup(str,tmp->value.str.len);
|
||||
} else {
|
||||
tmp->value.str.val = str;
|
||||
}
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API inline int add_property_stringl(zval *arg, char *key, char *str, uint length, int duplicate)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
tmp->type = IS_STRING;
|
||||
tmp->value.str.len = length;
|
||||
if (duplicate) {
|
||||
tmp->value.str.val = estrndup(str,tmp->value.str.len);
|
||||
} else {
|
||||
tmp->value.str.val = str;
|
||||
}
|
||||
INIT_PZVAL(tmp);
|
||||
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int zend_startup_module(zend_module_entry *module)
|
||||
{
|
||||
if (module) {
|
||||
@@ -892,7 +819,7 @@ ZEND_API zend_class_entry *zend_register_internal_class_ex(zend_class_entry *cla
|
||||
register_class = zend_register_internal_class(class_entry);
|
||||
|
||||
if (parent_ce) {
|
||||
do_inheritance(register_class, parent_ce);
|
||||
zend_do_inheritance(register_class, parent_ce);
|
||||
}
|
||||
return register_class;
|
||||
}
|
||||
@@ -982,3 +909,98 @@ ZEND_API int zend_disable_function(char *function_name, uint function_name_lengt
|
||||
disabled_function[0].fname = function_name;
|
||||
return zend_register_functions(disabled_function, CG(function_table), MODULE_PERSISTENT);
|
||||
}
|
||||
|
||||
zend_bool zend_is_callable(zval *callable, zend_bool syntax_only, char **callable_name)
|
||||
{
|
||||
char *lcname;
|
||||
int retval = 0;
|
||||
ELS_FETCH();
|
||||
|
||||
switch (Z_TYPE_P(callable)) {
|
||||
case IS_STRING:
|
||||
if (syntax_only)
|
||||
return 1;
|
||||
|
||||
lcname = estrndup(Z_STRVAL_P(callable), Z_STRLEN_P(callable));
|
||||
zend_str_tolower(lcname, Z_STRLEN_P(callable));
|
||||
if (zend_hash_exists(EG(function_table), lcname, Z_STRLEN_P(callable)+1))
|
||||
retval = 1;
|
||||
efree(lcname);
|
||||
if (!retval && callable_name)
|
||||
*callable_name = estrndup(Z_STRVAL_P(callable), Z_STRLEN_P(callable));
|
||||
break;
|
||||
|
||||
case IS_ARRAY:
|
||||
{
|
||||
zval **method;
|
||||
zval **obj;
|
||||
zend_class_entry *ce;
|
||||
char callable_name_len;
|
||||
|
||||
if (zend_hash_index_find(Z_ARRVAL_P(callable), 0, (void **) &obj) == SUCCESS &&
|
||||
zend_hash_index_find(Z_ARRVAL_P(callable), 1, (void **) &method) == SUCCESS &&
|
||||
(Z_TYPE_PP(obj) == IS_OBJECT || Z_TYPE_PP(obj) == IS_STRING) &&
|
||||
Z_TYPE_PP(method) == IS_STRING) {
|
||||
|
||||
if (syntax_only)
|
||||
return 1;
|
||||
|
||||
if (Z_TYPE_PP(obj) == IS_STRING) {
|
||||
int found;
|
||||
|
||||
lcname = estrndup(Z_STRVAL_PP(obj), Z_STRLEN_PP(obj));
|
||||
zend_str_tolower(lcname, Z_STRLEN_PP(obj));
|
||||
found = zend_hash_find(EG(class_table), lcname, Z_STRLEN_PP(obj) + 1, (void**)&ce);
|
||||
efree(lcname);
|
||||
if (found == FAILURE) {
|
||||
if (callable_name) {
|
||||
char *ptr;
|
||||
|
||||
callable_name_len = Z_STRLEN_PP(obj) + Z_STRLEN_PP(method) + sizeof("::");
|
||||
ptr = *callable_name = emalloc(callable_name_len);
|
||||
memcpy(ptr, Z_STRVAL_PP(obj), Z_STRLEN_PP(obj));
|
||||
ptr += Z_STRLEN_PP(obj);
|
||||
memcpy(ptr, "::", sizeof("::") - 1);
|
||||
ptr += sizeof("::") - 1;
|
||||
memcpy(ptr, Z_STRVAL_PP(method), Z_STRLEN_PP(method) + 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
ce = Z_OBJCE_PP(obj);
|
||||
}
|
||||
lcname = estrndup(Z_STRVAL_PP(method), Z_STRLEN_PP(method));
|
||||
zend_str_tolower(lcname, Z_STRLEN_PP(method));
|
||||
if (zend_hash_exists(&ce->function_table, lcname, Z_STRLEN_PP(method)+1))
|
||||
retval = 1;
|
||||
if (!retval && callable_name) {
|
||||
char *ptr;
|
||||
|
||||
callable_name_len = ce->name_length + Z_STRLEN_PP(method) + sizeof("::");
|
||||
ptr = *callable_name = emalloc(callable_name_len);
|
||||
memcpy(ptr, ce->name, ce->name_length);
|
||||
ptr += ce->name_length;
|
||||
memcpy(ptr, "::", sizeof("::") - 1);
|
||||
ptr += sizeof("::") - 1;
|
||||
memcpy(ptr, Z_STRVAL_PP(method), Z_STRLEN_PP(method) + 1);
|
||||
}
|
||||
efree(lcname);
|
||||
} else if (callable_name)
|
||||
*callable_name = estrndup("Array", sizeof("Array")-1);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
if (callable_name) {
|
||||
zval expr_copy;
|
||||
int use_copy;
|
||||
|
||||
zend_make_printable_zval(callable, &expr_copy, &use_copy);
|
||||
*callable_name = estrndup(Z_STRVAL(expr_copy), Z_STRLEN(expr_copy));
|
||||
zval_dtor(&expr_copy);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
+55
-22
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -21,7 +21,7 @@
|
||||
#ifndef ZEND_API_H
|
||||
#define ZEND_API_H
|
||||
|
||||
#include "modules.h"
|
||||
#include "zend_modules.h"
|
||||
#include "zend_list.h"
|
||||
#include "zend_fast_cache.h"
|
||||
#include "zend_operators.h"
|
||||
@@ -120,6 +120,7 @@ ZEND_API zend_module_entry *zend_get_module(int module_number);
|
||||
ZEND_API int zend_disable_function(char *function_name, uint function_name_length);
|
||||
|
||||
ZEND_API void wrong_param_count(void);
|
||||
ZEND_API zend_bool zend_is_callable(zval *callable, zend_bool syntax_only, char **callable_name);
|
||||
|
||||
#define getThis() (this_ptr)
|
||||
|
||||
@@ -146,47 +147,79 @@ ZEND_API int _object_init_ex(zval *arg, zend_class_entry *ce ZEND_FILE_LINE_DC);
|
||||
/* no longer supported */
|
||||
ZEND_API int add_assoc_function(zval *arg, char *key,void (*function_ptr)(INTERNAL_FUNCTION_PARAMETERS));
|
||||
|
||||
ZEND_API int add_assoc_long(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_long_ex(zval *arg, char *key, uint key_len, long n);
|
||||
ZEND_API int add_assoc_null_ex(zval *arg, char *key, uint key_len);
|
||||
ZEND_API int add_assoc_bool_ex(zval *arg, char *key, uint key_len, int b);
|
||||
ZEND_API int add_assoc_resource_ex(zval *arg, char *key, uint key_len, int r);
|
||||
ZEND_API int add_assoc_double_ex(zval *arg, char *key, uint key_len, double d);
|
||||
ZEND_API int add_assoc_string_ex(zval *arg, char *key, uint key_len, char *str, int duplicate);
|
||||
ZEND_API int add_assoc_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, int duplicate);
|
||||
ZEND_API int add_assoc_zval_ex(zval *arg, char *key, uint key_len, zval *value);
|
||||
|
||||
#define add_assoc_long(__arg, __key, __n) add_assoc_long_ex(__arg, __key, strlen(__key)+1, __n)
|
||||
#define add_assoc_null(__arg, __key) add_assoc_null_ex(__arg, __key, strlen(__key) + 1)
|
||||
#define add_assoc_bool(__arg, __key, __b) add_assoc_bool_ex(__arg, __key, strlen(__key)+1, __b)
|
||||
#define add_assoc_resource(__arg, __key, __r) add_assoc_resource_ex(__arg, __key, strlen(__key)+1, __r)
|
||||
#define add_assoc_double(__arg, __key, __d) add_assoc_double_ex(__arg, __key, strlen(__key)+1, __d)
|
||||
#define add_assoc_string(__arg, __key, __str, __duplicate) add_assoc_string_ex(__arg, __key, strlen(__key)+1, __str, __duplicate)
|
||||
#define add_assoc_stringl(__arg, __key, __str, __length, __duplicate) add_assoc_stringl_ex(__arg, __key, strlen(__key)+1, __str, __length, __duplicate)
|
||||
#define add_assoc_zval(__arg, __key, __value) add_assoc_zval_ex(__arg, __key, strlen(__key)+1, __value)
|
||||
|
||||
/* unset() functions are only suported for legacy modules and null() functions should be used */
|
||||
#define add_assoc_unset(__arg, __key) add_assoc_null_ex(__arg, __key, strlen(__key) + 1)
|
||||
#define add_index_unset(__arg, __key) add_index_null(__arg, __key)
|
||||
#define add_next_index_unset(__arg) add_next_index_null(__arg)
|
||||
#define add_property_unset(__arg, __key) add_property_null(__arg, __key)
|
||||
|
||||
ZEND_API int add_index_long(zval *arg, uint idx, long n);
|
||||
ZEND_API int add_index_unset(zval *arg, uint idx);
|
||||
ZEND_API int add_index_null(zval *arg, uint idx);
|
||||
ZEND_API int add_index_bool(zval *arg, uint idx, int b);
|
||||
ZEND_API int add_index_resource(zval *arg, uint idx, int r);
|
||||
ZEND_API int add_index_double(zval *arg, uint idx, double d);
|
||||
ZEND_API int add_index_string(zval *arg, uint idx, char *str, int duplicate);
|
||||
ZEND_API int add_index_stringl(zval *arg, uint idx, char *str, uint length, int duplicate);
|
||||
ZEND_API int add_index_zval(zval *arg, uint index, zval *value);
|
||||
|
||||
ZEND_API int add_next_index_long(zval *arg, long n);
|
||||
ZEND_API int add_next_index_unset(zval *arg);
|
||||
ZEND_API int add_next_index_null(zval *arg);
|
||||
ZEND_API int add_next_index_bool(zval *arg, int b);
|
||||
ZEND_API int add_next_index_resource(zval *arg, int r);
|
||||
ZEND_API int add_next_index_double(zval *arg, double d);
|
||||
ZEND_API int add_next_index_string(zval *arg, char *str, int duplicate);
|
||||
ZEND_API int add_next_index_stringl(zval *arg, char *str, uint length, int duplicate);
|
||||
ZEND_API int add_next_index_zval(zval *arg, zval *value);
|
||||
|
||||
ZEND_API int add_get_assoc_string_ex(zval *arg, char *key, uint key_len, char *str, void **dest, int duplicate);
|
||||
ZEND_API int add_get_assoc_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, void **dest, int duplicate);
|
||||
|
||||
#define add_get_assoc_string(__arg, __key, __str, __dest, __duplicate) add_get_assoc_string_ex(__arg, __key, strlen(__key)+1, __str, __dest, __duplicate)
|
||||
#define add_get_assoc_stringl(__arg, __key, __str, __length, __dest, __duplicate) add_get_assoc_stringl_ex(__arg, __key, strlen(__key)+1, __str, __length, __dest, __duplicate)
|
||||
|
||||
ZEND_API int add_get_index_long(zval *arg, uint idx, long l, void **dest);
|
||||
ZEND_API int add_get_index_double(zval *arg, uint idx, double d, void **dest);
|
||||
ZEND_API int add_get_assoc_string(zval *arg, char *key, char *str, void **dest, int duplicate);
|
||||
ZEND_API int add_get_assoc_stringl(zval *arg, char *key, char *str, uint length, void **dest, int duplicate);
|
||||
ZEND_API int add_get_index_string(zval *arg, uint idx, char *str, void **dest, int duplicate);
|
||||
ZEND_API int add_get_index_stringl(zval *arg, uint idx, char *str, uint length, void **dest, int duplicate);
|
||||
|
||||
ZEND_API int call_user_function(HashTable *function_table, zval *object, zval *function_name, zval *retval_ptr, int param_count, zval *params[]);
|
||||
ZEND_API int call_user_function_ex(HashTable *function_table, zval *object, zval *function_name, zval **retval_ptr_ptr, int param_count, zval **params[], int no_separation, HashTable *symbol_table);
|
||||
ZEND_API int add_property_long_ex(zval *arg, char *key, uint key_len, long l);
|
||||
ZEND_API int add_property_null_ex(zval *arg, char *key, uint key_len);
|
||||
ZEND_API int add_property_bool_ex(zval *arg, char *key, uint key_len, int b);
|
||||
ZEND_API int add_property_resource_ex(zval *arg, char *key, uint key_len, long r);
|
||||
ZEND_API int add_property_double_ex(zval *arg, char *key, uint key_len, double d);
|
||||
ZEND_API int add_property_string_ex(zval *arg, char *key, uint key_len, char *str, int duplicate);
|
||||
ZEND_API int add_property_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, int duplicate);
|
||||
ZEND_API int add_property_zval_ex(zval *arg, char *key, uint key_len, zval *value);
|
||||
|
||||
ZEND_API int 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);
|
||||
#define add_property_long(__arg, __key, __n) add_property_long_ex(__arg, __key, strlen(__key)+1, __n)
|
||||
#define add_property_null(__arg, __key) add_property_null_ex(__arg, __key, strlen(__key) + 1)
|
||||
#define add_property_bool(__arg, __key, __b) add_property_bool_ex(__arg, __key, strlen(__key)+1, __b)
|
||||
#define add_property_resource(__arg, __key, __r) add_property_resource_ex(__arg, __key, strlen(__key)+1, __r)
|
||||
#define add_property_double(__arg, __key, __d) add_property_double_ex(__arg, __key, strlen(__key)+1, __d)
|
||||
#define add_property_string(__arg, __key, __str, __duplicate) add_property_string_ex(__arg, __key, strlen(__key)+1, __str, __duplicate)
|
||||
#define add_property_stringl(__arg, __key, __str, __length, __duplicate) add_property_stringl_ex(__arg, __key, strlen(__key)+1, __str, __length, __duplicate)
|
||||
#define add_property_zval(__arg, __key, __value) add_property_zval_ex(__arg, __key, strlen(__key)+1, __value)
|
||||
|
||||
ZEND_API int call_user_function(HashTable *function_table, zval **object_pp, zval *function_name, zval *retval_ptr, int param_count, zval *params[]);
|
||||
ZEND_API int call_user_function_ex(HashTable *function_table, zval **object_pp, zval *function_name, zval **retval_ptr_ptr, int param_count, zval **params[], int no_separation, HashTable *symbol_table);
|
||||
|
||||
ZEND_API int zend_set_hash_symbol(zval *symbol, char *name, int name_length,
|
||||
int is_ref, int num_symbol_tables, ...);
|
||||
|
||||
+31
-3
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 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 |
|
||||
@@ -137,6 +137,9 @@ ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
|
||||
p->orig_lineno = __zend_orig_lineno;
|
||||
p->magic = MEM_BLOCK_START_MAGIC;
|
||||
p->reported = 0;
|
||||
/* Setting the thread id should not be necessary, because we fetched this block
|
||||
* from this thread's cache
|
||||
*/
|
||||
AG(cache_stats)[CACHE_INDEX][1]++;
|
||||
#endif
|
||||
p->persistent = 0;
|
||||
@@ -177,6 +180,9 @@ ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
|
||||
p->orig_lineno = __zend_orig_lineno;
|
||||
p->magic = MEM_BLOCK_START_MAGIC;
|
||||
p->reported = 0;
|
||||
# ifdef ZTS
|
||||
p->thread_id = tsrm_thread_id();
|
||||
# endif
|
||||
*((long *)(((char *) p) + sizeof(zend_mem_header)+SIZE+PLATFORM_PADDING+END_ALIGNMENT(SIZE))) = MEM_BLOCK_END_MAGIC;
|
||||
#endif
|
||||
#if MEMORY_LIMIT
|
||||
@@ -193,6 +199,15 @@ ZEND_API void _efree(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
|
||||
DECLARE_CACHE_VARS
|
||||
ALS_FETCH();
|
||||
|
||||
#if defined(ZTS) && ZEND_DEBUG
|
||||
if (p->thread_id != tsrm_thread_id()) {
|
||||
tsrm_error(TSRM_ERROR_LEVEL_ERROR, "Memory block allocated at %s:(%d) on thread %x freed at %s:(%d) on thread %x, ignoring",
|
||||
p->filename, p->lineno, p->thread_id,
|
||||
__zend_filename, __zend_lineno, tsrm_thread_id());
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
CALCULATE_REAL_SIZE_AND_CACHE_INDEX(p->size);
|
||||
#if ZEND_DEBUG
|
||||
if (!_mem_block_check(ptr, 1 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC)) {
|
||||
@@ -253,6 +268,19 @@ ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure ZEND_FILE_LIN
|
||||
return _emalloc(size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
|
||||
}
|
||||
|
||||
#if defined(ZTS) && ZEND_DEBUG
|
||||
if (p->thread_id != tsrm_thread_id()) {
|
||||
void *new_p;
|
||||
|
||||
tsrm_error(TSRM_ERROR_LEVEL_ERROR, "Memory block allocated at %s:(%d) on thread %x reallocated at %s:(%d) on thread %x, duplicating",
|
||||
p->filename, p->lineno, p->thread_id,
|
||||
__zend_filename, __zend_lineno, tsrm_thread_id());
|
||||
new_p = _emalloc(size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
|
||||
memcpy(new_p, ptr, p->size);
|
||||
return new_p;
|
||||
}
|
||||
#endif
|
||||
|
||||
CALCULATE_REAL_SIZE_AND_CACHE_INDEX(size);
|
||||
|
||||
HANDLE_BLOCK_INTERRUPTIONS();
|
||||
@@ -474,7 +502,7 @@ ZEND_API void shutdown_memory_manager(int silent, int clean_cache)
|
||||
/* we're shutting down completely, don't even touch the INI subsystem */
|
||||
break;
|
||||
}
|
||||
if (zend_get_ini_entry("display_memory_cache_stats", sizeof("display_memory_cache_stats"), &display_memory_cache_stats)==FAILURE) {
|
||||
if (zend_get_configuration_directive("display_memory_cache_stats", sizeof("display_memory_cache_stats"), &display_memory_cache_stats)==FAILURE) {
|
||||
break;
|
||||
}
|
||||
if (!atoi(display_memory_cache_stats.value.str.val)) {
|
||||
@@ -520,7 +548,7 @@ void zend_debug_alloc_output(char *format, ...)
|
||||
#ifdef ZEND_WIN32
|
||||
OutputDebugString(output_buf);
|
||||
#else
|
||||
fprintf(stderr, output_buf);
|
||||
fprintf(stderr, "%s", output_buf);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
+10
-2
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -23,6 +23,10 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef ZTS
|
||||
#include "../TSRM/TSRM.h"
|
||||
#endif
|
||||
|
||||
#include "zend_globals_macros.h"
|
||||
|
||||
#define MEM_BLOCK_START_MAGIC 0x7312F8DCL
|
||||
@@ -38,6 +42,9 @@ typedef struct _zend_mem_header {
|
||||
int reported;
|
||||
char *orig_filename;
|
||||
uint orig_lineno;
|
||||
# ifdef ZTS
|
||||
THREAD_T thread_id;
|
||||
# endif
|
||||
#endif
|
||||
struct _zend_mem_header *pNext;
|
||||
struct _zend_mem_header *pLast;
|
||||
@@ -64,10 +71,11 @@ typedef union _align_test {
|
||||
|
||||
#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()
|
||||
|
||||
ZEND_API char *zend_strndup(const char *s, unsigned int length);
|
||||
|
||||
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);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -29,7 +29,7 @@ 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_NAMED_FUNCTION(zend_if_strlen);
|
||||
static ZEND_FUNCTION(strcmp);
|
||||
static ZEND_FUNCTION(strncmp);
|
||||
static ZEND_FUNCTION(strcasecmp);
|
||||
@@ -56,23 +56,25 @@ static ZEND_FUNCTION(trigger_error);
|
||||
static ZEND_FUNCTION(set_error_handler);
|
||||
static ZEND_FUNCTION(restore_error_handler);
|
||||
static ZEND_FUNCTION(get_declared_classes);
|
||||
static ZEND_FUNCTION(get_defined_functions);
|
||||
static ZEND_FUNCTION(get_defined_vars);
|
||||
static ZEND_FUNCTION(create_function);
|
||||
static ZEND_FUNCTION(get_resource_type);
|
||||
#if ZEND_DEBUG
|
||||
static ZEND_FUNCTION(zend_test_func);
|
||||
#endif
|
||||
|
||||
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 };
|
||||
ZEND_API unsigned char first_arg_force_ref[] = { 1, BYREF_FORCE };
|
||||
ZEND_API unsigned char first_arg_allow_ref[] = { 1, BYREF_ALLOW };
|
||||
ZEND_API unsigned char second_arg_force_ref[] = { 2, BYREF_NONE, BYREF_FORCE };
|
||||
ZEND_API unsigned char second_arg_allow_ref[] = { 2, BYREF_NONE, BYREF_ALLOW };
|
||||
|
||||
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)
|
||||
{ "strlen", zend_if_strlen, NULL },
|
||||
ZEND_FE(strcmp, NULL)
|
||||
ZEND_FE(strncmp, NULL)
|
||||
ZEND_FE(strcasecmp, NULL)
|
||||
@@ -101,6 +103,8 @@ static zend_function_entry builtin_functions[] = {
|
||||
ZEND_FE(set_error_handler, NULL)
|
||||
ZEND_FE(restore_error_handler, NULL)
|
||||
ZEND_FE(get_declared_classes, NULL)
|
||||
ZEND_FE(get_defined_functions, NULL)
|
||||
ZEND_FE(get_defined_vars, NULL)
|
||||
ZEND_FE(create_function, NULL)
|
||||
ZEND_FE(get_resource_type, NULL)
|
||||
#if ZEND_DEBUG
|
||||
@@ -217,7 +221,7 @@ ZEND_FUNCTION(func_get_args)
|
||||
|
||||
/* {{{ proto int strlen(string str)
|
||||
Get string length */
|
||||
ZEND_FUNCTION(strlen)
|
||||
ZEND_NAMED_FUNCTION(zend_if_strlen)
|
||||
{
|
||||
zval **str;
|
||||
|
||||
@@ -328,7 +332,7 @@ ZEND_FUNCTION(each)
|
||||
entry->refcount++;
|
||||
|
||||
/* add the key elements */
|
||||
switch (zend_hash_get_current_key(target_hash, &string_key, &num_key)) {
|
||||
switch (zend_hash_get_current_key(target_hash, &string_key, &num_key, 1)) {
|
||||
case HASH_KEY_IS_STRING:
|
||||
add_get_index_string(return_value,0,string_key,(void **) &inserted_pointer,0);
|
||||
break;
|
||||
@@ -527,6 +531,10 @@ ZEND_FUNCTION(get_class_vars)
|
||||
} else {
|
||||
efree(lcname);
|
||||
array_init(return_value);
|
||||
if (!ce->constants_updated) {
|
||||
zend_hash_apply_with_argument(&ce->default_properties, (int (*)(void *,void *)) zval_update_constant, (void *) 1);
|
||||
ce->constants_updated = 1;
|
||||
}
|
||||
zend_hash_copy(return_value->value.ht, &ce->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
|
||||
}
|
||||
}
|
||||
@@ -581,7 +589,7 @@ ZEND_FUNCTION(get_class_methods)
|
||||
efree(lcname);
|
||||
array_init(return_value);
|
||||
zend_hash_internal_pointer_reset(&ce->function_table);
|
||||
while ((key_type = zend_hash_get_current_key(&ce->function_table, &string_key, &num_key)) != HASH_KEY_NON_EXISTANT) {
|
||||
while ((key_type = zend_hash_get_current_key(&ce->function_table, &string_key, &num_key, 1)) != HASH_KEY_NON_EXISTANT) {
|
||||
if (key_type == HASH_KEY_IS_STRING) {
|
||||
MAKE_STD_ZVAL(method_name);
|
||||
ZVAL_STRING(method_name, string_key, 0);
|
||||
@@ -716,12 +724,19 @@ static int copy_import_use_file(zend_file_handle *fh, zval *array)
|
||||
Returns an array with the file names that were include_once()'d */
|
||||
ZEND_FUNCTION(get_included_files)
|
||||
{
|
||||
char *entry;
|
||||
if (ZEND_NUM_ARGS() != 0) {
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
}
|
||||
|
||||
array_init(return_value);
|
||||
zend_hash_apply_with_argument(&EG(included_files), (apply_func_arg_t) copy_import_use_file, return_value);
|
||||
zend_hash_internal_pointer_reset(&EG(included_files));
|
||||
while(zend_hash_get_current_key(&EG(included_files), &entry, NULL, 1) == HASH_KEY_IS_STRING) {
|
||||
add_next_index_string(return_value,entry,0);
|
||||
zend_hash_move_forward(&EG(included_files));
|
||||
}
|
||||
|
||||
/* zend_hash_apply_with_argument(&EG(included_files), (apply_func_arg_t) copy_import_use_file, return_value); */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -756,9 +771,11 @@ ZEND_FUNCTION(trigger_error)
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
}
|
||||
convert_to_string_ex(z_error_message);
|
||||
zend_error(error_type, (*z_error_message)->value.str.val);
|
||||
zend_error(error_type, "%s", (*z_error_message)->value.str.val);
|
||||
RETURN_TRUE;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -842,6 +859,68 @@ ZEND_FUNCTION(get_declared_classes)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static int copy_function_name(zend_function *func, int num_args, va_list args, zend_hash_key *hash_key)
|
||||
{
|
||||
zval *internal_ar = va_arg(args, zval *),
|
||||
*user_ar = va_arg(args, zval *);
|
||||
|
||||
if (hash_key->nKeyLength == 0 || hash_key->arKey[0] == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (func->type == ZEND_INTERNAL_FUNCTION) {
|
||||
add_next_index_stringl(internal_ar, hash_key->arKey, hash_key->nKeyLength, 1);
|
||||
} else if (func->type == ZEND_USER_FUNCTION) {
|
||||
add_next_index_stringl(user_ar, hash_key->arKey, hash_key->nKeyLength, 1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* {{{ proto array get_defined_functions(void)
|
||||
Returns an array of all defined functions */
|
||||
ZEND_FUNCTION(get_defined_functions)
|
||||
{
|
||||
zval *internal;
|
||||
zval *user;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 0) {
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
}
|
||||
|
||||
MAKE_STD_ZVAL(internal);
|
||||
MAKE_STD_ZVAL(user);
|
||||
|
||||
array_init(internal);
|
||||
array_init(user);
|
||||
array_init(return_value);
|
||||
|
||||
zend_hash_apply_with_arguments(EG(function_table), (apply_func_args_t)copy_function_name, 2, internal, user);
|
||||
|
||||
if (zend_hash_add(return_value->value.ht, "internal", sizeof("internal"), (void **)&internal, sizeof(zval *), NULL) == FAILURE) {
|
||||
zend_error(E_WARNING, "Cannot add internal functions to return value from get_defined_functions()");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (zend_hash_add(return_value->value.ht, "user", sizeof("user"), (void **)&user, sizeof(zval *), NULL) == FAILURE) {
|
||||
zend_error(E_WARNING, "Cannot add user functions to return value from get_defined_functions()");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto array get_defined_vars(void)
|
||||
Returns an associative array of names and values of all currently defined variable names (variables in the current scope) */
|
||||
ZEND_FUNCTION(get_defined_vars)
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
array_init(return_value);
|
||||
|
||||
zend_hash_copy(return_value->value.ht, EG(active_symbol_table),
|
||||
(copy_ctor_func_t)zval_add_ref, &tmp, sizeof(zval *));
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#define LAMBDA_TEMP_FUNCNAME "__lambda_func"
|
||||
|
||||
@@ -853,6 +932,7 @@ ZEND_FUNCTION(create_function)
|
||||
int eval_code_length, function_name_length;
|
||||
zval **z_function_args, **z_function_code;
|
||||
int retval;
|
||||
char *eval_name;
|
||||
CLS_FETCH();
|
||||
|
||||
if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, &z_function_args, &z_function_code)==FAILURE) {
|
||||
@@ -871,8 +951,11 @@ ZEND_FUNCTION(create_function)
|
||||
eval_code = (char *) emalloc(eval_code_length);
|
||||
sprintf(eval_code, "function " LAMBDA_TEMP_FUNCNAME "(%s){%s}", Z_STRVAL_PP(z_function_args), Z_STRVAL_PP(z_function_code));
|
||||
|
||||
retval = zend_eval_string(eval_code, NULL CLS_CC ELS_CC);
|
||||
eval_name = zend_make_compiled_string_description("runtime-created function");
|
||||
retval = zend_eval_string(eval_code, NULL, eval_name CLS_CC ELS_CC);
|
||||
efree(eval_code);
|
||||
efree(eval_name);
|
||||
|
||||
if (retval==SUCCESS) {
|
||||
zend_function *func;
|
||||
|
||||
@@ -897,13 +980,14 @@ ZEND_FUNCTION(create_function)
|
||||
/* }}} */
|
||||
|
||||
|
||||
|
||||
#if ZEND_DEBUG
|
||||
ZEND_FUNCTION(zend_test_func)
|
||||
{
|
||||
zval *arg1, *arg2;
|
||||
|
||||
zend_get_parameters(ht, 2, &arg1, &arg2);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
ZEND_FUNCTION(get_resource_type)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 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 |
|
||||
|
||||
+171
-161
File diff suppressed because it is too large.
Load diff
+99
-93
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -28,7 +28,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <istream.h>
|
||||
#include <iostream.h>
|
||||
#endif
|
||||
|
||||
#include "zend_llist.h"
|
||||
@@ -44,6 +44,7 @@
|
||||
#define FREE_PNODE(znode) zval_dtor(&znode->u.constant);
|
||||
#define FREE_OP(op, should_free) if (should_free) zval_dtor(&Ts[(op)->u.var].tmp_var);
|
||||
|
||||
#define SET_UNUSED(op) (op).op_type = IS_UNUSED
|
||||
|
||||
#if SUPPORT_INTERACTIVE
|
||||
#define INC_BPC(op_array) ((op_array)->backpatch_count++)
|
||||
@@ -236,147 +237,147 @@ int zend_get_zendleng(CLS_D);
|
||||
|
||||
|
||||
/* parser-driven code generators */
|
||||
void do_binary_op(int op, znode *result, znode *op1, znode *op2 CLS_DC);
|
||||
void do_unary_op(int op, znode *result, znode *op1 CLS_DC);
|
||||
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 zend_do_binary_op(int op, znode *result, znode *op1, znode *op2 CLS_DC);
|
||||
void zend_do_unary_op(int op, znode *result, znode *op1 CLS_DC);
|
||||
void zend_do_binary_assign_op(int op, znode *result, znode *op1, znode *op2 CLS_DC);
|
||||
void zend_do_assign(znode *result, znode *variable, znode *value CLS_DC);
|
||||
void zend_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 zend_do_indirect_references(znode *result, znode *num_references, znode *variable CLS_DC);
|
||||
void zend_do_fetch_global_or_static_variable(znode *varname, znode *static_assignment, int fetch_type CLS_DC);
|
||||
void zend_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);
|
||||
void zend_do_print(znode *result, znode *arg CLS_DC);
|
||||
void zend_do_echo(znode *arg CLS_DC);
|
||||
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_open_bracket, znode *expr CLS_DC);
|
||||
void zend_do_while_cond(znode *expr, znode *close_bracket_token CLS_DC);
|
||||
void zend_do_while_end(znode *while_token, znode *close_bracket_token CLS_DC);
|
||||
void zend_do_do_while_begin(CLS_D);
|
||||
void zend_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);
|
||||
void do_if_after_statement(znode *closing_bracket_token, unsigned char initialize CLS_DC);
|
||||
void do_if_end(CLS_D);
|
||||
void zend_do_if_cond(znode *cond, znode *closing_bracket_token CLS_DC);
|
||||
void zend_do_if_after_statement(znode *closing_bracket_token, unsigned char initialize CLS_DC);
|
||||
void zend_do_if_end(CLS_D);
|
||||
|
||||
void do_for_cond(znode *expr, znode *second_semicolon_token CLS_DC);
|
||||
void do_for_before_statement(znode *cond_start, znode *second_semicolon_token CLS_DC);
|
||||
void do_for_end(znode *second_semicolon_token CLS_DC);
|
||||
void zend_do_for_cond(znode *expr, znode *second_semicolon_token CLS_DC);
|
||||
void zend_do_for_before_statement(znode *cond_start, znode *second_semicolon_token CLS_DC);
|
||||
void zend_do_for_end(znode *second_semicolon_token CLS_DC);
|
||||
|
||||
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 zend_do_pre_incdec(znode *result, znode *op1, int op CLS_DC);
|
||||
void zend_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, int arg_offset CLS_DC);
|
||||
void zend_do_begin_variable_parse(CLS_D);
|
||||
void zend_do_end_variable_parse(int type, int arg_offset CLS_DC);
|
||||
|
||||
void do_free(znode *op1 CLS_DC);
|
||||
void zend_do_free(znode *op1 CLS_DC);
|
||||
|
||||
void do_init_string(znode *result CLS_DC);
|
||||
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 zend_do_init_string(znode *result CLS_DC);
|
||||
void zend_do_add_char(znode *result, znode *op1, znode *op2 CLS_DC);
|
||||
void zend_do_add_string(znode *result, znode *op1, znode *op2 CLS_DC);
|
||||
void zend_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, 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);
|
||||
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, int is_dynamic_fcall CLS_DC);
|
||||
void do_return(znode *expr, int do_end_vparse CLS_DC);
|
||||
void zend_do_begin_function_declaration(znode *function_token, znode *function_name, int is_method, int return_reference CLS_DC);
|
||||
void zend_do_end_function_declaration(znode *function_token CLS_DC);
|
||||
void zend_do_receive_arg(int op, znode *var, znode *offset, znode *initialization, unsigned char pass_type CLS_DC);
|
||||
int zend_do_begin_function_call(znode *function_name CLS_DC);
|
||||
void zend_do_begin_dynamic_function_call(znode *function_name CLS_DC);
|
||||
void zend_do_begin_class_member_function_call(znode *class_name, znode *function_name CLS_DC);
|
||||
void zend_do_end_function_call(znode *function_name, znode *result, znode *argument_list, int is_method, int is_dynamic_fcall CLS_DC);
|
||||
void zend_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_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce);
|
||||
void do_early_binding(CLS_D);
|
||||
void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce);
|
||||
void zend_do_early_binding(CLS_D);
|
||||
|
||||
void do_pass_param(znode *param, int op, int offset CLS_DC);
|
||||
void zend_do_pass_param(znode *param, int op, int offset CLS_DC);
|
||||
|
||||
|
||||
void do_boolean_or_begin(znode *expr1, znode *op_token CLS_DC);
|
||||
void do_boolean_or_end(znode *result, znode *expr1, znode *expr2, znode *op_token CLS_DC);
|
||||
void do_boolean_and_begin(znode *expr1, znode *op_token CLS_DC);
|
||||
void do_boolean_and_end(znode *result, znode *expr1, znode *expr2, znode *op_token CLS_DC);
|
||||
void zend_do_boolean_or_begin(znode *expr1, znode *op_token CLS_DC);
|
||||
void zend_do_boolean_or_end(znode *result, znode *expr1, znode *expr2, znode *op_token CLS_DC);
|
||||
void zend_do_boolean_and_begin(znode *expr1, znode *op_token CLS_DC);
|
||||
void zend_do_boolean_and_end(znode *result, znode *expr1, znode *expr2, znode *op_token CLS_DC);
|
||||
|
||||
void do_brk_cont(int op, znode *expr CLS_DC);
|
||||
void zend_do_brk_cont(int op, znode *expr CLS_DC);
|
||||
|
||||
void do_switch_cond(znode *cond CLS_DC);
|
||||
void do_switch_end(znode *case_list CLS_DC);
|
||||
void do_case_before_statement(znode *case_list, znode *case_token, znode *case_expr CLS_DC);
|
||||
void do_case_after_statement(znode *result, znode *case_token CLS_DC);
|
||||
void do_default_before_statement(znode *case_list, znode *default_token CLS_DC);
|
||||
void zend_do_switch_cond(znode *cond CLS_DC);
|
||||
void zend_do_switch_end(znode *case_list CLS_DC);
|
||||
void zend_do_case_before_statement(znode *case_list, znode *case_token, znode *case_expr CLS_DC);
|
||||
void zend_do_case_after_statement(znode *result, znode *case_token CLS_DC);
|
||||
void zend_do_default_before_statement(znode *case_list, znode *default_token CLS_DC);
|
||||
|
||||
void do_begin_class_declaration(znode *class_name, znode *parent_class_name CLS_DC);
|
||||
void do_end_class_declaration(CLS_D);
|
||||
void do_declare_property(znode *var_name, znode *value CLS_DC);
|
||||
void zend_do_begin_class_declaration(znode *class_name, znode *parent_class_name CLS_DC);
|
||||
void zend_do_end_class_declaration(CLS_D);
|
||||
void zend_do_declare_property(znode *var_name, znode *value CLS_DC);
|
||||
|
||||
void do_fetch_property(znode *result, znode *object, znode *property CLS_DC);
|
||||
void zend_do_fetch_property(znode *result, znode *object, znode *property CLS_DC);
|
||||
|
||||
|
||||
void do_push_object(znode *object CLS_DC);
|
||||
void do_pop_object(znode *object CLS_DC);
|
||||
void zend_do_push_object(znode *object CLS_DC);
|
||||
void zend_do_pop_object(znode *object 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 zend_do_begin_new_object(znode *new_token, znode *class_name CLS_DC);
|
||||
void zend_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 zend_do_fetch_constant(znode *result, znode *constant_name, int mode CLS_DC);
|
||||
|
||||
void do_shell_exec(znode *result, znode *cmd CLS_DC);
|
||||
void zend_do_shell_exec(znode *result, znode *cmd CLS_DC);
|
||||
|
||||
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);
|
||||
void do_new_list_end(CLS_D);
|
||||
void zend_do_init_array(znode *result, znode *expr, znode *offset, int is_ref CLS_DC);
|
||||
void zend_do_add_array_element(znode *result, znode *expr, znode *offset, int is_ref CLS_DC);
|
||||
void zend_do_add_static_array_element(znode *result, znode *offset, znode *expr);
|
||||
void zend_do_list_init(CLS_D);
|
||||
void zend_do_list_end(znode *result, znode *expr CLS_DC);
|
||||
void zend_do_add_list_element(znode *element CLS_DC);
|
||||
void zend_do_new_list_begin(CLS_D);
|
||||
void zend_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 zend_do_cast(znode *result, znode *expr, int type CLS_DC);
|
||||
void zend_do_include_or_eval(int type, znode *result, znode *op1 CLS_DC);
|
||||
|
||||
void do_unset(znode *variable CLS_DC);
|
||||
void do_isset_or_isempty(int type, znode *result, znode *variable CLS_DC);
|
||||
void zend_do_unset(znode *variable CLS_DC);
|
||||
void zend_do_isset_or_isempty(int type, znode *result, znode *variable CLS_DC);
|
||||
|
||||
void do_foreach_begin(znode *foreach_token, znode *array, znode *open_brackets_token, znode *as_token, int variable CLS_DC);
|
||||
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 zend_do_foreach_begin(znode *foreach_token, znode *array, znode *open_brackets_token, znode *as_token, int variable CLS_DC);
|
||||
void zend_do_foreach_cont(znode *value, znode *key, znode *as_token CLS_DC);
|
||||
void zend_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 zend_do_declare_begin(CLS_D);
|
||||
void zend_do_declare_stmt(znode *var, znode *val CLS_DC);
|
||||
void zend_do_declare_end(CLS_D);
|
||||
|
||||
void do_end_heredoc(CLS_D);
|
||||
void zend_do_end_heredoc(CLS_D);
|
||||
|
||||
void do_exit(znode *result, znode *message CLS_DC);
|
||||
void zend_do_exit(znode *result, znode *message CLS_DC);
|
||||
|
||||
void do_begin_silence(znode *strudel_token CLS_DC);
|
||||
void do_end_silence(znode *strudel_token CLS_DC);
|
||||
void zend_do_begin_silence(znode *strudel_token CLS_DC);
|
||||
void zend_do_end_silence(znode *strudel_token CLS_DC);
|
||||
|
||||
void do_begin_qm_op(znode *cond, znode *qm_token CLS_DC);
|
||||
void do_qm_true(znode *true_value, znode *qm_token, znode *colon_token CLS_DC);
|
||||
void do_qm_false(znode *result, znode *false_value, znode *qm_token, znode *colon_token CLS_DC);
|
||||
void zend_do_begin_qm_op(znode *cond, znode *qm_token CLS_DC);
|
||||
void zend_do_qm_true(znode *true_value, znode *qm_token, znode *colon_token CLS_DC);
|
||||
void zend_do_qm_false(znode *result, znode *false_value, znode *qm_token, znode *colon_token CLS_DC);
|
||||
|
||||
void do_extended_info(CLS_D);
|
||||
void do_extended_fcall_begin(CLS_D);
|
||||
void do_extended_fcall_end(CLS_D);
|
||||
void zend_do_extended_info(CLS_D);
|
||||
void zend_do_extended_fcall_begin(CLS_D);
|
||||
void zend_do_extended_fcall_end(CLS_D);
|
||||
|
||||
void do_ticks(CLS_D);
|
||||
void zend_do_ticks(CLS_D);
|
||||
|
||||
ZEND_API void function_add_ref(zend_function *function);
|
||||
|
||||
#define INITIAL_OP_ARRAY_SIZE 64
|
||||
|
||||
|
||||
/* helper functions in zend-scanner.l */
|
||||
/* helper functions in zend_language_scanner.l */
|
||||
ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type CLS_DC);
|
||||
ZEND_API zend_op_array *compile_string(zval *source_string CLS_DC);
|
||||
ZEND_API zend_op_array *compile_string(zval *source_string, char *filename CLS_DC);
|
||||
ZEND_API zend_op_array *compile_filename(int type, zval *filename CLS_DC ELS_DC);
|
||||
ZEND_API int zend_execute_scripts(int type CLS_DC ELS_DC, int file_count, ...);
|
||||
ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC);
|
||||
@@ -400,6 +401,7 @@ void print_op_array(zend_op_array *op_array, int optimizations);
|
||||
int pass_two(zend_op_array *op_array);
|
||||
zend_brk_cont_element *get_next_brk_cont_element(zend_op_array *op_array);
|
||||
ZEND_API zend_bool zend_is_compiling(void);
|
||||
ZEND_API char *zend_make_compiled_string_description(char *name);
|
||||
|
||||
int zendlex(znode *zendlval CLS_DC);
|
||||
|
||||
@@ -536,6 +538,8 @@ int zendlex(znode *zendlval CLS_DC);
|
||||
|
||||
#define ZEND_TICKS 105
|
||||
|
||||
#define ZEND_SEND_VAR_NO_REF 106
|
||||
|
||||
/* end of block */
|
||||
|
||||
|
||||
@@ -593,6 +597,8 @@ int zendlex(znode *zendlval CLS_DC);
|
||||
#define ZEND_MEMBER_FUNC_CALL 1<<0
|
||||
#define ZEND_CTOR_CALL 1<<1
|
||||
|
||||
#define ZEND_ARG_SEND_BY_REF (1<<0)
|
||||
#define ZEND_ARG_COMPILE_TIME_BOUND (1<<1)
|
||||
|
||||
#define AI_USE_PTR(ai) \
|
||||
if ((ai).ptr_ptr) { \
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -13,8 +13,7 @@
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Z
|
||||
eev Suraski <zeev@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
@@ -50,15 +49,12 @@ typedef unsigned int uint;
|
||||
#define vsnprintf _vsnprintf
|
||||
#define zend_isinf(a) 0
|
||||
|
||||
#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
|
||||
*/
|
||||
#undef inline
|
||||
#ifdef ZEND_WIN32_FORCE_INLINE
|
||||
# define inline __forceinline
|
||||
#else
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+146
-130
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -98,6 +98,7 @@ static inline zval *_get_zval_ptr(znode *node, temp_variable *Ts, int *should_fr
|
||||
zval *str = T->EA.data.str_offset.str;
|
||||
|
||||
if (T->EA.data.str_offset.str->type != IS_STRING
|
||||
|| (T->EA.data.str_offset.offset<0)
|
||||
|| (T->EA.data.str_offset.str->value.str.len <= T->EA.data.str_offset.offset)) {
|
||||
T->tmp_var.value.str.val = empty_string;
|
||||
T->tmp_var.value.str.len = 0;
|
||||
@@ -173,8 +174,7 @@ static inline zval **_get_zval_ptr_ptr(znode *node, temp_variable *Ts ELS_DC)
|
||||
|
||||
static inline zval **zend_fetch_property_address_inner(HashTable *ht, znode *op2, temp_variable *Ts, int type ELS_DC)
|
||||
{
|
||||
int free_op2;
|
||||
zval *prop_ptr = get_zval_ptr(op2, Ts, &free_op2, BP_VAR_R);
|
||||
zval *prop_ptr = get_zval_ptr(op2, Ts, &EG(free_op2), BP_VAR_R);
|
||||
zval **retval;
|
||||
zval tmp;
|
||||
|
||||
@@ -219,7 +219,7 @@ static inline zval **zend_fetch_property_address_inner(HashTable *ht, znode *op2
|
||||
if (prop_ptr == &tmp) {
|
||||
zval_dtor(prop_ptr);
|
||||
}
|
||||
FREE_OP(op2, free_op2);
|
||||
FREE_OP(op2, EG(free_op2));
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -264,6 +264,7 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2
|
||||
temp_variable *T = &Ts[op1->u.var];
|
||||
|
||||
if (T->EA.data.str_offset.str->type == IS_STRING
|
||||
&& (T->EA.data.str_offset.offset >= 0)
|
||||
&& (T->EA.data.str_offset.offset < T->EA.data.str_offset.str->value.str.len)) {
|
||||
zval tmp;
|
||||
zval *final_value = value;
|
||||
@@ -345,7 +346,7 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2
|
||||
if (variable_ptr==value) {
|
||||
variable_ptr->refcount++;
|
||||
} else if (PZVAL_IS_REF(value)) {
|
||||
zval tmp = *value;
|
||||
zval tmp;
|
||||
|
||||
tmp = *value;
|
||||
zval_copy_ctor(&tmp);
|
||||
@@ -502,8 +503,7 @@ static void zend_fetch_var_address(znode *result, znode *op1, znode *op2, temp_v
|
||||
|
||||
static inline zval **zend_fetch_dimension_address_inner(HashTable *ht, znode *op2, temp_variable *Ts, int type ELS_DC)
|
||||
{
|
||||
int free_op2;
|
||||
zval *dim = get_zval_ptr(op2, Ts, &free_op2, BP_VAR_R);
|
||||
zval *dim = get_zval_ptr(op2, Ts, &EG(free_op2), BP_VAR_R);
|
||||
zval **retval;
|
||||
char *offset_key;
|
||||
int offset_key_length;
|
||||
@@ -581,52 +581,58 @@ fetch_string_dim:
|
||||
}
|
||||
break;
|
||||
}
|
||||
FREE_OP(op2, free_op2);
|
||||
FREE_OP(op2, EG(free_op2));
|
||||
return retval;
|
||||
}
|
||||
|
||||
static void fetch_overloaded_element(znode *result, znode *op1, znode *op2, temp_variable *Ts, int type, zval ***retval, int overloaded_element_type ELS_DC)
|
||||
{
|
||||
zend_overloaded_element overloaded_element;
|
||||
|
||||
if (Ts[op1->u.var].EA.type == IS_STRING_OFFSET) {
|
||||
zval_ptr_dtor(&Ts[op1->u.var].EA.data.str_offset.str);
|
||||
switch (type) {
|
||||
case BP_VAR_R:
|
||||
case BP_VAR_IS:
|
||||
*retval = &EG(uninitialized_zval_ptr);
|
||||
break;
|
||||
case BP_VAR_W:
|
||||
case BP_VAR_RW:
|
||||
*retval = &EG(error_zval_ptr);
|
||||
break;
|
||||
EMPTY_SWITCH_DEFAULT_CASE()
|
||||
}
|
||||
SELECTIVE_PZVAL_LOCK(**retval, result);
|
||||
return;
|
||||
}
|
||||
|
||||
overloaded_element.element = *get_zval_ptr(op2, Ts, &EG(free_op2), type);
|
||||
overloaded_element.type = overloaded_element_type;
|
||||
if (!EG(free_op2)) {
|
||||
zval_copy_ctor(&overloaded_element.element);
|
||||
}
|
||||
|
||||
Ts[result->u.var].EA = Ts[op1->u.var].EA;
|
||||
zend_llist_add_element(Ts[result->u.var].EA.data.overloaded_element.elements_list, &overloaded_element);
|
||||
|
||||
Ts[result->u.var].EA.type = IS_OVERLOADED_OBJECT;
|
||||
*retval = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
static void zend_fetch_dimension_address(znode *result, znode *op1, znode *op2, temp_variable *Ts, int type ELS_DC)
|
||||
{
|
||||
int free_op2;
|
||||
zval **container_ptr = get_zval_ptr_ptr(op1, Ts, type);
|
||||
zval *container;
|
||||
zval ***retval = &Ts[result->u.var].var.ptr_ptr;
|
||||
|
||||
|
||||
if (container_ptr == NULL) {
|
||||
zend_overloaded_element overloaded_element;
|
||||
|
||||
if (Ts[op1->u.var].EA.type == IS_STRING_OFFSET) {
|
||||
switch (type) {
|
||||
case BP_VAR_R:
|
||||
case BP_VAR_IS:
|
||||
*retval = &EG(uninitialized_zval_ptr);
|
||||
break;
|
||||
case BP_VAR_W:
|
||||
case BP_VAR_RW:
|
||||
*retval = &EG(error_zval_ptr);
|
||||
break;
|
||||
EMPTY_SWITCH_DEFAULT_CASE()
|
||||
}
|
||||
SELECTIVE_PZVAL_LOCK(**retval, result);
|
||||
return;
|
||||
}
|
||||
|
||||
/* prepare the new element */
|
||||
overloaded_element.element = *get_zval_ptr(op2, Ts, &free_op2, type);
|
||||
overloaded_element.type = OE_IS_ARRAY;
|
||||
if (!free_op2) {
|
||||
zval_copy_ctor(&overloaded_element.element);
|
||||
}
|
||||
|
||||
Ts[result->u.var].EA = Ts[op1->u.var].EA;
|
||||
zend_llist_add_element(Ts[result->u.var].EA.data.overloaded_element.elements_list, &overloaded_element);
|
||||
|
||||
Ts[result->u.var].EA.type = IS_OVERLOADED_OBJECT;
|
||||
*retval = NULL;
|
||||
fetch_overloaded_element(result, op1, op2, Ts, type, retval, OE_IS_ARRAY ELS_CC);
|
||||
return;
|
||||
}
|
||||
|
||||
container = *container_ptr;
|
||||
|
||||
if (container == EG(error_zval_ptr)) {
|
||||
@@ -668,10 +674,10 @@ static void zend_fetch_dimension_address(znode *result, znode *op1, znode *op2,
|
||||
break;
|
||||
case IS_NULL:
|
||||
/* for read-mode only */
|
||||
get_zval_ptr(op2, Ts, &free_op2, BP_VAR_R);
|
||||
get_zval_ptr(op2, Ts, &EG(free_op2), BP_VAR_R);
|
||||
*retval = &EG(uninitialized_zval_ptr);
|
||||
SELECTIVE_PZVAL_LOCK(**retval, result);
|
||||
FREE_OP(op2, free_op2);
|
||||
FREE_OP(op2, EG(free_op2));
|
||||
if (type==BP_VAR_W || type==BP_VAR_RW) {
|
||||
zend_error(E_WARNING, "Cannot use a NULL value as an array");
|
||||
}
|
||||
@@ -684,7 +690,7 @@ static void zend_fetch_dimension_address(znode *result, znode *op1, znode *op2,
|
||||
zend_error(E_ERROR, "[] operator not supported for strings");
|
||||
}
|
||||
|
||||
offset = get_zval_ptr(op2, Ts, &free_op2, BP_VAR_R);
|
||||
offset = get_zval_ptr(op2, Ts, &EG(free_op2), BP_VAR_R);
|
||||
|
||||
if (offset->type != IS_LONG) {
|
||||
tmp = *offset;
|
||||
@@ -700,7 +706,7 @@ static void zend_fetch_dimension_address(znode *result, znode *op1, znode *op2,
|
||||
PZVAL_LOCK(container);
|
||||
Ts[result->u.var].EA.data.str_offset.offset = offset->value.lval;
|
||||
Ts[result->u.var].EA.type = IS_STRING_OFFSET;
|
||||
FREE_OP(op2, free_op2);
|
||||
FREE_OP(op2, EG(free_op2));
|
||||
*retval = NULL;
|
||||
return;
|
||||
}
|
||||
@@ -708,13 +714,13 @@ static void zend_fetch_dimension_address(znode *result, znode *op1, znode *op2,
|
||||
default: {
|
||||
zval *offset;
|
||||
|
||||
offset = get_zval_ptr(op2, Ts, &free_op2, BP_VAR_R);
|
||||
offset = get_zval_ptr(op2, Ts, &EG(free_op2), BP_VAR_R);
|
||||
if (type==BP_VAR_R || type==BP_VAR_IS) {
|
||||
*retval = &EG(uninitialized_zval_ptr);
|
||||
} else {
|
||||
*retval = &EG(error_zval_ptr);
|
||||
}
|
||||
FREE_OP(op2, free_op2);
|
||||
FREE_OP(op2, EG(free_op2));
|
||||
SELECTIVE_PZVAL_LOCK(**retval, result);
|
||||
if (type==BP_VAR_W || type==BP_VAR_RW) {
|
||||
zend_error(E_WARNING, "Cannot use a scalar value as an array");
|
||||
@@ -743,43 +749,13 @@ static void zend_fetch_dimension_address_from_tmp_var(znode *result, znode *op1,
|
||||
|
||||
static void zend_fetch_property_address(znode *result, znode *op1, znode *op2, temp_variable *Ts, int type ELS_DC)
|
||||
{
|
||||
int free_op2;
|
||||
zval **container_ptr = get_zval_ptr_ptr(op1, Ts, type);
|
||||
zval *container;
|
||||
zval ***retval = &Ts[result->u.var].var.ptr_ptr;
|
||||
|
||||
|
||||
if (container_ptr == NULL) {
|
||||
zend_overloaded_element overloaded_element;
|
||||
|
||||
if (Ts[op1->u.var].EA.type == IS_STRING_OFFSET) {
|
||||
zval_ptr_dtor(&Ts[op1->u.var].EA.data.str_offset.str);
|
||||
switch (type) {
|
||||
case BP_VAR_R:
|
||||
case BP_VAR_IS:
|
||||
*retval = &EG(uninitialized_zval_ptr);
|
||||
break;
|
||||
case BP_VAR_W:
|
||||
case BP_VAR_RW:
|
||||
*retval = &EG(error_zval_ptr);
|
||||
break;
|
||||
EMPTY_SWITCH_DEFAULT_CASE()
|
||||
}
|
||||
SELECTIVE_PZVAL_LOCK(**retval, result);
|
||||
return;
|
||||
}
|
||||
|
||||
overloaded_element.element = *get_zval_ptr(op2, Ts, &free_op2, type);
|
||||
overloaded_element.type = OE_IS_OBJECT;
|
||||
if (!free_op2) {
|
||||
zval_copy_ctor(&overloaded_element.element);
|
||||
}
|
||||
|
||||
Ts[result->u.var].EA = Ts[op1->u.var].EA;
|
||||
zend_llist_add_element(Ts[result->u.var].EA.data.overloaded_element.elements_list, &overloaded_element);
|
||||
|
||||
Ts[result->u.var].EA.type = IS_OVERLOADED_OBJECT;
|
||||
*retval = NULL;
|
||||
fetch_overloaded_element(result, op1, op2, Ts, type, retval, OE_IS_OBJECT ELS_CC);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -798,9 +774,9 @@ static void zend_fetch_property_address(znode *result, znode *op1, znode *op2, t
|
||||
Ts[result->u.var].EA.data.overloaded_element.type = type;
|
||||
Ts[result->u.var].EA.data.overloaded_element.elements_list = (zend_llist *) emalloc(sizeof(zend_llist));
|
||||
zend_llist_init(Ts[result->u.var].EA.data.overloaded_element.elements_list, sizeof(zend_overloaded_element), NULL, 0);
|
||||
overloaded_element.element = *get_zval_ptr(op2, Ts, &free_op2, type);
|
||||
overloaded_element.element = *get_zval_ptr(op2, Ts, &EG(free_op2), type);
|
||||
overloaded_element.type = OE_IS_OBJECT;
|
||||
if (!free_op2) {
|
||||
if (!EG(free_op2)) {
|
||||
zval_copy_ctor(&overloaded_element.element);
|
||||
}
|
||||
zend_llist_add_element(Ts[result->u.var].EA.data.overloaded_element.elements_list, &overloaded_element);
|
||||
@@ -828,8 +804,8 @@ static void zend_fetch_property_address(znode *result, znode *op1, znode *op2, t
|
||||
if (container->type != IS_OBJECT) {
|
||||
zval *offset;
|
||||
|
||||
offset = get_zval_ptr(op2, Ts, &free_op2, BP_VAR_R);
|
||||
FREE_OP(op2, free_op2);
|
||||
offset = get_zval_ptr(op2, Ts, &EG(free_op2), BP_VAR_R);
|
||||
FREE_OP(op2, EG(free_op2));
|
||||
if (type==BP_VAR_R || type==BP_VAR_IS) {
|
||||
*retval = &EG(uninitialized_zval_ptr);
|
||||
} else {
|
||||
@@ -1322,38 +1298,32 @@ binary_assign_op_addr: {
|
||||
zend_op *original_opline = opline;
|
||||
int retval = zend_is_true(get_zval_ptr(&original_opline->op1, Ts, &EG(free_op1), BP_VAR_R));
|
||||
|
||||
FREE_OP(&original_opline->op1, EG(free_op1));
|
||||
Ts[original_opline->result.u.var].tmp_var.value.lval = retval;
|
||||
Ts[original_opline->result.u.var].tmp_var.type = IS_LONG;
|
||||
if (!retval) {
|
||||
#if DEBUG_ZEND>=2
|
||||
printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
|
||||
#endif
|
||||
opline = &op_array->opcodes[opline->op2.u.opline_num];
|
||||
FREE_OP(&original_opline->op1, EG(free_op1));
|
||||
Ts[original_opline->result.u.var].tmp_var.value.lval = retval;
|
||||
Ts[original_opline->result.u.var].tmp_var.type = IS_LONG;
|
||||
continue;
|
||||
}
|
||||
FREE_OP(&original_opline->op1, EG(free_op1));
|
||||
Ts[original_opline->result.u.var].tmp_var.value.lval = retval;
|
||||
Ts[original_opline->result.u.var].tmp_var.type = IS_LONG;
|
||||
}
|
||||
NEXT_OPCODE();
|
||||
case ZEND_JMPNZ_EX: {
|
||||
zend_op *original_opline = opline;
|
||||
int retval = zend_is_true(get_zval_ptr(&original_opline->op1, Ts, &EG(free_op1), BP_VAR_R));
|
||||
|
||||
FREE_OP(&original_opline->op1, EG(free_op1));
|
||||
Ts[original_opline->result.u.var].tmp_var.value.lval = retval;
|
||||
Ts[original_opline->result.u.var].tmp_var.type = IS_LONG;
|
||||
if (retval) {
|
||||
#if DEBUG_ZEND>=2
|
||||
printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
|
||||
#endif
|
||||
opline = &op_array->opcodes[opline->op2.u.opline_num];
|
||||
FREE_OP(&original_opline->op1, EG(free_op1));
|
||||
Ts[original_opline->result.u.var].tmp_var.value.lval = retval;
|
||||
Ts[original_opline->result.u.var].tmp_var.type = IS_LONG;
|
||||
continue;
|
||||
}
|
||||
FREE_OP(&original_opline->op1, EG(free_op1));
|
||||
Ts[original_opline->result.u.var].tmp_var.value.lval = retval;
|
||||
Ts[original_opline->result.u.var].tmp_var.type = IS_LONG;
|
||||
}
|
||||
NEXT_OPCODE();
|
||||
case ZEND_FREE:
|
||||
@@ -1414,7 +1384,7 @@ binary_assign_op_addr: {
|
||||
if (opline->op1.op_type == IS_VAR) {
|
||||
SELECTIVE_PZVAL_LOCK(*Ts[opline->op1.u.var].var.ptr_ptr, &opline->op1);
|
||||
}
|
||||
if (opline->op2.op_type==IS_VAR) {
|
||||
if (opline->op2.op_type == IS_VAR) {
|
||||
PZVAL_LOCK(*Ts[opline->op2.u.var].var.ptr_ptr);
|
||||
}
|
||||
}
|
||||
@@ -1431,10 +1401,6 @@ binary_assign_op_addr: {
|
||||
zend_class_entry *ce;
|
||||
zval **object_ptr_ptr;
|
||||
|
||||
if (zend_hash_find(EG(class_table), opline->op1.u.constant.value.str.val, opline->op1.u.constant.value.str.len+1, (void **) &ce)==FAILURE) {
|
||||
zend_error(E_ERROR, "Undefined class name '%s'", opline->op1.u.constant.value.str.val);
|
||||
}
|
||||
active_function_table = &ce->function_table;
|
||||
if (zend_hash_find(EG(active_symbol_table), "this", sizeof("this"), (void **) &object_ptr_ptr)==FAILURE) {
|
||||
object.ptr=NULL;
|
||||
} else {
|
||||
@@ -1443,6 +1409,15 @@ binary_assign_op_addr: {
|
||||
object.ptr = *object_ptr_ptr;
|
||||
object.ptr->refcount++; /* For this pointer */
|
||||
}
|
||||
if (zend_hash_find(EG(class_table), opline->op1.u.constant.value.str.val, opline->op1.u.constant.value.str.len+1, (void **) &ce)==FAILURE) { /* class doesn't exist */
|
||||
/* test for parent:: special case - if it doesn't exist - error out */
|
||||
if (opline->op1.u.constant.value.str.len!=(sizeof("parent")-1)
|
||||
|| memcmp(opline->op1.u.constant.value.str.val, "parent", sizeof("parent")-1)!=0
|
||||
|| !(ce = object.ptr->value.obj.ce->parent)) {
|
||||
zend_error(E_ERROR, "Undefined class name '%s'", opline->op1.u.constant.value.str.val);
|
||||
}
|
||||
}
|
||||
active_function_table = &ce->function_table;
|
||||
} else { /* used for member function calls */
|
||||
object.ptr = _get_object_zval_ptr(&opline->op1, Ts, &EG(free_op1) ELS_CC);
|
||||
|
||||
@@ -1584,9 +1559,10 @@ do_fcall_common:
|
||||
zval_ptr_dtor(&Ts[opline->result.u.var].var.ptr);
|
||||
}
|
||||
}
|
||||
object.ptr = zend_ptr_stack_pop(&EG(arg_types_stack));
|
||||
if (opline->opcode == ZEND_DO_FCALL_BY_NAME) {
|
||||
fbc = zend_ptr_stack_pop(&EG(arg_types_stack));
|
||||
zend_ptr_stack_n_pop(&EG(arg_types_stack), 2, &object.ptr, &fbc);
|
||||
} else {
|
||||
object.ptr = zend_ptr_stack_pop(&EG(arg_types_stack));
|
||||
}
|
||||
function_state.function = (zend_function *) op_array;
|
||||
EG(function_state_ptr) = &function_state;
|
||||
@@ -1643,40 +1619,68 @@ do_fcall_common:
|
||||
}
|
||||
{
|
||||
zval *valptr;
|
||||
zval *value;
|
||||
|
||||
value = get_zval_ptr(&opline->op1, Ts, &EG(free_op1), BP_VAR_R);
|
||||
|
||||
ALLOC_ZVAL(valptr);
|
||||
*valptr = Ts[opline->op1.u.var].tmp_var;
|
||||
*valptr = *value;
|
||||
if (!EG(free_op1)) {
|
||||
zval_copy_ctor(valptr);
|
||||
}
|
||||
INIT_PZVAL(valptr);
|
||||
zend_ptr_stack_push(&EG(argument_stack), valptr);
|
||||
}
|
||||
NEXT_OPCODE();
|
||||
case ZEND_SEND_VAR:
|
||||
if (opline->extended_value==ZEND_DO_FCALL_BY_NAME
|
||||
&& ARG_SHOULD_BE_SENT_BY_REF(opline->op2.u.opline_num, fbc, fbc->common.arg_types)) {
|
||||
goto send_by_ref;
|
||||
case ZEND_SEND_VAR_NO_REF:
|
||||
if (opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND) { /* Had function_ptr at compile_time */
|
||||
if (!(opline->extended_value & ZEND_ARG_SEND_BY_REF)) {
|
||||
goto send_by_var;
|
||||
}
|
||||
} else if (!ARG_SHOULD_BE_SENT_BY_REF(opline->op2.u.opline_num, fbc, fbc->common.arg_types)) {
|
||||
goto send_by_var;
|
||||
}
|
||||
{
|
||||
zval *varptr;
|
||||
varptr = get_zval_ptr(&opline->op1, Ts, &EG(free_op1), BP_VAR_R);
|
||||
|
||||
if (varptr == &EG(uninitialized_zval)) {
|
||||
ALLOC_ZVAL(varptr);
|
||||
INIT_ZVAL(*varptr);
|
||||
varptr->refcount = 0;
|
||||
} else if (PZVAL_IS_REF(varptr)) {
|
||||
zval *original_var = varptr;
|
||||
|
||||
ALLOC_ZVAL(varptr);
|
||||
*varptr = *original_var;
|
||||
varptr->is_ref = 0;
|
||||
varptr->refcount = 0;
|
||||
zval_copy_ctor(varptr);
|
||||
if (varptr != &EG(uninitialized_zval) && (PZVAL_IS_REF(varptr) || varptr->refcount == 1)) {
|
||||
varptr->is_ref = 1;
|
||||
varptr->refcount++;
|
||||
zend_ptr_stack_push(&EG(argument_stack), varptr);
|
||||
NEXT_OPCODE();
|
||||
}
|
||||
varptr->refcount++;
|
||||
zend_ptr_stack_push(&EG(argument_stack), varptr);
|
||||
FREE_OP(&opline->op1, EG(free_op1)); /* for string offsets */
|
||||
zend_error(E_ERROR, "Only variables can be passed by reference");
|
||||
}
|
||||
NEXT_OPCODE();
|
||||
case ZEND_SEND_VAR:
|
||||
if ((opline->extended_value == ZEND_DO_FCALL_BY_NAME)
|
||||
&& ARG_SHOULD_BE_SENT_BY_REF(opline->op2.u.opline_num, fbc, fbc->common.arg_types)) {
|
||||
goto send_by_ref;
|
||||
}
|
||||
send_by_var:
|
||||
{
|
||||
zval *varptr;
|
||||
varptr = get_zval_ptr(&opline->op1, Ts, &EG(free_op1), BP_VAR_R);
|
||||
|
||||
if (varptr == &EG(uninitialized_zval)) {
|
||||
ALLOC_ZVAL(varptr);
|
||||
INIT_ZVAL(*varptr);
|
||||
varptr->refcount = 0;
|
||||
} else if (PZVAL_IS_REF(varptr)) {
|
||||
zval *original_var = varptr;
|
||||
|
||||
ALLOC_ZVAL(varptr);
|
||||
*varptr = *original_var;
|
||||
varptr->is_ref = 0;
|
||||
varptr->refcount = 0;
|
||||
zval_copy_ctor(varptr);
|
||||
}
|
||||
varptr->refcount++;
|
||||
zend_ptr_stack_push(&EG(argument_stack), varptr);
|
||||
FREE_OP(&opline->op1, EG(free_op1)); /* for string offsets */
|
||||
}
|
||||
NEXT_OPCODE();
|
||||
send_by_ref:
|
||||
case ZEND_SEND_REF: {
|
||||
zval **varptr_ptr;
|
||||
@@ -1792,7 +1796,7 @@ send_by_ref:
|
||||
FREE_OP(&opline->op2, EG(free_op2));
|
||||
continue;
|
||||
}
|
||||
NEXT_OPCODE();
|
||||
/* Never reaches this point */
|
||||
case ZEND_CASE: {
|
||||
int switch_expr_is_overloaded=0;
|
||||
|
||||
@@ -1911,7 +1915,11 @@ send_by_ref:
|
||||
case IS_STRING:
|
||||
zend_hash_update(array_ptr->value.ht, offset->value.str.val, offset->value.str.len+1, &expr_ptr, sizeof(zval *), NULL);
|
||||
break;
|
||||
case IS_NULL:
|
||||
zend_hash_update(array_ptr->value.ht, "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
|
||||
break;
|
||||
default:
|
||||
zval_ptr_dtor(&expr_ptr);
|
||||
/* do nothing */
|
||||
break;
|
||||
}
|
||||
@@ -1974,7 +1982,7 @@ send_by_ref:
|
||||
switch (opline->op2.u.constant.value.lval) {
|
||||
case ZEND_INCLUDE_ONCE:
|
||||
case ZEND_REQUIRE_ONCE: {
|
||||
char *opened_path;
|
||||
char *opened_path=NULL;
|
||||
int dummy = 1;
|
||||
zend_file_handle file_handle;
|
||||
|
||||
@@ -2000,19 +2008,21 @@ send_by_ref:
|
||||
}
|
||||
}
|
||||
if (opened_path) {
|
||||
free(opened_path);
|
||||
efree(opened_path);
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case ZEND_INCLUDE:
|
||||
case ZEND_REQUIRE:
|
||||
{
|
||||
new_op_array = compile_filename(opline->op2.u.constant.value.lval, inc_filename CLS_CC ELS_CC);
|
||||
break;
|
||||
}
|
||||
case ZEND_EVAL:
|
||||
new_op_array = compile_string(inc_filename CLS_CC);
|
||||
case ZEND_EVAL: {
|
||||
char *eval_desc = zend_make_compiled_string_description("eval()'d code");
|
||||
|
||||
new_op_array = compile_string(inc_filename, eval_desc CLS_CC);
|
||||
efree(eval_desc);
|
||||
}
|
||||
break;
|
||||
EMPTY_SWITCH_DEFAULT_CASE()
|
||||
}
|
||||
@@ -2080,8 +2090,6 @@ send_by_ref:
|
||||
if (container) {
|
||||
HashTable *ht;
|
||||
|
||||
SEPARATE_ZVAL_IF_NOT_REF(container);
|
||||
|
||||
switch ((*container)->type) {
|
||||
case IS_ARRAY:
|
||||
ht = (*container)->value.ht;
|
||||
@@ -2189,7 +2197,7 @@ send_by_ref:
|
||||
|
||||
ALLOC_ZVAL(key);
|
||||
INIT_PZVAL(key);
|
||||
switch (zend_hash_get_current_key(fe_ht, &str_key, &int_key)) {
|
||||
switch (zend_hash_get_current_key(fe_ht, &str_key, &int_key, 1)) {
|
||||
case HASH_KEY_IS_STRING:
|
||||
key->value.str.val = str_key;
|
||||
key->value.str.len = strlen(str_key);
|
||||
@@ -2266,7 +2274,13 @@ send_by_ref:
|
||||
NEXT_OPCODE();
|
||||
case ZEND_EXIT:
|
||||
if (opline->op1.op_type != IS_UNUSED) {
|
||||
zend_print_variable(get_zval_ptr(&opline->op1, Ts, &EG(free_op1), BP_VAR_R));
|
||||
zval *ptr;
|
||||
|
||||
ptr = get_zval_ptr(&opline->op1, Ts, &EG(free_op1), BP_VAR_R);
|
||||
if (Z_TYPE_P(ptr) == IS_LONG) {
|
||||
EG(exit_status) = Z_LVAL_P(ptr);
|
||||
}
|
||||
zend_print_variable(ptr);
|
||||
FREE_OP(&opline->op1, EG(free_op1));
|
||||
}
|
||||
zend_bailout();
|
||||
@@ -2322,7 +2336,9 @@ send_by_ref:
|
||||
}
|
||||
}
|
||||
#if SUPPORT_INTERACTIVE
|
||||
ALLOC_INIT_ZVAL(*(EG(return_value_ptr_ptr)));
|
||||
op_array->last_executed_op_number = opline-op_array->opcodes;
|
||||
EG(in_execution) = original_in_execution;
|
||||
free_alloca(Ts);
|
||||
#else
|
||||
zend_error(E_ERROR,"Arrived at end of main loop which shouldn't happen");
|
||||
|
||||
+14
-33
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 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 |
|
||||
@@ -54,8 +54,7 @@ void init_executor(CLS_D ELS_DC);
|
||||
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)
|
||||
#if defined(C9X_INLINE_SEMANTICS)
|
||||
static inline void safe_free_zval_ptr(zval *p)
|
||||
{
|
||||
ELS_FETCH();
|
||||
|
||||
@@ -63,13 +62,9 @@ ZEND_API inline void safe_free_zval_ptr(zval *p)
|
||||
FREE_ZVAL(p);
|
||||
}
|
||||
}
|
||||
#else
|
||||
;
|
||||
#endif
|
||||
|
||||
ZEND_API int zend_eval_string(char *str, zval *retval_ptr CLS_DC ELS_DC);
|
||||
ZEND_API inline int i_zend_is_true(zval *op)
|
||||
#if defined(C9X_INLINE_SEMANTICS)
|
||||
ZEND_API int zend_eval_string(char *str, zval *retval_ptr, char *string_name CLS_DC ELS_DC);
|
||||
static inline int i_zend_is_true(zval *op)
|
||||
{
|
||||
int result;
|
||||
|
||||
@@ -105,15 +100,11 @@ ZEND_API inline int i_zend_is_true(zval *op)
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#else
|
||||
;
|
||||
#endif
|
||||
|
||||
ZEND_API int zval_update_constant(zval **pp, void *arg);
|
||||
|
||||
/* dedicated Zend executor functions - do not use! */
|
||||
ZEND_API inline void zend_ptr_stack_clear_multiple(ELS_D)
|
||||
#if defined(C9X_INLINE_SEMANTICS)
|
||||
static inline void zend_ptr_stack_clear_multiple(ELS_D)
|
||||
{
|
||||
void **p = EG(argument_stack).top_element-2;
|
||||
int delete_count = (ulong) *p;
|
||||
@@ -124,12 +115,8 @@ ZEND_API inline void zend_ptr_stack_clear_multiple(ELS_D)
|
||||
}
|
||||
EG(argument_stack).top_element = p;
|
||||
}
|
||||
#else
|
||||
;
|
||||
#endif
|
||||
|
||||
ZEND_API inline int zend_ptr_stack_get_arg(int requested_arg, void **data ELS_DC)
|
||||
#if defined(C9X_INLINE_SEMANTICS)
|
||||
static inline int zend_ptr_stack_get_arg(int requested_arg, void **data ELS_DC)
|
||||
{
|
||||
void **p = EG(argument_stack).top_element-2;
|
||||
int arg_count = (ulong) *p;
|
||||
@@ -140,9 +127,6 @@ ZEND_API inline int zend_ptr_stack_get_arg(int requested_arg, void **data ELS_DC
|
||||
*data = (p-arg_count+requested_arg-1);
|
||||
return SUCCESS;
|
||||
}
|
||||
#else
|
||||
;
|
||||
#endif
|
||||
|
||||
#if SUPPORT_INTERACTIVE
|
||||
void execute_new_code(CLS_D);
|
||||
@@ -155,8 +139,8 @@ 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);
|
||||
|
||||
void zend_set_timeout(long seconds);
|
||||
void zend_unset_timeout(void);
|
||||
ZEND_API void zend_set_timeout(long seconds);
|
||||
ZEND_API void zend_unset_timeout(void);
|
||||
ZEND_API void zend_timeout(int dummy);
|
||||
|
||||
#ifdef ZEND_WIN32
|
||||
@@ -171,19 +155,19 @@ void zend_shutdown_timeout_thread();
|
||||
|
||||
#define active_opline (*EG(opline_ptr))
|
||||
|
||||
ZEND_API inline void zend_assign_to_variable_reference(znode *result, zval **variable_ptr_ptr, zval **value_ptr_ptr, temp_variable *Ts ELS_DC)
|
||||
#if defined(C9X_INLINE_SEMANTICS)
|
||||
static inline void zend_assign_to_variable_reference(znode *result, zval **variable_ptr_ptr, zval **value_ptr_ptr, temp_variable *Ts ELS_DC)
|
||||
{
|
||||
zval *variable_ptr = *variable_ptr_ptr;
|
||||
zval *variable_ptr;
|
||||
zval *value_ptr;
|
||||
|
||||
|
||||
if (!value_ptr_ptr) {
|
||||
zend_error(E_ERROR, "Cannot create references to string offsets nor overloaded objects");
|
||||
if (!value_ptr_ptr || !variable_ptr_ptr) {
|
||||
zend_error(E_ERROR, "Cannot create references to/from string offsets nor overloaded objects");
|
||||
return;
|
||||
}
|
||||
|
||||
variable_ptr = *variable_ptr_ptr;
|
||||
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==&EG(uninitialized_zval) || variable_ptr!=value_ptr) { */
|
||||
@@ -222,9 +206,6 @@ ZEND_API inline void zend_assign_to_variable_reference(znode *result, zval **var
|
||||
AI_USE_PTR(Ts[result->u.var].var);
|
||||
}
|
||||
}
|
||||
#else
|
||||
;
|
||||
#endif
|
||||
|
||||
#define IS_OVERLOADED_OBJECT 1
|
||||
#define IS_STRING_OFFSET 2
|
||||
|
||||
+49
-17
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -312,7 +312,7 @@ ZEND_API int zval_update_constant(zval **pp, void *arg)
|
||||
}
|
||||
|
||||
|
||||
int call_user_function(HashTable *function_table, zval *object, zval *function_name, zval *retval_ptr, int param_count, zval *params[])
|
||||
int call_user_function(HashTable *function_table, zval **object_pp, zval *function_name, zval *retval_ptr, int param_count, zval *params[])
|
||||
{
|
||||
zval ***params_array = (zval ***) emalloc(sizeof(zval **)*param_count);
|
||||
int i;
|
||||
@@ -322,7 +322,7 @@ int call_user_function(HashTable *function_table, zval *object, zval *function_n
|
||||
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, NULL);
|
||||
ex_retval = call_user_function_ex(function_table, object_pp, function_name, &local_retval_ptr, param_count, params_array, 1, NULL);
|
||||
if (local_retval_ptr) {
|
||||
COPY_PZVAL_TO_ZVAL(*retval_ptr, local_retval_ptr);
|
||||
} else {
|
||||
@@ -333,7 +333,7 @@ int call_user_function(HashTable *function_table, zval *object, zval *function_n
|
||||
}
|
||||
|
||||
|
||||
int call_user_function_ex(HashTable *function_table, zval *object, zval *function_name, zval **retval_ptr_ptr, int param_count, zval **params[], int no_separation, HashTable *symbol_table)
|
||||
int call_user_function_ex(HashTable *function_table, zval **object_pp, zval *function_name, zval **retval_ptr_ptr, int param_count, zval **params[], int no_separation, HashTable *symbol_table)
|
||||
{
|
||||
int i;
|
||||
zval **original_return_value;
|
||||
@@ -342,6 +342,9 @@ int call_user_function_ex(HashTable *function_table, zval *object, zval *functio
|
||||
zend_function_state *original_function_state_ptr;
|
||||
zend_op_array *original_op_array;
|
||||
zend_op **original_opline_ptr;
|
||||
int orig_free_op1, orig_free_op2;
|
||||
int (*orig_unary_op)(zval *result, zval *op1);
|
||||
int (*orig_binary_op)(zval *result, zval *op1, zval *op2);
|
||||
ELS_FETCH();
|
||||
|
||||
*retval_ptr_ptr = NULL;
|
||||
@@ -356,14 +359,33 @@ int call_user_function_ex(HashTable *function_table, zval *object, zval *functio
|
||||
return FAILURE;
|
||||
}
|
||||
function_name = *tmp_real_function_name;
|
||||
object = *tmp_object_ptr;
|
||||
SEPARATE_ZVAL_IF_NOT_REF(tmp_object_ptr);
|
||||
object_pp = tmp_object_ptr;
|
||||
(*object_pp)->is_ref = 1;
|
||||
}
|
||||
|
||||
if (object) {
|
||||
if (object->type != IS_OBJECT) {
|
||||
if (object_pp && !*object_pp) {
|
||||
object_pp = NULL;
|
||||
}
|
||||
if (object_pp) {
|
||||
if (Z_TYPE_PP(object_pp) == IS_OBJECT) {
|
||||
function_table = &(*object_pp)->value.obj.ce->function_table;
|
||||
} else if (Z_TYPE_PP(object_pp) == IS_STRING) {
|
||||
zend_class_entry *ce;
|
||||
char *lc_class;
|
||||
int found;
|
||||
|
||||
lc_class = estrndup(Z_STRVAL_PP(object_pp), Z_STRLEN_PP(object_pp));
|
||||
zend_str_tolower(lc_class, Z_STRLEN_PP(object_pp));
|
||||
found = zend_hash_find(EG(class_table), lc_class, Z_STRLEN_PP(object_pp) + 1, (void **) &ce);
|
||||
efree(lc_class);
|
||||
if (found == FAILURE)
|
||||
return FAILURE;
|
||||
|
||||
function_table = &ce->function_table;
|
||||
object_pp = NULL;
|
||||
} else
|
||||
return FAILURE;
|
||||
}
|
||||
function_table = &object->value.obj.ce->function_table;
|
||||
}
|
||||
|
||||
if (function_name->type!=IS_STRING) {
|
||||
@@ -412,6 +434,8 @@ int call_user_function_ex(HashTable *function_table, zval *object, zval *functio
|
||||
|
||||
zend_ptr_stack_n_push(&EG(argument_stack), 2, (void *) (long) param_count, NULL);
|
||||
|
||||
EG(function_state_ptr) = &function_state;
|
||||
|
||||
if (function_state.function->type == ZEND_USER_FUNCTION) {
|
||||
calling_symbol_table = EG(active_symbol_table);
|
||||
if (symbol_table) {
|
||||
@@ -420,20 +444,23 @@ int call_user_function_ex(HashTable *function_table, zval *object, zval *functio
|
||||
ALLOC_HASHTABLE(EG(active_symbol_table));
|
||||
zend_hash_init(EG(active_symbol_table), 0, NULL, ZVAL_PTR_DTOR, 0);
|
||||
}
|
||||
if (object) {
|
||||
if (object_pp) {
|
||||
zval *dummy, **this_ptr;
|
||||
|
||||
|
||||
ALLOC_ZVAL(dummy);
|
||||
INIT_ZVAL(*dummy);
|
||||
|
||||
INIT_ZVAL(*dummy);
|
||||
zend_hash_update(EG(active_symbol_table), "this", sizeof("this"), &dummy, sizeof(zval *), (void **) &this_ptr);
|
||||
zend_assign_to_variable_reference(NULL, this_ptr, &object, NULL ELS_CC);
|
||||
zend_assign_to_variable_reference(NULL, this_ptr, object_pp, NULL ELS_CC);
|
||||
}
|
||||
original_return_value = EG(return_value_ptr_ptr);
|
||||
original_op_array = EG(active_op_array);
|
||||
EG(return_value_ptr_ptr) = retval_ptr_ptr;
|
||||
EG(active_op_array) = (zend_op_array *) function_state.function;
|
||||
original_opline_ptr = EG(opline_ptr);
|
||||
orig_free_op1 = EG(free_op1);
|
||||
orig_free_op2 = EG(free_op2);
|
||||
orig_unary_op = EG(unary_op);
|
||||
orig_binary_op = EG(binary_op);
|
||||
zend_execute(EG(active_op_array) ELS_CC);
|
||||
if (!symbol_table) {
|
||||
zend_hash_destroy(EG(active_symbol_table));
|
||||
@@ -443,9 +470,13 @@ int call_user_function_ex(HashTable *function_table, zval *object, zval *functio
|
||||
EG(active_op_array) = original_op_array;
|
||||
EG(return_value_ptr_ptr)=original_return_value;
|
||||
EG(opline_ptr) = original_opline_ptr;
|
||||
EG(free_op1) = orig_free_op1;
|
||||
EG(free_op2) = orig_free_op2;
|
||||
EG(unary_op) = orig_unary_op;
|
||||
EG(binary_op) = orig_binary_op;
|
||||
} else {
|
||||
ALLOC_INIT_ZVAL(*retval_ptr_ptr);
|
||||
((zend_internal_function *) function_state.function)->handler(param_count, *retval_ptr_ptr, object, 1 ELS_CC);
|
||||
((zend_internal_function *) function_state.function)->handler(param_count, *retval_ptr_ptr, (object_pp?*object_pp:NULL), 1 ELS_CC);
|
||||
INIT_PZVAL(*retval_ptr_ptr);
|
||||
}
|
||||
zend_ptr_stack_clear_multiple(ELS_C);
|
||||
@@ -455,7 +486,7 @@ int call_user_function_ex(HashTable *function_table, zval *object, zval *functio
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int zend_eval_string(char *str, zval *retval_ptr CLS_DC ELS_DC)
|
||||
ZEND_API int zend_eval_string(char *str, zval *retval_ptr, char *string_name CLS_DC ELS_DC)
|
||||
{
|
||||
zval pv;
|
||||
zend_op_array *new_op_array;
|
||||
@@ -480,7 +511,7 @@ ZEND_API int zend_eval_string(char *str, zval *retval_ptr CLS_DC ELS_DC)
|
||||
|
||||
original_handle_op_arrays = CG(handle_op_arrays);
|
||||
CG(handle_op_arrays) = 0;
|
||||
new_op_array = compile_string(&pv CLS_CC);
|
||||
new_op_array = compile_string(&pv, string_name CLS_CC);
|
||||
CG(handle_op_arrays) = original_handle_op_arrays;
|
||||
|
||||
if (new_op_array) {
|
||||
@@ -538,6 +569,7 @@ void execute_new_code(CLS_D)
|
||||
CG(active_op_array)->end_op_number = CG(active_op_array)->last;
|
||||
EG(active_op_array) = CG(active_op_array);
|
||||
zend_execute(CG(active_op_array) ELS_CC);
|
||||
zval_ptr_dtor(EG(return_value_ptr_ptr));
|
||||
CG(active_op_array)->start_op_number = CG(active_op_array)->last_executed_op_number;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
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]); \
|
||||
@@ -14,6 +13,7 @@
|
||||
EG(garbage)[1] = EG(garbage)[3]; \
|
||||
EG(garbage_ptr) -= 2; \
|
||||
} \
|
||||
EG(garbage)[EG(garbage_ptr)++] = (z); \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
+52
-38
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -23,23 +23,6 @@
|
||||
ZEND_API zend_llist zend_extensions;
|
||||
static int last_resource_number;
|
||||
|
||||
int zend_load_extensions(char **extension_paths)
|
||||
{
|
||||
char **p = extension_paths;
|
||||
|
||||
if (!p) {
|
||||
return SUCCESS;
|
||||
}
|
||||
while (*p) {
|
||||
if (zend_load_extension(*p)==FAILURE) {
|
||||
return FAILURE;
|
||||
}
|
||||
p++;
|
||||
}
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
int zend_load_extension(char *path)
|
||||
{
|
||||
#if ZEND_EXTENSIONS_SUPPORT
|
||||
@@ -64,17 +47,19 @@ int zend_load_extension(char *path)
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
if (extension_version_info->zend_extension_api_no > ZEND_EXTENSION_API_NO) {
|
||||
fprintf(stderr, "%s requires Zend Engine API version %d\n"
|
||||
|
||||
/* allow extension to proclaim compatibility with any Zend version */
|
||||
if(extension_version_info->zend_extension_api_no != ZEND_EXTENSION_API_NO &&(!new_extension->api_no_check || new_extension->api_no_check(ZEND_EXTENSION_API_NO) != SUCCESS)) {
|
||||
if (extension_version_info->zend_extension_api_no > ZEND_EXTENSION_API_NO) {
|
||||
fprintf(stderr, "%s requires Zend Engine API version %d\n"
|
||||
"The installed Zend Engine API version is %d\n\n",
|
||||
new_extension->name,
|
||||
extension_version_info->zend_extension_api_no,
|
||||
ZEND_EXTENSION_API_NO);
|
||||
DL_UNLOAD(handle);
|
||||
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. */
|
||||
fprintf(stderr, "%s designed to be used with the Zend Engine API %d is outdated\n"
|
||||
DL_UNLOAD(handle);
|
||||
return FAILURE;
|
||||
} else if (extension_version_info->zend_extension_api_no < ZEND_EXTENSION_API_NO) {
|
||||
fprintf(stderr, "%s designed to be used with the Zend Engine API %d is outdated\n"
|
||||
"It requires a more recent version of the Zend Engine\n"
|
||||
"The installed Zend Engine API version is %d\n"
|
||||
"Contact %s at %s for a later version of this module.\n\n",
|
||||
@@ -83,8 +68,9 @@ int zend_load_extension(char *path)
|
||||
ZEND_EXTENSION_API_NO,
|
||||
new_extension->author,
|
||||
new_extension->URL);
|
||||
DL_UNLOAD(handle);
|
||||
return FAILURE;
|
||||
DL_UNLOAD(handle);
|
||||
return FAILURE;
|
||||
}
|
||||
} else if (ZTS_V!=extension_version_info->thread_safe) {
|
||||
fprintf(stderr, "Cannot load %s - it %s thread safe, whereas Zend %s\n",
|
||||
new_extension->name,
|
||||
@@ -114,13 +100,6 @@ int zend_register_extension(zend_extension *new_extension, DL_HANDLE handle)
|
||||
#if ZEND_EXTENSIONS_SUPPORT
|
||||
zend_extension extension;
|
||||
|
||||
if (new_extension->startup) {
|
||||
if (new_extension->startup(new_extension)!=SUCCESS) {
|
||||
DL_UNLOAD(handle);
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
extension = *new_extension;
|
||||
extension.handle = handle;
|
||||
|
||||
@@ -128,7 +107,6 @@ int zend_register_extension(zend_extension *new_extension, DL_HANDLE handle)
|
||||
|
||||
zend_llist_add_element(&zend_extensions, &extension);
|
||||
|
||||
zend_append_version_info(&extension);
|
||||
/*fprintf(stderr, "Loaded %s, version %s\n", extension.name, extension.version);*/
|
||||
#endif
|
||||
|
||||
@@ -145,11 +123,32 @@ static void zend_extension_shutdown(zend_extension *extension)
|
||||
#endif
|
||||
}
|
||||
|
||||
static int zend_extension_startup(zend_extension *extension)
|
||||
{
|
||||
#if ZEND_EXTENSIONS_SUPPORT
|
||||
if (extension->startup) {
|
||||
if (extension->startup(extension)!=SUCCESS) {
|
||||
return 1;
|
||||
}
|
||||
zend_append_version_info(extension);
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int zend_startup_extensions_mechanism()
|
||||
{
|
||||
/* Startup extensions mechanism */
|
||||
zend_llist_init(&zend_extensions, sizeof(zend_extension), (void (*)(void *)) zend_extension_dtor, 1);
|
||||
last_resource_number = 0;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
int zend_startup_extensions()
|
||||
{
|
||||
zend_llist_init(&zend_extensions, sizeof(zend_extension), (void (*)(void *)) zend_extension_dtor, 1);
|
||||
last_resource_number = 0;
|
||||
zend_llist_apply_with_del(&zend_extensions, (int (*)(void *)) zend_extension_startup);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@@ -163,7 +162,7 @@ void zend_shutdown_extensions()
|
||||
|
||||
void zend_extension_dtor(zend_extension *extension)
|
||||
{
|
||||
#if ZEND_EXTENSIONS_SUPPORT
|
||||
#if ZEND_EXTENSIONS_SUPPORT && !ZEND_DEBUG
|
||||
if (extension->handle) {
|
||||
DL_UNLOAD(extension->handle);
|
||||
}
|
||||
@@ -200,3 +199,18 @@ ZEND_API int zend_get_resource_handle(zend_extension *extension)
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ZEND_API zend_extension *zend_get_extension(char *extension_name)
|
||||
{
|
||||
zend_llist_element *element;
|
||||
|
||||
for (element = zend_extensions.head; element; element = element->next) {
|
||||
zend_extension *extension = (zend_extension *) element->data;
|
||||
|
||||
if (!strcmp(extension->name, extension_name)) {
|
||||
return extension;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
+35
-16
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "zend_compile.h"
|
||||
|
||||
#define ZEND_EXTENSION_API_NO 20000815
|
||||
#define ZEND_EXTENSION_API_NO 20001224
|
||||
|
||||
typedef struct _zend_extension_version_info {
|
||||
int zend_extension_api_no;
|
||||
@@ -35,6 +35,23 @@ typedef struct _zend_extension_version_info {
|
||||
|
||||
typedef struct _zend_extension zend_extension;
|
||||
|
||||
/* Typedef's for zend_extension function pointers */
|
||||
typedef int (*startup_func_t)(zend_extension *extension);
|
||||
typedef void (*shutdown_func_t)(zend_extension *extension);
|
||||
typedef void (*activate_func_t)(void);
|
||||
typedef void (*deactivate_func_t)(void);
|
||||
|
||||
typedef void (*message_handler_func_t)(int message, void *arg);
|
||||
|
||||
typedef void (*op_array_handler_func_t)(zend_op_array *op_array);
|
||||
|
||||
typedef void (*statement_handler_func_t)(zend_op_array *op_array);
|
||||
typedef void (*fcall_begin_handler_func_t)(zend_op_array *op_array);
|
||||
typedef void (*fcall_end_handler_func_t)(zend_op_array *op_array);
|
||||
|
||||
typedef void (*op_array_ctor_func_t)(zend_op_array *op_array);
|
||||
typedef void (*op_array_dtor_func_t)(zend_op_array *op_array);
|
||||
|
||||
struct _zend_extension {
|
||||
char *name;
|
||||
char *version;
|
||||
@@ -42,23 +59,23 @@ struct _zend_extension {
|
||||
char *URL;
|
||||
char *copyright;
|
||||
|
||||
int (*startup)(zend_extension *extension);
|
||||
void (*shutdown)(zend_extension *extension);
|
||||
void (*activate)();
|
||||
void (*deactivate)();
|
||||
startup_func_t startup;
|
||||
shutdown_func_t shutdown;
|
||||
activate_func_t activate;
|
||||
deactivate_func_t deactivate;
|
||||
|
||||
void (*message_handler)(int message, void *arg);
|
||||
message_handler_func_t message_handler;
|
||||
|
||||
void (*op_array_handler)(zend_op_array *op_array);
|
||||
|
||||
void (*statement_handler)(zend_op_array *op_array);
|
||||
void (*fcall_begin_handler)(zend_op_array *op_array);
|
||||
void (*fcall_end_handler)(zend_op_array *op_array);
|
||||
op_array_handler_func_t op_array_handler;
|
||||
|
||||
void (*op_array_ctor)(zend_op_array *op_array);
|
||||
void (*op_array_dtor)(zend_op_array *op_array);
|
||||
statement_handler_func_t statement_handler;
|
||||
fcall_begin_handler_func_t fcall_begin_handler;
|
||||
fcall_end_handler_func_t fcall_end_handler;
|
||||
|
||||
void *reserved1;
|
||||
op_array_ctor_func_t op_array_ctor;
|
||||
op_array_dtor_func_t op_array_dtor;
|
||||
|
||||
int (*api_no_check)(int api_no);
|
||||
void *reserved2;
|
||||
void *reserved3;
|
||||
void *reserved4;
|
||||
@@ -82,16 +99,18 @@ ZEND_API void zend_extension_dispatch_message(int message, void *arg);
|
||||
ZEND_EXT_API zend_extension_version_info extension_version_info = { ZEND_EXTENSION_API_NO, ZEND_VERSION, ZTS_V, ZEND_DEBUG }
|
||||
|
||||
#define STANDARD_ZEND_EXTENSION_PROPERTIES NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, -1
|
||||
#define COMPAT_ZEND_EXTENSION_PROPERTIES NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, -1
|
||||
|
||||
|
||||
ZEND_API extern zend_llist zend_extensions;
|
||||
|
||||
void zend_extension_dtor(zend_extension *extension);
|
||||
ZEND_API int zend_load_extension(char *path);
|
||||
ZEND_API int zend_load_extensions(char **extension_paths);
|
||||
ZEND_API int zend_register_extension(zend_extension *new_extension, DL_HANDLE handle);
|
||||
void zend_append_version_info(zend_extension *extension);
|
||||
int zend_startup_extensions_mechanism(void);
|
||||
int zend_startup_extensions(void);
|
||||
void zend_shutdown_extensions(void);
|
||||
ZEND_API zend_extension *zend_get_extension(char *extension_name);
|
||||
|
||||
#endif /* ZEND_EXTENSIONS_H */
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 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 |
|
||||
@@ -74,7 +74,7 @@ typedef struct _zend_fast_cache_list_entry {
|
||||
{ \
|
||||
ALS_FETCH(); \
|
||||
\
|
||||
((zend_fast_cache_list_entry *) (p))->next = AG(fast_cache_list_head)[fc_type]; \
|
||||
((zend_fast_cache_list_entry *) (p))->next = (zend_fast_cache_list_entry *) AG(fast_cache_list_head)[fc_type]; \
|
||||
AG(fast_cache_list_head)[fc_type] = (zend_fast_cache_list_entry *) (p); \
|
||||
}
|
||||
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
|
||||
/*
|
||||
* If C9X_INLINE_SEMANTICS is already defined here,
|
||||
* we assume the user does not want GCC inline semantics,
|
||||
* but compiles this file always.
|
||||
*/
|
||||
|
||||
#ifndef C9X_INLINE_SEMANTICS
|
||||
|
||||
#define C9X_INLINE_SEMANTICS
|
||||
|
||||
#include "zend.h"
|
||||
|
||||
#include "zend_execute.h"
|
||||
#include "zend_operators.h"
|
||||
|
||||
#endif
|
||||
+10
-4
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 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 |
|
||||
@@ -40,6 +40,7 @@
|
||||
|
||||
#ifdef __cplusplus
|
||||
class ZendFlexLexer;
|
||||
class ZendIniFlexLexer;
|
||||
#endif
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
@@ -106,13 +107,15 @@ struct _zend_compiler_globals {
|
||||
|
||||
zend_bool unclean_shutdown;
|
||||
|
||||
zend_bool ini_parser_unbuffered_errors;
|
||||
|
||||
zend_llist open_files;
|
||||
#ifdef ZTS
|
||||
#ifdef __cplusplus
|
||||
#if defined(ZTS) && defined(__cplusplus)
|
||||
ZendFlexLexer *ZFL;
|
||||
ZendIniFlexLexer *ini_scanner;
|
||||
#else
|
||||
void *ZFL;
|
||||
#endif
|
||||
void *ini_parser;
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -148,6 +151,7 @@ struct _zend_executor_globals {
|
||||
|
||||
int error_reporting;
|
||||
int orig_error_reporting;
|
||||
int exit_status;
|
||||
|
||||
zend_op_array *active_op_array;
|
||||
|
||||
@@ -187,6 +191,8 @@ struct _zend_executor_globals {
|
||||
|
||||
int lambda_count;
|
||||
|
||||
HashTable ini_directives;
|
||||
|
||||
void *reserved[ZEND_MAX_RESERVED_RESOURCES];
|
||||
#if SUPPORT_INTERACTIVE
|
||||
int interactive;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+49
-15
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 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 |
|
||||
@@ -155,7 +155,7 @@ ZEND_API ulong hashpjw(char *arKey, uint nKeyLength)
|
||||
if (!(p)->pDataPtr) { \
|
||||
pefree((p)->pData, (ht)->persistent); \
|
||||
} \
|
||||
(p)->pDataPtr = *(void **)pData; \
|
||||
memcpy(&(p)->pDataPtr, pData, sizeof(void *)); \
|
||||
(p)->pData = &(p)->pDataPtr; \
|
||||
} else { \
|
||||
if ((p)->pDataPtr) { \
|
||||
@@ -167,7 +167,7 @@ ZEND_API ulong hashpjw(char *arKey, uint nKeyLength)
|
||||
|
||||
#define INIT_DATA(ht, p, pData, nDataSize); \
|
||||
if (nDataSize == sizeof(void*)) { \
|
||||
(p)->pDataPtr = *(void **)pData; \
|
||||
memcpy(&(p)->pDataPtr, pData, sizeof(void *)); \
|
||||
(p)->pData = &(p)->pDataPtr; \
|
||||
} else { \
|
||||
(p)->pData = (void *) pemalloc(nDataSize, (ht)->persistent); \
|
||||
@@ -750,21 +750,21 @@ ZEND_API void zend_hash_apply_with_arguments(HashTable *ht, int (*destruct)(void
|
||||
ZEND_API void zend_hash_copy(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size)
|
||||
{
|
||||
Bucket *p;
|
||||
void *new_entry;
|
||||
|
||||
IS_CONSISTENT(source);
|
||||
IS_CONSISTENT(target);
|
||||
|
||||
p = source->pListHead;
|
||||
while (p) {
|
||||
memcpy(tmp, p->pData, size);
|
||||
if (pCopyConstructor) {
|
||||
pCopyConstructor(tmp);
|
||||
}
|
||||
if (p->nKeyLength) {
|
||||
zend_hash_update(target, p->arKey, p->nKeyLength, tmp, size, NULL);
|
||||
zend_hash_update(target, p->arKey, p->nKeyLength, p->pData, size, &new_entry);
|
||||
} else {
|
||||
zend_hash_index_update(target, p->h, tmp, size, NULL);
|
||||
zend_hash_index_update(target, p->h, p->pData, size, &new_entry);
|
||||
}
|
||||
if (pCopyConstructor) {
|
||||
pCopyConstructor(new_entry);
|
||||
}
|
||||
p = p->pListNext;
|
||||
}
|
||||
target->pInternalPointer = target->pListHead;
|
||||
@@ -782,13 +782,12 @@ ZEND_API void zend_hash_merge(HashTable *target, HashTable *source, copy_ctor_fu
|
||||
|
||||
p = source->pListHead;
|
||||
while (p) {
|
||||
memcpy(tmp, p->pData, size);
|
||||
if (p->nKeyLength>0) {
|
||||
if (zend_hash_add_or_update(target, p->arKey, p->nKeyLength, tmp, size, &t, mode)==SUCCESS && pCopyConstructor) {
|
||||
if (zend_hash_add_or_update(target, p->arKey, p->nKeyLength, p->pData, size, &t, mode)==SUCCESS && pCopyConstructor) {
|
||||
pCopyConstructor(t);
|
||||
}
|
||||
} else {
|
||||
if ((mode==HASH_UPDATE || !zend_hash_index_exists(target, p->h)) && zend_hash_index_update(target, p->h, tmp, size, &t)==SUCCESS && pCopyConstructor) {
|
||||
if ((mode==HASH_UPDATE || !zend_hash_index_exists(target, p->h)) && zend_hash_index_update(target, p->h, p->pData, size, &t)==SUCCESS && pCopyConstructor) {
|
||||
pCopyConstructor(t);
|
||||
}
|
||||
}
|
||||
@@ -798,6 +797,38 @@ ZEND_API void zend_hash_merge(HashTable *target, HashTable *source, copy_ctor_fu
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zend_hash_merge_ex(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, uint size, zend_bool (*pReplaceOrig)(void *orig, void *p_new))
|
||||
{
|
||||
Bucket *p;
|
||||
void *t;
|
||||
void *pOrig;
|
||||
|
||||
IS_CONSISTENT(source);
|
||||
IS_CONSISTENT(target);
|
||||
|
||||
p = source->pListHead;
|
||||
while (p) {
|
||||
if (p->nKeyLength>0) {
|
||||
if (zend_hash_find(target, p->arKey, p->nKeyLength, &pOrig)==FAILURE
|
||||
|| pReplaceOrig(pOrig, p->pData)) {
|
||||
if (zend_hash_update(target, p->arKey, p->nKeyLength, p->pData, size, &t)==SUCCESS && pCopyConstructor) {
|
||||
pCopyConstructor(t);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (zend_hash_index_find(target, p->h, &pOrig)==FAILURE
|
||||
|| pReplaceOrig(pOrig, p->pData)) {
|
||||
if (zend_hash_index_update(target, p->h, p->pData, size, &t)==SUCCESS && pCopyConstructor) {
|
||||
pCopyConstructor(t);
|
||||
}
|
||||
}
|
||||
}
|
||||
p = p->pListNext;
|
||||
}
|
||||
target->pInternalPointer = target->pListHead;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API ulong zend_get_hash_value(HashTable *ht, char *arKey, uint nKeyLength)
|
||||
{
|
||||
IS_CONSISTENT(ht);
|
||||
@@ -988,7 +1019,7 @@ ZEND_API int zend_hash_move_backwards_ex(HashTable *ht, HashPosition *pos)
|
||||
|
||||
|
||||
/* This function should be made binary safe */
|
||||
ZEND_API int zend_hash_get_current_key_ex(HashTable *ht, char **str_index, ulong *str_length, ulong *num_index, HashPosition *pos)
|
||||
ZEND_API int zend_hash_get_current_key_ex(HashTable *ht, char **str_index, ulong *str_length, ulong *num_index, zend_bool duplicate, HashPosition *pos)
|
||||
{
|
||||
Bucket *p;
|
||||
|
||||
@@ -998,8 +1029,11 @@ ZEND_API int zend_hash_get_current_key_ex(HashTable *ht, char **str_index, ulong
|
||||
|
||||
if (p) {
|
||||
if (p->nKeyLength) {
|
||||
*str_index = (char *) pemalloc(p->nKeyLength, ht->persistent);
|
||||
memcpy(*str_index, p->arKey, p->nKeyLength);
|
||||
if (duplicate) {
|
||||
*str_index = estrndup(p->arKey, p->nKeyLength);
|
||||
} else {
|
||||
*str_index = p->arKey;
|
||||
}
|
||||
if (str_length) {
|
||||
*str_length = p->nKeyLength;
|
||||
}
|
||||
|
||||
+5
-4
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -146,7 +146,7 @@ ZEND_API ulong zend_hash_next_free_element(HashTable *ht);
|
||||
/* traversing */
|
||||
ZEND_API int zend_hash_move_forward_ex(HashTable *ht, HashPosition *pos);
|
||||
ZEND_API int zend_hash_move_backwards_ex(HashTable *ht, HashPosition *pos);
|
||||
ZEND_API int zend_hash_get_current_key_ex(HashTable *ht, char **str_index, ulong *str_length, ulong *num_index, HashPosition *pos);
|
||||
ZEND_API int zend_hash_get_current_key_ex(HashTable *ht, char **str_index, ulong *str_length, ulong *num_index, zend_bool duplicate, HashPosition *pos);
|
||||
ZEND_API int zend_hash_get_current_key_type_ex(HashTable *ht, HashPosition *pos);
|
||||
ZEND_API int zend_hash_get_current_data_ex(HashTable *ht, void **pData, HashPosition *pos);
|
||||
ZEND_API void zend_hash_internal_pointer_reset_ex(HashTable *ht, HashPosition *pos);
|
||||
@@ -156,8 +156,8 @@ ZEND_API void zend_hash_internal_pointer_end_ex(HashTable *ht, HashPosition *pos
|
||||
zend_hash_move_forward_ex(ht, NULL)
|
||||
#define zend_hash_move_backwards(ht) \
|
||||
zend_hash_move_backwards_ex(ht, NULL)
|
||||
#define zend_hash_get_current_key(ht, str_index, num_index) \
|
||||
zend_hash_get_current_key_ex(ht, str_index, NULL, num_index, NULL)
|
||||
#define zend_hash_get_current_key(ht, str_index, num_index, duplicate) \
|
||||
zend_hash_get_current_key_ex(ht, str_index, NULL, num_index, duplicate, NULL)
|
||||
#define zend_hash_get_current_key_type(ht) \
|
||||
zend_hash_get_current_key_type_ex(ht, NULL)
|
||||
#define zend_hash_get_current_data(ht, pData) \
|
||||
@@ -170,6 +170,7 @@ ZEND_API void zend_hash_internal_pointer_end_ex(HashTable *ht, HashPosition *pos
|
||||
/* Copying, merging and sorting */
|
||||
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 void zend_hash_merge_ex(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, uint size, zend_bool (*pReplaceOrig)(void *orig, void *p_new));
|
||||
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_compare(HashTable *ht1, HashTable *ht2, compare_func_t compar, zend_bool ordered);
|
||||
ZEND_API int zend_hash_minmax(HashTable *ht, int (*compar)(const void *, const void *), int flag, void **pData);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 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 |
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
|
||||
#include "zend.h"
|
||||
#include "zend-parser.h"
|
||||
#include "zend_language_parser.h"
|
||||
#include "zend_compile.h"
|
||||
#include "zend_highlight.h"
|
||||
#include "zend_ptr_stack.h"
|
||||
@@ -149,6 +149,7 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
|
||||
case T_OPEN_TAG_WITH_ECHO:
|
||||
case T_CLOSE_TAG:
|
||||
case T_WHITESPACE:
|
||||
case T_COMMENT:
|
||||
break;
|
||||
default:
|
||||
efree(token.value.str.val);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 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 |
|
||||
@@ -40,8 +40,8 @@ typedef struct _zend_syntax_highlighter_ini {
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini);
|
||||
int highlight_file(char *filename, zend_syntax_highlighter_ini *syntax_highlighter_ini);
|
||||
int highlight_string(zval *str, zend_syntax_highlighter_ini *syntax_highlighter_ini);
|
||||
ZEND_API int highlight_file(char *filename, zend_syntax_highlighter_ini *syntax_highlighter_ini);
|
||||
ZEND_API int highlight_string(zval *str, zend_syntax_highlighter_ini *syntax_highlighter_ini, char *str_name);
|
||||
ZEND_API void zend_html_putc(char c);
|
||||
ZEND_API void zend_html_puts(char *s, uint len);
|
||||
END_EXTERN_C()
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 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 |
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
|
||||
#include "zend.h"
|
||||
#include "zend-parser.h"
|
||||
#include "zend_language_parser.h"
|
||||
#include "zend_compile.h"
|
||||
#include "zend_indent.h"
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 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 |
|
||||
|
||||
+499
@@ -0,0 +1,499 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 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. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Author: Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "zend.h"
|
||||
#include "zend_API.h"
|
||||
#include "zend_ini.h"
|
||||
#include "zend_alloc.h"
|
||||
#include "zend_operators.h"
|
||||
|
||||
static HashTable *registered_zend_ini_directives;
|
||||
|
||||
|
||||
/*
|
||||
* hash_apply functions
|
||||
*/
|
||||
static int zend_remove_ini_entries(zend_ini_entry *ini_entry, int *module_number)
|
||||
{
|
||||
if (ini_entry->module_number == *module_number) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static int zend_restore_ini_entry_cb(zend_ini_entry *ini_entry, int stage)
|
||||
{
|
||||
if (ini_entry->modified) {
|
||||
if (ini_entry->on_modify) {
|
||||
ini_entry->on_modify(ini_entry, ini_entry->orig_value, ini_entry->orig_value_length, ini_entry->mh_arg1, ini_entry->mh_arg2, ini_entry->mh_arg3, stage);
|
||||
}
|
||||
efree(ini_entry->value);
|
||||
ini_entry->value = ini_entry->orig_value;
|
||||
ini_entry->value_length = ini_entry->orig_value_length;
|
||||
ini_entry->modified = 0;
|
||||
ini_entry->orig_value = NULL;
|
||||
ini_entry->orig_value_length = 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Startup / shutdown
|
||||
*/
|
||||
ZEND_API int zend_ini_startup(ELS_D)
|
||||
{
|
||||
registered_zend_ini_directives = &EG(ini_directives);
|
||||
if (zend_hash_init_ex(registered_zend_ini_directives, 100, NULL, NULL, 1, 0)==FAILURE) {
|
||||
return FAILURE;
|
||||
}
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int zend_ini_shutdown(ELS_D)
|
||||
{
|
||||
zend_hash_destroy(&EG(ini_directives));
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int zend_ini_deactivate(ELS_D)
|
||||
{
|
||||
zend_hash_apply_with_argument(&EG(ini_directives), (int (*)(void *, void *)) zend_restore_ini_entry_cb, (void *) ZEND_INI_STAGE_DEACTIVATE);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int zend_copy_ini_directives(ELS_D)
|
||||
{
|
||||
zend_ini_entry ini_entry;
|
||||
|
||||
if (zend_hash_init_ex(&EG(ini_directives), registered_zend_ini_directives->nNumOfElements, NULL, NULL, 1, 0)==FAILURE) {
|
||||
return FAILURE;
|
||||
}
|
||||
zend_hash_copy(&EG(ini_directives), registered_zend_ini_directives, NULL, &ini_entry, sizeof(zend_ini_entry));
|
||||
zend_ini_refresh_caches(ZEND_INI_STAGE_STARTUP ELS_CC);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
static int ini_key_compare(const void *a, const void *b)
|
||||
{
|
||||
Bucket *f;
|
||||
Bucket *s;
|
||||
|
||||
f = *((Bucket **) a);
|
||||
s = *((Bucket **) b);
|
||||
|
||||
if (f->nKeyLength==0 && s->nKeyLength==0) { /* both numeric */
|
||||
return ZEND_NORMALIZE_BOOL(f->nKeyLength - s->nKeyLength);
|
||||
} else if (f->nKeyLength==0) { /* f is numeric, s is not */
|
||||
return -1;
|
||||
} else if (s->nKeyLength==0) { /* s is numeric, f is not */
|
||||
return 1;
|
||||
} else { /* both strings */
|
||||
return zend_binary_strcasecmp(f->arKey, f->nKeyLength, s->arKey, s->nKeyLength);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zend_ini_sort_entries(ELS_D)
|
||||
{
|
||||
zend_hash_sort(&EG(ini_directives), qsort, ini_key_compare, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Registration / unregistration
|
||||
*/
|
||||
|
||||
ZEND_API int zend_register_ini_entries(zend_ini_entry *ini_entry, int module_number)
|
||||
{
|
||||
zend_ini_entry *p = ini_entry;
|
||||
zend_ini_entry *hashed_ini_entry;
|
||||
zval default_value;
|
||||
|
||||
while (p->name) {
|
||||
p->module_number = module_number;
|
||||
if (zend_hash_add(registered_zend_ini_directives, p->name, p->name_length, p, sizeof(zend_ini_entry), (void **) &hashed_ini_entry)==FAILURE) {
|
||||
zend_unregister_ini_entries(module_number);
|
||||
return FAILURE;
|
||||
}
|
||||
if ((zend_get_configuration_directive(p->name, p->name_length, &default_value))==SUCCESS) {
|
||||
if (!hashed_ini_entry->on_modify
|
||||
|| hashed_ini_entry->on_modify(hashed_ini_entry, default_value.value.str.val, default_value.value.str.len, hashed_ini_entry->mh_arg1, hashed_ini_entry->mh_arg2, hashed_ini_entry->mh_arg3, ZEND_INI_STAGE_STARTUP)==SUCCESS) {
|
||||
hashed_ini_entry->value = default_value.value.str.val;
|
||||
hashed_ini_entry->value_length = default_value.value.str.len;
|
||||
}
|
||||
} else {
|
||||
if (hashed_ini_entry->on_modify) {
|
||||
hashed_ini_entry->on_modify(hashed_ini_entry, hashed_ini_entry->value, hashed_ini_entry->value_length, hashed_ini_entry->mh_arg1, hashed_ini_entry->mh_arg2, hashed_ini_entry->mh_arg3, ZEND_INI_STAGE_STARTUP);
|
||||
}
|
||||
}
|
||||
p++;
|
||||
}
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zend_unregister_ini_entries(int module_number)
|
||||
{
|
||||
zend_hash_apply_with_argument(registered_zend_ini_directives, (int (*)(void *, void *)) zend_remove_ini_entries, (void *) &module_number);
|
||||
}
|
||||
|
||||
|
||||
static int zend_ini_refresh_cache(zend_ini_entry *p, int stage)
|
||||
{
|
||||
if (p->on_modify) {
|
||||
p->on_modify(p, p->value, p->value_length, p->mh_arg1, p->mh_arg2, p->mh_arg3, stage);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zend_ini_refresh_caches(int stage ELS_DC)
|
||||
{
|
||||
zend_hash_apply_with_argument(&EG(ini_directives), (int (*)(void *, void *)) zend_ini_refresh_cache, (void *)(long) stage);
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int zend_alter_ini_entry(char *name, uint name_length, char *new_value, uint new_value_length, int modify_type, int stage)
|
||||
{
|
||||
zend_ini_entry *ini_entry;
|
||||
char *duplicate;
|
||||
ELS_FETCH();
|
||||
|
||||
if (zend_hash_find(&EG(ini_directives), name, name_length, (void **) &ini_entry)==FAILURE) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
if (!(ini_entry->modifyable & modify_type)) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
duplicate = estrndup(new_value, new_value_length);
|
||||
|
||||
if (!ini_entry->on_modify
|
||||
|| ini_entry->on_modify(ini_entry, duplicate, new_value_length, ini_entry->mh_arg1, ini_entry->mh_arg2, ini_entry->mh_arg3, stage)==SUCCESS) {
|
||||
if (!ini_entry->modified) {
|
||||
ini_entry->orig_value = ini_entry->value;
|
||||
ini_entry->orig_value_length = ini_entry->value_length;
|
||||
} else { /* we already changed the value, free the changed value */
|
||||
efree(ini_entry->value);
|
||||
}
|
||||
ini_entry->value = duplicate;
|
||||
ini_entry->value_length = new_value_length;
|
||||
ini_entry->modified = 1;
|
||||
} else {
|
||||
efree(duplicate);
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int zend_restore_ini_entry(char *name, uint name_length, int stage)
|
||||
{
|
||||
zend_ini_entry *ini_entry;
|
||||
ELS_FETCH();
|
||||
|
||||
if (zend_hash_find(&EG(ini_directives), name, name_length, (void **) &ini_entry)==FAILURE) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
zend_restore_ini_entry_cb(ini_entry, stage);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int zend_ini_register_displayer(char *name, uint name_length, void (*displayer)(zend_ini_entry *ini_entry, int type))
|
||||
{
|
||||
zend_ini_entry *ini_entry;
|
||||
|
||||
if (zend_hash_find(registered_zend_ini_directives, name, name_length, (void **) &ini_entry)==FAILURE) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
ini_entry->displayer = displayer;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Data retrieval
|
||||
*/
|
||||
|
||||
ZEND_API long zend_ini_long(char *name, uint name_length, int orig)
|
||||
{
|
||||
zend_ini_entry *ini_entry;
|
||||
ELS_FETCH();
|
||||
|
||||
if (zend_hash_find(&EG(ini_directives), name, name_length, (void **) &ini_entry)==SUCCESS) {
|
||||
if (orig && ini_entry->modified) {
|
||||
return (ini_entry->orig_value ? strtol(ini_entry->orig_value, NULL, 0) : 0);
|
||||
} else if (ini_entry->value) {
|
||||
return strtol(ini_entry->value, NULL, 0);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API double zend_ini_double(char *name, uint name_length, int orig)
|
||||
{
|
||||
zend_ini_entry *ini_entry;
|
||||
ELS_FETCH();
|
||||
|
||||
if (zend_hash_find(&EG(ini_directives), name, name_length, (void **) &ini_entry)==SUCCESS) {
|
||||
if (orig && ini_entry->modified) {
|
||||
return (double) (ini_entry->orig_value ? strtod(ini_entry->orig_value, NULL) : 0.0);
|
||||
} else if (ini_entry->value) {
|
||||
return (double) strtod(ini_entry->value, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API char *zend_ini_string(char *name, uint name_length, int orig)
|
||||
{
|
||||
zend_ini_entry *ini_entry;
|
||||
ELS_FETCH();
|
||||
|
||||
if (zend_hash_find(&EG(ini_directives), name, name_length, (void **) &ini_entry)==SUCCESS) {
|
||||
if (orig && ini_entry->modified) {
|
||||
return ini_entry->orig_value;
|
||||
} else {
|
||||
return ini_entry->value;
|
||||
}
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
zend_ini_entry *get_ini_entry(char *name, uint name_length)
|
||||
{
|
||||
zend_ini_entry *ini_entry;
|
||||
ELS_FETCH();
|
||||
|
||||
if (zend_hash_find(&EG(ini_directives), name, name_length, (void **) &ini_entry)==SUCCESS) {
|
||||
return ini_entry;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void zend_ini_displayer_cb(zend_ini_entry *ini_entry, int type)
|
||||
{
|
||||
if (ini_entry->displayer) {
|
||||
ini_entry->displayer(ini_entry, type);
|
||||
} else {
|
||||
char *display_string;
|
||||
uint display_string_length;
|
||||
|
||||
if (type==ZEND_INI_DISPLAY_ORIG && ini_entry->modified) {
|
||||
if (ini_entry->orig_value) {
|
||||
display_string = ini_entry->orig_value;
|
||||
display_string_length = ini_entry->orig_value_length;
|
||||
} else {
|
||||
display_string = "<i>no value</i>";
|
||||
display_string_length = sizeof("<i>no value</i>")-1;
|
||||
}
|
||||
} else if (ini_entry->value && ini_entry->value[0]) {
|
||||
display_string = ini_entry->value;
|
||||
display_string_length = ini_entry->value_length;
|
||||
} else {
|
||||
display_string = "<i>no value</i>";
|
||||
display_string_length = sizeof("<i>no value</i>")-1;
|
||||
}
|
||||
ZEND_WRITE(display_string, display_string_length);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ZEND_INI_DISP(zend_ini_boolean_displayer_cb)
|
||||
{
|
||||
int value;
|
||||
|
||||
if (type==ZEND_INI_DISPLAY_ORIG && ini_entry->modified) {
|
||||
value = (ini_entry->orig_value ? atoi(ini_entry->orig_value) : 0);
|
||||
} else if (ini_entry->value) {
|
||||
value = atoi(ini_entry->value);
|
||||
} else {
|
||||
value = 0;
|
||||
}
|
||||
if (value) {
|
||||
ZEND_PUTS("On");
|
||||
} else {
|
||||
ZEND_PUTS("Off");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ZEND_INI_DISP(zend_ini_color_displayer_cb)
|
||||
{
|
||||
char *value;
|
||||
|
||||
if (type==ZEND_INI_DISPLAY_ORIG && ini_entry->modified) {
|
||||
value = ini_entry->orig_value;
|
||||
} else if (ini_entry->value) {
|
||||
value = ini_entry->value;
|
||||
} else {
|
||||
value = NULL;
|
||||
}
|
||||
if (value) {
|
||||
zend_printf("<font color=\"%s\">%s</font>", value, value);
|
||||
} else {
|
||||
ZEND_PUTS("<i>no value</i>;");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ZEND_INI_DISP(display_link_numbers)
|
||||
{
|
||||
char *value;
|
||||
|
||||
if (type==ZEND_INI_DISPLAY_ORIG && ini_entry->modified) {
|
||||
value = ini_entry->orig_value;
|
||||
} else if (ini_entry->value) {
|
||||
value = ini_entry->value;
|
||||
} else {
|
||||
value = NULL;
|
||||
}
|
||||
|
||||
if (value) {
|
||||
if (atoi(value)==-1) {
|
||||
ZEND_PUTS("Unlimited");
|
||||
} else {
|
||||
zend_printf("%s", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Standard message handlers */
|
||||
|
||||
ZEND_API ZEND_INI_MH(OnUpdateBool)
|
||||
{
|
||||
zend_bool *p;
|
||||
#ifndef ZTS
|
||||
char *base = (char *) mh_arg2;
|
||||
#else
|
||||
char *base;
|
||||
|
||||
base = (char *) ts_resource(*((int *) mh_arg2));
|
||||
#endif
|
||||
|
||||
p = (zend_bool *) (base+(size_t) mh_arg1);
|
||||
|
||||
*p = (zend_bool) atoi(new_value);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API ZEND_INI_MH(OnUpdateInt)
|
||||
{
|
||||
long *p;
|
||||
#ifndef ZTS
|
||||
char *base = (char *) mh_arg2;
|
||||
#else
|
||||
char *base;
|
||||
|
||||
base = (char *) ts_resource(*((int *) mh_arg2));
|
||||
#endif
|
||||
|
||||
p = (long *) (base+(size_t) mh_arg1);
|
||||
|
||||
*p = zend_atoi(new_value, new_value_length);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API ZEND_INI_MH(OnUpdateReal)
|
||||
{
|
||||
double *p;
|
||||
#ifndef ZTS
|
||||
char *base = (char *) mh_arg2;
|
||||
#else
|
||||
char *base;
|
||||
|
||||
base = (char *) ts_resource(*((int *) mh_arg2));
|
||||
#endif
|
||||
|
||||
p = (double *) (base+(size_t) mh_arg1);
|
||||
|
||||
*p = strtod(new_value, NULL);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API ZEND_INI_MH(OnUpdateString)
|
||||
{
|
||||
char **p;
|
||||
#ifndef ZTS
|
||||
char *base = (char *) mh_arg2;
|
||||
#else
|
||||
char *base;
|
||||
|
||||
base = (char *) ts_resource(*((int *) mh_arg2));
|
||||
#endif
|
||||
|
||||
p = (char **) (base+(size_t) mh_arg1);
|
||||
|
||||
*p = new_value;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API ZEND_INI_MH(OnUpdateStringUnempty)
|
||||
{
|
||||
char **p;
|
||||
#ifndef ZTS
|
||||
char *base = (char *) mh_arg2;
|
||||
#else
|
||||
char *base;
|
||||
|
||||
base = (char *) ts_resource(*((int *) mh_arg2));
|
||||
#endif
|
||||
|
||||
if (new_value && !new_value[0]) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
p = (char **) (base+(size_t) mh_arg1);
|
||||
|
||||
*p = new_value;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
*/
|
||||
+195
@@ -0,0 +1,195 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 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. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Author: Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
#ifndef ZEND_INI_H
|
||||
#define ZEND_INI_H
|
||||
|
||||
#define ZEND_INI_USER (1<<0)
|
||||
#define ZEND_INI_PERDIR (1<<1)
|
||||
#define ZEND_INI_SYSTEM (1<<2)
|
||||
|
||||
#define ZEND_INI_ALL (ZEND_INI_USER|ZEND_INI_PERDIR|ZEND_INI_SYSTEM)
|
||||
|
||||
#ifndef XtOffsetOf
|
||||
# if defined(CRAY) || (defined(__arm) && !defined(LINUX))
|
||||
# ifdef __STDC__
|
||||
# define XtOffset(p_type,field) _Offsetof(p_type,field)
|
||||
# else
|
||||
# ifdef CRAY2
|
||||
# define XtOffset(p_type,field) \
|
||||
(sizeof(int)*((unsigned int)&(((p_type)NULL)->field)))
|
||||
|
||||
# else /* !CRAY2 */
|
||||
|
||||
# define XtOffset(p_type,field) ((unsigned int)&(((p_type)NULL)->field))
|
||||
|
||||
# endif /* !CRAY2 */
|
||||
# endif /* __STDC__ */
|
||||
# else /* ! (CRAY || __arm) */
|
||||
|
||||
# define XtOffset(p_type,field) \
|
||||
((long) (((char *) (&(((p_type)NULL)->field))) - ((char *) NULL)))
|
||||
|
||||
# endif /* !CRAY */
|
||||
|
||||
# ifdef offsetof
|
||||
# define XtOffsetOf(s_type,field) offsetof(s_type,field)
|
||||
# else
|
||||
# define XtOffsetOf(s_type,field) XtOffset(s_type*,field)
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
typedef struct _zend_ini_entry zend_ini_entry;
|
||||
|
||||
#define ZEND_INI_MH(name) int name(zend_ini_entry *entry, char *new_value, uint new_value_length, void *mh_arg1, void *mh_arg2, void *mh_arg3, int stage)
|
||||
#define ZEND_INI_DISP(name) void name(zend_ini_entry *ini_entry, int type)
|
||||
|
||||
struct _zend_ini_entry {
|
||||
int module_number;
|
||||
int modifyable;
|
||||
char *name;
|
||||
uint name_length;
|
||||
ZEND_INI_MH((*on_modify));
|
||||
void *mh_arg1;
|
||||
void *mh_arg2;
|
||||
void *mh_arg3;
|
||||
|
||||
char *value;
|
||||
uint value_length;
|
||||
|
||||
char *orig_value;
|
||||
uint orig_value_length;
|
||||
int modified;
|
||||
|
||||
void (*displayer)(zend_ini_entry *ini_entry, int type);
|
||||
};
|
||||
|
||||
|
||||
ZEND_API int zend_ini_startup(ELS_D);
|
||||
ZEND_API int zend_ini_shutdown(ELS_D);
|
||||
ZEND_API int zend_ini_deactivate(ELS_D);
|
||||
|
||||
ZEND_API int zend_copy_ini_directives(ELS_D);
|
||||
|
||||
ZEND_API void zend_ini_sort_entries(ELS_D);
|
||||
|
||||
ZEND_API int zend_register_ini_entries(zend_ini_entry *ini_entry, int module_number);
|
||||
ZEND_API void zend_unregister_ini_entries(int module_number);
|
||||
ZEND_API void zend_ini_refresh_caches(int stage ELS_DC);
|
||||
ZEND_API int zend_alter_ini_entry(char *name, uint name_length, char *new_value, uint new_value_length, int modify_type, int stage);
|
||||
ZEND_API int zend_restore_ini_entry(char *name, uint name_length, int stage);
|
||||
ZEND_API void display_ini_entries(zend_module_entry *module);
|
||||
|
||||
ZEND_API long zend_ini_long(char *name, uint name_length, int orig);
|
||||
ZEND_API double zend_ini_double(char *name, uint name_length, int orig);
|
||||
ZEND_API char *zend_ini_string(char *name, uint name_length, int orig);
|
||||
zend_ini_entry *get_ini_entry(char *name, uint name_length);
|
||||
|
||||
ZEND_API int zend_ini_register_displayer(char *name, uint name_length, void (*displayer)(zend_ini_entry *ini_entry, int type));
|
||||
|
||||
ZEND_API ZEND_INI_DISP(zend_ini_boolean_displayer_cb);
|
||||
ZEND_API ZEND_INI_DISP(zend_ini_color_displayer_cb);
|
||||
ZEND_API ZEND_INI_DISP(display_link_numbers);
|
||||
|
||||
#define ZEND_INI_BEGIN() static zend_ini_entry ini_entries[] = {
|
||||
#define ZEND_INI_END() { 0, 0, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, 0, 0, NULL } };
|
||||
|
||||
#define ZEND_INI_ENTRY3_EX(name, default_value, modifyable, on_modify, arg1, arg2, arg3, displayer) \
|
||||
{ 0, modifyable, name, sizeof(name), on_modify, arg1, arg2, arg3, default_value, sizeof(default_value)-1, NULL, 0, 0, displayer },
|
||||
|
||||
#define ZEND_INI_ENTRY3(name, default_value, modifyable, on_modify, arg1, arg2, arg3) \
|
||||
ZEND_INI_ENTRY3_EX(name, default_value, modifyable, on_modify, arg1, arg2, arg3, NULL)
|
||||
|
||||
#define ZEND_INI_ENTRY2_EX(name, default_value, modifyable, on_modify, arg1, arg2, displayer) \
|
||||
ZEND_INI_ENTRY3_EX(name, default_value, modifyable, on_modify, arg1, arg2, NULL, displayer)
|
||||
|
||||
#define ZEND_INI_ENTRY2(name, default_value, modifyable, on_modify, arg1, arg2) \
|
||||
ZEND_INI_ENTRY2_EX(name, default_value, modifyable, on_modify, arg1, arg2, NULL)
|
||||
|
||||
#define ZEND_INI_ENTRY1_EX(name, default_value, modifyable, on_modify, arg1, displayer) \
|
||||
ZEND_INI_ENTRY3_EX(name, default_value, modifyable, on_modify, arg1, NULL, NULL, displayer)
|
||||
|
||||
#define ZEND_INI_ENTRY1(name, default_value, modifyable, on_modify, arg1) \
|
||||
ZEND_INI_ENTRY1_EX(name, default_value, modifyable, on_modify, arg1, NULL)
|
||||
|
||||
#define ZEND_INI_ENTRY_EX(name, default_value, modifyable, on_modify, displayer) \
|
||||
ZEND_INI_ENTRY3_EX(name, default_value, modifyable, on_modify, NULL, NULL, NULL, displayer)
|
||||
|
||||
#define ZEND_INI_ENTRY(name, default_value, modifyable, on_modify) \
|
||||
ZEND_INI_ENTRY_EX(name, default_value, modifyable, on_modify, NULL)
|
||||
|
||||
#ifdef ZTS
|
||||
#define STD_ZEND_INI_ENTRY(name, default_value, modifyable, on_modify, property_name, struct_type, struct_ptr) \
|
||||
ZEND_INI_ENTRY2(name, default_value, modifyable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr##_id)
|
||||
#define STD_ZEND_INI_ENTRY_EX(name, default_value, modifyable, on_modify, property_name, struct_type, struct_ptr, displayer) \
|
||||
ZEND_INI_ENTRY2_EX(name, default_value, modifyable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr##_id, displayer)
|
||||
#define STD_ZEND_INI_BOOLEAN(name, default_value, modifyable, on_modify, property_name, struct_type, struct_ptr) \
|
||||
ZEND_INI_ENTRY3_EX(name, default_value, modifyable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr##_id, NULL, zend_ini_boolean_displayer_cb)
|
||||
#else
|
||||
#define STD_ZEND_INI_ENTRY(name, default_value, modifyable, on_modify, property_name, struct_type, struct_ptr) \
|
||||
ZEND_INI_ENTRY2(name, default_value, modifyable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr)
|
||||
#define STD_ZEND_INI_ENTRY_EX(name, default_value, modifyable, on_modify, property_name, struct_type, struct_ptr, displayer) \
|
||||
ZEND_INI_ENTRY2_EX(name, default_value, modifyable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr, displayer)
|
||||
#define STD_ZEND_INI_BOOLEAN(name, default_value, modifyable, on_modify, property_name, struct_type, struct_ptr) \
|
||||
ZEND_INI_ENTRY3_EX(name, default_value, modifyable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr, NULL, zend_ini_boolean_displayer_cb)
|
||||
#endif
|
||||
|
||||
#define INI_INT(name) zend_ini_long((name), sizeof(name), 0)
|
||||
#define INI_FLT(name) zend_ini_double((name), sizeof(name), 0)
|
||||
#define INI_STR(name) zend_ini_string((name), sizeof(name), 0)
|
||||
#define INI_BOOL(name) ((zend_bool) INI_INT(name))
|
||||
|
||||
#define INI_ORIG_INT(name) zend_ini_long((name), sizeof(name), 1)
|
||||
#define INI_ORIG_FLT(name) zend_ini_double((name), sizeof(name), 1)
|
||||
#define INI_ORIG_STR(name) zend_ini_string((name), sizeof(name), 1)
|
||||
#define INI_ORIG_BOOL(name) ((zend_bool) INI_ORIG_INT(name))
|
||||
|
||||
|
||||
#define REGISTER_INI_ENTRIES() zend_register_ini_entries(ini_entries, module_number)
|
||||
#define UNREGISTER_INI_ENTRIES() zend_unregister_ini_entries(module_number)
|
||||
#define DISPLAY_INI_ENTRIES() display_ini_entries(zend_module)
|
||||
|
||||
#define REGISTER_INI_DISPLAYER(name, displayer) zend_ini_register_displayer((name), sizeof(name), displayer)
|
||||
#define REGISTER_INI_BOOLEAN(name) REGISTER_INI_DISPLAYER(name, zend_ini_boolean_displayer_cb)
|
||||
|
||||
/* Standard message handlers */
|
||||
ZEND_API ZEND_INI_MH(OnUpdateBool);
|
||||
ZEND_API ZEND_INI_MH(OnUpdateInt);
|
||||
ZEND_API ZEND_INI_MH(OnUpdateReal);
|
||||
ZEND_API ZEND_INI_MH(OnUpdateString);
|
||||
ZEND_API ZEND_INI_MH(OnUpdateStringUnempty);
|
||||
|
||||
|
||||
#define ZEND_INI_DISPLAY_ORIG 1
|
||||
#define ZEND_INI_DISPLAY_ACTIVE 2
|
||||
|
||||
#define ZEND_INI_STAGE_STARTUP (1<<0)
|
||||
#define ZEND_INI_STAGE_SHUTDOWN (1<<1)
|
||||
#define ZEND_INI_STAGE_ACTIVATE (1<<2)
|
||||
#define ZEND_INI_STAGE_DEACTIVATE (1<<3)
|
||||
#define ZEND_INI_STAGE_RUNTIME (1<<4)
|
||||
|
||||
/* INI parsing engine */
|
||||
typedef void (*zend_ini_parser_cb_t)(zval *arg1, zval *arg2, int callback_type, void *arg);
|
||||
int zend_parse_ini_file(zend_file_handle *fh, zend_bool unbuffered_errors, zend_ini_parser_cb_t ini_parser_cb, void *arg);
|
||||
#define ZEND_INI_PARSER_ENTRY 1
|
||||
#define ZEND_INI_PARSER_SECTION 2
|
||||
|
||||
#endif /* ZEND_INI_H */
|
||||
@@ -0,0 +1,231 @@
|
||||
%{
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 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. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Author: Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
#define DEBUG_CFG_PARSER 0
|
||||
#include "zend.h"
|
||||
#include "zend_API.h"
|
||||
#include "zend_ini.h"
|
||||
#include "zend_constants.h"
|
||||
#include "zend_ini_scanner.h"
|
||||
#include "zend_extensions.h"
|
||||
|
||||
|
||||
#if WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#include <winbase.h>
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct _zend_ini_parser_param {
|
||||
zend_ini_parser_cb_t ini_parser_cb;
|
||||
void *arg;
|
||||
} zend_ini_parser_param;
|
||||
|
||||
#define YYSTYPE zval
|
||||
#define YYPARSE_PARAM ini_parser_param
|
||||
|
||||
#define ZEND_INI_PARSER_CB ((zend_ini_parser_param *) ini_parser_param)->ini_parser_cb
|
||||
#define ZEND_INI_PARSER_ARG ((zend_ini_parser_param *) ini_parser_param)->arg
|
||||
|
||||
int ini_lex(zval *ini_lval);
|
||||
int ini_parse(void *ini_parser_param);
|
||||
|
||||
zval yylval;
|
||||
|
||||
#ifndef ZTS
|
||||
extern int ini_lex(zval *ini_lval);
|
||||
extern FILE *ini_in;
|
||||
extern int ini_lineno;
|
||||
extern void init_cfg_scanner(void);
|
||||
#endif
|
||||
|
||||
void zend_ini_do_op(char type, zval *result, zval *op1, zval *op2)
|
||||
{
|
||||
int i_result;
|
||||
int i_op1, i_op2;
|
||||
char str_result[MAX_LENGTH_OF_LONG];
|
||||
|
||||
i_op1 = atoi(op1->value.str.val);
|
||||
free(op1->value.str.val);
|
||||
if (op2) {
|
||||
i_op2 = atoi(op2->value.str.val);
|
||||
free(op2->value.str.val);
|
||||
} else {
|
||||
i_op2 = 0;
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
case '|':
|
||||
i_result = i_op1 | i_op2;
|
||||
break;
|
||||
case '&':
|
||||
i_result = i_op1 & i_op2;
|
||||
break;
|
||||
case '~':
|
||||
i_result = ~i_op1;
|
||||
break;
|
||||
case '!':
|
||||
i_result = !i_op1;
|
||||
break;
|
||||
default:
|
||||
i_result = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
result->value.str.len = zend_sprintf(str_result, "%d", i_result);
|
||||
result->value.str.val = (char *) malloc(result->value.str.len+1);
|
||||
memcpy(result->value.str.val, str_result, result->value.str.len);
|
||||
result->value.str.val[result->value.str.len] = 0;
|
||||
result->type = IS_STRING;
|
||||
}
|
||||
|
||||
|
||||
void zend_ini_get_constant(zval *result, zval *name)
|
||||
{
|
||||
zval z_constant;
|
||||
|
||||
if (zend_get_constant(name->value.str.val, name->value.str.len, &z_constant)) {
|
||||
/* z_constant is emalloc()'d */
|
||||
convert_to_string(&z_constant);
|
||||
result->value.str.val = zend_strndup(z_constant.value.str.val, z_constant.value.str.len);
|
||||
result->value.str.len = z_constant.value.str.len;
|
||||
result->type = z_constant.type;
|
||||
zval_dtor(&z_constant);
|
||||
free(name->value.str.val);
|
||||
} else {
|
||||
*result = *name;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void ini_error(char *str)
|
||||
{
|
||||
char *error_buf;
|
||||
int error_buf_len;
|
||||
char *currently_parsed_filename = zend_ini_scanner_get_filename();
|
||||
CLS_FETCH();
|
||||
|
||||
error_buf_len = 128+strlen(currently_parsed_filename); /* should be more than enough */
|
||||
error_buf = (char *) emalloc(error_buf_len);
|
||||
|
||||
sprintf(error_buf, "Error parsing %s on line %d\n", currently_parsed_filename, zend_ini_scanner_get_lineno());
|
||||
|
||||
if (CG(ini_parser_unbuffered_errors)) {
|
||||
#ifdef PHP_WIN32
|
||||
MessageBox(NULL, error_buf, "PHP Error", MB_OK|MB_TOPMOST|0x00200000L);
|
||||
#else
|
||||
fprintf(stderr, "PHP: %s", error_buf);
|
||||
#endif
|
||||
} else {
|
||||
zend_error(E_CORE_WARNING, error_buf);
|
||||
}
|
||||
efree(error_buf);
|
||||
}
|
||||
|
||||
|
||||
int zend_parse_ini_file(zend_file_handle *fh, zend_bool unbuffered_errors, zend_ini_parser_cb_t ini_parser_cb, void *arg)
|
||||
{
|
||||
zend_ini_parser_param ini_parser_param;
|
||||
int retval;
|
||||
CLS_FETCH();
|
||||
|
||||
ini_parser_param.ini_parser_cb = ini_parser_cb;
|
||||
ini_parser_param.arg = arg;
|
||||
|
||||
if (zend_ini_open_file_for_scanning(fh)==FAILURE) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
CG(ini_parser_unbuffered_errors) = unbuffered_errors;
|
||||
retval = ini_parse(&ini_parser_param);
|
||||
|
||||
zend_ini_close_file(fh);
|
||||
|
||||
if (retval==0) {
|
||||
return SUCCESS;
|
||||
} else {
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
%}
|
||||
|
||||
%pure_parser
|
||||
%token TC_STRING
|
||||
%token TC_ENCAPSULATED_STRING
|
||||
%token SECTION
|
||||
%token CFG_TRUE
|
||||
%token CFG_FALSE
|
||||
%left '|' '&'
|
||||
%right '~' '!'
|
||||
|
||||
%%
|
||||
|
||||
statement_list:
|
||||
statement_list statement
|
||||
| /* empty */
|
||||
;
|
||||
|
||||
statement:
|
||||
TC_STRING '=' string_or_value {
|
||||
#if DEBUG_CFG_PARSER
|
||||
printf("'%s' = '%s'\n", $1.value.str.val, $3.value.str.val);
|
||||
#endif
|
||||
ZEND_INI_PARSER_CB(&$1, &$3, ZEND_INI_PARSER_ENTRY, ZEND_INI_PARSER_ARG);
|
||||
free($1.value.str.val);
|
||||
free($3.value.str.val);
|
||||
}
|
||||
| TC_STRING { ZEND_INI_PARSER_CB(&$1, NULL, ZEND_INI_PARSER_ENTRY, ZEND_INI_PARSER_ARG); free($1.value.str.val); }
|
||||
| SECTION { ZEND_INI_PARSER_CB(&$1, NULL, ZEND_INI_PARSER_SECTION, ZEND_INI_PARSER_ARG); free($1.value.str.val); }
|
||||
| '\n'
|
||||
;
|
||||
|
||||
|
||||
string_or_value:
|
||||
expr { $$ = $1; }
|
||||
| TC_ENCAPSULATED_STRING { $$ = $1; }
|
||||
| CFG_TRUE { $$ = $1; }
|
||||
| CFG_FALSE { $$ = $1; }
|
||||
| '\n' { $$.value.str.val = strdup(""); $$.value.str.len=0; $$.type = IS_STRING; }
|
||||
| '\0' { $$.value.str.val = strdup(""); $$.value.str.len=0; $$.type = IS_STRING; }
|
||||
;
|
||||
|
||||
expr:
|
||||
constant_string { $$ = $1; }
|
||||
| expr '|' expr { zend_ini_do_op('|', &$$, &$1, &$3); }
|
||||
| expr '&' expr { zend_ini_do_op('&', &$$, &$1, &$3); }
|
||||
| '~' expr { zend_ini_do_op('~', &$$, &$2, NULL); }
|
||||
| '!' expr { zend_ini_do_op('!', &$$, &$2, NULL); }
|
||||
| '(' expr ')' { $$ = $2; }
|
||||
;
|
||||
|
||||
constant_string:
|
||||
TC_STRING { zend_ini_get_constant(&$$, &$1); }
|
||||
;
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
*/
|
||||
@@ -0,0 +1,24 @@
|
||||
#ifndef _ZEND_INI_SCANNER_H
|
||||
#define _ZEND_INI_SCANNER_H
|
||||
|
||||
#if defined(ZTS) && defined(__cplusplus)
|
||||
class ZendIniFlexLexer : public yyFlexLexer
|
||||
{
|
||||
public:
|
||||
virtual ~ZendIniFlexLexer();
|
||||
int lex_scan(zval *zendlval);
|
||||
void BeginState(int state);
|
||||
|
||||
char *filename;
|
||||
};
|
||||
#endif /* ZTS && __cplusplus */
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
int zend_ini_scanner_get_lineno(void);
|
||||
char *zend_ini_scanner_get_filename(void);
|
||||
int zend_ini_open_file_for_scanning(zend_file_handle *fh);
|
||||
void zend_ini_close_file(zend_file_handle *fh);
|
||||
int ini_lex(zval *ini_lval);
|
||||
END_EXTERN_C()
|
||||
|
||||
#endif /* _ZEND_INI_SCANNER_H */
|
||||
@@ -0,0 +1,286 @@
|
||||
%{
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 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. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Author: Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include "zend.h"
|
||||
#include "zend_globals.h"
|
||||
#include "zend_ini_parser.h"
|
||||
#include "zend_ini_scanner.h"
|
||||
|
||||
#ifdef ZTS
|
||||
# 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
|
||||
|
||||
#undef YYSTYPE
|
||||
#define YYSTYPE zval
|
||||
|
||||
#ifdef ZTS
|
||||
#define YY_DECL int ZendIniFlexLexer::lex_scan(zval *ini_lval)
|
||||
#else
|
||||
#define YY_DECL int ini_lex(zval *ini_lval)
|
||||
#endif
|
||||
|
||||
#include "zend_istdiostream.h"
|
||||
|
||||
|
||||
#ifndef ZTS
|
||||
static char *ini_filename;
|
||||
|
||||
void init_ini_scanner()
|
||||
{
|
||||
ini_lineno=1;
|
||||
}
|
||||
|
||||
|
||||
int zend_ini_scanner_get_lineno()
|
||||
{
|
||||
return ini_lineno;
|
||||
}
|
||||
|
||||
|
||||
char *zend_ini_scanner_get_filename()
|
||||
{
|
||||
return ini_filename;
|
||||
}
|
||||
|
||||
#else /* ZTS */
|
||||
|
||||
int zend_ini_scanner_get_lineno()
|
||||
{
|
||||
CLS_FETCH();
|
||||
|
||||
return CG(ini_scanner)->lineno();
|
||||
}
|
||||
|
||||
char *zend_ini_scanner_get_filename()
|
||||
{
|
||||
CLS_FETCH();
|
||||
|
||||
return CG(ini_scanner)->filename;
|
||||
}
|
||||
|
||||
int ini_lex(zval *ini_lval)
|
||||
{
|
||||
CLS_FETCH();
|
||||
|
||||
return CG(ini_scanner)->lex_scan(ini_lval);
|
||||
}
|
||||
|
||||
ZendIniFlexLexer::~ZendIniFlexLexer()
|
||||
{
|
||||
if (yy_start_stack) {
|
||||
yy_flex_free(yy_start_stack);
|
||||
}
|
||||
}
|
||||
|
||||
int yyFlexLexer::yylex()
|
||||
{
|
||||
fprintf(stderr, "Error: yyFlexLexer::yylex() called\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
int zend_ini_open_file_for_scanning(zend_file_handle *fh)
|
||||
{
|
||||
FILE *fp;
|
||||
CLS_FETCH();
|
||||
|
||||
switch (fh->type) {
|
||||
case ZEND_HANDLE_FP:
|
||||
fp = fh->handle.fp;
|
||||
break;
|
||||
case ZEND_HANDLE_FILENAME:
|
||||
fp = zend_fopen(fh->filename, NULL);
|
||||
fh->type = ZEND_HANDLE_FP;
|
||||
break;
|
||||
default:
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
#ifdef ZTS
|
||||
if (!fp) {
|
||||
return FAILURE;
|
||||
}
|
||||
fh->handle.is = new istdiostream(fp);
|
||||
fh->type = ZEND_HANDLE_STDIOSTREAM;
|
||||
|
||||
CG(ini_scanner) = new ZendIniFlexLexer;
|
||||
CG(ini_scanner)->switch_streams(fh->handle.is, &cout);
|
||||
CG(ini_scanner)->filename = fh->filename;
|
||||
#else
|
||||
init_ini_scanner();
|
||||
yyin = fp;
|
||||
yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE));
|
||||
ini_filename = fh->filename;
|
||||
#endif
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
void zend_ini_close_file(zend_file_handle *fh)
|
||||
{
|
||||
switch (fh->type) {
|
||||
case ZEND_HANDLE_FP:
|
||||
fclose(fh->handle.fp);
|
||||
break;
|
||||
#ifdef ZTS
|
||||
case ZEND_HANDLE_STDIOSTREAM: {
|
||||
CLS_FETCH();
|
||||
delete CG(ini_scanner);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
%}
|
||||
|
||||
%option noyywrap
|
||||
%option yylineno
|
||||
|
||||
%%
|
||||
|
||||
|
||||
<INITIAL>[ ]*("true"|"on"|"yes")[ ]* {
|
||||
ini_lval->value.str.val = zend_strndup("1",1);
|
||||
ini_lval->value.str.len = 1;
|
||||
ini_lval->type = IS_STRING;
|
||||
return CFG_TRUE;
|
||||
}
|
||||
|
||||
|
||||
<INITIAL>[ ]*("false"|"off"|"no"|"none")[ ]* {
|
||||
ini_lval->value.str.val = zend_strndup("",0);
|
||||
ini_lval->value.str.len = 0;
|
||||
ini_lval->type = IS_STRING;
|
||||
return CFG_FALSE;
|
||||
}
|
||||
|
||||
<INITIAL>[[][^[]+[\]]([\n]?|"\r\n"?) {
|
||||
/* SECTION */
|
||||
|
||||
/* eat trailng ] */
|
||||
while (yyleng>0 && (yytext[yyleng-1]=='\n' || yytext[yyleng-1]=='\r' || yytext[yyleng-1]==']')) {
|
||||
yyleng--;
|
||||
yytext[yyleng]=0;
|
||||
}
|
||||
|
||||
/* eat leading [ */
|
||||
yytext++;
|
||||
yyleng--;
|
||||
|
||||
ini_lval->value.str.val = zend_strndup(yytext,yyleng);
|
||||
ini_lval->value.str.len = yyleng;
|
||||
ini_lval->type = IS_STRING;
|
||||
return SECTION;
|
||||
}
|
||||
|
||||
|
||||
<INITIAL>["][^\n\r"]*["] {
|
||||
/* ENCAPSULATED TC_STRING */
|
||||
|
||||
/* eat trailing " */
|
||||
yytext[yyleng-1]=0;
|
||||
|
||||
/* eat leading " */
|
||||
yytext++;
|
||||
|
||||
ini_lval->value.str.val = zend_strndup(yytext, yyleng - 2);
|
||||
ini_lval->value.str.len = yyleng - 2;
|
||||
ini_lval->type = IS_STRING;
|
||||
return TC_ENCAPSULATED_STRING;
|
||||
}
|
||||
|
||||
<INITIAL>[&|~()!] {
|
||||
return yytext[0];
|
||||
}
|
||||
|
||||
|
||||
<INITIAL>[^=\n\r\t;|&~()!"]+ {
|
||||
/* STRING */
|
||||
register int i;
|
||||
|
||||
/* eat trailing whitespace */
|
||||
for (i=yyleng-1; i>=0; i--) {
|
||||
if (yytext[i]==' ' || yytext[i]=='\t') {
|
||||
yytext[i]=0;
|
||||
yyleng--;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* eat leading whitespace */
|
||||
while (yytext[0]) {
|
||||
if (yytext[0]==' ' || yytext[0]=='\t') {
|
||||
yytext++;
|
||||
yyleng--;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (yyleng!=0) {
|
||||
ini_lval->value.str.val = zend_strndup(yytext,yyleng);
|
||||
ini_lval->value.str.len = yyleng;
|
||||
ini_lval->type = IS_STRING;
|
||||
return TC_STRING;
|
||||
} else {
|
||||
/* whitespace */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
<INITIAL>[=\n] {
|
||||
return yytext[0];
|
||||
}
|
||||
|
||||
<INITIAL>"\r\n" {
|
||||
return '\n';
|
||||
}
|
||||
|
||||
<INITIAL>[;][^\r\n]*[\r\n]? {
|
||||
/* comment */
|
||||
return '\n';
|
||||
}
|
||||
|
||||
<INITIAL>[ \t] {
|
||||
/* eat whitespace */
|
||||
}
|
||||
|
||||
<INITIAL>. {
|
||||
#if DEBUG
|
||||
php_error(E_NOTICE,"Unexpected character on line %d: '%s' (ASCII %d)\n",yylineno,yytext,yytext[0]);
|
||||
#endif
|
||||
}
|
||||
|
||||
<<EOF>> {
|
||||
yy_delete_buffer(YY_CURRENT_BUFFER);
|
||||
yyterminate();
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#ifndef _ZEND_STDIOSTREAM
|
||||
#define _ZEND_STDIOSTREAM
|
||||
|
||||
#if defined(ZTS) && !defined(HAVE_CLASS_ISTDIOSTREAM)
|
||||
class istdiostream : public istream
|
||||
{
|
||||
private:
|
||||
stdiobuf _file;
|
||||
public:
|
||||
istdiostream (FILE* __f) : istream(), _file(__f) { init(&_file); }
|
||||
stdiobuf* rdbuf()/* const */ { return &_file; }
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,726 @@
|
||||
%{
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2001 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> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/*
|
||||
* LALR shift/reduce conflicts and how they are resolved:
|
||||
*
|
||||
* - 2 shift/reduce conflicts due to the dangeling elseif/else ambiguity. Solved by shift.
|
||||
* - 1 shift/reduce conflict due to arrays within encapsulated strings. Solved by shift.
|
||||
* - 1 shift/reduce conflict due to objects within encapsulated strings. Solved by shift.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "zend_compile.h"
|
||||
#include "zend.h"
|
||||
#include "zend_list.h"
|
||||
#include "zend_globals.h"
|
||||
#include "zend_API.h"
|
||||
|
||||
#define YYERROR_VERBOSE
|
||||
#define YYSTYPE znode
|
||||
#ifdef ZTS
|
||||
# define YYPARSE_PARAM compiler_globals
|
||||
# define YYLEX_PARAM compiler_globals
|
||||
#endif
|
||||
|
||||
|
||||
%}
|
||||
|
||||
%pure_parser
|
||||
%expect 4
|
||||
|
||||
%left T_INCLUDE T_INCLUDE_ONCE T_EVAL T_REQUIRE T_REQUIRE_ONCE
|
||||
%left ','
|
||||
%left T_LOGICAL_OR
|
||||
%left T_LOGICAL_XOR
|
||||
%left T_LOGICAL_AND
|
||||
%right T_PRINT
|
||||
%left '=' T_PLUS_EQUAL T_MINUS_EQUAL T_MUL_EQUAL T_DIV_EQUAL T_CONCAT_EQUAL T_MOD_EQUAL T_AND_EQUAL T_OR_EQUAL T_XOR_EQUAL T_SL_EQUAL T_SR_EQUAL
|
||||
%left '?' ':'
|
||||
%left T_BOOLEAN_OR
|
||||
%left T_BOOLEAN_AND
|
||||
%left '|'
|
||||
%left '^'
|
||||
%left '&'
|
||||
%nonassoc T_IS_EQUAL T_IS_NOT_EQUAL T_IS_IDENTICAL T_IS_NOT_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 T_BOOL_CAST T_UNSET_CAST '@'
|
||||
%right '['
|
||||
%nonassoc T_NEW
|
||||
%token T_EXIT
|
||||
%token T_IF
|
||||
%left T_ELSEIF
|
||||
%left T_ELSE
|
||||
%left T_ENDIF
|
||||
%token T_LNUMBER
|
||||
%token T_DNUMBER
|
||||
%token T_STRING
|
||||
%token T_STRING_VARNAME
|
||||
%token T_VARIABLE
|
||||
%token T_NUM_STRING
|
||||
%token T_INLINE_HTML
|
||||
%token T_CHARACTER
|
||||
%token T_BAD_CHARACTER
|
||||
%token T_ENCAPSED_AND_WHITESPACE
|
||||
%token T_CONSTANT_ENCAPSED_STRING
|
||||
%token T_ECHO
|
||||
%token T_DO
|
||||
%token T_WHILE
|
||||
%token T_ENDWHILE
|
||||
%token T_FOR
|
||||
%token T_ENDFOR
|
||||
%token T_FOREACH
|
||||
%token T_ENDFOREACH
|
||||
%token T_DECLARE
|
||||
%token T_ENDDECLARE
|
||||
%token T_AS
|
||||
%token T_SWITCH
|
||||
%token T_ENDSWITCH
|
||||
%token T_CASE
|
||||
%token T_DEFAULT
|
||||
%token T_BREAK
|
||||
%token T_CONTINUE
|
||||
%token T_OLD_FUNCTION
|
||||
%token T_FUNCTION
|
||||
%token T_CONST
|
||||
%token T_RETURN
|
||||
%token T_USE
|
||||
%token T_GLOBAL
|
||||
%token T_STATIC
|
||||
%token T_VAR
|
||||
%token T_UNSET
|
||||
%token T_ISSET
|
||||
%token T_EMPTY
|
||||
%token T_CLASS
|
||||
%token T_EXTENDS
|
||||
%token T_OBJECT_OPERATOR
|
||||
%token T_DOUBLE_ARROW
|
||||
%token T_LIST
|
||||
%token T_ARRAY
|
||||
%token T_LINE
|
||||
%token T_FILE
|
||||
%token T_COMMENT
|
||||
%token T_ML_COMMENT
|
||||
%token T_OPEN_TAG
|
||||
%token T_OPEN_TAG_WITH_ECHO
|
||||
%token T_CLOSE_TAG
|
||||
%token T_WHITESPACE
|
||||
%token T_START_HEREDOC
|
||||
%token T_END_HEREDOC
|
||||
%token T_DOLLAR_OPEN_CURLY_BRACES
|
||||
%token T_CURLY_OPEN
|
||||
%token T_PAAMAYIM_NEKUDOTAYIM
|
||||
|
||||
%% /* Rules */
|
||||
|
||||
start:
|
||||
top_statement_list
|
||||
;
|
||||
|
||||
top_statement_list:
|
||||
top_statement_list { zend_do_extended_info(CLS_C); } top_statement { HANDLE_INTERACTIVE(); }
|
||||
| /* empty */
|
||||
;
|
||||
|
||||
|
||||
top_statement:
|
||||
statement
|
||||
| declaration_statement { zend_do_early_binding(CLS_C); }
|
||||
;
|
||||
|
||||
|
||||
inner_statement_list:
|
||||
inner_statement_list { zend_do_extended_info(CLS_C); } inner_statement { HANDLE_INTERACTIVE(); }
|
||||
| /* empty */
|
||||
;
|
||||
|
||||
|
||||
inner_statement:
|
||||
statement
|
||||
| declaration_statement
|
||||
;
|
||||
|
||||
|
||||
statement:
|
||||
unticked_statement { zend_do_ticks(CLS_C); }
|
||||
;
|
||||
|
||||
|
||||
unticked_statement:
|
||||
'{' inner_statement_list '}'
|
||||
| T_IF '(' expr ')' { zend_do_if_cond(&$3, &$4 CLS_CC); } statement { zend_do_if_after_statement(&$4, 1 CLS_CC); } elseif_list else_single { zend_do_if_end(CLS_C); }
|
||||
| T_IF '(' expr ')' ':' { zend_do_if_cond(&$3, &$4 CLS_CC); } inner_statement_list { zend_do_if_after_statement(&$4, 1 CLS_CC); } new_elseif_list new_else_single T_ENDIF ';' { zend_do_if_end(CLS_C); }
|
||||
| T_WHILE '(' { $1.u.opline_num = get_next_op_number(CG(active_op_array)); } expr ')' { zend_do_while_cond(&$4, &$5 CLS_CC); } while_statement { zend_do_while_end(&$1, &$5 CLS_CC); }
|
||||
| T_DO { $1.u.opline_num = get_next_op_number(CG(active_op_array)); zend_do_do_while_begin(CLS_C); } statement T_WHILE '(' { $5.u.opline_num = get_next_op_number(CG(active_op_array)); } expr ')' ';' { zend_do_do_while_end(&$1, &$5, &$7 CLS_CC); }
|
||||
| T_FOR
|
||||
'('
|
||||
for_expr
|
||||
';' { zend_do_free(&$3 CLS_CC); $4.u.opline_num = get_next_op_number(CG(active_op_array)); }
|
||||
for_expr
|
||||
';' { zend_do_extended_info(CLS_C); zend_do_for_cond(&$6, &$7 CLS_CC); }
|
||||
for_expr
|
||||
')' { zend_do_free(&$9 CLS_CC); zend_do_for_before_statement(&$4, &$7 CLS_CC); }
|
||||
for_statement { zend_do_for_end(&$7 CLS_CC); }
|
||||
| T_SWITCH '(' expr ')' { zend_do_switch_cond(&$3 CLS_CC); } switch_case_list { zend_do_switch_end(&$6 CLS_CC); }
|
||||
| T_BREAK ';' { zend_do_brk_cont(ZEND_BRK, NULL CLS_CC); }
|
||||
| T_BREAK expr ';' { zend_do_brk_cont(ZEND_BRK, &$2 CLS_CC); }
|
||||
| T_CONTINUE ';' { zend_do_brk_cont(ZEND_CONT, NULL CLS_CC); }
|
||||
| T_CONTINUE expr ';' { zend_do_brk_cont(ZEND_CONT, &$2 CLS_CC); }
|
||||
| T_RETURN ';' { zend_do_return(NULL, 0 CLS_CC); }
|
||||
| T_RETURN expr_without_variable ';' { zend_do_return(&$2, 0 CLS_CC); }
|
||||
| T_RETURN cvar ';' { zend_do_return(&$2, 1 CLS_CC); }
|
||||
| T_GLOBAL global_var_list ';'
|
||||
| T_STATIC static_var_list ';'
|
||||
| T_ECHO echo_expr_list ';'
|
||||
| T_INLINE_HTML { zend_do_echo(&$1 CLS_CC); }
|
||||
| expr ';' { zend_do_free(&$1 CLS_CC); }
|
||||
| T_USE use_filename ';' { zend_error(E_COMPILE_ERROR,"use: Not yet supported. Please use include_once() or require_once()"); zval_dtor(&$2.u.constant); }
|
||||
| T_UNSET '(' unset_variables ')' ';'
|
||||
| T_FOREACH '(' w_cvar T_AS { zend_do_foreach_begin(&$1, &$3, &$2, &$4, 1 CLS_CC); } w_cvar foreach_optional_arg ')' { zend_do_foreach_cont(&$6, &$7, &$4 CLS_CC); } foreach_statement { zend_do_foreach_end(&$1, &$2 CLS_CC); }
|
||||
| T_FOREACH '(' expr_without_variable T_AS { zend_do_foreach_begin(&$1, &$3, &$2, &$4, 0 CLS_CC); } w_cvar foreach_optional_arg ')' { zend_do_foreach_cont(&$6, &$7, &$4 CLS_CC); } foreach_statement { zend_do_foreach_end(&$1, &$2 CLS_CC); }
|
||||
| T_DECLARE { zend_do_declare_begin(CLS_C); } '(' declare_list ')' declare_statement { zend_do_declare_end(CLS_C); }
|
||||
| ';' /* empty statement */
|
||||
;
|
||||
|
||||
unset_variables:
|
||||
unset_variable
|
||||
| unset_variables ',' unset_variable
|
||||
;
|
||||
|
||||
unset_variable:
|
||||
cvar { zend_do_end_variable_parse(BP_VAR_UNSET, 0 CLS_CC); zend_do_unset(&$1 CLS_CC); }
|
||||
;
|
||||
|
||||
use_filename:
|
||||
T_CONSTANT_ENCAPSED_STRING { $$ = $1; }
|
||||
| '(' T_CONSTANT_ENCAPSED_STRING ')' { $$ = $2; }
|
||||
;
|
||||
|
||||
|
||||
declaration_statement:
|
||||
unticked_declaration_statement { zend_do_ticks(CLS_C); }
|
||||
;
|
||||
|
||||
|
||||
unticked_declaration_statement:
|
||||
T_FUNCTION { $1.u.opline_num = CG(zend_lineno); } is_reference T_STRING { zend_do_begin_function_declaration(&$1, &$4, 0, $3.op_type CLS_CC); }
|
||||
'(' parameter_list ')' '{' inner_statement_list '}' { zend_do_end_function_declaration(&$1 CLS_CC); }
|
||||
| T_OLD_FUNCTION { $1.u.opline_num = CG(zend_lineno); } is_reference T_STRING { zend_do_begin_function_declaration(&$1, &$4, 0, $3.op_type CLS_CC); }
|
||||
parameter_list '(' inner_statement_list ')' ';' { zend_do_end_function_declaration(&$1 CLS_CC); }
|
||||
| T_CLASS T_STRING { zend_do_begin_class_declaration(&$2, NULL CLS_CC); } '{' class_statement_list '}' { zend_do_end_class_declaration(CLS_C); }
|
||||
| T_CLASS T_STRING T_EXTENDS T_STRING { zend_do_begin_class_declaration(&$2, &$4 CLS_CC); } '{' class_statement_list '}' { zend_do_end_class_declaration(CLS_C); }
|
||||
;
|
||||
|
||||
|
||||
foreach_optional_arg:
|
||||
/* empty */ { $$.op_type = IS_UNUSED; }
|
||||
| T_DOUBLE_ARROW w_cvar { $$ = $2; }
|
||||
;
|
||||
|
||||
|
||||
for_statement:
|
||||
statement
|
||||
| ':' inner_statement_list T_ENDFOR ';'
|
||||
;
|
||||
|
||||
|
||||
foreach_statement:
|
||||
statement
|
||||
| ':' inner_statement_list T_ENDFOREACH ';'
|
||||
;
|
||||
|
||||
|
||||
declare_statement:
|
||||
statement
|
||||
| ':' inner_statement_list T_ENDDECLARE ';'
|
||||
;
|
||||
|
||||
|
||||
declare_list:
|
||||
T_STRING '=' static_scalar { zend_do_declare_stmt(&$1, &$3 CLS_CC); }
|
||||
| declare_list ',' T_STRING '=' static_scalar { zend_do_declare_stmt(&$3, &$5 CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
switch_case_list:
|
||||
'{' case_list '}' { $$ = $2; }
|
||||
| '{' ';' case_list '}' { $$ = $3; }
|
||||
| ':' case_list T_ENDSWITCH ';' { $$ = $2; }
|
||||
| ':' ';' case_list T_ENDSWITCH ';' { $$ = $3; }
|
||||
;
|
||||
|
||||
|
||||
case_list:
|
||||
/* empty */ { $$.op_type = IS_UNUSED; }
|
||||
| case_list T_CASE expr case_separator { zend_do_extended_info(CLS_C); zend_do_case_before_statement(&$1, &$2, &$3 CLS_CC); } inner_statement_list { zend_do_case_after_statement(&$$, &$2 CLS_CC); $$.op_type = IS_CONST }
|
||||
| case_list T_DEFAULT case_separator { zend_do_extended_info(CLS_C); zend_do_default_before_statement(&$1, &$2 CLS_CC); } inner_statement_list { zend_do_case_after_statement(&$$, &$2 CLS_CC); $$.op_type = IS_CONST; }
|
||||
;
|
||||
|
||||
|
||||
case_separator:
|
||||
':'
|
||||
| ';'
|
||||
;
|
||||
|
||||
|
||||
while_statement:
|
||||
statement
|
||||
| ':' inner_statement_list T_ENDWHILE ';'
|
||||
;
|
||||
|
||||
|
||||
|
||||
elseif_list:
|
||||
/* empty */
|
||||
| elseif_list T_ELSEIF '(' expr ')' { zend_do_if_cond(&$4, &$5 CLS_CC); } statement { zend_do_if_after_statement(&$5, 0 CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
new_elseif_list:
|
||||
/* empty */
|
||||
| new_elseif_list T_ELSEIF '(' expr ')' ':' { zend_do_if_cond(&$4, &$5 CLS_CC); } inner_statement_list { zend_do_if_after_statement(&$5, 0 CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
else_single:
|
||||
/* empty */
|
||||
| T_ELSE statement
|
||||
;
|
||||
|
||||
|
||||
new_else_single:
|
||||
/* empty */
|
||||
| T_ELSE ':' inner_statement_list
|
||||
;
|
||||
|
||||
|
||||
parameter_list:
|
||||
non_empty_parameter_list
|
||||
| /* empty */
|
||||
;
|
||||
|
||||
|
||||
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; INIT_PZVAL(&$$.u.constant); zend_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); zend_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); zend_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); zend_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++; zend_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++; zend_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++; zend_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++; zend_do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, &$5, BYREF_NONE CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
function_call_parameter_list:
|
||||
non_empty_function_call_parameter_list { $$ = $1; }
|
||||
| /* empty */ { $$.u.constant.value.lval = 0; }
|
||||
;
|
||||
|
||||
|
||||
non_empty_function_call_parameter_list:
|
||||
expr_without_variable { $$.u.constant.value.lval = 1; zend_do_pass_param(&$1, ZEND_SEND_VAL, $$.u.constant.value.lval CLS_CC); }
|
||||
| cvar { $$.u.constant.value.lval = 1; zend_do_pass_param(&$1, ZEND_SEND_VAR, $$.u.constant.value.lval CLS_CC); }
|
||||
| '&' w_cvar { $$.u.constant.value.lval = 1; zend_do_pass_param(&$2, ZEND_SEND_REF, $$.u.constant.value.lval CLS_CC); }
|
||||
| non_empty_function_call_parameter_list ',' expr_without_variable { $$.u.constant.value.lval=$1.u.constant.value.lval+1; zend_do_pass_param(&$3, ZEND_SEND_VAL, $$.u.constant.value.lval CLS_CC); }
|
||||
| non_empty_function_call_parameter_list ',' cvar { $$.u.constant.value.lval=$1.u.constant.value.lval+1; zend_do_pass_param(&$3, ZEND_SEND_VAR, $$.u.constant.value.lval CLS_CC); }
|
||||
| non_empty_function_call_parameter_list ',' '&' w_cvar { $$.u.constant.value.lval=$1.u.constant.value.lval+1; zend_do_pass_param(&$4, ZEND_SEND_REF, $$.u.constant.value.lval CLS_CC); }
|
||||
;
|
||||
|
||||
global_var_list:
|
||||
global_var_list ',' global_var { zend_do_fetch_global_or_static_variable(&$3, NULL, ZEND_FETCH_GLOBAL CLS_CC); }
|
||||
| global_var { zend_do_fetch_global_or_static_variable(&$1, NULL, ZEND_FETCH_GLOBAL CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
global_var:
|
||||
T_VARIABLE { $$ = $1; }
|
||||
| '$' r_cvar { $$ = $2; }
|
||||
| '$' '{' expr '}' { $$ = $3; }
|
||||
;
|
||||
|
||||
|
||||
static_var_list:
|
||||
static_var_list ',' T_VARIABLE { zend_do_fetch_global_or_static_variable(&$3, NULL, ZEND_FETCH_STATIC CLS_CC); }
|
||||
| static_var_list ',' T_VARIABLE '=' static_scalar { zend_do_fetch_global_or_static_variable(&$3, &$5, ZEND_FETCH_STATIC CLS_CC); }
|
||||
| T_VARIABLE { zend_do_fetch_global_or_static_variable(&$1, NULL, ZEND_FETCH_STATIC CLS_CC); }
|
||||
| T_VARIABLE '=' static_scalar { zend_do_fetch_global_or_static_variable(&$1, &$3, ZEND_FETCH_STATIC CLS_CC); }
|
||||
|
||||
;
|
||||
|
||||
|
||||
class_statement_list:
|
||||
class_statement_list class_statement
|
||||
| /* empty */
|
||||
;
|
||||
|
||||
|
||||
class_statement:
|
||||
T_VAR class_variable_decleration ';'
|
||||
| T_FUNCTION { $1.u.opline_num = CG(zend_lineno); } is_reference T_STRING { zend_do_begin_function_declaration(&$1, &$4, 1, $3.op_type CLS_CC); } '('
|
||||
parameter_list ')' '{' inner_statement_list '}' { zend_do_end_function_declaration(&$1 CLS_CC); }
|
||||
| T_OLD_FUNCTION { $1.u.opline_num = CG(zend_lineno); } is_reference T_STRING { zend_do_begin_function_declaration(&$1, &$4, 1, $3.op_type CLS_CC); }
|
||||
parameter_list '(' inner_statement_list ')' ';' { zend_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 { zend_do_declare_property(&$3, NULL CLS_CC); }
|
||||
| class_variable_decleration ',' T_VARIABLE '=' static_scalar { zend_do_declare_property(&$3, &$5 CLS_CC); }
|
||||
| T_VARIABLE { zend_do_declare_property(&$1, NULL CLS_CC); }
|
||||
| T_VARIABLE '=' static_scalar { zend_do_declare_property(&$1, &$3 CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
echo_expr_list:
|
||||
| echo_expr_list ',' expr { zend_do_echo(&$3 CLS_CC); }
|
||||
| expr { zend_do_echo(&$1 CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
for_expr:
|
||||
/* empty */ { $$.op_type = IS_CONST; $$.u.constant.type = IS_BOOL; $$.u.constant.value.lval = 1; }
|
||||
| non_empty_for_expr { $$ = $1; }
|
||||
;
|
||||
|
||||
non_empty_for_expr:
|
||||
non_empty_for_expr ',' { zend_do_free(&$1 CLS_CC); } expr { $$ = $4; }
|
||||
| expr { $$ = $1; }
|
||||
;
|
||||
|
||||
|
||||
expr_without_variable:
|
||||
T_LIST '(' { zend_do_list_init(CLS_C); } assignment_list ')' '=' expr { zend_do_list_end(&$$, &$7 CLS_CC); }
|
||||
| cvar '=' expr { zend_do_end_variable_parse(BP_VAR_W, 0 CLS_CC); zend_do_assign(&$$, &$1, &$3 CLS_CC); }
|
||||
| cvar '=' '&' w_cvar { zend_do_end_variable_parse(BP_VAR_W, 0 CLS_CC); zend_do_assign_ref(&$$, &$1, &$4 CLS_CC); }
|
||||
| cvar '=' '&' function_call { zend_do_end_variable_parse(BP_VAR_W, 0 CLS_CC); zend_do_assign_ref(&$$, &$1, &$4 CLS_CC); }
|
||||
| cvar '=' '&' T_NEW class_name { zend_do_extended_fcall_begin(CLS_C); zend_do_begin_new_object(&$4, &$5 CLS_CC); } ctor_arguments { zend_do_end_new_object(&$3, &$5, &$4, &$7 CLS_CC); zend_do_extended_fcall_end(CLS_C); zend_do_end_variable_parse(BP_VAR_W, 0 CLS_CC); zend_do_assign_ref(&$$, &$1, &$3 CLS_CC); }
|
||||
| T_NEW class_name { zend_do_extended_fcall_begin(CLS_C); zend_do_begin_new_object(&$1, &$2 CLS_CC); } ctor_arguments { zend_do_end_new_object(&$$, &$2, &$1, &$4 CLS_CC); zend_do_extended_fcall_end(CLS_C);}
|
||||
| cvar T_PLUS_EQUAL expr { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_ADD, &$$, &$1, &$3 CLS_CC); }
|
||||
| cvar T_MINUS_EQUAL expr { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_SUB, &$$, &$1, &$3 CLS_CC); }
|
||||
| cvar T_MUL_EQUAL expr { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_MUL, &$$, &$1, &$3 CLS_CC); }
|
||||
| cvar T_DIV_EQUAL expr { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_DIV, &$$, &$1, &$3 CLS_CC); }
|
||||
| cvar T_CONCAT_EQUAL expr { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_CONCAT, &$$, &$1, &$3 CLS_CC); }
|
||||
| cvar T_MOD_EQUAL expr { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_MOD, &$$, &$1, &$3 CLS_CC); }
|
||||
| cvar T_AND_EQUAL expr { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_BW_AND, &$$, &$1, &$3 CLS_CC); }
|
||||
| cvar T_OR_EQUAL expr { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_BW_OR, &$$, &$1, &$3 CLS_CC); }
|
||||
| cvar T_XOR_EQUAL expr { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_BW_XOR, &$$, &$1, &$3 CLS_CC); }
|
||||
| cvar T_SL_EQUAL expr { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_SL, &$$, &$1, &$3 CLS_CC); }
|
||||
| cvar T_SR_EQUAL expr { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_SR, &$$, &$1, &$3 CLS_CC); }
|
||||
| rw_cvar T_INC { zend_do_post_incdec(&$$, &$1, ZEND_POST_INC CLS_CC); }
|
||||
| T_INC rw_cvar { zend_do_pre_incdec(&$$, &$2, ZEND_PRE_INC CLS_CC); }
|
||||
| rw_cvar T_DEC { zend_do_post_incdec(&$$, &$1, ZEND_POST_DEC CLS_CC); }
|
||||
| T_DEC rw_cvar { zend_do_pre_incdec(&$$, &$2, ZEND_PRE_DEC CLS_CC); }
|
||||
| expr T_BOOLEAN_OR { zend_do_boolean_or_begin(&$1, &$2 CLS_CC); } expr { zend_do_boolean_or_end(&$$, &$1, &$4, &$2 CLS_CC); }
|
||||
| expr T_BOOLEAN_AND { zend_do_boolean_and_begin(&$1, &$2 CLS_CC); } expr { zend_do_boolean_and_end(&$$, &$1, &$4, &$2 CLS_CC); }
|
||||
| expr T_LOGICAL_OR { zend_do_boolean_or_begin(&$1, &$2 CLS_CC); } expr { zend_do_boolean_or_end(&$$, &$1, &$4, &$2 CLS_CC); }
|
||||
| expr T_LOGICAL_AND { zend_do_boolean_and_begin(&$1, &$2 CLS_CC); } expr { zend_do_boolean_and_end(&$$, &$1, &$4, &$2 CLS_CC); }
|
||||
| expr T_LOGICAL_XOR expr { zend_do_binary_op(ZEND_BOOL_XOR, &$$, &$1, &$3 CLS_CC); }
|
||||
| expr '|' expr { zend_do_binary_op(ZEND_BW_OR, &$$, &$1, &$3 CLS_CC); }
|
||||
| expr '&' expr { zend_do_binary_op(ZEND_BW_AND, &$$, &$1, &$3 CLS_CC); }
|
||||
| expr '^' expr { zend_do_binary_op(ZEND_BW_XOR, &$$, &$1, &$3 CLS_CC); }
|
||||
| expr '.' expr { zend_do_binary_op(ZEND_CONCAT,&$$,&$1,&$3 CLS_CC); }
|
||||
| expr '+' expr { zend_do_binary_op(ZEND_ADD,&$$,&$1,&$3 CLS_CC); }
|
||||
| expr '-' expr { zend_do_binary_op(ZEND_SUB,&$$,&$1,&$3 CLS_CC); }
|
||||
| expr '*' expr { zend_do_binary_op(ZEND_MUL,&$$,&$1,&$3 CLS_CC); }
|
||||
| expr '/' expr { zend_do_binary_op(ZEND_DIV,&$$,&$1,&$3 CLS_CC); }
|
||||
| expr '%' expr { zend_do_binary_op(ZEND_MOD,&$$,&$1,&$3 CLS_CC); }
|
||||
| expr T_SL expr { zend_do_binary_op(ZEND_SL, &$$, &$1, &$3 CLS_CC); }
|
||||
| expr T_SR expr { zend_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; INIT_PZVAL(&$1.u.constant); zend_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); zend_do_binary_op(ZEND_SUB, &$$, &$1, &$2 CLS_CC); }
|
||||
| '!' expr { zend_do_unary_op(ZEND_BOOL_NOT, &$$, &$2 CLS_CC); }
|
||||
| '~' expr { zend_do_unary_op(ZEND_BW_NOT, &$$, &$2 CLS_CC); }
|
||||
| expr T_IS_IDENTICAL expr { zend_do_binary_op(ZEND_IS_IDENTICAL, &$$, &$1, &$3 CLS_CC); }
|
||||
| expr T_IS_NOT_IDENTICAL expr { zend_do_binary_op(ZEND_IS_NOT_IDENTICAL, &$$, &$1, &$3 CLS_CC); }
|
||||
| expr T_IS_EQUAL expr { zend_do_binary_op(ZEND_IS_EQUAL, &$$, &$1, &$3 CLS_CC); }
|
||||
| expr T_IS_NOT_EQUAL expr { zend_do_binary_op(ZEND_IS_NOT_EQUAL, &$$, &$1, &$3 CLS_CC); }
|
||||
| expr '<' expr { zend_do_binary_op(ZEND_IS_SMALLER, &$$, &$1, &$3 CLS_CC); }
|
||||
| expr T_IS_SMALLER_OR_EQUAL expr { zend_do_binary_op(ZEND_IS_SMALLER_OR_EQUAL, &$$, &$1, &$3 CLS_CC); }
|
||||
| expr '>' expr { zend_do_binary_op(ZEND_IS_SMALLER, &$$, &$3, &$1 CLS_CC); }
|
||||
| expr T_IS_GREATER_OR_EQUAL expr { zend_do_binary_op(ZEND_IS_SMALLER_OR_EQUAL, &$$, &$3, &$1 CLS_CC); }
|
||||
| '(' expr ')' { $$ = $2; }
|
||||
| expr '?' { zend_do_begin_qm_op(&$1, &$2 CLS_CC); }
|
||||
expr ':' { zend_do_qm_true(&$4, &$2, &$5 CLS_CC); }
|
||||
expr { zend_do_qm_false(&$$, &$7, &$2, &$5 CLS_CC); }
|
||||
| function_call { $$ = $1; }
|
||||
| internal_functions_in_yacc { $$ = $1; }
|
||||
| T_INT_CAST expr { zend_do_cast(&$$, &$2, IS_LONG CLS_CC); }
|
||||
| T_DOUBLE_CAST expr { zend_do_cast(&$$, &$2, IS_DOUBLE CLS_CC); }
|
||||
| T_STRING_CAST expr { zend_do_cast(&$$, &$2, IS_STRING CLS_CC); }
|
||||
| T_ARRAY_CAST expr { zend_do_cast(&$$, &$2, IS_ARRAY CLS_CC); }
|
||||
| T_OBJECT_CAST expr { zend_do_cast(&$$, &$2, IS_OBJECT CLS_CC); }
|
||||
| T_BOOL_CAST expr { zend_do_cast(&$$, &$2, IS_BOOL CLS_CC); }
|
||||
| T_UNSET_CAST expr { zend_do_cast(&$$, &$2, IS_NULL CLS_CC); }
|
||||
| T_EXIT exit_expr { zend_do_exit(&$$, &$2 CLS_CC); }
|
||||
| '@' { zend_do_begin_silence(&$1 CLS_CC); } expr { zend_do_end_silence(&$1 CLS_CC); $$ = $3; }
|
||||
| scalar { $$ = $1; }
|
||||
| T_ARRAY '(' array_pair_list ')' { $$ = $3; }
|
||||
| '`' encaps_list '`' { zend_do_shell_exec(&$$, &$2 CLS_CC); }
|
||||
| T_PRINT expr { zend_do_print(&$$, &$2 CLS_CC); }
|
||||
;
|
||||
|
||||
function_call:
|
||||
T_STRING '(' { $2.u.opline_num = zend_do_begin_function_call(&$1 CLS_CC); }
|
||||
function_call_parameter_list
|
||||
')' { zend_do_end_function_call(&$1, &$$, &$4, 0, $2.u.opline_num CLS_CC); zend_do_extended_fcall_end(CLS_C); }
|
||||
| cvar '(' { zend_do_begin_dynamic_function_call(&$1 CLS_CC); }
|
||||
function_call_parameter_list
|
||||
')' { zend_do_end_function_call(&$1, &$$, &$4, 0, 1 CLS_CC); zend_do_extended_fcall_end(CLS_C);}
|
||||
| T_STRING T_PAAMAYIM_NEKUDOTAYIM T_STRING '(' { zend_do_extended_fcall_begin(CLS_C); zend_do_begin_class_member_function_call(&$1, &$3 CLS_CC); }
|
||||
function_call_parameter_list
|
||||
')' { zend_do_end_function_call(&$3, &$$, &$6, 1, 1 CLS_CC); zend_do_extended_fcall_end(CLS_C);}
|
||||
;
|
||||
|
||||
|
||||
exit_expr:
|
||||
/* empty */ { memset(&$$, 0, sizeof(znode)); $$.op_type = IS_UNUSED; }
|
||||
| '(' ')' { memset(&$$, 0, sizeof(znode)); $$.op_type = IS_UNUSED; }
|
||||
| '(' expr ')' { $$ = $2; }
|
||||
;
|
||||
|
||||
|
||||
ctor_arguments:
|
||||
/* empty */ { $$.u.constant.value.lval=0; }
|
||||
| '(' function_call_parameter_list ')' { $$ = $2; }
|
||||
;
|
||||
|
||||
|
||||
class_name:
|
||||
T_STRING { $$ = $1; }
|
||||
| r_cvar { $$ = $1; }
|
||||
;
|
||||
|
||||
|
||||
|
||||
common_scalar:
|
||||
T_LNUMBER { $$ = $1; }
|
||||
| T_DNUMBER { $$ = $1; }
|
||||
| T_CONSTANT_ENCAPSED_STRING { $$ = $1; }
|
||||
| T_LINE { $$ = $1; }
|
||||
| T_FILE { $$ = $1; }
|
||||
;
|
||||
|
||||
|
||||
static_scalar: /* compile-time evaluated scalars */
|
||||
common_scalar { $$ = $1; }
|
||||
| T_STRING { zend_do_fetch_constant(&$$, &$1, ZEND_CT CLS_CC); }
|
||||
| '+' static_scalar { $$ = $1; }
|
||||
| '-' static_scalar { zval minus_one; minus_one.type = IS_LONG; minus_one.value.lval = -1; mul_function(&$2.u.constant, &$2.u.constant, &minus_one); $$ = $2; }
|
||||
| T_ARRAY '(' static_array_pair_list ')' { $$ = $3; $$.u.constant.type = IS_CONSTANT_ARRAY; }
|
||||
;
|
||||
|
||||
|
||||
scalar:
|
||||
T_STRING { zend_do_fetch_constant(&$$, &$1, ZEND_RT CLS_CC); }
|
||||
| T_STRING_VARNAME { $$ = $1; }
|
||||
| common_scalar { $$ = $1; }
|
||||
| '"' encaps_list '"' { $$ = $2; }
|
||||
| '\'' encaps_list '\'' { $$ = $2; }
|
||||
| T_START_HEREDOC encaps_list T_END_HEREDOC { $$ = $2; zend_do_end_heredoc(CLS_C); }
|
||||
;
|
||||
|
||||
|
||||
static_array_pair_list:
|
||||
/* 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 { zend_do_add_static_array_element(&$$, &$3, &$5); }
|
||||
| non_empty_static_array_pair_list ',' static_scalar { zend_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); zend_do_add_static_array_element(&$$, &$1, &$3); }
|
||||
| static_scalar { $$.op_type = IS_CONST; INIT_PZVAL(&$$.u.constant); array_init(&$$.u.constant); zend_do_add_static_array_element(&$$, NULL, &$1); }
|
||||
;
|
||||
|
||||
expr:
|
||||
r_cvar { $$ = $1; }
|
||||
| expr_without_variable { $$ = $1; }
|
||||
;
|
||||
|
||||
/*
|
||||
w_expr:
|
||||
w_cvar { $$ = $1; }
|
||||
| expr_without_variable { $$ = $1; }
|
||||
;
|
||||
*/
|
||||
|
||||
|
||||
r_cvar:
|
||||
cvar { zend_do_end_variable_parse(BP_VAR_R, 0 CLS_CC); $$ = $1; }
|
||||
;
|
||||
|
||||
|
||||
w_cvar:
|
||||
cvar { zend_do_end_variable_parse(BP_VAR_W, 0 CLS_CC); $$ = $1; }
|
||||
;
|
||||
|
||||
|
||||
rw_cvar:
|
||||
cvar { zend_do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); $$ = $1; }
|
||||
;
|
||||
|
||||
|
||||
cvar:
|
||||
cvar_without_objects { $$ = $1; }
|
||||
| cvar_without_objects T_OBJECT_OPERATOR { zend_do_push_object(&$1 CLS_CC); } ref_list { $$ = $4; }
|
||||
;
|
||||
|
||||
|
||||
cvar_without_objects:
|
||||
reference_variable { $$ = $1; }
|
||||
| simple_indirect_reference reference_variable { zend_do_indirect_references(&$$, &$1, &$2 CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
reference_variable:
|
||||
reference_variable '[' dim_offset ']' { fetch_array_dim(&$$, &$1, &$3 CLS_CC); }
|
||||
| reference_variable '{' expr '}' { fetch_string_offset(&$$, &$1, &$3 CLS_CC); }
|
||||
| compound_variable { zend_do_fetch_globals(&$1 CLS_CC); zend_do_begin_variable_parse(CLS_C); fetch_simple_variable(&$$, &$1, 1 CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
compound_variable:
|
||||
T_VARIABLE { $$ = $1; }
|
||||
| '$' '{' expr '}' { $$ = $3; }
|
||||
;
|
||||
|
||||
dim_offset:
|
||||
/* empty */ { $$.op_type = IS_UNUSED; }
|
||||
| expr { $$ = $1; }
|
||||
;
|
||||
|
||||
ref_list:
|
||||
object_property { $$ = $1; }
|
||||
| ref_list T_OBJECT_OPERATOR { zend_do_push_object(&$1 CLS_CC); } object_property { $$ = $4; }
|
||||
;
|
||||
|
||||
object_property:
|
||||
object_dim_list { $$ = $1; }
|
||||
| cvar_without_objects { zend_do_end_variable_parse(BP_VAR_R, 0 CLS_CC); } { znode tmp_znode; zend_do_pop_object(&tmp_znode CLS_CC); zend_do_fetch_property(&$$, &tmp_znode, &$1 CLS_CC);}
|
||||
;
|
||||
|
||||
object_dim_list:
|
||||
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; zend_do_pop_object(&tmp_znode CLS_CC); zend_do_fetch_property(&$$, &tmp_znode, &$1 CLS_CC);}
|
||||
;
|
||||
|
||||
variable_name:
|
||||
T_STRING { $$ = $1; }
|
||||
| '{' expr '}' { $$ = $2; }
|
||||
;
|
||||
|
||||
|
||||
simple_indirect_reference:
|
||||
'$' { $$.u.constant.value.lval = 1; }
|
||||
| simple_indirect_reference '$' { $$.u.constant.value.lval++; }
|
||||
;
|
||||
|
||||
assignment_list:
|
||||
assignment_list ',' assignment_list_element
|
||||
| assignment_list_element
|
||||
;
|
||||
|
||||
|
||||
assignment_list_element:
|
||||
cvar { zend_do_add_list_element(&$1 CLS_CC); }
|
||||
| T_LIST '(' { zend_do_new_list_begin(CLS_C); } assignment_list ')' { zend_do_new_list_end(CLS_C); }
|
||||
| /* empty */ { zend_do_add_list_element(NULL CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
array_pair_list:
|
||||
/* empty */ { zend_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 { zend_do_add_array_element(&$$, &$5, &$3, 0 CLS_CC); }
|
||||
| non_empty_array_pair_list ',' expr { zend_do_add_array_element(&$$, &$3, NULL, 0 CLS_CC); }
|
||||
| expr T_DOUBLE_ARROW expr { zend_do_init_array(&$$, &$3, &$1, 0 CLS_CC); }
|
||||
| expr { zend_do_init_array(&$$, &$1, NULL, 0 CLS_CC); }
|
||||
| non_empty_array_pair_list ',' expr T_DOUBLE_ARROW '&' w_cvar { zend_do_add_array_element(&$$, &$6, &$3, 1 CLS_CC); }
|
||||
| non_empty_array_pair_list ',' '&' w_cvar { zend_do_add_array_element(&$$, &$4, NULL, 1 CLS_CC); }
|
||||
| expr T_DOUBLE_ARROW '&' w_cvar { zend_do_init_array(&$$, &$4, &$1, 1 CLS_CC); }
|
||||
| '&' w_cvar { zend_do_init_array(&$$, &$2, NULL, 1 CLS_CC); }
|
||||
;
|
||||
|
||||
encaps_list:
|
||||
encaps_list encaps_var { zend_do_end_variable_parse(BP_VAR_R, 0 CLS_CC); zend_do_add_variable(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list T_STRING { zend_do_add_string(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list T_NUM_STRING { zend_do_add_string(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list T_ENCAPSED_AND_WHITESPACE { zend_do_add_string(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list T_CHARACTER { zend_do_add_char(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list T_BAD_CHARACTER { zend_do_add_string(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list '[' { $2.u.constant.value.lval = (long) '['; zend_do_add_char(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list ']' { $2.u.constant.value.lval = (long) ']'; zend_do_add_char(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list '{' { $2.u.constant.value.lval = (long) '{'; zend_do_add_char(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list '}' { $2.u.constant.value.lval = (long) '}'; zend_do_add_char(&$$, &$1, &$2 CLS_CC); }
|
||||
| encaps_list T_OBJECT_OPERATOR { znode tmp; $2.u.constant.value.lval = (long) '-'; zend_do_add_char(&tmp, &$1, &$2 CLS_CC); $2.u.constant.value.lval = (long) '>'; zend_do_add_char(&$$, &tmp, &$2 CLS_CC); }
|
||||
| /* empty */ { zend_do_init_string(&$$ CLS_CC); }
|
||||
|
||||
;
|
||||
|
||||
|
||||
|
||||
encaps_var:
|
||||
T_VARIABLE { zend_do_fetch_globals(&$1 CLS_CC); zend_do_begin_variable_parse(CLS_C); fetch_simple_variable(&$$, &$1, 1 CLS_CC); }
|
||||
| T_VARIABLE '[' { zend_do_begin_variable_parse(CLS_C); } encaps_var_offset ']' { zend_do_fetch_globals(&$1 CLS_CC); fetch_array_begin(&$$, &$1, &$4 CLS_CC); }
|
||||
| T_VARIABLE T_OBJECT_OPERATOR T_STRING { zend_do_begin_variable_parse(CLS_C); fetch_simple_variable(&$2, &$1, 1 CLS_CC); zend_do_fetch_property(&$$, &$2, &$3 CLS_CC); }
|
||||
| T_DOLLAR_OPEN_CURLY_BRACES expr '}' { zend_do_begin_variable_parse(CLS_C); fetch_simple_variable(&$$, &$2, 1 CLS_CC); }
|
||||
| T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '[' expr ']' '}' { zend_do_begin_variable_parse(CLS_C); fetch_array_begin(&$$, &$2, &$4 CLS_CC); }
|
||||
| T_CURLY_OPEN cvar '}' { $$ = $2; }
|
||||
;
|
||||
|
||||
|
||||
encaps_var_offset:
|
||||
T_STRING { $$ = $1; }
|
||||
| T_NUM_STRING { $$ = $1; }
|
||||
| T_VARIABLE { fetch_simple_variable(&$$, &$1, 1 CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
internal_functions_in_yacc:
|
||||
T_ISSET '(' cvar ')' { zend_do_isset_or_isempty(ZEND_ISSET, &$$, &$3 CLS_CC); }
|
||||
| T_EMPTY '(' cvar ')' { zend_do_isset_or_isempty(ZEND_ISEMPTY, &$$, &$3 CLS_CC); }
|
||||
| T_INCLUDE expr { zend_do_include_or_eval(ZEND_INCLUDE, &$$, &$2 CLS_CC); }
|
||||
| T_INCLUDE_ONCE expr { zend_do_include_or_eval(ZEND_INCLUDE_ONCE, &$$, &$2 CLS_CC); }
|
||||
| T_EVAL '(' expr ')' { zend_do_include_or_eval(ZEND_EVAL, &$$, &$3 CLS_CC); }
|
||||
| T_REQUIRE expr { zend_do_include_or_eval(ZEND_REQUIRE, &$$, &$2 CLS_CC); }
|
||||
| T_REQUIRE_ONCE expr { zend_do_include_or_eval(ZEND_REQUIRE_ONCE, &$$, &$2 CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
%%
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -4,7 +4,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -29,6 +29,7 @@
|
||||
%x ST_LOOKING_FOR_PROPERTY
|
||||
%x ST_LOOKING_FOR_VARNAME
|
||||
%x ST_COMMENT
|
||||
%x ST_ONE_LINE_COMMENT
|
||||
%option stack
|
||||
|
||||
%{
|
||||
@@ -38,11 +39,12 @@
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include "zend.h"
|
||||
#include "zend_alloc.h"
|
||||
#include "zend-parser.h"
|
||||
#include "zend_language_parser.h"
|
||||
#include "zend_compile.h"
|
||||
#include "zend-scanner.h"
|
||||
#include "zend_language_scanner.h"
|
||||
#include "zend_highlight.h"
|
||||
#include "zend_constants.h"
|
||||
#include "zend_variables.h"
|
||||
@@ -76,6 +78,7 @@
|
||||
#else
|
||||
#define YY_DECL int lex_scan(zval *zendlval CLS_DC)
|
||||
#endif
|
||||
|
||||
#define ECHO { ZEND_WRITE( yytext, yyleng ); }
|
||||
|
||||
#ifdef ZTS
|
||||
@@ -84,16 +87,7 @@
|
||||
# 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); }
|
||||
stdiobuf* rdbuf()/* const */ { return &_file; }
|
||||
};
|
||||
#endif
|
||||
#include "zend_istdiostream.h"
|
||||
|
||||
#define YY_FATAL_ERROR zend_fatal_scanner_error
|
||||
|
||||
@@ -116,7 +110,7 @@ do { \
|
||||
}
|
||||
|
||||
|
||||
#define ZEND_IS_OCT(c) ((c)>='0' && (c)<'8')
|
||||
#define ZEND_IS_OCT(c) ((c)>='0' && (c)<='7')
|
||||
#define ZEND_IS_HEX(c) (((c)>='0' && (c)<='9') || ((c)>='a' && (c)<='f') || ((c)>='A' && (c)<='F'))
|
||||
|
||||
|
||||
@@ -207,7 +201,7 @@ ZEND_API void zend_file_handle_dtor(zend_file_handle *fh)
|
||||
#endif
|
||||
}
|
||||
if (fh->opened_path) {
|
||||
free(fh->opened_path);
|
||||
efree(fh->opened_path);
|
||||
}
|
||||
if (fh->free_filename && fh->filename) {
|
||||
efree(fh->filename);
|
||||
@@ -249,23 +243,18 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
|
||||
switch (file_handle->type) {
|
||||
case ZEND_HANDLE_FILENAME:
|
||||
file_handle->handle.fp = zend_fopen(file_handle->filename, &file_handle->opened_path);
|
||||
file_path = file_handle->opened_path;
|
||||
break;
|
||||
case ZEND_HANDLE_FD:
|
||||
/* file_handle->opened_path = NULL; */
|
||||
file_handle->handle.fp = fdopen(file_handle->handle.fd, "r");
|
||||
break;
|
||||
case ZEND_HANDLE_FP:
|
||||
/* file_handle->opened_path = NULL; */
|
||||
file_handle->handle.fp = file_handle->handle.fp;
|
||||
break;
|
||||
}
|
||||
if (!file_handle->handle.fp) {
|
||||
return FAILURE;
|
||||
}
|
||||
if (!file_path) {
|
||||
file_path = file_handle->filename;
|
||||
}
|
||||
|
||||
file_handle->type = ZEND_HANDLE_FP;
|
||||
if (file_handle->handle.fp != stdin) {
|
||||
zend_llist_add_element(&CG(open_files), file_handle);
|
||||
@@ -277,7 +266,6 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
|
||||
#else
|
||||
switch (file_handle->type) {
|
||||
case ZEND_HANDLE_FD:
|
||||
/* file_handle->opened_path = NULL; */
|
||||
file_handle->handle.is = new ifstream(file_handle->handle.fd);
|
||||
file_handle->type = ZEND_HANDLE_FSTREAM;
|
||||
break;
|
||||
@@ -292,7 +280,6 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
|
||||
break;
|
||||
}
|
||||
case ZEND_HANDLE_FP:
|
||||
/* file_handle->opened_path = NULL; */
|
||||
if (file_handle->handle.fp==stdin) {
|
||||
file_handle->handle.is = &cin;
|
||||
} else {
|
||||
@@ -305,8 +292,6 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
|
||||
break;
|
||||
}
|
||||
|
||||
file_path = file_handle->filename;
|
||||
|
||||
if (file_handle->handle.is->fail()) {
|
||||
delete file_handle->handle.is;
|
||||
return FAILURE;
|
||||
@@ -318,6 +303,13 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
|
||||
CG(ZFL) = new ZendFlexLexer;
|
||||
CG(ZFL)->switch_streams(file_handle->handle.is, &cout);
|
||||
#endif
|
||||
|
||||
if(file_handle->opened_path) {
|
||||
file_path = file_handle->opened_path;
|
||||
} else {
|
||||
file_path = file_handle->filename;
|
||||
}
|
||||
|
||||
zend_set_compiled_filename(file_path);
|
||||
CG(zend_lineno) = 1;
|
||||
return SUCCESS;
|
||||
@@ -359,8 +351,7 @@ ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type CLS
|
||||
CG(in_compilation) = 1;
|
||||
CG(active_op_array) = op_array;
|
||||
compiler_result = zendparse(CLS_C);
|
||||
do_return(&retval_znode, 0 CLS_CC);
|
||||
restore_lexical_state(&original_lex_state CLS_CC);
|
||||
zend_do_return(&retval_znode, 0 CLS_CC);
|
||||
CG(in_compilation) = original_in_compilation;
|
||||
if (compiler_result==1) { /* parser error */
|
||||
CG(unclean_shutdown) = 1;
|
||||
@@ -378,6 +369,9 @@ ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type CLS
|
||||
retval = NULL;
|
||||
}
|
||||
}
|
||||
if (compilation_successful) {
|
||||
restore_lexical_state(&original_lex_state CLS_CC);
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -401,6 +395,10 @@ zend_op_array *compile_filename(int type, zval *filename CLS_DC ELS_DC)
|
||||
|
||||
|
||||
retval = zend_compile_file(&file_handle, type CLS_CC);
|
||||
if (retval && file_handle.opened_path) {
|
||||
int dummy = 1;
|
||||
zend_hash_add(&EG(included_files), file_handle.opened_path, strlen(file_handle.opened_path)+1, (void *)&dummy, sizeof(int), NULL);
|
||||
}
|
||||
zend_destroy_file_handle(&file_handle CLS_CC);
|
||||
|
||||
if (filename==&tmp) {
|
||||
@@ -410,9 +408,9 @@ zend_op_array *compile_filename(int type, zval *filename CLS_DC ELS_DC)
|
||||
}
|
||||
|
||||
#ifndef ZTS
|
||||
static inline int prepare_string_for_scanning(zval *str)
|
||||
static inline int prepare_string_for_scanning(zval *str, char *filename)
|
||||
#else
|
||||
static inline int prepare_string_for_scanning(zval *str, istrstream **input_stream CLS_DC)
|
||||
static inline int prepare_string_for_scanning(zval *str, istrstream **input_stream, char *filename CLS_DC)
|
||||
#endif
|
||||
{
|
||||
#ifndef ZTS
|
||||
@@ -429,13 +427,13 @@ static inline int prepare_string_for_scanning(zval *str, istrstream **input_stre
|
||||
|
||||
CG(ZFL)->switch_streams(*input_stream, &cout);
|
||||
#endif
|
||||
zend_set_compiled_filename("Eval code");
|
||||
zend_set_compiled_filename(filename);
|
||||
CG(zend_lineno) = 1;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
zend_op_array *compile_string(zval *source_string CLS_DC)
|
||||
zend_op_array *compile_string(zval *source_string, char *filename CLS_DC)
|
||||
{
|
||||
zend_lex_state original_lex_state;
|
||||
zend_op_array *op_array = (zend_op_array *) emalloc(sizeof(zend_op_array));
|
||||
@@ -462,9 +460,9 @@ zend_op_array *compile_string(zval *source_string CLS_DC)
|
||||
|
||||
save_lexical_state(&original_lex_state CLS_CC);
|
||||
#ifndef ZTS
|
||||
if (prepare_string_for_scanning(source_string)==FAILURE) {
|
||||
if (prepare_string_for_scanning(source_string, filename)==FAILURE) {
|
||||
#else
|
||||
if (prepare_string_for_scanning(source_string, &input_stream CLS_CC)==FAILURE) {
|
||||
if (prepare_string_for_scanning(source_string, &input_stream, filename CLS_CC)==FAILURE) {
|
||||
#endif
|
||||
efree(op_array);
|
||||
retval = NULL;
|
||||
@@ -477,18 +475,18 @@ zend_op_array *compile_string(zval *source_string CLS_DC)
|
||||
CG(ZFL)->BeginState(ST_IN_SCRIPTING);
|
||||
#endif
|
||||
compiler_result = zendparse(CLS_C);
|
||||
restore_lexical_state(&original_lex_state CLS_CC);
|
||||
|
||||
if (compiler_result==1) {
|
||||
CG(active_op_array) = original_active_op_array;
|
||||
CG(unclean_shutdown)=1;
|
||||
retval = NULL;
|
||||
} else {
|
||||
do_return(NULL, 0 CLS_CC);
|
||||
zend_do_return(NULL, 0 CLS_CC);
|
||||
CG(active_op_array) = original_active_op_array;
|
||||
pass_two(op_array);
|
||||
retval = op_array;
|
||||
}
|
||||
restore_lexical_state(&original_lex_state CLS_CC);
|
||||
}
|
||||
#ifdef ZTS
|
||||
delete input_stream;
|
||||
@@ -521,8 +519,7 @@ int highlight_file(char *filename, zend_syntax_highlighter_ini *syntax_highlight
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
int highlight_string(zval *str, zend_syntax_highlighter_ini *syntax_highlighter_ini)
|
||||
int highlight_string(zval *str, zend_syntax_highlighter_ini *syntax_highlighter_ini, char *str_name)
|
||||
{
|
||||
zend_lex_state original_lex_state;
|
||||
zval tmp = *str;
|
||||
@@ -535,9 +532,9 @@ int highlight_string(zval *str, zend_syntax_highlighter_ini *syntax_highlighter_
|
||||
zval_copy_ctor(str);
|
||||
save_lexical_state(&original_lex_state CLS_CC);
|
||||
#ifndef ZTS
|
||||
if (prepare_string_for_scanning(str)==FAILURE) {
|
||||
if (prepare_string_for_scanning(str, str_name)==FAILURE) {
|
||||
#else
|
||||
if (prepare_string_for_scanning(str, &input_stream CLS_CC)==FAILURE) {
|
||||
if (prepare_string_for_scanning(str, &input_stream, str_name CLS_CC)==FAILURE) {
|
||||
#endif
|
||||
return FAILURE;
|
||||
}
|
||||
@@ -746,7 +743,6 @@ ANY_CHAR (.|[\n])
|
||||
}
|
||||
|
||||
<ST_LOOKING_FOR_PROPERTY>{ANY_CHAR} {
|
||||
/*unput(yytext[0]);*/
|
||||
yyless(0);
|
||||
yy_pop_state();
|
||||
}
|
||||
@@ -899,7 +895,6 @@ ANY_CHAR (.|[\n])
|
||||
return T_CONCAT_EQUAL;
|
||||
}
|
||||
|
||||
|
||||
<ST_IN_SCRIPTING>"%=" {
|
||||
return T_MOD_EQUAL;
|
||||
}
|
||||
@@ -989,14 +984,13 @@ ANY_CHAR (.|[\n])
|
||||
|
||||
|
||||
<ST_LOOKING_FOR_VARNAME>{ANY_CHAR} {
|
||||
/*unput(yytext[0]);*/
|
||||
yyless(0);
|
||||
yy_pop_state();
|
||||
yy_push_state(ST_IN_SCRIPTING);
|
||||
}
|
||||
|
||||
|
||||
<ST_IN_SCRIPTING>{LNUM}|{HNUM} {
|
||||
<ST_IN_SCRIPTING>{LNUM} {
|
||||
errno = 0;
|
||||
zendlval->value.lval = strtol(yytext, NULL, 0);
|
||||
if (errno == ERANGE) { /* overflow */
|
||||
@@ -1009,6 +1003,26 @@ ANY_CHAR (.|[\n])
|
||||
}
|
||||
}
|
||||
|
||||
<ST_IN_SCRIPTING>{HNUM} {
|
||||
errno = 0;
|
||||
zendlval->value.lval = strtoul(yytext, NULL, 16);
|
||||
if (errno == ERANGE) { /* overflow */
|
||||
/* not trying strtod - it returns trash on 0x-es */
|
||||
zendlval->value.lval = LONG_MAX; /* maximal long */
|
||||
zend_error(E_NOTICE,"Hex number is too big: %s",yytext);
|
||||
} else {
|
||||
if(zendlval->value.lval < 0) {
|
||||
/* maintain consistency with the old way */
|
||||
zendlval->value.dval = (unsigned long) zendlval->value.lval;
|
||||
zendlval->type = IS_DOUBLE;
|
||||
return T_DNUMBER;
|
||||
}
|
||||
zendlval->type = IS_LONG;
|
||||
}
|
||||
zendlval->type = IS_LONG;
|
||||
return T_LNUMBER;
|
||||
}
|
||||
|
||||
<ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC>{LNUM}|{HNUM} { /* treat numbers (almost) as strings inside encapsulated strings */
|
||||
zendlval->value.str.val = (char *)estrndup(yytext, yyleng);
|
||||
zendlval->value.str.len = yyleng;
|
||||
@@ -1035,7 +1049,7 @@ ANY_CHAR (.|[\n])
|
||||
filename = "";
|
||||
}
|
||||
zendlval->value.str.len = strlen(filename);
|
||||
zendlval->value.str.val = estrndup(filename,zendlval->value.str.len);
|
||||
zendlval->value.str.val = estrndup(filename, zendlval->value.str.len);
|
||||
zendlval->type = IS_STRING;
|
||||
return T_FILE;
|
||||
}
|
||||
@@ -1045,7 +1059,7 @@ ANY_CHAR (.|[\n])
|
||||
zendlval->value.str.val = (char *) estrndup(yytext, yyleng);
|
||||
zendlval->value.str.len = yyleng;
|
||||
zendlval->type = IS_STRING;
|
||||
HANDLE_NEWLINES(yytext,yyleng);
|
||||
HANDLE_NEWLINES(yytext, yyleng);
|
||||
return T_INLINE_HTML;
|
||||
}
|
||||
|
||||
@@ -1109,7 +1123,7 @@ ANY_CHAR (.|[\n])
|
||||
}
|
||||
|
||||
|
||||
<INITIAL>"<?php_track_vars?>"([\n]|"\r\n")? {
|
||||
<INITIAL>"<?php_track_vars?>"("\n"|"\r\n")? {
|
||||
zend_error(E_WARNING, "<?php_track_vars?> is no longer supported - please use the track_vars INI directive instead");
|
||||
HANDLE_NEWLINE(yytext[yyleng-1]);
|
||||
zendlval->value.str.val = (char *) estrndup(yytext, yyleng);
|
||||
@@ -1151,11 +1165,41 @@ ANY_CHAR (.|[\n])
|
||||
}
|
||||
|
||||
|
||||
<ST_IN_SCRIPTING>([#]|"//")([^\n\r?]|"?"[^>\n\r])*("?\n"|"?\r\n")? { /* eat one line comments */
|
||||
HANDLE_NEWLINE(yytext[yyleng-1]);
|
||||
<ST_IN_SCRIPTING>"#"|"//" {
|
||||
BEGIN(ST_ONE_LINE_COMMENT);
|
||||
yymore();
|
||||
}
|
||||
|
||||
<ST_ONE_LINE_COMMENT>"?"|"%"|">" {
|
||||
yymore();
|
||||
}
|
||||
|
||||
<ST_ONE_LINE_COMMENT>[^\n\r?%>]+ {
|
||||
yymore();
|
||||
}
|
||||
|
||||
<ST_ONE_LINE_COMMENT>"\n"|"\r\n" {
|
||||
zendlval->value.str.val = yytext; /* no copying - intentional */
|
||||
zendlval->value.str.len = yyleng;
|
||||
zendlval->type = IS_STRING;
|
||||
BEGIN(ST_IN_SCRIPTING);
|
||||
CG(zend_lineno)++;
|
||||
return T_COMMENT;
|
||||
}
|
||||
|
||||
<ST_ONE_LINE_COMMENT>"?>"|"%>" {
|
||||
if(CG(asp_tags) || yytext[yyleng-2] != '%') { /* asp comment? */
|
||||
zendlval->value.str.val = yytext; /* no copying - intentional */
|
||||
zendlval->value.str.len = yyleng;
|
||||
zendlval->type = IS_STRING;
|
||||
yyless(yyleng-2);
|
||||
BEGIN(ST_IN_SCRIPTING);
|
||||
return T_COMMENT;
|
||||
} else {
|
||||
yymore();
|
||||
}
|
||||
}
|
||||
|
||||
<ST_IN_SCRIPTING>"/*" {
|
||||
CG(comment_start_line) = CG(zend_lineno);
|
||||
BEGIN(ST_COMMENT);
|
||||
@@ -1177,7 +1221,7 @@ ANY_CHAR (.|[\n])
|
||||
yymore();
|
||||
}
|
||||
|
||||
<ST_IN_SCRIPTING>("?>"|"</script"{WHITESPACE}*">")([\n]|"\r\n")? {
|
||||
<ST_IN_SCRIPTING>("?>"|"</script"{WHITESPACE}*">")("\n"|"\r\n")? {
|
||||
zendlval->value.str.val = yytext; /* no copying - intentional */
|
||||
zendlval->value.str.len = yyleng;
|
||||
zendlval->type = IS_STRING;
|
||||
@@ -1187,17 +1231,17 @@ ANY_CHAR (.|[\n])
|
||||
}
|
||||
|
||||
|
||||
<ST_IN_SCRIPTING>"%>"([\n]|"\r\n")? {
|
||||
zendlval->value.str.len = yyleng;
|
||||
zendlval->type = IS_STRING;
|
||||
HANDLE_NEWLINES(yytext,yyleng);
|
||||
<ST_IN_SCRIPTING>"%>"("\n"|"\r\n")? {
|
||||
if (CG(asp_tags)) {
|
||||
BEGIN(INITIAL);
|
||||
zendlval->value.str.len = yyleng;
|
||||
zendlval->type = IS_STRING;
|
||||
zendlval->value.str.val = yytext; /* no copying - intentional */
|
||||
HANDLE_NEWLINES(yytext,yyleng);
|
||||
return T_CLOSE_TAG; /* implicit ';' at php-end tag */
|
||||
} else {
|
||||
zendlval->value.str.val = (char *) estrndup(yytext, yyleng);
|
||||
return T_INLINE_HTML;
|
||||
yyless(1);
|
||||
return yytext[0];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1432,9 +1476,6 @@ ANY_CHAR (.|[\n])
|
||||
zendlval->value.lval = (long) yytext[0];
|
||||
if (yyleng == 2) {
|
||||
yyless(1);
|
||||
/*unput(yytext[1]);
|
||||
yytext[1] = 0;
|
||||
yyleng--;*/
|
||||
}
|
||||
return T_CHARACTER;
|
||||
}
|
||||
@@ -1448,7 +1489,6 @@ ANY_CHAR (.|[\n])
|
||||
<ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC>"{$" {
|
||||
zendlval->value.lval = (long) yytext[0];
|
||||
yy_push_state(ST_IN_SCRIPTING);
|
||||
/*unput('$');*/
|
||||
yyless(1);
|
||||
return T_CURLY_OPEN;
|
||||
}
|
||||
+20
-6
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -272,8 +272,18 @@ void plist_entry_destructor(void *ptr)
|
||||
zend_rsrc_list_dtors_entry *ld;
|
||||
|
||||
if (zend_hash_index_find(&list_destructors, le->type,(void **) &ld)==SUCCESS) {
|
||||
if (ld->plist_dtor) {
|
||||
(ld->plist_dtor)(le->ptr);
|
||||
switch (ld->type) {
|
||||
case ZEND_RESOURCE_LIST_TYPE_STD:
|
||||
if (ld->plist_dtor) {
|
||||
(ld->plist_dtor)(le->ptr);
|
||||
}
|
||||
break;
|
||||
case ZEND_RESOURCE_LIST_TYPE_EX:
|
||||
if (ld->plist_dtor_ex) {
|
||||
ld->plist_dtor_ex(le);
|
||||
}
|
||||
break;
|
||||
EMPTY_SWITCH_DEFAULT_CASE()
|
||||
}
|
||||
} else {
|
||||
zend_error(E_WARNING,"Unknown persistent list entry type in module shutdown (%d)",le->type);
|
||||
@@ -382,13 +392,13 @@ ZEND_API int zend_register_list_destructors_ex(rsrc_dtor_func_t ld, rsrc_dtor_fu
|
||||
}
|
||||
|
||||
|
||||
int zend_init_rsrc_list_dtors()
|
||||
int zend_init_rsrc_list_dtors(void)
|
||||
{
|
||||
return zend_hash_init(&list_destructors, 50, NULL, NULL, 1);
|
||||
}
|
||||
|
||||
|
||||
void zend_destroy_rsrc_list_dtors()
|
||||
void zend_destroy_rsrc_list_dtors(void)
|
||||
{
|
||||
zend_hash_destroy(&list_destructors);
|
||||
}
|
||||
@@ -397,8 +407,12 @@ void zend_destroy_rsrc_list_dtors()
|
||||
char *zend_rsrc_list_get_rsrc_type(int resource)
|
||||
{
|
||||
zend_rsrc_list_dtors_entry *lde;
|
||||
int rsrc_type;
|
||||
|
||||
if (zend_hash_index_find(&list_destructors, resource, (void **) &lde)==SUCCESS) {
|
||||
if (!zend_list_find(resource, &rsrc_type))
|
||||
return NULL;
|
||||
|
||||
if (zend_hash_index_find(&list_destructors, rsrc_type, (void **) &lde)==SUCCESS) {
|
||||
return lde->type_name;
|
||||
} else {
|
||||
return NULL;
|
||||
|
||||
+4
-3
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -71,8 +71,8 @@ int zend_init_rsrc_list(ELS_D);
|
||||
int zend_init_rsrc_plist(ELS_D);
|
||||
void zend_destroy_rsrc_list(ELS_D);
|
||||
void zend_destroy_rsrc_plist(ELS_D);
|
||||
int zend_init_rsrc_list_dtors();
|
||||
void zend_destroy_rsrc_list_dtors();
|
||||
int zend_init_rsrc_list_dtors(void);
|
||||
void zend_destroy_rsrc_list_dtors(void);
|
||||
|
||||
ZEND_API int zend_list_insert(void *ptr, int type);
|
||||
ZEND_API int zend_plist_insert(void *ptr, int type);
|
||||
@@ -84,6 +84,7 @@ ZEND_API void *zend_list_find(int id, int *type);
|
||||
ZEND_API void *zend_plist_find(int id, int *type);
|
||||
|
||||
ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type);
|
||||
ZEND_API int zend_register_false_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type);
|
||||
ZEND_API void *zend_fetch_resource(zval **passed_id, int default_id, char *resource_type_name, int *found_resource_type, int num_resource_types, ...);
|
||||
|
||||
ZEND_API char *zend_rsrc_list_get_rsrc_type(int resource);
|
||||
|
||||
+34
-15
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 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 |
|
||||
@@ -63,26 +63,30 @@ ZEND_API void zend_llist_prepend_element(zend_llist *l, void *element)
|
||||
}
|
||||
|
||||
|
||||
#define DEL_LLIST_ELEMENT(current,l) \
|
||||
if (current->prev) {\
|
||||
current->prev->next = current->next;\
|
||||
} else {\
|
||||
l->head = current->next;\
|
||||
}\
|
||||
if (current->next) {\
|
||||
current->next->prev = current->prev;\
|
||||
} else {\
|
||||
l->tail = current->prev;\
|
||||
}\
|
||||
if (l->dtor) {\
|
||||
l->dtor(current->data);\
|
||||
pefree(current, l->persistent);\
|
||||
}
|
||||
|
||||
|
||||
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 (compare(current->data, element)) {
|
||||
if (current->prev) {
|
||||
current->prev->next = current->next;
|
||||
} else {
|
||||
l->head = current->next;
|
||||
}
|
||||
if (current->next) {
|
||||
current->next->prev = current->prev;
|
||||
} else {
|
||||
l->tail = current->prev;
|
||||
}
|
||||
if (l->dtor) {
|
||||
l->dtor(current->data);
|
||||
pefree(current, l->persistent);
|
||||
}
|
||||
DEL_LLIST_ELEMENT(current,l);
|
||||
break;
|
||||
}
|
||||
current = current->next;
|
||||
@@ -139,6 +143,21 @@ ZEND_API void zend_llist_copy(zend_llist *dst, zend_llist *src)
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zend_llist_apply_with_del(zend_llist *l, int (*func)(void *data))
|
||||
{
|
||||
zend_llist_element *element, *next;
|
||||
|
||||
element=l->head;
|
||||
while (element) {
|
||||
next = element->next;
|
||||
if (func(element->data)) {
|
||||
DEL_LLIST_ELEMENT(element,l);
|
||||
}
|
||||
element = next;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zend_llist_apply(zend_llist *l, void (*func)(void *data))
|
||||
{
|
||||
zend_llist_element *element;
|
||||
|
||||
+2
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 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 |
|
||||
@@ -55,6 +55,7 @@ ZEND_API void zend_llist_clean(zend_llist *l);
|
||||
ZEND_API void zend_llist_remove_tail(zend_llist *l);
|
||||
ZEND_API void zend_llist_copy(zend_llist *dst, zend_llist *src);
|
||||
ZEND_API void zend_llist_apply(zend_llist *l, llist_apply_func_t);
|
||||
ZEND_API void zend_llist_apply_with_del(zend_llist *l, int (*func)(void *data));
|
||||
ZEND_API void zend_llist_apply_with_argument(zend_llist *l, llist_apply_with_arg_func_t, void *arg);
|
||||
ZEND_API void zend_llist_apply_with_arguments(zend_llist *l, llist_apply_with_args_func_t func, int num_args, ...);
|
||||
ZEND_API int zend_llist_count(zend_llist *l);
|
||||
|
||||
+9
-9
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -21,6 +21,8 @@
|
||||
#ifndef MODULES_H
|
||||
#define MODULES_H
|
||||
|
||||
#include "zend.h"
|
||||
|
||||
#define INIT_FUNC_ARGS int type, int module_number ELS_DC
|
||||
#define INIT_FUNC_ARGS_PASSTHRU type, module_number ELS_CC
|
||||
#define SHUTDOWN_FUNC_ARGS int type, int module_number
|
||||
@@ -30,14 +32,12 @@
|
||||
#define GINIT_FUNC_ARGS void
|
||||
#define GINIT_FUNC_ARGS_PASSTHRU
|
||||
|
||||
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[];
|
||||
ZEND_API extern unsigned char first_arg_force_ref[];
|
||||
ZEND_API extern unsigned char first_arg_allow_ref[];
|
||||
ZEND_API extern unsigned char second_arg_force_ref[];
|
||||
ZEND_API extern unsigned char second_arg_allow_ref[];
|
||||
|
||||
#include "zend.h"
|
||||
|
||||
#define ZEND_MODULE_API_NO 20000809
|
||||
#define ZEND_MODULE_API_NO 20001222
|
||||
#ifdef ZTS
|
||||
#define USING_ZTS 1
|
||||
#else
|
||||
@@ -75,7 +75,7 @@ struct _zend_module_entry {
|
||||
};
|
||||
|
||||
|
||||
extern HashTable module_registry;
|
||||
extern ZEND_API HashTable module_registry;
|
||||
|
||||
void module_destructor(zend_module_entry *module);
|
||||
int module_registry_cleanup(zend_module_entry *module);
|
||||
|
||||
+10
-9
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 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 |
|
||||
@@ -189,7 +189,7 @@ void init_op(zend_op *op CLS_DC)
|
||||
{
|
||||
memset(&op->result, 0, sizeof(znode));
|
||||
op->lineno = CG(zend_lineno);
|
||||
op->result.op_type = IS_UNUSED;
|
||||
SET_UNUSED(op->result);
|
||||
op->extended_value = 0;
|
||||
memset(&op->op1, 0, sizeof(znode));
|
||||
memset(&op->op2, 0, sizeof(znode));
|
||||
@@ -211,7 +211,7 @@ zend_op *get_next_op(zend_op_array *op_array CLS_DC)
|
||||
zend_bailout();
|
||||
}
|
||||
#endif
|
||||
op_array->size *= 2;
|
||||
op_array->size *= 4;
|
||||
op_array_alloc_ops(op_array);
|
||||
}
|
||||
|
||||
@@ -251,7 +251,9 @@ static void zend_update_extended_info(zend_op_array *op_array CLS_DC)
|
||||
opline++;
|
||||
continue;
|
||||
}
|
||||
opline->lineno = (opline+1)->lineno;
|
||||
if (opline+1<end) {
|
||||
opline->lineno = (opline+1)->lineno;
|
||||
}
|
||||
} else {
|
||||
opline->opcode = ZEND_NOP;
|
||||
}
|
||||
@@ -260,11 +262,8 @@ static void zend_update_extended_info(zend_op_array *op_array CLS_DC)
|
||||
}
|
||||
opline = get_next_op(op_array CLS_CC);
|
||||
opline->opcode = ZEND_EXT_STMT;
|
||||
opline->op1.op_type = IS_UNUSED;
|
||||
opline->op2.op_type = IS_UNUSED;
|
||||
if (op_array->last>0) {
|
||||
opline->lineno= op_array->opcodes[op_array->last-2].lineno;
|
||||
}
|
||||
SET_UNUSED(opline->op1);
|
||||
SET_UNUSED(opline->op2);
|
||||
}
|
||||
|
||||
|
||||
@@ -302,6 +301,8 @@ int pass_two(zend_op_array *op_array)
|
||||
}
|
||||
opline++;
|
||||
}
|
||||
op_array->opcodes = (zend_op *) erealloc(op_array->opcodes, sizeof(zend_op)*op_array->last);
|
||||
op_array->size = op_array->last;
|
||||
op_array->done_pass_two = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
+86
-48
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -32,10 +32,34 @@
|
||||
#include "zend_list.h"
|
||||
#include "zend_fast_cache.h"
|
||||
|
||||
#if WITH_BCMATH
|
||||
#if 0&&WITH_BCMATH
|
||||
#include "ext/bcmath/number.h"
|
||||
#endif
|
||||
|
||||
ZEND_API int zend_atoi(const char *str, int str_len)
|
||||
{
|
||||
int retval;
|
||||
|
||||
if (!str_len) {
|
||||
str_len = strlen(str);
|
||||
}
|
||||
retval = atoi(str);
|
||||
if (str_len>0) {
|
||||
switch (str[str_len-1]) {
|
||||
case 'k':
|
||||
case 'K':
|
||||
retval *= 1024;
|
||||
break;
|
||||
case 'm':
|
||||
case 'M':
|
||||
retval *= 1048576;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API double zend_string_to_double(const char *number, zend_uint length)
|
||||
{
|
||||
double divisor = 10.0;
|
||||
@@ -92,7 +116,7 @@ ZEND_API void convert_scalar_to_number(zval *op)
|
||||
case IS_DOUBLE:
|
||||
case IS_LONG:
|
||||
break;
|
||||
#if WITH_BCMATH
|
||||
#if 0&&WITH_BCMATH
|
||||
case FLAG_IS_BC:
|
||||
op->type = IS_DOUBLE; /* may have lost significant digits */
|
||||
break;
|
||||
@@ -402,11 +426,13 @@ ZEND_API void _convert_to_string(zval *op ZEND_FILE_LINE_DC)
|
||||
zval_dtor(op);
|
||||
op->value.str.val = estrndup_rel("Array",sizeof("Array")-1);
|
||||
op->value.str.len = sizeof("Array")-1;
|
||||
zend_error(E_NOTICE, "Array to string conversion");
|
||||
break;
|
||||
case IS_OBJECT:
|
||||
zval_dtor(op);
|
||||
op->value.str.val = estrndup_rel("Object",sizeof("Object")-1);
|
||||
op->value.str.len = sizeof("Object")-1;
|
||||
zend_error(E_NOTICE, "Object to string conversion");
|
||||
break;
|
||||
default:
|
||||
zval_dtor(op);
|
||||
@@ -488,7 +514,51 @@ ZEND_API void convert_to_object(zval *op)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void multi_convert_to_long_ex(int argc, ...)
|
||||
{
|
||||
zval **arg;
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, argc);
|
||||
|
||||
while (argc--) {
|
||||
arg = va_arg(ap, zval **);
|
||||
convert_to_long_ex(arg);
|
||||
}
|
||||
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
ZEND_API void multi_convert_to_double_ex(int argc, ...)
|
||||
{
|
||||
zval **arg;
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, argc);
|
||||
|
||||
while (argc--) {
|
||||
arg = va_arg(ap, zval **);
|
||||
convert_to_double_ex(arg);
|
||||
}
|
||||
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
ZEND_API void multi_convert_to_string_ex(int argc, ...)
|
||||
{
|
||||
zval **arg;
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, argc);
|
||||
|
||||
while (argc--) {
|
||||
arg = va_arg(ap, zval **);
|
||||
convert_to_string_ex(arg);
|
||||
}
|
||||
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
ZEND_API int add_function(zval *result, zval *op1, zval *op2)
|
||||
{
|
||||
zval op1_copy, op2_copy;
|
||||
@@ -673,47 +743,6 @@ ZEND_API int mod_function(zval *result, zval *op1, zval *op2)
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int boolean_or_function(zval *result, zval *op1, zval *op2)
|
||||
{
|
||||
zval op1_copy, op2_copy;
|
||||
|
||||
result->type = IS_BOOL;
|
||||
|
||||
zendi_convert_to_boolean(op1, op1_copy, result);
|
||||
if (op1->value.lval) {
|
||||
result->value.lval = 1;
|
||||
return SUCCESS;
|
||||
}
|
||||
zendi_convert_to_boolean(op2, op2_copy, result);
|
||||
if (op2->value.lval) {
|
||||
result->value.lval = 1;
|
||||
return SUCCESS;
|
||||
}
|
||||
result->value.lval = 0;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int boolean_and_function(zval *result, zval *op1, zval *op2)
|
||||
{
|
||||
zval op1_copy, op2_copy;
|
||||
|
||||
result->type = IS_BOOL;
|
||||
|
||||
zendi_convert_to_boolean(op1, op1_copy, result);
|
||||
if (!op1->value.lval) {
|
||||
result->value.lval = 0;
|
||||
return SUCCESS;
|
||||
}
|
||||
zendi_convert_to_boolean(op2, op2_copy, result);
|
||||
if (!op2->value.lval) {
|
||||
result->value.lval = 0;
|
||||
return SUCCESS;
|
||||
}
|
||||
result->value.lval = 1;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int boolean_xor_function(zval *result, zval *op1, zval *op2)
|
||||
{
|
||||
@@ -1069,7 +1098,7 @@ ZEND_API int compare_function(zval *result, zval *op1, zval *op2)
|
||||
|
||||
if (op1->type == IS_LONG && op2->type == IS_LONG) {
|
||||
result->type = IS_LONG;
|
||||
result->value.lval = ZEND_NORMALIZE_BOOL(op1->value.lval-op2->value.lval);
|
||||
result->value.lval = op1->value.lval>op2->value.lval?1:(op1->value.lval<op2->value.lval?-1:0);
|
||||
return SUCCESS;
|
||||
}
|
||||
if ((op1->type == IS_DOUBLE || op1->type == IS_LONG)
|
||||
@@ -1295,6 +1324,13 @@ static void increment_string(zval *str)
|
||||
int last=0; /* Shut up the compiler warning */
|
||||
int ch;
|
||||
|
||||
if (str->value.str.len == 0) {
|
||||
STR_FREE(str->value.str.val);
|
||||
str->value.str.val = estrndup("1", sizeof("1")-1);
|
||||
str->value.str.len = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
while(pos >= 0) {
|
||||
ch = s[pos];
|
||||
if (ch >= 'a' && ch <= 'z') {
|
||||
@@ -1488,7 +1524,7 @@ ZEND_API int zend_binary_strncasecmp(char *s1, uint len1, char *s2, uint len2, u
|
||||
}
|
||||
}
|
||||
|
||||
return len1 - len2;
|
||||
return MIN(length, len1) - MIN(length, len2);
|
||||
}
|
||||
|
||||
|
||||
@@ -1523,7 +1559,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 0&&WITH_BCMATH
|
||||
if ((ret1==FLAG_IS_BC) || (ret2==FLAG_IS_BC)) {
|
||||
bc_num first, second;
|
||||
|
||||
@@ -1673,4 +1709,6 @@ static inline int is_numeric_string(char *str, int length, long *lval, double *d
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
+22
-11
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -28,8 +28,9 @@
|
||||
#include <ieeefp.h>
|
||||
#endif
|
||||
|
||||
#if WITH_BCMATH
|
||||
#include "ext/bcmath/number.h"
|
||||
|
||||
#if 0&&WITH_BCMATH
|
||||
#include "ext/bcmath/libbcmath/src/bcmath.h"
|
||||
#endif
|
||||
|
||||
#define MAX_LENGTH_OF_LONG 18
|
||||
@@ -40,9 +41,7 @@ ZEND_API int sub_function(zval *result, zval *op1, zval *op2);
|
||||
ZEND_API int mul_function(zval *result, zval *op1, zval *op2);
|
||||
ZEND_API int div_function(zval *result, zval *op1, zval *op2);
|
||||
ZEND_API int mod_function(zval *result, zval *op1, zval *op2);
|
||||
ZEND_API int boolean_or_function(zval *result, zval *op1, zval *op2);
|
||||
ZEND_API int boolean_xor_function(zval *result, zval *op1, zval *op2);
|
||||
ZEND_API int boolean_and_function(zval *result, zval *op1, zval *op2);
|
||||
ZEND_API int boolean_not_function(zval *result, zval *op1);
|
||||
ZEND_API int bitwise_not_function(zval *result, zval *op1);
|
||||
ZEND_API int bitwise_or_function(zval *result, zval *op1, zval *op2);
|
||||
@@ -58,8 +57,7 @@ ZEND_API int is_not_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)
|
||||
#if defined(C9X_INLINE_SEMANTICS)
|
||||
static inline int is_numeric_string(char *str, int length, long *lval, double *dval)
|
||||
{
|
||||
long local_lval;
|
||||
double local_dval;
|
||||
@@ -89,7 +87,7 @@ ZEND_API inline int is_numeric_string(char *str, int length, long *lval, double
|
||||
if (dval) {
|
||||
*dval = local_dval;
|
||||
}
|
||||
#if WITH_BCMATH
|
||||
#if 0&&WITH_BCMATH
|
||||
if (length>16) {
|
||||
register char *ptr=str, *end=str+length;
|
||||
|
||||
@@ -115,9 +113,6 @@ ZEND_API inline int is_numeric_string(char *str, int length, long *lval, double
|
||||
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
;
|
||||
#endif
|
||||
|
||||
ZEND_API int increment_function(zval *op1);
|
||||
ZEND_API int decrement_function(zval *op2);
|
||||
@@ -132,6 +127,9 @@ 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 void multi_convert_to_long_ex(int argc, ...);
|
||||
ZEND_API void multi_convert_to_double_ex(int argc, ...);
|
||||
ZEND_API void multi_convert_to_string_ex(int argc, ...);
|
||||
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);
|
||||
#define convert_to_string(op) _convert_to_string((op) ZEND_FILE_LINE_CC)
|
||||
@@ -159,6 +157,7 @@ ZEND_API void zend_compare_symbol_tables(zval *result, HashTable *ht1, HashTable
|
||||
ZEND_API void zend_compare_arrays(zval *result, zval *a1, zval *a2);
|
||||
ZEND_API void zend_compare_objects(zval *result, zval *o1, zval *o2);
|
||||
|
||||
ZEND_API int zend_atoi(const char *str, int str_len);
|
||||
|
||||
#define convert_to_ex_master(ppzv, lower_type, upper_type) \
|
||||
if ((*ppzv)->type!=IS_##upper_type) { \
|
||||
@@ -203,22 +202,34 @@ ZEND_API void zend_compare_objects(zval *result, zval *o1, zval *o2);
|
||||
|
||||
|
||||
#define Z_LVAL(zval) (zval).value.lval
|
||||
#define Z_BVAL(zval) ((zend_bool)(zval).value.lval)
|
||||
#define Z_DVAL(zval) (zval).value.dval
|
||||
#define Z_STRVAL(zval) (zval).value.str.val
|
||||
#define Z_STRLEN(zval) (zval).value.str.len
|
||||
#define Z_ARRVAL(zval) (zval).value.ht
|
||||
#define Z_OBJPROP(zval) (zval).value.obj.properties
|
||||
#define Z_OBJCE(zval) (zval).value.obj.ce
|
||||
#define Z_RESVAL(zval) (zval).value.lval
|
||||
|
||||
#define Z_LVAL_P(zval_p) Z_LVAL(*zval_p)
|
||||
#define Z_BVAL_P(zval_p) Z_BVAL(*zval_p)
|
||||
#define Z_DVAL_P(zval_p) Z_DVAL(*zval_p)
|
||||
#define Z_STRVAL_P(zval_p) Z_STRVAL(*zval_p)
|
||||
#define Z_STRLEN_P(zval_p) Z_STRLEN(*zval_p)
|
||||
#define Z_ARRVAL_P(zval_p) Z_ARRVAL(*zval_p)
|
||||
#define Z_OBJPROP_P(zval_p) Z_OBJPROP(*zval_p)
|
||||
#define Z_OBJCE_P(zval_p) Z_OBJCE(*zval_p)
|
||||
#define Z_RESVAL_P(zval_p) Z_RESVAL(*zval_p)
|
||||
|
||||
#define Z_LVAL_PP(zval_pp) Z_LVAL(**zval_pp)
|
||||
#define Z_BVAL_PP(zval_pp) Z_BVAL(**zval_pp)
|
||||
#define Z_DVAL_PP(zval_pp) Z_DVAL(**zval_pp)
|
||||
#define Z_STRVAL_PP(zval_pp) Z_STRVAL(**zval_pp)
|
||||
#define Z_STRLEN_PP(zval_pp) Z_STRLEN(**zval_pp)
|
||||
#define Z_ARRVAL_PP(zval_pp) Z_ARRVAL(**zval_pp)
|
||||
#define Z_OBJPROP_PP(zval_pp) Z_OBJPROP(**zval_pp)
|
||||
#define Z_OBJCE_PP(zval_pp) Z_OBJCE(**zval_pp)
|
||||
#define Z_RESVAL_PP(zval_pp) Z_RESVAL(**zval_pp)
|
||||
|
||||
#define Z_TYPE(zval) (zval).type
|
||||
#define Z_TYPE_P(zval_p) Z_TYPE(*zval_p)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-11
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -90,16 +90,6 @@ ZEND_API void _zval_dtor(zval *zvalue ZEND_FILE_LINE_DC)
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zval_del_ref(zval **p)
|
||||
{
|
||||
(*p)->refcount--;
|
||||
if ((*p)->refcount==0) {
|
||||
zval_dtor(*p);
|
||||
FREE_ZVAL(*p);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zval_add_ref(zval **p)
|
||||
{
|
||||
(*p)->refcount++;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 0.92 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -49,7 +49,6 @@ END_EXTERN_C()
|
||||
|
||||
|
||||
ZEND_API void zval_add_ref(zval **p);
|
||||
ZEND_API void zval_del_ref(zval **p);
|
||||
|
||||
#define ZVAL_DESTRUCTOR (void (*)(void *)) zval_dtor_wrapper
|
||||
#define ZVAL_PTR_DTOR (void (*)(void *)) zval_ptr_dtor_wrapper
|
||||
|
||||
+103
-8
@@ -4,6 +4,53 @@ dnl This file contains local autoconf functions.
|
||||
|
||||
sinclude(dynlib.m4)
|
||||
|
||||
AC_DEFUN(PHP_SETUP_OPENSSL,[
|
||||
if test "$PHP_OPENSSL" = "no"; then
|
||||
PHP_OPENSSL="/usr/local/ssl /usr/local /usr /usr/local/openssl"
|
||||
fi
|
||||
|
||||
for i in $PHP_OPENSSL; do
|
||||
if test -r $i/include/openssl/evp.h; then
|
||||
OPENSSL_DIR=$i
|
||||
OPENSSL_INC=$i/include
|
||||
fi
|
||||
done
|
||||
|
||||
if test -z "$OPENSSL_DIR"; then
|
||||
AC_MSG_ERROR(Cannot find OpenSSL's <evp.h>)
|
||||
fi
|
||||
|
||||
old_CPPFLAGS=$CPPFLAGS
|
||||
CPPFLAGS="-I$OPENSSL_INC"
|
||||
AC_MSG_CHECKING(for OpenSSL version)
|
||||
AC_EGREP_CPP(yes,[
|
||||
#include <openssl/opensslv.h>
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x0090500fL
|
||||
yes
|
||||
#endif
|
||||
],[
|
||||
AC_MSG_RESULT(>= 0.9.5)
|
||||
],[
|
||||
AC_MSG_ERROR(OpenSSL version 0.9.5 or greater required.)
|
||||
])
|
||||
CPPFLAGS=$old_CPPFLAGS
|
||||
|
||||
AC_ADD_LIBPATH($OPENSSL_DIR/lib)
|
||||
|
||||
AC_CHECK_LIB(crypto, CRYPTO_free, [
|
||||
AC_ADD_LIBRARY(crypto)
|
||||
],[
|
||||
AC_MSG_ERROR(libcrypto not found!)
|
||||
])
|
||||
|
||||
AC_CHECK_LIB(ssl, SSL_CTX_set_ssl_version, [
|
||||
AC_ADD_LIBRARY(ssl)
|
||||
],[
|
||||
AC_MSG_ERROR(libssl not found!)
|
||||
])
|
||||
AC_ADD_INCLUDE($OPENSSL_INC)
|
||||
])
|
||||
|
||||
dnl PHP_EVAL_LIBLINE(LINE, SHARED-LIBADD)
|
||||
dnl
|
||||
dnl Use this macro, if you need to add libraries and or library search
|
||||
@@ -51,14 +98,19 @@ AC_DEFUN(PHP_READDIR_R_TYPE,[
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX 1024
|
||||
#endif
|
||||
|
||||
main() {
|
||||
DIR *dir;
|
||||
struct dirent entry, *pentry;
|
||||
char entry[sizeof(struct dirent)+PATH_MAX];
|
||||
struct dirent *pentry = (struct dirent *) &entry;
|
||||
|
||||
dir = opendir("/");
|
||||
if (!dir)
|
||||
exit(1);
|
||||
if (readdir_r(dir, &entry, &pentry) == 0)
|
||||
if (readdir_r(dir, (struct dirent *) entry, &pentry) == 0)
|
||||
exit(0);
|
||||
exit(1);
|
||||
}
|
||||
@@ -171,7 +223,7 @@ case "[$]$1" in
|
||||
shared,*)
|
||||
ext_output="yes, shared"
|
||||
ext_shared=yes
|
||||
$1=`echo $ac_n "[$]$1$ac_c"|sed s/^shared,//`
|
||||
$1=`echo "[$]$1"|sed 's/^shared,//'`
|
||||
;;
|
||||
shared)
|
||||
ext_output="yes, shared"
|
||||
@@ -203,7 +255,7 @@ dnl Sets PHP_ARG_NAME either to the user value or to the default value.
|
||||
dnl default-val defaults to no.
|
||||
dnl
|
||||
AC_DEFUN(PHP_ARG_WITH,[
|
||||
PHP_REAL_ARG_WITH([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z-,A-Z_))
|
||||
PHP_REAL_ARG_WITH([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z0-9-,A-Z0-9_))
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_REAL_ARG_WITH,[
|
||||
@@ -279,6 +331,10 @@ fi
|
||||
|
||||
AC_DEFUN(PHP_SUBST,[
|
||||
PHP_VAR_SUBST="$PHP_VAR_SUBST $1"
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_SUBST_OLD,[
|
||||
PHP_SUBST($1)
|
||||
AC_SUBST($1)
|
||||
])
|
||||
|
||||
@@ -309,7 +365,7 @@ AC_DEFUN(PHP_GEN_CONFIG_VARS,[
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_GEN_MAKEFILES,[
|
||||
$SHELL $srcdir/build/fastgen.sh $srcdir $ac_cv_mkdir_p $1
|
||||
$SHELL $srcdir/build/fastgen.sh $srcdir $ac_cv_mkdir_p $BSD_MAKEFILE $1
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_TM_GMTOFF,[
|
||||
@@ -331,7 +387,7 @@ AC_DEFUN(PHP_CONFIGURE_PART,[
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_PROG_SENDMAIL,[
|
||||
AC_PATH_PROG(PROG_SENDMAIL, sendmail, /usr/lib/sendmail, $PATH:/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib)
|
||||
AC_PATH_PROG(PROG_SENDMAIL, sendmail,[], $PATH:/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib)
|
||||
if test -n "$PROG_SENDMAIL"; then
|
||||
AC_DEFINE(HAVE_SENDMAIL,1,[whether you have sendmail])
|
||||
fi
|
||||
@@ -416,7 +472,7 @@ dnl
|
||||
AC_DEFUN(PHP_BUILD_THREAD_SAFE,[
|
||||
enable_experimental_zts=yes
|
||||
if test "$pthreads_working" != "yes"; then
|
||||
AC_MSG_ERROR(ZTS currently requires working POSIX threads. Your system does not support this.)
|
||||
AC_MSG_ERROR(ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads.)
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -475,7 +531,7 @@ AC_DEFUN(AC_EXPAND_PATH,[
|
||||
$2="$1"
|
||||
else
|
||||
changequote({,})
|
||||
ep_dir="`echo $1|sed 's%/*[^/][^/]*$%%'`"
|
||||
ep_dir="`echo $1|sed 's%/*[^/][^/]*/*$%%'`"
|
||||
changequote([,])
|
||||
ep_realdir="`(cd \"$ep_dir\" && pwd)`"
|
||||
$2="$ep_realdir/`basename \"$1\"`"
|
||||
@@ -878,3 +934,42 @@ int main(void) {
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_FOPENCOOKIE,[
|
||||
AC_CHECK_FUNC(fopencookie, [ have_glibc_fopencookie=yes ])
|
||||
|
||||
if test "$have_glibc_fopencookie" = "yes" ; then
|
||||
dnl this comes in two flavors:
|
||||
dnl newer glibcs (since 2.1.2 ? )
|
||||
dnl have a type called cookie_io_functions_t
|
||||
AC_TRY_COMPILE([ #define _GNU_SOURCE
|
||||
#include <stdio.h>
|
||||
],
|
||||
[ cookie_io_functions_t cookie; ],
|
||||
[ have_cookie_io_functions_t=yes ],
|
||||
[ ] )
|
||||
|
||||
if test "$have_cookie_io_functions_t" = "yes" ; then
|
||||
cookie_io_functions_t=cookie_io_functions_t
|
||||
have_fopen_cookie=yes
|
||||
else
|
||||
dnl older glibc versions (up to 2.1.2 ?)
|
||||
dnl call it _IO_cookie_io_functions_t
|
||||
AC_TRY_COMPILE([ #define _GNU_SOURCE
|
||||
#include <stdio.h>
|
||||
],
|
||||
[ _IO_cookie_io_functions_t cookie; ],
|
||||
[ have_IO_cookie_io_functions_t=yes ],
|
||||
[] )
|
||||
if test "$have_cookie_io_functions_t" = "yes" ; then
|
||||
cookie_io_functions_t=_IO_cookie_io_functions_t
|
||||
have_fopen_cookie=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$have_fopen_cookie" = "yes" ; then
|
||||
AC_DEFINE(HAVE_FOPENCOOKIE, 1, [ ])
|
||||
AC_DEFINE_UNQUOTED(COOKIE_IO_FUNCTIONS_T, $cookie_io_functions_t, [ ])
|
||||
fi
|
||||
|
||||
fi
|
||||
])
|
||||
+1
-1
@@ -238,7 +238,7 @@ registers two INI entries - "foo" and "bar". They're given defaults "1"
|
||||
and "bah" respectively - note that all defaults are always given as
|
||||
strings. That doesn't reduce your ability to use integer values, simply
|
||||
specify them as strings. "foo" is marked so that it can be changed by
|
||||
anyone at any time (PHP_INI_ALL), whereas "foo" is marked so it can be
|
||||
anyone at any time (PHP_INI_ALL), whereas "bar" is marked so it can be
|
||||
changed only at startup in the php3.ini only, presumably, by the system
|
||||
administrator (PHP_INI_SYSTEM).
|
||||
When "foo" changes, no function is called. Access to it is done using the
|
||||
|
||||
Executable
+34
@@ -0,0 +1,34 @@
|
||||
#! /bin/sh
|
||||
# +----------------------------------------------------------------------+
|
||||
# | PHP version 4.0 |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | This source file is subject to version 2.02 of the PHP license, |
|
||||
# | that is bundled with this package in the file LICENSE, and is |
|
||||
# | available at through the world-wide-web at |
|
||||
# | http://www.php.net/license/2_02.txt. |
|
||||
# | If you did not receive a copy of the PHP license and are unable to |
|
||||
# | obtain it through the world-wide-web, please send a note to |
|
||||
# | license@php.net so we can mail you a copy immediately. |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Authors: Sascha Schumann <sascha@schumann.cx> |
|
||||
# +----------------------------------------------------------------------+
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
# cwd must be top_srcdir
|
||||
test -f build/bsd_makefile || exit 2
|
||||
|
||||
test -f bsd_converted && exit 0
|
||||
|
||||
tmpfile=`mktemp /tmp/bsd_makefile.XXXXXX 2>/dev/null` || tmpfile="tmp.$$"
|
||||
for i in build/*.mk; do
|
||||
sed 's/^include \(.*\)/.include "\1"/' $i >$tmpfile \
|
||||
&& cp $tmpfile $i
|
||||
done
|
||||
rm -f $tmpfile
|
||||
|
||||
touch bsd_converted
|
||||
exit 0
|
||||
+6
-5
@@ -26,7 +26,7 @@ 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
|
||||
config_h_in = main/php_config.h.in
|
||||
|
||||
acconfig_h_SOURCES = acconfig.h.in $(config_h_files)
|
||||
|
||||
@@ -54,23 +54,24 @@ $(makefile_in_files): $(makefile_am_files) aclocal.m4 configure.in $(config_m4_f
|
||||
fi; \
|
||||
done
|
||||
@test -f want_dependencies || flag=-i; \
|
||||
automake -a $$flag $(AMFLAGS) $(makefile_files) \
|
||||
|| true >&2
|
||||
automake -a $$flag $(AMFLAGS) $(makefile_files) 2>&1 | $(SUPPRESS_WARNINGS)
|
||||
@for i in $(LT_TARGETS); do mv $$i.bak $$i; done
|
||||
|
||||
aclocal.m4: configure.in acinclude.m4 dynlib.m4
|
||||
aclocal
|
||||
|
||||
SUPPRESS_WARNINGS = (egrep -v '(warning: AC_TRY_RUN called without default to allow cross compiling|AC_PROG_CXXCPP was called before AC_PROG_CXX|.*AM_PROG_LEX.*)'||true)
|
||||
|
||||
$(config_h_in): configure acconfig.h
|
||||
# explicitly remove target since autoheader does not seem to work
|
||||
# correctly otherwise (timestamps are not updated)
|
||||
@echo rebuilding $@
|
||||
@rm -f $@
|
||||
@autoheader 2>&1 | (grep -v 'warning: AC_TRY_RUN called without default to allow cross compiling'||true)
|
||||
@autoheader 2>&1 | $(SUPPRESS_WARNINGS)
|
||||
|
||||
$(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)
|
||||
@autoconf 2>&1 | $(SUPPRESS_WARNINGS)
|
||||
Loaded 100 of 1175 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user