build: Hide private structs from generated GIR files

Otherwise the fields in `MctAppFilter` become visible to introspected
languages, which was not the intention.

Spotted in
https://gitlab.freedesktop.org/pwithnall/malcontent/-/issues/65.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
Philip Withnall 2023-12-20 11:02:43 +00:00
parent de7a645548
commit 8ca426f631
3 changed files with 3 additions and 1 deletions

View File

@ -48,6 +48,7 @@ typedef enum
struct _MctAppFilter struct _MctAppFilter
{ {
/*< private >*/
gint ref_count; gint ref_count;
uid_t user_id; uid_t user_id;

View File

@ -66,7 +66,7 @@ pkgconfig.generate(libmalcontent,
) )
libmalcontent_gir = gnome.generate_gir(libmalcontent, libmalcontent_gir = gnome.generate_gir(libmalcontent,
sources: libmalcontent_sources + libmalcontent_headers + libmalcontent_private_headers + enums, sources: libmalcontent_sources + libmalcontent_headers + enums,
nsversion: libmalcontent_api_version, nsversion: libmalcontent_api_version,
namespace: 'Malcontent', namespace: 'Malcontent',
symbol_prefix: 'mct_', symbol_prefix: 'mct_',

View File

@ -50,6 +50,7 @@ typedef enum
struct _MctSessionLimits struct _MctSessionLimits
{ {
/*< private >*/
gint ref_count; gint ref_count;
uid_t user_id; uid_t user_id;