summaryrefslogtreecommitdiff
path: root/test cases/vala/11 generated vapi/libfoo/foo.h
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2018-01-03 18:32:07 +0000
committerJon Turney <jon.turney@dronecode.org.uk>2018-01-06 14:23:53 +0000
commit8a27c08b05e4537d5061d30ddd8aad9dc52cf1c4 (patch)
tree4adabb3a57bb13d08fc23845b12a9d798104bf9e /test cases/vala/11 generated vapi/libfoo/foo.h
parentbbdd6ecd4c36d5f66217fad0e53fdc42bfa59e90 (diff)
downloadmeson-8a27c08b05e4537d5061d30ddd8aad9dc52cf1c4.tar.gz
Use GObject-based libraries in test case/vala/11 generated vapi
Non-GObject-based libraries are not (reliably) introspectable, and this only happens to work by accident, at the moment. Briefly: In non-libtool mode, g-ir-scanner inspects the run-time dependencies of a generated executable to determine the shared library name an -l flag corresponds to. But this generated executable only references the libraries by *_get_type() functions. So, if the library doesn't contain any Gobject-based types, it is not referenced, and this inspection fails with PECOFF binaries. It seems that distutils doesn't currently decide to use --as-needed, so this just happens to work on ELF.
Diffstat (limited to 'test cases/vala/11 generated vapi/libfoo/foo.h')
-rw-r--r--test cases/vala/11 generated vapi/libfoo/foo.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/test cases/vala/11 generated vapi/libfoo/foo.h b/test cases/vala/11 generated vapi/libfoo/foo.h
index f09256d7c..e1887d8c3 100644
--- a/test cases/vala/11 generated vapi/libfoo/foo.h
+++ b/test cases/vala/11 generated vapi/libfoo/foo.h
@@ -2,4 +2,8 @@
#pragma once
-int foo_return_success(void);
+#define FOO_TYPE_FOO (foo_foo_get_type())
+
+G_DECLARE_FINAL_TYPE (FooFoo, foo_foo, Foo, FOO, GObject)
+
+int foo_foo_return_success(void);