It should be fixed. These get used in routine/method objects, so any that
use names common between them would get duplicates rather than just a
single string. I suspect that the only really duplicated one is probably
the first one anyway, so it probably still works correctly, but should be
fixed.

Rick

On Sun, Sep 6, 2020 at 7:09 AM Erich Steinböck <erich.steinbo...@gmail.com>
wrote:

> Our LanguageParser uses words() to break up the name string of an EXTERNAL
> option into an Array of words.  A comment for words() says "The first word
> will be uppercased, and all of the strings will be added to the common
> string pool."
>
> The loop (see code below) that intends to add the second and further words
> to the common pool has a bug (it uses 1 instead of i) so this pool is never
> updated for these words.
>
> Is it necessary to add the words to the common pool?
> Just the first?  Or all?
> If the failure to do so didn't hurt in the past, should I still fix the
> loop or just remove it?
>
> EXTERNAL name string parsing in the loadExternalMethod/Routine() methods
> works differently, doesn't uppercase the first word and doesn't try to add
> the parsed words to the common pool.
> This means that currently you can specify the LIBRARY keyword in
> mixed-case on the directives, but must uppercase it for the
> loadExternal..() methods.
>
> ~~~
>     wordArray->put(commonString(((RexxString
> *)wordArray->get(1))->upper()), 1);
>
>     // now make commonstring versions of the rest of the words
>     for (size_t i = 2; i <= count; i++)
>     {
>         wordArray->put(commonString(((RexxString *)wordArray->*get(1))),
> 1);*
>     }
> ~~~
> _______________________________________________
> Oorexx-devel mailing list
> Oorexx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to