Skip to content

Commit

Permalink
lib/remote: Box OstreeRemote if experimental-api
Browse files Browse the repository at this point in the history
To avoid an introspection warning.  Otherwise, don't box it.

Closes: #858
Approved by: pwithnall
  • Loading branch information
cgwalters authored and rh-atomic-bot committed May 16, 2017
1 parent 05d0ee5 commit a5eef45
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/libostree/ostree-remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 7 additions & 0 deletions src/libostree/ostree-remote.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a5eef45

Please sign in to comment.