roxen.lists.pike.general

Subject Author Date
Re: Pike 7.8.300 beta Reinhard Pfau <Reinhard[dot]Pfau[at]gmx[dot]de> 16-06-2009
On Thu, 2009-06-11 at 21:35 +0000, Peter Bortas @ Pike importm?te f?r
mailinglistan wrote:
> New beta build, 7.8.300:
> 
>   http://pike.ida.liu.se/pub/pike/beta/7.8.300/Pike-v7.8.300.tar.gz
> 
> Changes since yesturdays build are:
> 
> o Fixed bug in Protocols.HTTP.AsyncClient that made alla data decoding
>   fail. Fixed by Thomas Gusenleitner earlier today.
> 
> 
> No Windows build today.
> 
> I quite like this build number, so try not to break it.

Hmm, should I then tell U?... ;-)

Taking a first look at Pike 7.8.300, I found a flaw (in comparison to
7.6.112) with XML DOM parser:

Look at the following snippets made with HILFE:

First: parsing done with 7.6.112:
----vvv---------------------------------------------------------vvv----
[<reinhard[at]hitzkopf> ~]$ pike
Pike v7.6 release 112 running Hilfe v3.5 (Incremental Pike Frontend)
> object o=Parser.XML.DOM.NonValidatingDOMParser();
> o->parse( Parser.XML.DOM.InputSource( Stdio.FakeFile("<?xml version=
\"1.0\"?><a></a>")) );
(1) Result: 0
> o->get_document();
(2) Result: Parser.XML.DOM.Document(#document)
---^^^----------------------------------------------------------^^^----
That's what we'll expect.


The same try with 7.8.300:

----vvv---------------------------------------------------------vvv----
[<reinhard[at]hitzkopf> ~]$ ~/vroot/pike/7.8.300/bin/pike 
Pike v7.8 release 300 running Hilfe v3.5 (Incremental Pike Frontend)
> object o=Parser.XML.DOM.NonValidatingDOMParser();
> o->parse( Parser.XML.DOM.InputSource( Stdio.FakeFile("<?xml version=
\"1.0\"?><a></a>")) );
Attempt to call the NULL-value
Unknown program: 0(Parser.XML.DOM.InputSource())
HilfeInput:1: HilfeInput()->___HilfeWrapper()
----vvv---------------------------------------------------------vvv----
The "parse" method vanished in the NonValidatingDOMParser.

I didn't track it down completely, but the it looks like a difference in
the compiler:

The class starts with (7.8.300; in 7.6.112 its "static" instead of
"protected"; but that's essentially the same ):

----vvv---------------------------------------------------------vvv----
class NonValidatingDOMParser
{
  inherit AbstractDOMParser;
  protected inherit .Simple : xml;
----vvv---------------------------------------------------------vvv----

The AbstractDOMParser provides the (public) method "parse".
The .Simple class also has a method parse, but is inherited protected
with an alias.
While 7.6.112 preserves the public "parse", 7.8.300 seems to override it
with the parse from .Simple and hides it 'cause of protected
inheritance.

I don't know if this effect is wanted in Pike 7.8 ?
If yes, the DOM module is broken and might require some changes.
If no, we might have a problem with the compiler in 7.8 :-(


Greetings,
Reinhard.

-- 
Reinhard Pfau
mailto:<Reinhard.Pfau[at]gmx.de>