diff options
| author | Jon Turney <jon.turney@dronecode.org.uk> | 2018-01-03 18:32:07 +0000 |
|---|---|---|
| committer | Jon Turney <jon.turney@dronecode.org.uk> | 2018-01-06 14:23:53 +0000 |
| commit | 8a27c08b05e4537d5061d30ddd8aad9dc52cf1c4 (patch) | |
| tree | 4adabb3a57bb13d08fc23845b12a9d798104bf9e /test cases/vala/11 generated vapi/libfoo/foo.c | |
| parent | bbdd6ecd4c36d5f66217fad0e53fdc42bfa59e90 (diff) | |
| download | meson-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.c')
| -rw-r--r-- | test cases/vala/11 generated vapi/libfoo/foo.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/test cases/vala/11 generated vapi/libfoo/foo.c b/test cases/vala/11 generated vapi/libfoo/foo.c index 0413ac558..dd2b891fa 100644 --- a/test cases/vala/11 generated vapi/libfoo/foo.c +++ b/test cases/vala/11 generated vapi/libfoo/foo.c @@ -1,11 +1,28 @@ #include "foo.h" +struct _FooFoo +{ + GObject parent_instance; +}; + +G_DEFINE_TYPE (FooFoo, foo_foo, G_TYPE_OBJECT) + +static void +foo_foo_class_init (FooFooClass *klass) +{ +} + +static void +foo_foo_init (FooFoo *self) +{ +} + /** - * foo_return_success: + * foo_foo_return_success: * * Returns 0 */ -int foo_return_success(void) +int foo_foo_return_success(void) { - return 0; + return 0; } |
