Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • G GLib
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 857
    • Issues 857
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 56
    • Merge requests 56
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • GLib
  • Merge requests
  • !2788

Add G_DEFINE macros for enum and flags types

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Emmanuele Bassi requested to merge ebassi/enum-type-macros into main Jun 29, 2022
  • Overview 21
  • Commits 7
  • Pipelines 4
  • Changes 4

While you might want to use automated tools like glib-mkenums to generate enumeration types for your library, it's often not entirely necessary to complicate your build system in order to handle a couple of enumerations with few values.

Just like we have G_DEFINE macros for object, interface, pointer, and boxed types, we should provide macros for defining enum and flags types.

Edited Jun 29, 2022 by Emmanuele Bassi
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: ebassi/enum-type-macros