From 4d0e3a66c5ec6cf1063a057a8e0ccf3d8be3d615 Mon Sep 17 00:00:00 2001 From: Denis Pynkin Date: Wed, 4 Dec 2019 20:40:55 +0000 Subject: [PATCH] lib/sign: make dummy engine non-public Remove unneeded public declaration for dummy signing engine. Signed-off-by: Denis Pynkin --- apidoc/ostree-sections.txt | 2 -- src/libostree/libostree-devel.sym | 1 - src/libostree/ostree-sign-dummy.c | 14 +++++++------- src/libostree/ostree-sign-dummy.h | 9 ++++----- 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/apidoc/ostree-sections.txt b/apidoc/ostree-sections.txt index a5a632a5..e61b46c3 100644 --- a/apidoc/ostree-sections.txt +++ b/apidoc/ostree-sections.txt @@ -709,7 +709,6 @@ ostree_kernel_args_to_string
ostree-sign OstreeSign -OstreeSignDummy OstreeSignEd25519 ostree_sign_list_names ostree_sign_commit @@ -726,6 +725,5 @@ ostree_sign_set_sk ostree_sign_summary ostree_sign_get_type -ostree_sign_dummy_get_type ostree_sign_ed25519_get_type
diff --git a/src/libostree/libostree-devel.sym b/src/libostree/libostree-devel.sym index 29221f5d..730eac3e 100644 --- a/src/libostree/libostree-devel.sym +++ b/src/libostree/libostree-devel.sym @@ -36,7 +36,6 @@ global: ostree_sign_add_pk; ostree_sign_set_sk; ostree_sign_summary; - ostree_sign_dummy_get_type; ostree_sign_ed25519_get_type; } LIBOSTREE_2020.1; diff --git a/src/libostree/ostree-sign-dummy.c b/src/libostree/ostree-sign-dummy.c index 034c7d6b..df5a7b82 100644 --- a/src/libostree/ostree-sign-dummy.c +++ b/src/libostree/ostree-sign-dummy.c @@ -50,7 +50,7 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeSignDummy, g_object_unref) static void ostree_sign_dummy_iface_init (OstreeSignInterface *self); -G_DEFINE_TYPE_WITH_CODE (OstreeSignDummy, ostree_sign_dummy, G_TYPE_OBJECT, +G_DEFINE_TYPE_WITH_CODE (OstreeSignDummy, _ostree_sign_dummy, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE (OSTREE_TYPE_SIGN, ostree_sign_dummy_iface_init)); static void @@ -70,13 +70,13 @@ ostree_sign_dummy_iface_init (OstreeSignInterface *self) } static void -ostree_sign_dummy_class_init (OstreeSignDummyClass *self) +_ostree_sign_dummy_class_init (OstreeSignDummyClass *self) { g_debug ("%s enter", __FUNCTION__); } static void -ostree_sign_dummy_init (OstreeSignDummy *self) +_ostree_sign_dummy_init (OstreeSignDummy *self) { g_debug ("%s enter", __FUNCTION__); @@ -88,7 +88,7 @@ gboolean ostree_sign_dummy_set_sk (OstreeSign *self, GVariant *key, GError **err { g_debug ("%s enter", __FUNCTION__); - OstreeSignDummy *sign = ostree_sign_dummy_get_instance_private(OSTREE_SIGN_DUMMY(self)); + OstreeSignDummy *sign = _ostree_sign_dummy_get_instance_private(OSTREE_SIGN_DUMMY(self)); g_free(sign->sk_ascii); @@ -101,7 +101,7 @@ gboolean ostree_sign_dummy_set_pk (OstreeSign *self, GVariant *key, GError **err { g_debug ("%s enter", __FUNCTION__); - OstreeSignDummy *sign = ostree_sign_dummy_get_instance_private(OSTREE_SIGN_DUMMY(self)); + OstreeSignDummy *sign = _ostree_sign_dummy_get_instance_private(OSTREE_SIGN_DUMMY(self)); g_free(sign->pk_ascii); @@ -120,7 +120,7 @@ gboolean ostree_sign_dummy_data (OstreeSign *self, g_debug ("%s enter", __FUNCTION__); g_return_val_if_fail (OSTREE_IS_SIGN (self), FALSE); - OstreeSignDummy *sign = ostree_sign_dummy_get_instance_private(OSTREE_SIGN_DUMMY(self)); + OstreeSignDummy *sign = _ostree_sign_dummy_get_instance_private(OSTREE_SIGN_DUMMY(self)); *signature = g_bytes_new (sign->sk_ascii, strlen(sign->sk_ascii)); @@ -158,7 +158,7 @@ gboolean ostree_sign_dummy_data_verify (OstreeSign *self, g_return_val_if_fail (OSTREE_IS_SIGN (self), FALSE); g_return_val_if_fail (data != NULL, FALSE); - OstreeSignDummy *sign = ostree_sign_dummy_get_instance_private(OSTREE_SIGN_DUMMY(self)); + OstreeSignDummy *sign = _ostree_sign_dummy_get_instance_private(OSTREE_SIGN_DUMMY(self)); gboolean ret = FALSE; diff --git a/src/libostree/ostree-sign-dummy.h b/src/libostree/ostree-sign-dummy.h index 6fc3a363..c37bcdfa 100644 --- a/src/libostree/ostree-sign-dummy.h +++ b/src/libostree/ostree-sign-dummy.h @@ -30,17 +30,16 @@ G_BEGIN_DECLS -#define OSTREE_TYPE_SIGN_DUMMY (ostree_sign_dummy_get_type ()) +#define OSTREE_TYPE_SIGN_DUMMY (_ostree_sign_dummy_get_type ()) -_OSTREE_PUBLIC -GType ostree_sign_dummy_get_type (void); +GType _ostree_sign_dummy_get_type (void); G_GNUC_BEGIN_IGNORE_DEPRECATIONS typedef struct _OstreeSignDummy OstreeSignDummy; typedef struct { GObjectClass parent_class; } OstreeSignDummyClass; -static inline OstreeSignDummy *OSTREE_SIGN_DUMMY (gpointer ptr) { return G_TYPE_CHECK_INSTANCE_CAST (ptr, ostree_sign_dummy_get_type (), OstreeSignDummy); } -static inline gboolean OSTREE_IS_SIGN_DUMMY (gpointer ptr) { return G_TYPE_CHECK_INSTANCE_TYPE (ptr, ostree_sign_dummy_get_type ()); } +static inline OstreeSignDummy *OSTREE_SIGN_DUMMY (gpointer ptr) { return G_TYPE_CHECK_INSTANCE_CAST (ptr, _ostree_sign_dummy_get_type (), OstreeSignDummy); } +static inline gboolean OSTREE_IS_SIGN_DUMMY (gpointer ptr) { return G_TYPE_CHECK_INSTANCE_TYPE (ptr, _ostree_sign_dummy_get_type ()); } G_GNUC_END_IGNORE_DEPRECATIONS