Ticket #646 (closed bug: duplicate)

Opened 13 years ago

Last modified 10 years ago

const STRING problems

Reported by: NotFound Owned by:
Priority: normal Milestone:
Component: core Version: 1.1.0
Severity: medium Keywords:
Cc: Language:
Patch status: Platform:

Description (last modified by NotFound) (diff)

The struct multi_func_list in multidispatch.h has several const STRING * members. His content is passed is several points to string functions that takes non-const arguments, giving warnings in C and errors in C++

I fixed that in r38539 but a better solution will be to make that functions take a const argument, and that implies doing the same with the related charset/encoding functions.

Change History

Changed 13 years ago by NotFound

  • description modified (diff)

Changed 12 years ago by dschauer

I started looking into this by undoing the r38539 fix and fixing things from there. Things were not going all that badly until some of my changes started getting overwritten as include/parrot/vtable.h is generated. I'll need to backtrack to where it is being generated and fix that before moving forward on this. Also, rather than just using changing "STRING" to "const STRING" where applicable, another typedef should be used that contains the "const STRING". I don't see any need for me to submit a patch for what I've done so far as it does not completely or properly resolve this issue.

Changed 12 years ago by julian.notfound@…

> Comment(by dschauer):
>
>  I started looking into this by undoing the r38539 fix and fixing things
>  from there. Things were not going all that badly until some of my changes
>  started getting overwritten as include/parrot/vtable.h is generated. I'll

What are you trying to do that requires vtable changes?

-- 
Salu2

Changed 12 years ago by dschauer

Many of the functions that need to be changed to accept const STRING arguments are prototyped in include/parrot/vtable.h.

Changed 12 years ago by julian.notfound@…

Hello.

If you change such a key part of parrot without previous discussion
don't expect the patch to be accepted.

-- 
Salu2

Changed 12 years ago by dschauer

I would not expect such a patch to be accepted without previous discussion, which is why I stopped my efforts (modifying vtable, etc) as soon I realized addressing this issue was bigger than I originally anticipated, and the reason why I commented here in the first place, as the fix would be quite involved.

Changed 11 years ago by jkeenan

  • component changed from none to core

Have any changes that have taken place in Parrot in the past 10 months affected the status of this ticket?

Changed 10 years ago by bacek

  • status changed from new to closed
  • resolution set to duplicate

Superseded by #1906. Non-const STRING* are deprecated and should be removed.

Note: See TracTickets for help on using tickets.