Ticket #1496 (new bug)

Opened 12 years ago

Last modified 11 years ago

Parrot_String-related functions are only available from parrot/parrot.h

Reported by: dukeleto Owned by:
Priority: major Milestone:
Component: core Version: 2.1.0
Severity: medium Keywords:
Cc: Language:
Patch status: Platform: all

Description

As reported by Joshua Tolley:

 I'm calling Parrot_compile_string(), which as one
of its arguments takes a pointer to a Parrot_String object, where apparently
it puts error messages should the string I'm compiling happen not to compile.
Presumably in order to test the resulting string for NULL, convert it to a C
string, etc., I should use the stuff declared in string_funcs.h. The problem
is that everything in string_funcs.h is defined only if PARROT_IN_CORE is
defined. PARROT_IN_CORE, in turn, is defined only if I include parrot.h

Since only parrot internals should include parrot/parrot.h, these functions need to be made available from parrot/embed.h and parrot/extend.h

Change History

Changed 11 years ago by jkeenan

dukeleto:

Can we get an update on the status of this ticket? (And is it truly a 'major' priority?)

Thank you very much.

kid51

Changed 11 years ago by dukeleto

I consider this ticket a "major" priority, but not a blocker. It is major in the sense that our public API is incomplete. When compiling PL/Parrot, we get these kinds of warnings:

plparrot.c: In function ‘plparrot_func_handler’:
plparrot.c:310: warning: implicit declaration of function ‘Parrot_str_is_null’
plparrot.c:312: warning: implicit declaration of function ‘Parrot_str_to_cstring’
plparrot.c:312: warning: assignment makes pointer from integer without a cast
plparrot.c:315: warning: implicit declaration of function ‘Parrot_str_free_cstring’
plparrot.c: In function ‘plperl6_run’:
plparrot.c:478: warning: assignment makes pointer from integer without a cast
plparrot.c: In function ‘create_string’:
plparrot.c:512: warning: implicit declaration of function ‘Parrot_str_new’
plparrot.c:512: warning: return makes pointer from integer without a cast
plparrot.c: In function ‘create_string_const’:
plparrot.c:517: warning: implicit declaration of function ‘Parrot_str_new_constant’

which are caused by string-related functions not existing in embed.h or extend.h

Note: See TracTickets for help on using tickets.