Ticket #210 (closed todo: fixed)
string_repeat siganture, maybe bug
Reported by: | NotFound | Owned by: | NotFound |
---|---|---|---|
Priority: | normal | Milestone: | 1.0 |
Component: | core | Version: | |
Severity: | medium | Keywords: | |
Cc: | Language: | ||
Patch status: | Platform: | all |
Description
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.
Change History
Note: See
TracTickets for help on using
tickets.