lib: Include OstreeRemote and OstreeCollectionRef in GIR
authorDan Nicholson <nicholson@endlessm.com>
Thu, 9 Nov 2017 13:47:15 +0000 (05:47 -0800)
committerAtomic Bot <atomic-devel@projectatomic.io>
Fri, 10 Nov 2017 10:03:44 +0000 (10:03 +0000)
Now that g-ir-scanner is being told about ENABLE_EXPERIMENTAL_API, it
can include these types correctly. Drop the __GI_SCANNER__ guards in the
header files so that all the declarations are found.

After this, you can actually construct the types normally:

>>> OSTree.CollectionRef.new('com.example.Foo', 'bar')
<OSTree.CollectionRef object at 0x7f2bba4c7528 (OstreeCollectionRef at 0x55c033ff2f30)>

Closes: #1337
Approved by: pwithnall

src/libostree/ostree-ref.h
src/libostree/ostree-remote.h

index 3cf63ed45f83364dd744dc9e13472a8f2c1d3121..e91fe854b80c5fb3ad0a311b110ac397899f107a 100644 (file)
@@ -48,7 +48,6 @@ typedef struct
   gchar *ref_name;  /* (not nullable) */
 } OstreeCollectionRef;
 
-#ifndef __GI_SCANNER__
 _OSTREE_PUBLIC
 GType ostree_collection_ref_get_type (void);
 
@@ -59,7 +58,6 @@ _OSTREE_PUBLIC
 OstreeCollectionRef *ostree_collection_ref_dup (const OstreeCollectionRef *ref);
 _OSTREE_PUBLIC
 void ostree_collection_ref_free (OstreeCollectionRef *ref);
-#endif
 
 _OSTREE_PUBLIC
 guint ostree_collection_ref_hash (gconstpointer ref);
index 23ee21bc5ad2f02f0f86bd0ddf325b55ae4285fa..322fb96ed5daae5be747db9534962f1d03cb81db 100644 (file)
@@ -47,14 +47,12 @@ G_BEGIN_DECLS
 typedef struct OstreeRemote OstreeRemote;
 #endif
 
-#ifndef __GI_SCANNER__
 _OSTREE_PUBLIC
 GType ostree_remote_get_type (void) G_GNUC_CONST;
 _OSTREE_PUBLIC
 OstreeRemote *ostree_remote_ref (OstreeRemote *remote);
 _OSTREE_PUBLIC
 void ostree_remote_unref (OstreeRemote *remote);
-#endif /* GI_SCANNER */
 
 _OSTREE_PUBLIC
 const gchar *ostree_remote_get_name (OstreeRemote *remote);