lib/remote: Box OstreeRemote if experimental-api

To avoid an introspection warning.  Otherwise, don't box it.

Closes: #858
Approved by: pwithnall
This commit is contained in:
Colin Walters 2017-05-15 09:10:54 -04:00 committed by Atomic Bot
parent 05d0ee5cbe
commit a5eef45deb
2 changed files with 13 additions and 0 deletions

View File

@ -142,3 +142,9 @@ ostree_remote_unref (OstreeRemote *remote)
g_slice_free (OstreeRemote, remote);
}
}
#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
G_DEFINE_BOXED_TYPE(OstreeRemote, ostree_remote,
ostree_remote_ref,
ostree_remote_unref);
#endif

View File

@ -48,9 +48,16 @@ G_BEGIN_DECLS
typedef struct OstreeRemote OstreeRemote;
#endif
#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
_OSTREE_PUBLIC
GType ostree_remote_get_type (void) G_GNUC_CONST;
#else
#ifndef __GI_SCANNER__
_OSTREE_PUBLIC
OstreeRemote *ostree_remote_ref (OstreeRemote *remote);
_OSTREE_PUBLIC
void ostree_remote_unref (OstreeRemote *remote);
#endif /* GI_SCANNER */
#endif
G_END_DECLS