[Vortex] why don't vortex apis use "const gchar*"?

Sam Roberts sroberts at uniserve.com
Tue Nov 14 06:35:28 CET 2006


It forces users of the APIs to cast const away. If I was coding
only against vortex, I could use a const-less style of coding, too,
but I mix vortex in with code that does declare immutable return values,
casts become necessary.

Example:

// lua API:
const char* lua_tostring(lua_State*L, int idx);


// Using lua with vortex:

  const char*  profile = lua_tostring(L, 3);

  vortex_profiles_register(
    (gchar*) profile,
    ...

Cheers,
Sam




More information about the Vortex mailing list