At 8:52 AM +0200 9/8/04, Leopold Toetsch wrote:
Dan Sugalski wrote:
Or, rather, the const_string function.

Simple thing, looks like:

    STRING *foo = const_string(interpreter, c-style string constant);

Easy, right? Yeah. Easy.

Well, the real constant string is constructed like so:

  STRING *foo = CONST_STRING(interpreter, "cstring");

These strings get folded into a constant table (interpreter->const_cstring_table). The drawback is that it needs a bit of work per file (include the .str file, adapt Makefile build rules).

Right, that was the partial solution I mentioned. Still not a full solution, unfortunately, but not a bad one for the core code. We probably ought to work up a list of the places it's valid and deploy it more. It'd certainly cut down on the number of string headers created.
--
Dan


--------------------------------------it's like this-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to