#210: string_repeat siganture, maybe bug
----------------------+-----------------------------------------------------
Reporter: NotFound | Owner:
Type: RFC | Status: new
Priority: normal | Milestone:
Component: core | Version:
Severity: medium | Keywords:
Lang: | Patch:
Platform: all |
----------------------+-----------------------------------------------------
The string_repeat functions in string.c has a parameter d that seems to be
passed NULL in all usages in the repository. The pod doc says that the
string is created "if necessary" but that is not what the code does, it
always create a new STRING object. Finally, if the num of repetitions is 0
it does not update *d.
As long as there is no non-null usage, there is no way to fix and test the
documented semantic.
I suggest to drop the d parameter. pdd28 says that it must be renamed as
Parrot_string_repeat, we can create now and start replacing the usages in
the repo.
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/210>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets