Move GLib basic types in to glib-2.0-basic-types.vapi
@astavale
Submitted by Al Thomas Link to original bug (#794213)
Description
Created attachment 369518 glib-2.0: move basic types into glib-2.0-basic-types.vapi
This patch moves the definitions for int, etc. that are in the Vala global namespace from glib-2.0.vapi to their own VAPI. The patch is more for discussion than inclusion. It aims to be a model for including basic types from other platforms. For example if we wanted to exclude the GLib types and target POSIX:
valac my_source.vala --nostdpkg --pkg posix --pkg posix-basic-types
It is an example of targeting platforms at a low level without the need to introduce "profiles" in to the Vala codegen. In my view it is a more flexible approach. For example it would be fairly easy to add a Windows basic types binding. From https://msdn.microsoft.com/en-us/library/windows/desktop/aa373562(v=vs.85).aspx it looks like that is in Rpcndr.h.
Strangely this patch causes make check to fail. For the valadoc/test/drivers test I get:
G_DEBUG=fatal_warnings ./driver ** ERROR:drivers/generic-api-test.c:15456:test_driver: code should not be reached Makefile:1131: recipe for target 'check-TESTS' failed make[6]: *** [check-TESTS] Aborted (core dumped)
Patch 369518, "glib-2.0: move basic types into glib-2.0-basic-types.vapi":
0001-glib-2.0-move-basic-types-into-glib-2.0-basic-types..patch