summaryrefslogtreecommitdiff
path: root/gobject
Commit message (Collapse)AuthorAgeFilesLines
* meson: gio, gobject: use files() for headers listTim-Philipp Müller2017-05-131-2/+2
| | | | | Since these variables are referenced from other directories such as the tests/ subdir as well.
* meson: add support for dtrace/systemtapTim-Philipp Müller2017-05-131-0/+17
| | | | Still at least one FIXME. And untested so far. It builds.
* meson: Port to latest master (2.51.0)Nirbheek Chauhan2017-05-131-1/+1
| | | | | | | Also remove headers from some gio sources. Headers do not need to be added to the list of sources. + various smaller self-explanatory fixes.
* meson: Minor modernizationsPatrick Griffis2017-05-131-3/+3
|
* meson: More build fixesPatrick Griffis2017-05-131-0/+11
| | | | | - Fix installing various data files - Build translations
* meson: Improve MSVC and MinGW support and fix dependencies everywhereNirbheek Chauhan2017-05-134-33/+71
| | | | | | | | | | | | | | | | Disable gio tests on Windows, fix .gitignore to not ignore config.h.meson, and add more things to it. Rename the library file naming and versioning to match what Autotools outputs, e.g., libglib-2.0.so.0.5000.2 on Linux, libglib-2.0-0.dll and glib-2.0-0.dll on Windows with MSVC. Several more tiny fixes, more executables built and installed, install pkg-config and m4 files, fix building of gobject tests. Changes to gdbus-codegen to support out-of-tree builds without environment variables set (which you can't in Meson). We now add the build directory to the Python module search path.
* meson: Fix glib, add gobject, gio, gthread, gmodule, etcTim-Philipp Müller2017-05-133-0/+151
| | | | | | Several small fixes to the build files. Lots of tests have also been added, and glib tests pass now.
* genmarshal: Always generate the prototypes in the bodyEmmanuele Bassi2017-04-281-4/+12
| | | | | | | | This way code that does not manually include the generated marshallers header and wishes to build with `-Wmissing-prototypes` will not generate a compiler warning. https://bugzilla.gnome.org/show_bug.cgi?id=781755
* genmarshal: Use fewer magic numbersEmmanuele Bassi2017-04-281-2/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=781755
* genmarshal: Constify global variablesEmmanuele Bassi2017-04-281-2/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=781755
* genmarshal: Conform --help output to conventionsEmmanuele Bassi2017-04-281-2/+2
| | | | | | | | | | The convention for arguments taking a value is: --argument=VALUE with the `VALUE` in caps. https://bugzilla.gnome.org/show_bug.cgi?id=781755
* Drop trailing semi-colon from G_DEFINE_ macroEmmanuele Bassi2017-04-108-25/+22
| | | | | | | | It's unnecessary, and only adds visual noise; we have been fairly inconsistent in the past, but the semi-colon-less version clearly dominates in the code base. https://bugzilla.gnome.org/show_bug.cgi?id=669355
* gobject: remove duplicate GType sanity checkTim-Philipp Müller2017-04-081-2/+0
| | | | | | | | | | | This is going to be checked again by g_object_new_with_properties() and g_object_new_valist() anyway, so might just as well leave it to those functions to do the check and only do it once. It doesn't matter which function emits the critical warning in the end either, as one has to look at a stack trace to find out what code triggered it in any case. https://bugzilla.gnome.org/show_bug.cgi?id=780908
* gobject: Fix Since/Deprecated versions for GParameter replacement APIPhilip Withnall2017-03-313-9/+9
| | | | | | This slipped through the review cracks. https://bugzilla.gnome.org/show_bug.cgi?id=709865
* gobject: Deprecate g_object_newvFabian Orccon2017-03-312-4/+7
| | | | | | | | g_object_newv uses a GParameter as argument. Since GParameter is deprecated due to this type is not introspectible, g_object_newv is deprecated now. https://bugzilla.gnome.org/show_bug.cgi?id=709865
* gobject: Deprecate GParameterFabian Orccon2017-03-311-0/+2
| | | | | | GParameter is a rarely used type and not introspectible. https://bugzilla.gnome.org/show_bug.cgi?id=709865
* tests: Add test for gobject properties for g_object_newv/setv/getvFabian Orccon2017-03-311-0/+240
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=709865
* gobject: Add g_object_setv and g_object_getv functionsFabian Orccon2017-03-312-22/+107
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=709865
* gobject: Add g_object_new_with_propertiesFabian Orccon2017-03-312-0/+80
| | | | | | | | | g_object_new_with_properties is an alternative to g_object_newv. The last one, takes an array of GParameter. However, GParameter is a rarely used type and this type is not introspectible, so it will not work properly in bindings. https://bugzilla.gnome.org/show_bug.cgi?id=709865
* gobject: Add helper functions to handle warnings in g_object_new/set/getFabian Orccon2017-03-311-119/+97
| | | | | | | | g_object_new_is_valid_property g_object_get_is_valid_property g_object_set_is_valid_property https://bugzilla.gnome.org/show_bug.cgi?id=709865
* gobject: Add to_string() functions for Enum and Flags typesGarrett Regier2017-03-304-11/+184
| | | | | | These are useful for debugging. https://bugzilla.gnome.org/show_bug.cgi?id=447907
* glib-mkenums: Sort input files for more deterministic outputSimon McVittie2017-03-041-0/+2
| | | | | | | | | | | | | This should be helpful for reproducible builds <https://reproducible-builds.org/>. Perl's sorting is not locale-sensitive unless the lexical scope has 'use locale', which this one does not, so we do not need to force locale-agnostic sorting. Signed-off-by: Simon McVittie <smcv@debian.org> Bug: https://bugzilla.gnome.org/show_bug.cgi?id=769983 Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=809152
* Install gdb Python helpers as data, not as executable scriptsSimon McVittie2017-03-031-1/+1
| | | | | | | | | They do not start with the #!/usr/bin/python that would be necessary to make them run with Python rather than a shell, and they would not be useful to run anyway: they are libraries to be imported, not scripts to be run. Signed-off-by: Simon McVittie <smcv@debian.org>
* Visual Studio builds: Move project files to win32/Chun-wei Fan2017-01-091-2/+2
| | | | | | It was suggested that the project files be moved here as we don't actually need to go two directory layers from $(srcroot), and would help us to standardize on things in the future across the board.
* gobject: Document behaviour of GType checking macros on NULLPhilip Withnall2017-01-071-8/+13
| | | | | | | | | | | | The macros differ in their handling of NULL values — some macros ignore them and pass through (e.g. G_TYPE_CHECK_INSTANCE_CAST) while others will explicitly emit a warning if passed NULL (e.g. G_TYPE_CHECK_INSTANCE). Document their behaviour, so people don’t end up putting unnecessary NULL checks in their code when doing checked type casts. https://bugzilla.gnome.org/show_bug.cgi?id=735731
* Avoid calling Standard C string/array functions with NULL argumentsSimon McVittie2016-12-021-1/+2
| | | | | | | | | | | | | | | | glibc string.h declares memcpy() with attribute(nonnull(1,2)), causing calls with NULL arguments to be treated as undefined behaviour. This is consistent with ISO C99 and C11, which state that passing 0 to string functions as an array length does not remove the requirement that the pointer to the array is a valid pointer. gcc -fsanitize=undefined catches this while running OSTree's test suite. Similarly, running the GLib test suite reports similar issues for qsort(), memmove(), memcmp(). Signed-off-by: Simon McVittie <smcv@debian.org> Bug: https://bugzilla.gnome.org/show_bug.cgi?id=775510 Reviewed-by: Colin Walters
* GParam: make G_PARAM_USER_MASK unsignedSimon McVittie2016-12-021-1/+1
| | | | | | | | | | | | UBSan considers left-shifting a negative number to be undefined behaviour (per <http://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_081.html> it is implementation-defined in C89, but according to <https://llvm.org/bugs/show_bug.cgi?id=17490> it is undefined in C99). Signed-off-by: Simon McVittie <smcv@debian.org> Bug: https://bugzilla.gnome.org/show_bug.cgi?id=775510 Reviewed-by: Colin Walters
* glib: Namespace global tapset variables by sonamePhilip Withnall2016-11-231-18/+18
| | | | | | | | | | | global variables in SystemTap are shared between all SystemTap scripts; so if scripts are loaded for two versions of GLib (for example, a stable and a development version), those global variables will conflict. Avoid that by including the soname’s version in the global variable names. https://bugzilla.gnome.org/show_bug.cgi?id=770646
* introspection: use (nullable) or (optional) instead of (allow-none)Christian Hergert2016-11-2213-101/+101
| | | | | | | | If we have an input parameter (or return value) we need to use (nullable). However, if it is an (inout) or (out) parameter, (optional) is sufficient. It looks like (nullable) could be used for everything according to the Annotation documentation, but (optional) is more specific.
* gsignal: Mention handler ID type in signal connection macro docsPhilip Withnall2016-11-102-8/+8
| | | | | | | | | | gtk-doc doesn’t make the return type clear, because these are macros rather than inline functions, so people often have to guess at the return type (or look it up from g_signal_connect_closure(), but that’s hard work). Make it clear that the return type for handler IDs is gulong. While there, fix the capitalisation of ‘id’ to ‘ID’ in a few places.
* glib-mkenums: fix variable declarationTim-Philipp Müller2016-11-081-1/+1
| | | | | | | Inconsequential, just sync up declaration with actual name of variable to avoid confusion. https://bugzilla.gnome.org/show_bug.cgi?id=770175
* Avoid warning for G_PARAM_DEPRECATED with GCC 6 [-Wpedantic]Hannes Müller2016-10-241-1/+2
| | | | | Refer to https://bugzilla.gnome.org/show_bug.cgi?id=767882 Related to GCC https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71803
* glib-mkenums: add --output option to write output to a fileTim-Philipp Müller2016-10-121-0/+26
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=770175
* glib-genmarshal: add --output option to write output to a fileTim-Philipp Müller2016-10-121-1/+47
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=770175
* Fix the signals testMatthias Clasen2016-08-271-1/+2
| | | | | | The test setup here is not really independent, so the addition of the custom-marshaller test was breaking some of the other tests. Fix things up.
* tests: Add test showing default marshaller overrideBenjamin Otte2016-08-251-0/+79
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=769076
* Don't set a va marshaller if a marshaller was setMatthias Clasen2016-08-251-4/+10
| | | | | | | Otherwise we get warnings when the caller later tries to set a va marshaller with g_signal_set_va_marshaller. https://bugzilla.gnome.org/show_bug.cgi?id=769076
* build: Fix SystemTap build to disable semaphores as beforePhilip Withnall2016-08-131-1/+4
| | | | | | | | | | | | | | | | At some point, upstream SystemTap changed from using a STAP_HAS_SEMAPHORES preprocessor variable for this, to using _SDT_HAS_SEMAPHORES instead. We need to update our build system to disable that as well. The original discussion about use of semaphores is here: https://bugzilla.gnome.org/show_bug.cgi?id=606044 This was breaking the build with -flto enabled, either because -flto doesn’t work with semaphores. https://bugzilla.gnome.org/show_bug.cgi?id=768198
* Fix debug builds under MSVCEmmanuele Bassi2016-08-041-5/+14
| | | | | | | | | | | | | | | | | The C spec leaves conditional evaluation inside a macro expansion as undefined behaviour. This means we cannot use constructs like: GOBJECT_IF_DEBUG(OBJECTS, { ... #ifdef BLAH ... #endif ...}); Because compilers are entirely justified to ignore the conditional, or, like in the case of MSVC, error out. https://bugzilla.gnome.org/show_bug.cgi?id=769504
* gobject: add g_autoptr support for GTypeModuleAlberts Muktupāvels2016-07-211-0/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=769033
* gobject: add GOBJECT_IF_DEBUG macro for debugging gobjects and gsignals.Kang Hu2016-07-163-28/+28
| | | | | | | | | | | | | historically, DEBUG_CODE(gtype.c) and IF_DEBUG(gobject.c, gsignal.c) macros are used to support debugging messages about object bookkeeping and signal emission. DEBUG_CODE has never been used in gtype.c. IF_DEBUG, when used, must be accompanied by an extra #ifdef G_ENABLE_DEBUG. this is cumbersome. this patch add a new macro GOBJECT_IF_DEBUG based on DEBUG_CODE as a replacement for both DEBUG_CODE and IF_DEBUG. https://bugzilla.gnome.org/show_bug.cgi?id=729914
* build: Rename SystemTap scripts to include the LT versionPhilip Withnall2016-06-291-6/+5
| | | | | | | | | | | | | | | | | | | In a vague attempt at ensuring the .stp scripts can be closely associated with the .so files which they hard-code references to, rename the scripts so they include the LT version — so that they are the .so file name plus .stp. This does not fix the fact that our .stp scripts will not work on multiarch systems, as they are installed in an architecture-independent directory (/usr/share/systemtap/tapset). At the moment, it is recommended that any distribution who package the .stp files should install them in the architecture-specific subdirectories of this (for example, /usr/share/systemtap/tapset/x86-64). A better long-term solution for this is under discussion upstream: https://sourceware.org/bugzilla/show_bug.cgi?id=20264 https://bugzilla.gnome.org/show_bug.cgi?id=662802
* build: simplify dtrace configurationRyan Lortie2016-06-201-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The ability to pass libtool via $(CC) to dtrace and have it respect this appears to be a feature that is only present in the systemtap version of the tool. In particular, FreeBSD (which seems to be using a copy of the tool from Solaris) doesn't support this. The result is that, with $(CC) ignored, and a .lo file specified in -o, we get an ELF written to the .lo. Instead of trying to have dtrace run libtool we can have libtool run dtrace. dtrace is really just a compiler that produces an object file here, and it even understands -o, so libtool can make the appropriate adjustments. There appears to be some prior art for this approach. A quick search shows that at least QEMU is using this approach. It also appears to work on Linux with systemtap's dtrace and on FreeBSD. This may regress cross-compilation because the dtrace command will have no way of knowing which compiler we intend for it to use to produce the object file. I say "may" because I don't know if dtrace ever worked in the first place under cross-compilation. https://bugzilla.gnome.org/show_bug.cgi?id=725902
* gsignal: Remove a UTF-8 ellipsis from docsGerald Combs2016-06-031-1/+1
| | | | | | | | Some compilers have trouble with such sequences. Visual C++ may or may not generate a warning in this particular case depending on if the local code page supports an ellipsis. https://bugzilla.gnome.org/show_bug.cgi?id=767218
* Rename gdb macros with `_gdb` suffix to avoid ns clashesTom Tromey2016-05-233-5/+5
| | | | | | | | | | | | | glib installs a gdb helper file named `glib.py`. Then the "hook" file updates `sys.path` and does `import glib`. This will fail if glib has already been imported into gdb, say using `from gi.repository import GLib`. This is due to a namespace clash. One fix would be to rename the gdb helper files to not clash with other Python modules. This should be done for all such helper files. https://bugzilla.gnome.org/show_bug.cgi?id=760186
* gvalue: Fix description of g_value_type_transformable()Kjell Ahlstedt2016-04-281-2/+2
| | | | | | | Types are transformable if they are compatible *or* a transformation function is registered. https://bugzilla.gnome.org/show_bug.cgi?id=742898
* gparamspecs: GTypes are stored in v_pointer, not v_longSebastian Dröge2016-04-271-5/+5
| | | | | | | v_long is 32 bits on Win64, v_pointer is 64 bits. On most other platforms the size of long and pointer is the same, so it's usually not a problem. https://bugzilla.gnome.org/show_bug.cgi?id=758738
* Fix documentation typosPhillip Wood2016-04-111-1/+1
| | | | | | | | | Character entities are not supposed to be supported by gtk-doc¹ and fix the spelling of ‘optional’ ¹https://bugzilla.gnome.org/show_bug.cgi?id=758137 https://bugzilla.gnome.org/show_bug.cgi?id=758174
* build: Also dist Systemtap files always for gobject/Colin Walters2016-03-231-2/+3
| | | | | | | | Mirrors https://git.gnome.org/browse/glib/commit/?id=ad2092bc680e434c3d17600988ec9b20f52eebef except I didn't also change gobject/. https://bugzilla.gnome.org/show_bug.cgi?id=763821
* gio/gobject: Various introspection fixesRico Tzschichholz2016-02-033-3/+3
|