diff options
author | Hyunjee Kim <hj0426.kim@samsung.com> | 2019-12-03 10:42:37 +0900 |
---|---|---|
committer | Hyunjee Kim <hj0426.kim@samsung.com> | 2019-12-03 10:42:37 +0900 |
commit | 99d572044d3b94498607a05ad7aaccf372e8cbff (patch) | |
tree | 7c5dad139ba0b85031a7378639e419b108e10659 /gobject | |
parent | a60402374ac62bf99a22f84f0801d5513b12fd66 (diff) | |
download | glib-99d572044d3b94498607a05ad7aaccf372e8cbff.tar.gz glib-99d572044d3b94498607a05ad7aaccf372e8cbff.tar.bz2 glib-99d572044d3b94498607a05ad7aaccf372e8cbff.zip |
Imported Upstream version 2.59.1
Diffstat (limited to 'gobject')
-rw-r--r-- | gobject/Makefile.am | 261 | ||||
-rw-r--r-- | gobject/gtype.h | 8 | ||||
-rw-r--r-- | gobject/gtypemodule.h | 8 | ||||
-rw-r--r-- | gobject/tests/Makefile.am | 71 |
4 files changed, 11 insertions, 337 deletions
diff --git a/gobject/Makefile.am b/gobject/Makefile.am deleted file mode 100644 index 78748e96c..000000000 --- a/gobject/Makefile.am +++ /dev/null @@ -1,261 +0,0 @@ -# GObject - GLib Type, Object, Parameter and Signal Library -# Copyright (C) 1997,98,99,2000 Tim Janik and Red Hat, Inc. -# -## Process this file with automake to produce Makefile.in -include $(top_srcdir)/glib.mk - -SUBDIRS = . tests - -AM_CPPFLAGS = \ - -DG_LOG_DOMAIN=\"GLib-GObject\" \ - $(glib_INCLUDES) \ - $(GLIB_DEBUG_FLAGS) \ - -DGOBJECT_COMPILATION - -AM_CFLAGS = $(GLIB_WARN_CFLAGS) - -libglib = $(top_builddir)/glib/libglib-2.0.la - -# libraries to compile and install -lib_LTLIBRARIES = libgobject-2.0.la - -if OS_WIN32_AND_DLL_COMPILATION -if MS_LIB_AVAILABLE -noinst_DATA += gobject-2.0.lib - -install_ms_lib_cmd = $(INSTALL) gobject-2.0.lib $(DESTDIR)$(libdir) -uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gobject-2.0.lib -endif -endif - -install-ms-lib: - $(install_ms_lib_cmd) - -uninstall-ms-lib: - $(uninstall_ms_lib_cmd) - -if PLATFORM_WIN32 -no_undefined = -no-undefined -endif - -if OS_WIN32_AND_DLL_COMPILATION -gobject_win32_res = gobject-win32-res.o -gobject_win32_res_ldflag = -Wl,$(gobject_win32_res) -endif - -libgobjectincludedir = $(includedir)/glib-2.0/gobject -libgobject_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \ - $(gobject_win32_res_ldflag) \ - -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ - -export-dynamic $(no_undefined) - -libgobject_2_0_la_CFLAGS = $(AM_CFLAGS) $(LIBFFI_CFLAGS) $(GLIB_HIDDEN_VISIBILITY_CFLAGS) - -libgobject_2_0_la_LIBADD = $(libglib) $(LIBFFI_LIBS) - -libgobject_2_0_la_DEPENDENCIES = $(gobject_win32_res) - -# -# setup source file variables -# -# GObject library header files for public installation -gobject_public_h_sources = \ - gobject-autocleanups.h \ - glib-types.h \ - gbinding.h \ - gboxed.h \ - gclosure.h \ - genums.h \ - gmarshal.h \ - gobject.h \ - gparam.h \ - gparamspecs.h \ - gsignal.h \ - gsourceclosure.h \ - gtype.h \ - gtypemodule.h \ - gtypeplugin.h \ - gvalue.h \ - gvaluearray.h \ - gvaluecollector.h \ - gvaluetypes.h \ - gobjectnotifyqueue.c - -# GObject library header files that don't get installed -gobject_private_h_sources = \ - gatomicarray.h \ - gtype-private.h - -# GObject library C sources to build the library from -gobject_c_sources = \ - gobject_probes.d \ - gatomicarray.c \ - gbinding.c \ - gboxed.c \ - gclosure.c \ - genums.c \ - gmarshal.c \ - gobject.c \ - gobject_trace.h \ - gparam.c \ - gparamspecs.c \ - gsignal.c \ - gsourceclosure.c \ - gtype.c \ - gtypemodule.c \ - gtypeplugin.c \ - gvalue.c \ - gvaluearray.c \ - gvaluetransform.c \ - gvaluetypes.c - -if ENABLE_DTRACE - -gobject_probes.h: gobject_probes.d - $(AM_V_GEN) $(DTRACE) -C -h -s $< -o $@.tmp - @$(SED) \ - -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," \ - -e "s,define _SDT_HAS_SEMAPHORES 1,undef _SDT_HAS_SEMAPHORES," \ - < $@.tmp > $@ && rm -f $@.tmp - -gobject_probes.lo: gobject_probes.d - $(AM_V_GEN) $(LIBTOOL) --mode=compile $(AM_V_lt) --tag=CC env CFLAGS="$(CFLAGS)" $(DTRACE) -G -s $< -o $@ - -BUILT_SOURCES += gobject_probes.h gobject_probes.lo -CLEANFILES += gobject_probes.h -libgobject_2_0_la_LIBADD += gobject_probes.lo -endif - -tapsetdir = @ABS_TAPSET_DIR@ -EXTRA_DIST += gobject.stp.in - -if ENABLE_SYSTEMTAP -tapset_DATA = libgobject-2.0.so.0.@LT_CURRENT@.@LT_REVISION@.stp -CLEANFILES += $(tapset_DATA) - -$(tapset_DATA): gobject.stp.in Makefile - $(AM_V_GEN)$(SED) \ - -e 's|[@]ABS_GLIB_RUNTIME_LIBDIR[@]|$(ABS_GLIB_RUNTIME_LIBDIR)|g' \ - -e 's|[@]LT_CURRENT[@]|$(LT_CURRENT)|g' \ - -e 's|[@]LT_REVISION[@]|$(LT_REVISION)|g' \ - $< > $@ -endif - -# non-header sources (headers should be specified in the above variables) -# that don't serve as direct make target sources, i.e. they don't have -# their own .lo rules and don't get publically installed -gobject_extra_sources = - -# -# setup GObject library sources and their dependancies -# -gobject_target_headers = $(gobject_public_h_sources) -gobject_target_sources = $(gobject_c_sources) -EXTRA_HEADERS = -EXTRA_DIST += \ - $(gobject_private_h_sources) \ - $(gobject_extra_sources) - -# This is read by gobject-introspection/misc/ and gtk-doc -gobject-public-headers.txt: Makefile - $(AM_V_GEN) echo $(gobject_public_h_sources) > $@.tmp && mv $@.tmp $@ - -CLEANFILES += gobject-public-headers.txt - -all-local: gobject-public-headers.txt - -# -# rules to generate built sources -# -# setup autogeneration dependancies -gen_sources = xgen-gmh xgen-gmc xgen-gms -CLEANFILES += $(gen_sources) - -# normal autogeneration rules -# all autogenerated files need to be generated in the srcdir, -# so old versions get remade and are not confused with newer -# versions in the build dir. thus a development setup requires -# srcdir to be writable, passing --disable-rebuilds to -# ../configure will supress all autogeneration rules. - - -# target platform: -libgobjectinclude_HEADERS = $(gobject_target_headers) -libgobject_2_0_la_SOURCES = $(gobject_target_sources) - -# -# programs to compile and install -# -bin_PROGRAMS = gobject-query -bin_SCRIPTS = glib-mkenums glib-genmarshal -# source files -gobject_query_SOURCES = gobject-query.c -# link programs against libgobject -progs_LDADD = ./libgobject-2.0.la $(libglib) -gobject_query_LDADD = $(progs_LDADD) - -# -# auxillary files -# -EXTRA_DIST += \ - gobject.rc.in \ - libgobject-gdb.py.in \ - glib-genmarshal.in \ - glib-mkenums.in - -CLEANFILES += libgobject-gdb.py - -BUILT_EXTRA_DIST += \ - gobject.rc - -gobject-win32-res.o: gobject.rc - $(AM_V_GEN) $(WINDRES) gobject.rc $@ - -gobject.def: libgobject-2.0.la - $(AM_V_GEN) dumpbin.exe -exports .libs/libgobject-2.0-0.dll | awk 'BEGIN { print "EXPORTS" } / +[[:digit:]]+ +[[:xdigit:]]+ +[[:xdigit:]]+/{ print $$4 }' > gobject.def.tmp && mv gobject.def.tmp gobject.def - -gobject-2.0.lib: libgobject-2.0.la gobject.def - $(AM_V_GEN) lib.exe -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgobject-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/gobject.def -out:$@ - -dist-hook: $(BUILT_EXTRA_DIST) - files='$(BUILT_EXTRA_DIST)'; \ - for f in $$files; do \ - if test -f $$f; then d=.; else d=$(srcdir); fi; \ - cp $$d/$$f $(distdir) || exit 1; done - -install-data-local: install-ms-lib - -uninstall-local: uninstall-ms-lib uninstall-gdb - -distclean-local: - if test $(srcdir) = .; then :; else \ - rm -f $(BUILT_EXTRA_DIST); \ - fi - -# install gdb scripts -gdbdir = $(datadir)/glib-2.0/gdb -dist_gdb_DATA = gobject_gdb.py - -all-local: libgobject-gdb.py -libgobject-gdb.py: libgobject-gdb.py.in - $(AM_V_GEN) $(SED) -e "s|\@datadir\@|$(datadir)|" $(srcdir)/libgobject-gdb.py.in > $(builddir)/libgobject-gdb.py - -uninstall-gdb: - -rm -r $(DESTDIR)$(datadir)/gdb - -if HAVE_GLIB_RUNTIME_LIBDIR -ABS_GLIB_RUNTIME_LIBDIR = $(realpath $(libdir)/$(GLIB_RUNTIME_LIBDIR)) -else -ABS_GLIB_RUNTIME_LIBDIR = $(libdir) -endif - -install-data-hook: libgobject-gdb.py - mkdir -p $(DESTDIR)$(datadir)/gdb/auto-load/$(ABS_GLIB_RUNTIME_LIBDIR) - $(INSTALL) $(builddir)/libgobject-gdb.py $(DESTDIR)$(datadir)/gdb/auto-load/$(ABS_GLIB_RUNTIME_LIBDIR)/libgobject-2.0.so.0.$(LT_CURRENT).$(LT_REVISION)-gdb.py -if HAVE_GLIB_RUNTIME_LIBDIR - mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR) - mv $(DESTDIR)$(libdir)/libgobject-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR) - mv $(DESTDIR)$(libdir)/libgobject-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR) - rm -f $(DESTDIR)$(libdir)/libgobject-2.0.so - ln -s $(GLIB_RUNTIME_LIBDIR)/libgobject-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgobject-2.0.so -endif diff --git a/gobject/gtype.h b/gobject/gtype.h index 0d366e67b..a3a07c6a3 100644 --- a/gobject/gtype.h +++ b/gobject/gtype.h @@ -1753,6 +1753,12 @@ guint g_type_get_type_registration_serial (void); * name `t_n ## _default_init`, and the interface structure to have the * name `TN ## Interface`. * + * The initialization function has signature + * `static void t_n ## _default_init (TypeName##Interface *klass);`, rather than + * the full #GInterfaceInitFunc signature, for brevity and convenience. If you + * need to use an initialization function with an `iface_data` argument, you + * must write the #GTypeInterface definitions manually. + * * Since: 2.24 */ #define G_DEFINE_INTERFACE(TN, t_n, T_P) G_DEFINE_INTERFACE_WITH_CODE(TN, t_n, T_P, ;) @@ -1779,7 +1785,7 @@ guint g_type_get_type_registration_serial (void); /** * G_IMPLEMENT_INTERFACE: * @TYPE_IFACE: The #GType of the interface to add - * @iface_init: The interface init function + * @iface_init: (type GInterfaceInitFunc): The interface init function, of type #GInterfaceInitFunc * * A convenience macro to ease interface addition in the `_C_` section * of G_DEFINE_TYPE_WITH_CODE() or G_DEFINE_ABSTRACT_TYPE_WITH_CODE(). diff --git a/gobject/gtypemodule.h b/gobject/gtypemodule.h index deeadcdd3..5c4025063 100644 --- a/gobject/gtypemodule.h +++ b/gobject/gtypemodule.h @@ -204,12 +204,12 @@ type_name##_register_type (GTypeModule *type_module) \ sizeof (TypeName##Class), \ (GBaseInitFunc) NULL, \ (GBaseFinalizeFunc) NULL, \ - (GClassInitFunc) type_name##_class_intern_init, \ - (GClassFinalizeFunc) type_name##_class_finalize, \ + (GClassInitFunc)(void (*)(void)) type_name##_class_intern_init, \ + (GClassFinalizeFunc)(void (*)(void)) type_name##_class_finalize, \ NULL, /* class_data */ \ sizeof (TypeName), \ 0, /* n_preallocs */ \ - (GInstanceInitFunc) type_name##_init, \ + (GInstanceInitFunc)(void (*)(void)) type_name##_init, \ NULL /* value_table */ \ }; \ type_name##_type_id = g_type_module_register_type (type_module, \ @@ -238,7 +238,7 @@ type_name##_register_type (GTypeModule *type_module) \ */ #define G_IMPLEMENT_INTERFACE_DYNAMIC(TYPE_IFACE, iface_init) { \ const GInterfaceInfo g_implement_interface_info = { \ - (GInterfaceInitFunc) iface_init, NULL, NULL \ + (GInterfaceInitFunc)(void (*)(void)) iface_init, NULL, NULL \ }; \ g_type_module_add_interface (type_module, g_define_type_id, TYPE_IFACE, &g_implement_interface_info); \ } diff --git a/gobject/tests/Makefile.am b/gobject/tests/Makefile.am deleted file mode 100644 index ae94d5010..000000000 --- a/gobject/tests/Makefile.am +++ /dev/null @@ -1,71 +0,0 @@ -include $(top_srcdir)/glib-tap.mk - -LDADD = ../libgobject-2.0.la $(top_builddir)/glib/libglib-2.0.la -AM_CPPFLAGS = -g $(gobject_INCLUDES) $(GLIB_DEBUG_FLAGS) -DEFS = -DG_LOG_DOMAIN=\"GLib-GObject\" -AM_CFLAGS = $(GLIB_WARN_CFLAGS) - -# ----------------------------------------------------------------------------- - -test_programs = \ - qdata \ - boxed \ - enums \ - param \ - threadtests \ - dynamictests \ - binding \ - properties \ - reference \ - flags \ - value \ - type \ - private \ - closure \ - object \ - signal-handler \ - $(NULL) - -if HAVE_GCC -test_programs += \ - autoptr \ - $(NULL) -endif - -# ----------------------------------------------------------------------------- - -test_programs += ifaceproperties -ifaceproperties_SOURCES = ifaceproperties.c testcommon.h - -# ----------------------------------------------------------------------------- - -# The marshalers test requires running a binary, so we cannot build it when -# cross-compiling - -glib_genmarshal = $(top_builddir)/gobject/glib-genmarshal - -test_programs += signals -signals_SOURCES = signals.c -nodist_signals_SOURCES = marshalers.c marshalers.h -signals.o: marshalers.h -CLEANFILES += marshalers.h marshalers.c -EXTRA_DIST += marshalers.list - -marshalers.h: $(srcdir)/marshalers.list Makefile.am - $(AM_V_GEN) $(glib_genmarshal) \ - --prefix=test \ - --valist-marshallers \ - --output=$@ \ - --quiet \ - --header \ - $< - -marshalers.c: $(srcdir)/marshalers.list marshalers.h Makefile.am - $(AM_V_GEN) $(glib_genmarshal) \ - --prefix=test \ - --valist-marshallers \ - --include-header=marshalers.h \ - --output=$@ \ - --quiet \ - --body \ - $< |