#1576: Update functions that take STRING * to take const args where possible
----------------------+-----------------------------------------------------
Reporter: petdance | Owner:
Type: todo | Status: new
Priority: normal | Milestone:
Component: core | Version: 2.3.0
Severity: medium | Keywords:
Lang: | Patch:
Platform: |
----------------------+-----------------------------------------------------
Description changed by petdance:
Old description:
> Now that we theoretically have immutable strings on trunk, we can
> constify many STRING * arguments in many functions.
>
> {{{
> * Parrot_str_concat
> * Parrot_str_copy
> * Parrot_str_substr
> * Parrot_str_replace
> * Parrot_str_chopn
> * Parrot_str_to_hashval
> * Parrot_str_upcase
> * Parrot_str_downcase
> * Parrot_str_titlecase
> * Parrot_str_find_cclass
> * Parrot_str_find_not_cclass
> * Parrot_str_change_charset
> * Parrot_str_change_encoding
> * Parrot_str_compose
> * Parrot_str_join
> * Parrot_str_split
> }}}
New description:
Now that we theoretically have immutable strings on trunk, we can constify
many STRING * arguments in many functions.
{{{
* Parrot_str_concat
* Parrot_str_copy
* Parrot_str_substr
* Parrot_str_replace
* Parrot_str_chopn
* Parrot_str_to_hashval
* Parrot_str_upcase
* Parrot_str_downcase
* Parrot_str_titlecase
* Parrot_str_find_cclass
* Parrot_str_find_not_cclass
* Parrot_str_change_charset
* Parrot_str_change_encoding
* Parrot_str_compose
* Parrot_str_join
* Parrot_str_split
}}}
From src/spf_render.c
{{{
* handle_flags
* str_concat_w_flags
* Parrot_sprintf_format
}}}
The entire file needs some heavy consting on the STRINGs.
--
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/1576#comment:1>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets