noinst_LTLIBRARIES = libgirepository-parser.la
libgirepository_1_0_la_SOURCES = \
+ gdump.c \
+ gfield.c \
+ ginfo.c \
+ ginfo.h \
+ ginvoke.c \
girepository.c \
- gtypelib.h \
+ girffi.c \
+ girffi.h \
+ glib-compat.h \
gtypelib.c \
- gfield.c \
- ginfo.h \
- ginfo.c \
- girffi.c \
- girffi.h \
- gdump.c \
- ginvoke.c
+ gtypelib.h
libgirepository_1_0_la_CPPFLAGS = $(GIREPO_CFLAGS)
libgirepository_1_0_la_LIBADD = $(GIREPO_LIBS)
#include "girepository.h"
#include "gtypelib.h"
#include "ginfo.h"
+#include "glib-compat.h"
#include "config.h"
static void
free_candidate (struct NamespaceVersionCandidadate *candidate)
{
- g_mapped_file_free (candidate->mfile);
+ g_mapped_file_unref (candidate->mfile);
g_free (candidate->path);
g_free (candidate->version);
g_free (candidate);
--- /dev/null
+/* GObject introspection: Compatibility definitions
+ *
+ * Copyright (C) 2009 Javier Jardón
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+
+#if !GLIB_CHECK_VERSION(2,22,0)
+#define g_mapped_file_unref(x) g_mapped_file_free(x)
+#endif
#include "config.h"
#include "gtypelib.h"
+#include "glib-compat.h"
typedef struct {
GTypelib *typelib;
g_typelib_free (GTypelib *typelib)
{
if (typelib->mfile)
- g_mapped_file_free (typelib->mfile);
+ g_mapped_file_unref (typelib->mfile);
else
if (typelib->owns_memory)
g_free (typelib->data);