octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #49379] classdef constructor: .argn. loses fir


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #49379] classdef constructor: .argn. loses first argument, inputname(n) returns inputname(n+1)
Date: Wed, 30 Aug 2017 18:12:51 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

Update of bug #49379 (project octave):

                  Status:         Patch Submitted => In Progress            

    _______________________________________________________

Follow-up Comment #3:

Markus:  thanks, I pushed your changeset and another one that adds a new
test.

http://hg.savannah.gnu.org/hgweb/octave/rev/384561642b36
http://hg.savannah.gnu.org/hgweb/octave/rev/976a7a350274

Then I realized that the only reason your changeset works and the previous
code does not is that argument names are stored in the octave_value_list
object and some but not all operations on octave_value_list objects preserve
these names.  So when the classdef code inserts the partially constructed
object as the first argument of a classdef constructor, it doesn't also shift
the argument names, but the method that is used in octave_user_function::call
to split the argument list does preserve argument names.  So that's where the
inconsistency arises.

Probably it would be better to fix the octave_value_list object to properly
preserve the argument names when they are present.  Doing that efficiently
might need some changes to the string_vector object as well.

I'm keeping your changeset for now as it fixes the immediate problem, but
leaving this report open with a status of "In Progress".

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?49379>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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