bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: test results differents between the perl and XS parsers


From: Jacob Bachmeyer
Subject: Re: test results differents between the perl and XS parsers
Date: Mon, 16 Nov 2020 22:09:59 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.22) Gecko/20090807 MultiZilla/1.8.3.4e SeaMonkey/1.1.17 Mnenhy/0.7.6.0

Gavin Smith wrote:
[...]
In the Perl code, however, there is always a current line number object
available and when this is referenced the line number is stored as
a reference to the object.  It looks like

          $current->{'contents'}->[-1]->{'line_nr'} = $line_nr;

Hence the object can easily be shared.  Perl's garbage collector
takes care of memory leaks.

Wait a minute here... if the line number object is being shared, how do elements from different lines get different line numbers?

Why is the line number even an object in the first place? Why not simply read $. or use the HANDLE->input_line_number accessor?


-- Jacob



reply via email to

[Prev in Thread] Current Thread [Next in Thread]