Re: [Vala] gross string literals



Hi,

If you use gcc, it should intern the string so it is only stored once
in the final object file.

Example:

#include <stdio.h>
int main() {
        if ("asdf" == "asdf") {
                printf("Interning works!\n");
        }
        return 0;
}

Jared Moore

On Tue, Jun 24, 2008 at 2:28 AM, Sam Liddicott <sam liddicott com> wrote:
protected static const string xmldef="blah";

is implemented in the C .h file as:
#define PHONE_UI_GLADE_xmldef "blah"

I get uneasy because in some of my cases the string could be a few
thousand characters long.

I'd rather it was implemented directly as a string constant, with
"extern" in the header file.

Sam



_______________________________________________
Vala-list mailing list
Vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]