Hi Richard,

On Fri, Jun 19, 2009 at 08:26:30PM +0200, Richard van den Berg wrote:
> On 6/19/09 11:07 AM, H. Langos wrote:
>> Maybe the merge code should only be active if your memory saving feature is
>> active?
>>   
>
> Here is the new patch that does just that. I love git, it's super fast. :-)
>

One more question:

Why did you use
 &resetxml; 
instead of 
 resetxml();
?

I know the former doesn't pass an empty @_ array for the called sub but 
passes the existing argument list. But you don't do anything with @_ in 
resetxml(). So why bother passing the current arguments list on to it?

cheers
-henrik

> diff --git a/src/ext/XMLhelper.pm b/src/ext/XMLhelper.pm
> index 748ce22..bb7c88b 100755
> --- a/src/ext/XMLhelper.pm
> +++ b/src/ext/XMLhelper.pm
> @@ -301,19 +301,23 @@ sub mkh {
>  }
>  
>  
> -
>  #############################################################
> -# Parses the XML File and do events
> -sub doxml {
> -     my($xmlin, %opts) = @_;
> -     return undef unless (-r $xmlin);
> -     ### reset some stuff if we do a second run
> +# Reset some stuff if we do a second run
> +sub resetxml {
>       $cpn = undef; #Current PlaylistName
>       @idpub = ();
>       @plorder = ();
>       $xid = 1;
>       $XDAT = undef;
> -     ###
> +}
> +
> +
> +#############################################################
> +# Parses the XML File and do events
> +sub doxml {
> +     my($xmlin, %opts) = @_;
> +     return undef unless (-r $xmlin);
> +     &resetxml;
>       my $p;
>       my $ref = eval {
>               $p = new XML::Parser(ErrorContext => 0, 
> Handlers=>{Start=>\&eventer});



_______________________________________________
Bug-gnupod mailing list
Bug-gnupod@nongnu.org
http://lists.nongnu.org/mailman/listinfo/bug-gnupod

Reply via email to