defining quarks
Submitted by Allison (desrt)
Link to original bug (#644877)
Description
It would be nice if you could write
namespace MyProject { public const Quark MAGIC = "magic"; }
to get:
#define MY_PROJECT_MAGIC my_project_get_magic_quark();
and:
GQuark my_project_get_magic_quark (void) { static GQuark q;
if (!q) q = g_quark_from_static_string ("magic");
return q; }
Although my use case requires control over the precise string value of the quark, it would also be possibly nice to have something like this:
namespace MyProject { public const Quark MAGIC; }
as equivalent to
public const Quark MAGIC = "__ MyProject.MAGIC quark __";
or some other properly-namespaced gunk.
Version: 0.11.x