On Monday 10 December 2007 05:52:59 Allison Randal wrote:

> chromatic wrote:
> > It doesn't *always* work.  For example, I think CONST_STRING() doesn't
> > work in PCCMETHODs in PMCs for some reason I can't explain, and it
> > doesn't work in other source files.
>
> If you want to use CONST_STRING in other source files, you need to
> #include the corresponding .str file in the source code, since the
> CONST_STRING macro and the constant strings are defined in the .str
> file. See src/objects.c and src/objects.str for an example.

Yep.  There's one piece I don't remember at the moment, and that's where to 
add the filename so that the Makefile generates the .str file appropriately.  
I think it's just the root Makefile template.

> I haven't tested whether this works for regular functions declared in
> .pmc files yet (the other place the problem occurs most frequently).

It works now.  I fixed that a couple of weeks ago.

-- c

Reply via email to