[gobject-introspection/wip/transformer] Fix namespacing
- From: Tomeu Vizoso <tomeuv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection/wip/transformer] Fix namespacing
- Date: Thu, 29 Jul 2010 15:16:34 +0000 (UTC)
commit 859f0fd3e9a354d08b0ce38d5c502512777db6eb
Author: Colin Walters <walters verbum org>
Date: Thu Jul 29 08:00:23 2010 -0400
Fix namespacing
Various tests had incorrect namespacing; the scanner is now more
strict about this.
.../{foo-1.0-expected.gir => Foo-1.0-expected.gir} | 0
tests/scanner/Makefile.am | 54 ++++++++++----------
...0-expected.gir => TestInherit-1.0-expected.gir} | 0
...y-1.0-expected.gir => Utility-1.0-expected.gir} | 0
tests/scanner/barapp.c | 4 +-
tests/scanner/barapp.h | 4 +-
tests/scanner/drawable.c | 14 +++---
tests/scanner/drawable.h | 28 +++++-----
8 files changed, 52 insertions(+), 52 deletions(-)
---
diff --git a/tests/scanner/foo-1.0-expected.gir b/tests/scanner/Foo-1.0-expected.gir
similarity index 100%
rename from tests/scanner/foo-1.0-expected.gir
rename to tests/scanner/Foo-1.0-expected.gir
diff --git a/tests/scanner/Makefile.am b/tests/scanner/Makefile.am
index 42a7f72..3091cb4 100644
--- a/tests/scanner/Makefile.am
+++ b/tests/scanner/Makefile.am
@@ -7,7 +7,7 @@ INTROSPECTION_SCANNER_ARGS += --warn-all --warn-error
# it does not work with noinst_LTLIBRARIES
testlib_LTLIBRARIES = \
libannotation.la \
- libdrawable.la \
+ libtestinherit.la \
libfoo.la \
libutility.la \
libgtkfrob.la
@@ -20,7 +20,7 @@ AM_LDFLAGS = -avoid-version
LIBS = $(GOBJECT_LIBS) $(GTHREAD_LIBS)
libannotation_la_SOURCES = $(srcdir)/annotation.c $(srcdir)/annotation.h
-libdrawable_la_SOURCES = $(srcdir)/drawable.c $(srcdir)/drawable.h
+libtestinherit_la_SOURCES = $(srcdir)/drawable.c $(srcdir)/drawable.h
libfoo_la_SOURCES = $(srcdir)/foo.c $(srcdir)/foo.h
libutility_la_SOURCES = $(srcdir)/utility.c $(srcdir)/utility.h
libgtkfrob_la_SOURCES = $(srcdir)/gtkfrob.c $(srcdir)/gtkfrob.h
@@ -39,34 +39,34 @@ CLEANFILES = $(TYPELIBS) $(GIRS)
BUILT_SOURCES = $(TYPELIBS) $(GIRS)
EXTRA_DIST = $(EXPECTEDGIRS)
-annotation-1.0.gir: utility-1.0.gir libannotation.la
-annotation_1_0_gir_PACKAGES = gobject-2.0
-annotation_1_0_gir_LIBS = libannotation.la
-annotation_1_0_gir_INCLUDES = GObject-2.0 utility-1.0
-annotation_1_0_gir_FILES = $(libannotation_la_SOURCES)
-GIRS += annotation-1.0.gir
-
-drawable-1.0.gir: utility-1.0.gir libdrawable.la
-drawable_1_0_gir_PACKAGES = gobject-2.0
-drawable_1_0_gir_LIBS = libdrawable.la
-drawable_1_0_gir_INCLUDES = GObject-2.0 utility-1.0
-drawable_1_0_gir_FILES = $(libdrawable_la_SOURCES)
-GIRS += drawable-1.0.gir
-
-foo-1.0.gir: utility-1.0.gir libfoo.la
-foo_1_0_gir_PACKAGES = gobject-2.0
-foo_1_0_gir_LIBS = libfoo.la
-foo_1_0_gir_INCLUDES = GObject-2.0 Gio-2.0 utility-1.0
-foo_1_0_gir_FILES = $(srcdir)/foo.h $(srcdir)/foo.c
-foo_1_0_gir_SCANNERFLAGS = --c-include="foo.h"
-GIRS += foo-1.0.gir
-
-utility-1.0.gir: libutility.la
-utility_1_0_gir_PACKAGES = gobject-2.0
-utility_1_0_gir_LIBS = libutility.la
-utility_1_0_gir_INCLUDES = GObject-2.0
-utility_1_0_gir_FILES = $(libutility_la_SOURCES)
-GIRS += utility-1.0.gir
+Annotation-1.0.gir: Utility-1.0.gir libannotation.la
+Annotation_1_0_gir_PACKAGES = gobject-2.0
+Annotation_1_0_gir_LIBS = libannotation.la
+Annotation_1_0_gir_INCLUDES = GObject-2.0 Utility-1.0
+Annotation_1_0_gir_FILES = $(libannotation_la_SOURCES)
+GIRS += Annotation-1.0.gir
+
+TestInherit-1.0.gir: Utility-1.0.gir libtestinherit.la
+TestInherit_1_0_gir_PACKAGES = gobject-2.0
+TestInherit_1_0_gir_LIBS = libtestinherit.la
+TestInherit_1_0_gir_INCLUDES = GObject-2.0 Utility-1.0
+TestInherit_1_0_gir_FILES = $(libtestinherit_la_SOURCES)
+GIRS += TestInherit-1.0.gir
+
+Foo-1.0.gir: Utility-1.0.gir libfoo.la
+Foo_1_0_gir_PACKAGES = gobject-2.0
+Foo_1_0_gir_LIBS = libfoo.la
+Foo_1_0_gir_INCLUDES = GObject-2.0 Gio-2.0 Utility-1.0
+Foo_1_0_gir_FILES = $(srcdir)/foo.h $(srcdir)/foo.c
+Foo_1_0_gir_SCANNERFLAGS = --c-include="foo.h"
+GIRS += Foo-1.0.gir
+
+Utility-1.0.gir: libutility.la
+Utility_1_0_gir_PACKAGES = gobject-2.0
+Utility_1_0_gir_LIBS = libutility.la
+Utility_1_0_gir_INCLUDES = GObject-2.0
+Utility_1_0_gir_FILES = $(libutility_la_SOURCES)
+GIRS += Utility-1.0.gir
# This one tests different --namespace and --strip-prefix
GtkFrob-1.0.gir: libgtkfrob.la
diff --git a/tests/scanner/drawable-1.0-expected.gir b/tests/scanner/TestInherit-1.0-expected.gir
similarity index 100%
rename from tests/scanner/drawable-1.0-expected.gir
rename to tests/scanner/TestInherit-1.0-expected.gir
diff --git a/tests/scanner/utility-1.0-expected.gir b/tests/scanner/Utility-1.0-expected.gir
similarity index 100%
rename from tests/scanner/utility-1.0-expected.gir
rename to tests/scanner/Utility-1.0-expected.gir
diff --git a/tests/scanner/barapp.c b/tests/scanner/barapp.c
index f2b9254..d336975 100644
--- a/tests/scanner/barapp.c
+++ b/tests/scanner/barapp.c
@@ -16,12 +16,12 @@ bar_baz_init (BarBaz *object)
}
void
-barapp_func (void)
+bar_app_func (void)
{
}
void
-barapp_func2 (int x, double y)
+bar_app_func2 (int x, double y)
{
}
diff --git a/tests/scanner/barapp.h b/tests/scanner/barapp.h
index 6e09b8a..ff8037d 100644
--- a/tests/scanner/barapp.h
+++ b/tests/scanner/barapp.h
@@ -20,5 +20,5 @@ struct BarBazClass
GType bar_baz_get_type (void) G_GNUC_CONST;
-void barapp_func (void);
-void barapp_func2 (int x, double y);
+void bar_app_func (void);
+void bar_app_func2 (int x, double y);
diff --git a/tests/scanner/drawable.c b/tests/scanner/drawable.c
index 7101d18..0250fc0 100644
--- a/tests/scanner/drawable.c
+++ b/tests/scanner/drawable.c
@@ -1,41 +1,41 @@
#include "drawable.h"
-G_DEFINE_ABSTRACT_TYPE (TestDrawable, test_drawable, G_TYPE_OBJECT);
+G_DEFINE_ABSTRACT_TYPE (TestInheritDrawable, test_inherit_drawable, G_TYPE_OBJECT);
static void
-test_drawable_class_init (TestDrawableClass *klass)
+test_inherit_drawable_class_init (TestInheritDrawableClass *klass)
{
}
static void
-test_drawable_init (TestDrawable *drawable)
+test_inherit_drawable_init (TestInheritDrawable *drawable)
{
}
void
-test_drawable_do_foo (TestDrawable *drawable, int x)
+test_inherit_drawable_do_foo (TestInheritDrawable *drawable, int x)
{
}
void
-test_drawable_get_origin (TestDrawable *drawable, int *x, int *y)
+test_inherit_drawable_get_origin (TestInheritDrawable *drawable, int *x, int *y)
{
*x = 0;
*y = 0;
}
void
-test_drawable_get_size (TestDrawable *drawable, guint *width, guint *height)
+test_inherit_drawable_get_size (TestInheritDrawable *drawable, guint *width, guint *height)
{
*width = 42;
*height = 42;
}
void
-test_drawable_do_foo_maybe_throw (TestDrawable *drawable, int x, GError **error)
+test_inherit_drawable_do_foo_maybe_throw (TestInheritDrawable *drawable, int x, GError **error)
{
if (x != 42)
g_set_error(error, 0, 12, "The answer should be 42!");
diff --git a/tests/scanner/drawable.h b/tests/scanner/drawable.h
index 98a7010..ccc2a0e 100644
--- a/tests/scanner/drawable.h
+++ b/tests/scanner/drawable.h
@@ -1,31 +1,31 @@
-#ifndef __TEST_DRAWABLE_H__
-#define __TEST_DRAWABLE_H__
+#ifndef __TEST_INHERIT_DRAWABLE_H__
+#define __TEST_INHERIT_DRAWABLE_H__
#include <glib-object.h>
-typedef struct _TestDrawable TestDrawable;
-typedef struct _TestDrawableClass TestDrawableClass;
+typedef struct _TestInheritDrawable TestInheritDrawable;
+typedef struct _TestInheritDrawableClass TestInheritDrawableClass;
-struct _TestDrawable
+struct _TestInheritDrawable
{
GObject parent_instance;
};
-struct _TestDrawableClass
+struct _TestInheritDrawableClass
{
GObjectClass parent_class;
};
-GType test_drawable_get_type (void) G_GNUC_CONST;
+GType test_inherit_drawable_get_type (void) G_GNUC_CONST;
-void test_drawable_do_foo (TestDrawable *drawable, int x);
-void test_drawable_get_origin (TestDrawable *drawable, int *x, int *y);
-void test_drawable_get_size (TestDrawable *drawable, guint *width, guint *height);
-void test_drawable_do_foo_maybe_throw (TestDrawable *drawable, int x, GError **error);
+void test_inherit_drawable_do_foo (TestInheritDrawable *drawable, int x);
+void test_inherit_drawable_get_origin (TestInheritDrawable *drawable, int *x, int *y);
+void test_inherit_drawable_get_size (TestInheritDrawable *drawable, guint *width, guint *height);
+void test_inherit_drawable_do_foo_maybe_throw (TestInheritDrawable *drawable, int x, GError **error);
-struct _TestPixmapObjectClass
+struct _TestInheritPixmapObjectClass
{
- TestDrawableClass parent_class;
+ TestInheritDrawableClass parent_class;
};
-#endif /* __TEST_DRAWABLE_H__ */
+#endif /* __TEST_INHERIT_DRAWABLE_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]