Ticket #210 (closed todo: fixed)

Opened 13 years ago

Last modified 13 years ago

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


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

Changed 13 years ago by NotFound

  • owner set to NotFound
  • status changed from new to assigned
  • type changed from RFC to todo

Accepted in #ps with the new name Parrot_str_repeat. Working on it.

Changed 13 years ago by NotFound

Done in r36065, waiting for comments

Changed 13 years ago by barney

Looks fine. Could you also removed the old function 'string_repeat'?

Changed 13 years ago by NotFound

I think this function was public enough to require a deprecation cycle. We can deprecate it now, or just let it to the strings pdd.

Changed 13 years ago by coke

  • milestone set to 1.0

Deprecation should happen asap. Added note to pod file.

Changed 13 years ago by coke

  • status changed from assigned to closed
  • resolution set to fixed

This was removed in r36271, despite the fact that we advertised it as removed post 0.9.1

Resolving ticket, removing item from DEPRECATED.pod

Note: See TracTickets for help on using tickets.