[crossfire] New type "sstring"?

Nicolas Weeger nicolas.weeger at laposte.net
Mon Mar 5 13:31:30 CST 2007


Hello.

I'd like to add a "typedef const char* sstring" and use that for relevant 
members / variables. sstring is of course "shared_string".

It wouldn't change much things, but clarify when the string is shared 
(add_string / add_refcount) and when it's safe to alter it.

Unless I'm mistaking the const char* <-> sstring conversion would be implicit, 
so wouldn't need to change all functions immediately :)

What do you think of that?

Nicolas
-- 
http://nicolas.weeger.free.fr [Petit site d'images, de textes, de code, bref 
de l'aléatoire !]



More information about the crossfire mailing list