Re: bcompiler: minor patches
| From: | Alan Knowles | Date: | Sat, 18 Sep 2004 04:02:52 +0000 |
| Subject: | Re: bcompiler: minor patches | ||
| References: | 1 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-1353@lists.php.net to get a copy of this message | ||
are you patching head (php5'ish), the last release, or the last php4
version (which I'm not sure was tagged correctly - chora does detect the
tag...)
can you check out these files
bcompiler.c version 1.42
php_bcompiler.h version 1.13
and post/put a url up, with the diff -u.
Regards
Alan
val khokhlov wrote:
>Hello!
>
>i propose some minor patches for bcompiler and one major change (i'll write about it
>later). minor patches are:
>
>1) bz2_aware_stream_open() rewritten, so it can auto-detect not only bz2, but also gzip
>compressed streams and transparently handle them
>
>2) bcompiler_compile_file() changled a little bit - first of all, there's an obvious bug:
>stream is set to NULL (when declaring), if file is included with unknown type, stream is not
>changed, so error is generated. for example, include_once [php 4.3.3] uses type 1, which isn't
>handled, so *any* include_once causes error. error should be generated only when stream is NULL upon
>return from bz2_aware_stream_open(); otherwise, fallback should be done to original
>zend_compile_file()
>
>3) second, include_once() in php 4.3.3 uses type 1, which was not handled (while include uses
>type 0, which _was_ handled) - i've combined processing for types 0, 1 and 2 into single code
>fragment. it works ok.
>
>4) third, i've allowed use_bz in bcompiler_compile_file() - it gives possibility to
>include() and require() bytecodes just as the plain php source (by the way, it much more convenient
>than fopen/bcompiler_load/fclose)
>
>5) at last, php 4.3.3 on win32 crashes in bcompiler_load(). crash is caused by
>php_stream_close() call. i added #ifndef PHP_WIN32 around it (yes, i know - it's not correct,
>but it works w/o crash)
>
>i've written a message to Alan Knowles, but he didn't answer. i can post a patch (diff
>-u) here in order to review it
>
>/vk
>
>
>