Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
vala
vala
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 701
    • Issues 701
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 38
    • Merge Requests 38
  • Operations
    • Operations
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • External Wiki
    • External Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • GNOME
  • valavala
  • Issues
  • #181

Closed
Open
Opened Mar 16, 2011 by bugzilla-migration@bugzilla-migrationReporter

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

To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: GNOME/vala#181