girepository: Various fixes to symbol visibility and compilation defines

To make the setup in libgirepository match that in libgio.

Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>

Helps: #3155
This commit is contained in:
Philip Withnall 2023-10-25 18:30:38 +01:00
parent 5f012e9f12
commit f0e11e82d3
4 changed files with 9 additions and 3 deletions

View File

@ -32,7 +32,7 @@
* to libgirepository; see
* https://bugzilla.gnome.org/show_bug.cgi?id=630342
*/
#ifdef G_IREPOSITORY_COMPILATION
#ifdef GI_COMPILATION
#include "config.h"
#include "girepository.h"
#endif
@ -543,7 +543,7 @@ dump_error_quark (GQuark quark, const char *symbol, GOutputStream *out)
*
* Returns: %TRUE on success, %FALSE on error
*/
#ifndef G_IREPOSITORY_COMPILATION
#ifndef GI_COMPILATION
static gboolean
dump_irepository (const char *arg, GError **error) G_GNUC_UNUSED;
static gboolean

View File

@ -247,4 +247,6 @@ void gi_cclosure_marshal_generic (GClosure *closure,
G_END_DECLS
#undef __GIREPOSITORY_H_INSIDE__
#endif /* __G_IREPOSITORY_H__ */

View File

@ -24,6 +24,10 @@
#ifndef __GIRFFI_H__
#define __GIRFFI_H__
#if !defined (__GIREPOSITORY_H_INSIDE__) && !defined (GI_COMPILATION)
#error "Only <girepository.h> can be included directly."
#endif
#include <ffi.h>
#include "girepository.h"

View File

@ -67,7 +67,7 @@ girepo_headers = files(
install_headers(girepo_headers, install_dir: gir_includedir)
gir_c_args = [
'-DG_IREPOSITORY_COMPILATION',
'-DGI_COMPILATION',
'-DG_LOG_DOMAIN="GLib-GIRepository"',
'-DGIR_SUFFIX="gir-1.0"',
'-DGIR_DIR="@0@"'.format(glib_girdir),