From 15f4d5c5b92a6fc7e6ab572ff50a709d921a73ff Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Thu, 27 Oct 2016 11:51:21 +0900 Subject: [PATCH] Imported Upstream version 1.35.9 Change-Id: I85198d6f6add55f6f2cbf5cc3e755164e449287a Signed-off-by: DongHun Kwak --- Makefile.in | 243 +- Makefile.introspection | 2 + aclocal.m4 | 158 +- build-aux/compile | 9 +- build-aux/config.guess | 41 +- build-aux/config.sub | 66 +- build-aux/depcomp | 453 +-- build-aux/missing | 405 +-- build-aux/py-compile | 20 +- build-aux/test-driver | 127 + build-aux/ylwrap | 183 +- build/Makefile.in | 118 +- build/win32/Makefile.am | 1 + build/win32/Makefile.in | 119 +- build/win32/Regress.def | 17 + build/win32/annotation.def | 94 +- build/win32/create_nonglib_gir.py | 72 + build/win32/foo.def | 95 +- build/win32/gengir.bat | 3 + build/win32/gimarshallingtests.def | 33 + build/win32/testinherit.def | 10 +- build/win32/vs10/Makefile.in | 30 +- build/win32/vs9/Makefile.in | 30 +- config.h.win32 | 6 +- configure | 136 +- configure.ac | 4 +- docs/Makefile.in | 118 +- docs/reference/Makefile.in | 35 +- docs/reference/gi-sections.txt | 1 + docs/reference/html/annotation-glossary.html | 3 + docs/reference/html/gi-GIBaseInfo.html | 6 +- docs/reference/html/gi-gir-reference.html | 10 +- docs/reference/html/gi-girepository.html | 33 + docs/reference/html/gi.devhelp2 | 1 + docs/reference/html/index.sgml | 2 + examples/glib-print.c | 60 +- gir/gio-2.0.c | 1461 +-------- gir/glib-2.0.c | 12 +- gir/gobject-2.0.c | 2 +- girepository/girepository.h | 1 + girepository/girepository.symbols | 1 + girepository/gitypelib.c | 91 +- giscanner/ast.py | 6 + giscanner/docmain.py | 2 +- giscanner/docwriter.py | 53 +- giscanner/dumper.py | 7 +- giscanner/girparser.py | 26 +- giscanner/girwriter.py | 28 +- giscanner/scannermain.py | 31 +- giscanner/sourcescanner.py | 3 +- giscanner/transformer.py | 50 +- gobject-introspection-1.0.pc | 2 +- gobject-introspection-no-export-1.0.pc | 2 +- m4/Makefile.in | 30 +- scannerparser.c | 6 +- tests/Makefile.in | 139 +- tests/gimarshallingtests.c | 3373 ++++++++++---------- tests/gimarshallingtests.h | 15 +- tests/offsets/Makefile.in | 95 +- tests/repository/Makefile.in | 541 +++- tests/repository/gitypelibtest.c | 409 +-- tests/scanner/Bar-1.0-expected.gir | 1 - tests/scanner/GetType-1.0-expected.gir | 1 - tests/scanner/GtkFrob-1.0-expected.gir | 1 - tests/scanner/Makefile.am | 9 +- tests/scanner/Makefile.in | 106 +- .../Regress.AnnotationObject.watch.page | 2 +- .../Regress.FooBUnion.get_contained_type.page | 48 + .../Regress.FooBUnion.new.page | 40 + .../Regress.FooEnumType.method.page | 48 + .../Regress.FooEnumType.returnv.page | 48 + .../Regress.FooError.quark.page | 40 + .../Regress.FooInterfaceIface.do_regress_foo.page | 25 + .../Regress.FooObject.take_all.page | 2 +- .../Regress.FooObjectClass.read_fn.page | 25 + .../Regress.FooObjectClass.virtual_method.page | 25 + ...Regress.FooSubInterfaceIface.destroy_event.page | 25 + .../Regress.FooSubInterfaceIface.do_bar.page | 25 + .../Regress.FooSubInterfaceIface.do_baz.page | 25 + .../Regress.TestABCError.quark.page | 40 + .../Regress.TestEnum.param.page | 48 + .../Regress.TestError.quark.page | 40 + .../Regress.TestObj-sig-with-array-len-prop.page | 44 + .../Regress.TestObjClass._regress_reserved1.page | 25 + .../Regress.TestObjClass._regress_reserved2.page | 25 + .../Regress.TestObjClass.allow_none_vfunc.page | 25 + .../Regress.TestObjClass.matrix.page | 25 + .../Regress.TestOtherError.quark.page | 40 + .../Regress.FooBUnion.get_contained_type.page | 42 + .../Regress.FooBUnion.new.page | 42 + .../Regress.FooEnumType.method.page | 50 + .../Regress.FooEnumType.returnv.page | 50 + .../Regress.FooError.quark.page | 42 + .../Regress.TestABCError.quark.page | 42 + .../Regress.TestEnum.param.page | 50 + .../Regress.TestError.quark.page | 42 + .../Regress.TestObj-sig-with-array-len-prop.page | 39 + .../Regress.TestOtherError.quark.page | 42 + .../Regress.FooBUnion.get_contained_type.page | 51 + .../Regress.FooEnumType.method.page | 51 + .../Regress.FooEnumType.returnv.page | 51 + .../Regress.FooError.quark.page | 42 + .../Regress.TestABCError.quark.page | 42 + .../Regress.TestEnum.param.page | 51 + .../Regress.TestError.quark.page | 42 + .../Regress.TestObj-sig-with-array-len-prop.page | 49 + .../Regress.TestOtherError.quark.page | 42 + tests/scanner/Regress-1.0-expected.gir | 24 +- tests/scanner/SLetter-1.0-expected.gir | 2 - tests/scanner/Utility-1.0-expected.gir | 1 - tests/scanner/WarnLib-1.0-expected.gir | 14 +- tests/scanner/gettype.c | 14 +- tests/scanner/regress.c | 22 + tests/warn/Makefile.am | 9 +- tests/warn/Makefile.in | 490 ++- tests/warn/warntestrunner | 8 + 116 files changed, 6346 insertions(+), 5038 deletions(-) create mode 100755 build-aux/test-driver create mode 100644 build/win32/create_nonglib_gir.py create mode 100644 tests/scanner/Regress-1.0-C-expected/Regress.FooBUnion.get_contained_type.page create mode 100644 tests/scanner/Regress-1.0-C-expected/Regress.FooBUnion.new.page create mode 100644 tests/scanner/Regress-1.0-C-expected/Regress.FooEnumType.method.page create mode 100644 tests/scanner/Regress-1.0-C-expected/Regress.FooEnumType.returnv.page create mode 100644 tests/scanner/Regress-1.0-C-expected/Regress.FooError.quark.page create mode 100644 tests/scanner/Regress-1.0-C-expected/Regress.FooInterfaceIface.do_regress_foo.page create mode 100644 tests/scanner/Regress-1.0-C-expected/Regress.FooObjectClass.read_fn.page create mode 100644 tests/scanner/Regress-1.0-C-expected/Regress.FooObjectClass.virtual_method.page create mode 100644 tests/scanner/Regress-1.0-C-expected/Regress.FooSubInterfaceIface.destroy_event.page create mode 100644 tests/scanner/Regress-1.0-C-expected/Regress.FooSubInterfaceIface.do_bar.page create mode 100644 tests/scanner/Regress-1.0-C-expected/Regress.FooSubInterfaceIface.do_baz.page create mode 100644 tests/scanner/Regress-1.0-C-expected/Regress.TestABCError.quark.page create mode 100644 tests/scanner/Regress-1.0-C-expected/Regress.TestEnum.param.page create mode 100644 tests/scanner/Regress-1.0-C-expected/Regress.TestError.quark.page create mode 100644 tests/scanner/Regress-1.0-C-expected/Regress.TestObj-sig-with-array-len-prop.page create mode 100644 tests/scanner/Regress-1.0-C-expected/Regress.TestObjClass._regress_reserved1.page create mode 100644 tests/scanner/Regress-1.0-C-expected/Regress.TestObjClass._regress_reserved2.page create mode 100644 tests/scanner/Regress-1.0-C-expected/Regress.TestObjClass.allow_none_vfunc.page create mode 100644 tests/scanner/Regress-1.0-C-expected/Regress.TestObjClass.matrix.page create mode 100644 tests/scanner/Regress-1.0-C-expected/Regress.TestOtherError.quark.page create mode 100644 tests/scanner/Regress-1.0-Gjs-expected/Regress.FooBUnion.get_contained_type.page create mode 100644 tests/scanner/Regress-1.0-Gjs-expected/Regress.FooBUnion.new.page create mode 100644 tests/scanner/Regress-1.0-Gjs-expected/Regress.FooEnumType.method.page create mode 100644 tests/scanner/Regress-1.0-Gjs-expected/Regress.FooEnumType.returnv.page create mode 100644 tests/scanner/Regress-1.0-Gjs-expected/Regress.FooError.quark.page create mode 100644 tests/scanner/Regress-1.0-Gjs-expected/Regress.TestABCError.quark.page create mode 100644 tests/scanner/Regress-1.0-Gjs-expected/Regress.TestEnum.param.page create mode 100644 tests/scanner/Regress-1.0-Gjs-expected/Regress.TestError.quark.page create mode 100644 tests/scanner/Regress-1.0-Gjs-expected/Regress.TestObj-sig-with-array-len-prop.page create mode 100644 tests/scanner/Regress-1.0-Gjs-expected/Regress.TestOtherError.quark.page create mode 100644 tests/scanner/Regress-1.0-Python-expected/Regress.FooBUnion.get_contained_type.page create mode 100644 tests/scanner/Regress-1.0-Python-expected/Regress.FooEnumType.method.page create mode 100644 tests/scanner/Regress-1.0-Python-expected/Regress.FooEnumType.returnv.page create mode 100644 tests/scanner/Regress-1.0-Python-expected/Regress.FooError.quark.page create mode 100644 tests/scanner/Regress-1.0-Python-expected/Regress.TestABCError.quark.page create mode 100644 tests/scanner/Regress-1.0-Python-expected/Regress.TestEnum.param.page create mode 100644 tests/scanner/Regress-1.0-Python-expected/Regress.TestError.quark.page create mode 100644 tests/scanner/Regress-1.0-Python-expected/Regress.TestObj-sig-with-array-len-prop.page create mode 100644 tests/scanner/Regress-1.0-Python-expected/Regress.TestOtherError.quark.page create mode 100755 tests/warn/warntestrunner diff --git a/Makefile.in b/Makefile.in index 3b9c4e3..ffbe8cd 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.12.2 from Makefile.am. +# Makefile.in generated by automake 1.13.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. @@ -108,32 +108,30 @@ host_triplet = @host@ check_PROGRAMS = bin_PROGRAMS = g-ir-compiler$(EXEEXT) g-ir-generate$(EXEEXT) noinst_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) glib-print$(EXEEXT) -DIST_COMMON = README $(am__configure_deps) $(dist_make_DATA) \ - $(girepo_HEADERS) $(nobase_dist_template_DATA) \ - $(pkgpyexec_PYTHON) $(srcdir)/Makefile-cmph.am \ - $(srcdir)/Makefile-examples.am $(srcdir)/Makefile-gir.am \ - $(srcdir)/Makefile-girepository.am \ - $(srcdir)/Makefile-giscanner.am $(srcdir)/Makefile-msvcproj.am \ - $(srcdir)/Makefile-tools.am $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/Makefile.introspection \ - $(srcdir)/common.mk $(srcdir)/config.h.in \ - $(srcdir)/config.h.win32.in \ +DIST_COMMON = $(srcdir)/common.mk $(srcdir)/Makefile.introspection \ + $(srcdir)/Makefile-cmph.am $(srcdir)/Makefile-girepository.am \ + $(srcdir)/Makefile-giscanner.am $(srcdir)/Makefile-examples.am \ + $(srcdir)/Makefile-gir.am $(srcdir)/Makefile-tools.am \ + $(srcdir)/Makefile-msvcproj.am $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(srcdir)/config.h.in \ $(srcdir)/gobject-introspection-1.0.pc.in \ $(srcdir)/gobject-introspection-no-export-1.0.pc.in \ + $(srcdir)/config.h.win32.in scannerlexer.c scannerparser.h \ + scannerparser.c $(top_srcdir)/build-aux/depcomp \ + $(top_srcdir)/build-aux/ylwrap $(pkgpyexec_PYTHON) \ + $(top_srcdir)/build-aux/py-compile $(dist_make_DATA) \ + $(nobase_dist_template_DATA) $(girepo_HEADERS) AUTHORS COPYING \ + ChangeLog NEWS README TODO build-aux/compile \ + build-aux/config.guess build-aux/config.sub build-aux/depcomp \ + build-aux/install-sh build-aux/missing build-aux/py-compile \ + build-aux/ylwrap build-aux/ltmain.sh \ $(top_srcdir)/build-aux/compile \ $(top_srcdir)/build-aux/config.guess \ $(top_srcdir)/build-aux/config.sub \ - $(top_srcdir)/build-aux/depcomp \ $(top_srcdir)/build-aux/install-sh \ $(top_srcdir)/build-aux/ltmain.sh \ - $(top_srcdir)/build-aux/missing \ - $(top_srcdir)/build-aux/py-compile \ - $(top_srcdir)/build-aux/ylwrap $(top_srcdir)/configure AUTHORS \ - COPYING ChangeLog NEWS TODO build-aux/compile \ - build-aux/config.guess build-aux/config.sub build-aux/depcomp \ - build-aux/install-sh build-aux/ltmain.sh build-aux/missing \ - build-aux/py-compile build-aux/ylwrap scannerlexer.c \ - scannerparser.c scannerparser.h + $(top_srcdir)/build-aux/missing @OS_WIN32_FALSE@am__append_1 = gi-dump-types # Windows requires Python extension modules to be explicitly @@ -406,19 +404,22 @@ DIST_SOURCES = $(_giscanner_la_SOURCES) $(libcmph_la_SOURCES) \ $(g_ir_compiler_SOURCES) $(g_ir_generate_SOURCES) \ $(am__gi_dump_types_SOURCES_DIST) $(glib_print_SOURCES) \ $(gthash_test_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__py_compile = PYTHON=$(PYTHON) $(SHELL) $(py_compile) +am__pep3147_tweak = \ + sed -e 's|\.py$$||' -e 's|[^/]*$$|__pycache__/&.*.py|' py_compile = $(top_srcdir)/build-aux/py-compile man1dir = $(mandir)/man1 NROFF = nroff @@ -429,9 +430,30 @@ DATA = $(dist_make_DATA) $(gdump_DATA) $(gir_DATA) $(m4_DATA) \ HEADERS = $(girepo_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir dist dist-all distcheck +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)config.h.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope @@ -1286,6 +1308,7 @@ clean-checkLTLIBRARIES: echo rm -f $${locs}; \ rm -f $${locs}; \ } + install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ @@ -1331,6 +1354,7 @@ clean-noinstLTLIBRARIES: echo rm -f $${locs}; \ rm -f $${locs}; \ } + install-pkgpyexecLTLIBRARIES: $(pkgpyexec_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(pkgpyexec_LTLIBRARIES)'; test -n "$(pkgpyexecdir)" || list=; \ @@ -1389,10 +1413,12 @@ install-binPROGRAMS: $(bin_PROGRAMS) fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -1413,7 +1439,8 @@ uninstall-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files @@ -2130,13 +2157,23 @@ install-pkgpyexecPYTHON: $(pkgpyexec_PYTHON) uninstall-pkgpyexecPYTHON: @$(NORMAL_UNINSTALL) @list='$(pkgpyexec_PYTHON)'; test -n "$(pkgpyexecdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ + py_files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$py_files" || exit 0; \ dir='$(DESTDIR)$(pkgpyexecdir)'; \ - filesc=`echo "$$files" | sed 's|$$|c|'`; \ - fileso=`echo "$$files" | sed 's|$$|o|'`; \ + pyc_files=`echo "$$py_files" | sed 's|$$|c|'`; \ + pyo_files=`echo "$$py_files" | sed 's|$$|o|'`; \ + py_files_pep3147=`echo "$$py_files" | $(am__pep3147_tweak)`; \ + echo "$$py_files_pep3147";\ + pyc_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|c|'`; \ + pyo_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|o|'`; \ st=0; \ - for files in "$$files" "$$filesc" "$$fileso"; do \ + for files in \ + "$$py_files" \ + "$$pyc_files" \ + "$$pyo_files" \ + "$$pyc_files_pep3147" \ + "$$pyo_files_pep3147" \ + ; do \ $(am__uninstall_files_from_dir) || st=$$?; \ done; \ exit $$st @@ -2361,7 +2398,7 @@ uninstall-girepoHEADERS: # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. -$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): +$(am__recursive_targets): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ @@ -2389,31 +2426,13 @@ $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done -cscopelist-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \ - done -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -2429,12 +2448,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -2446,15 +2460,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -2463,18 +2473,16 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" - cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) - clean-cscope: -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-recursive -cscope.files: clean-cscope cscopelist-recursive cscopelist - -cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP)'; \ +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ @@ -2492,19 +2500,6 @@ distclean-tags: -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the 'missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically 'make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -2620,9 +2615,9 @@ distcheck: dist *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod u+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ @@ -2823,24 +2818,22 @@ uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ uninstall-man: uninstall-man1 -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ - check-am cscopelist-recursive ctags-recursive install \ - install-am install-strip tags-recursive +.MAKE: $(am__recursive_targets) all check check-am install install-am \ + install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am check-local clean \ - clean-binPROGRAMS clean-checkLTLIBRARIES clean-checkPROGRAMS \ - clean-cscope clean-generic clean-libLTLIBRARIES clean-libtool \ +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--refresh check check-am check-local clean clean-binPROGRAMS \ + clean-checkLTLIBRARIES clean-checkPROGRAMS clean-cscope \ + clean-generic clean-libLTLIBRARIES clean-libtool \ clean-noinstLTLIBRARIES clean-noinstPROGRAMS \ - clean-pkgpyexecLTLIBRARIES cscope cscopelist \ - cscopelist-recursive ctags ctags-recursive dist dist-all \ - dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ dist-xz \ - dist-zip distcheck distclean distclean-compile \ - distclean-generic distclean-hdr distclean-libtool \ - distclean-tags distcleancheck distdir distuninstallcheck dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-binSCRIPTS install-data \ - install-data-am install-dist_makeDATA install-dvi \ + clean-pkgpyexecLTLIBRARIES cscope cscopelist-am ctags ctags-am \ + dist dist-all dist-bzip2 dist-gzip dist-lzip dist-shar \ + dist-tarZ dist-xz dist-zip distcheck distclean \ + distclean-compile distclean-generic distclean-hdr \ + distclean-libtool distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-binPROGRAMS install-binSCRIPTS \ + install-data install-data-am install-dist_makeDATA install-dvi \ install-dvi-am install-exec install-exec-am install-gdumpDATA \ install-girDATA install-girepoHEADERS install-html \ install-html-am install-info install-info-am \ @@ -2851,14 +2844,14 @@ uninstall-man: uninstall-man1 install-typelibsDATA installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-binSCRIPTS uninstall-dist_makeDATA \ - uninstall-gdumpDATA uninstall-girDATA uninstall-girepoHEADERS \ - uninstall-libLTLIBRARIES uninstall-m4DATA uninstall-man \ - uninstall-man1 uninstall-nobase_dist_templateDATA \ - uninstall-pkgconfigDATA uninstall-pkgpyexecLTLIBRARIES \ - uninstall-pkgpyexecPYTHON uninstall-typelibsDATA + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-binSCRIPTS \ + uninstall-dist_makeDATA uninstall-gdumpDATA uninstall-girDATA \ + uninstall-girepoHEADERS uninstall-libLTLIBRARIES \ + uninstall-m4DATA uninstall-man uninstall-man1 \ + uninstall-nobase_dist_templateDATA uninstall-pkgconfigDATA \ + uninstall-pkgpyexecLTLIBRARIES uninstall-pkgpyexecPYTHON \ + uninstall-typelibsDATA # Make sure the required variables are set, these should under normal @@ -2924,7 +2917,9 @@ $(1): $$($(_gir_name)_FILES) $(_gir_program) \ $(_gir_libraries) \ $($(_gir_name)_SCANNERFLAGS) \ + --cflags-begin \ $($(_gir_name)_CFLAGS) \ + --cflags-end \ $($(_gir_name)_LDFLAGS) \ $$^ \ --output $(1) diff --git a/Makefile.introspection b/Makefile.introspection index 567d5e9..b347337 100644 --- a/Makefile.introspection +++ b/Makefile.introspection @@ -142,7 +142,9 @@ $(1): $$($(_gir_name)_FILES) $(_gir_program) \ $(_gir_libraries) \ $($(_gir_name)_SCANNERFLAGS) \ + --cflags-begin \ $($(_gir_name)_CFLAGS) \ + --cflags-end \ $($(_gir_name)_LDFLAGS) \ $$^ \ --output $(1) diff --git a/aclocal.m4 b/aclocal.m4 index 4bf81a2..13dfef5 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.12.2 -*- Autoconf -*- +# generated automatically by aclocal 1.13.1 -*- Autoconf -*- # Copyright (C) 1996-2012 Free Software Foundation, Inc. @@ -11,6 +11,7 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, @@ -19,24 +20,22 @@ You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2012 Free Software Foundation, Inc. +# Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 8 - # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.12' +[am__api_version='1.13' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.12.2], [], +m4_if([$1], [1.13.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -52,21 +51,19 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.12.2])dnl +[AM_AUTOMAKE_VERSION([1.13.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. @@ -114,14 +111,12 @@ am_aux_dir=`cd $ac_aux_dir && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2012 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 10 - # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. @@ -147,13 +142,12 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2012 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 17 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, @@ -339,19 +333,18 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2012 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 6 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in @@ -416,14 +409,12 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 19 - # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. @@ -439,7 +430,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.62])dnl +[AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl @@ -469,8 +460,7 @@ AC_SUBST([CYGPATH_W]) dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], -[$0: two- and three-arguments forms are deprecated. For more info, see: -http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation]) + [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], @@ -524,18 +514,15 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl -dnl Support for Objective C++ was only introduced in Autoconf 2.65, -dnl but we still cater to Autoconf 2.62. -m4_ifdef([AC_PROG_OBJCXX], -[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], - m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) -_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the -dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl @@ -569,14 +556,12 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 8 - # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. @@ -592,14 +577,12 @@ if test x"${install_sh}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2012 Free Software Foundation, Inc. +# Copyright (C) 2003-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], @@ -616,14 +599,12 @@ AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 7 - # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. @@ -651,18 +632,14 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) ] ) -AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) - # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 5 - # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. @@ -705,14 +682,12 @@ AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) -# Copyright (C) 1999-2012 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 6 - # AM_PROG_CC_C_O # -------------- # Like AC_PROG_CC_C_O, but changed for automake. @@ -741,14 +716,12 @@ m4_define([AC_PROG_CC], # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2012 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 7 - # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], @@ -756,11 +729,10 @@ AC_DEFUN([AM_MISSING_PROG], $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) - # AM_MISSING_HAS_RUN # ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl @@ -773,8 +745,8 @@ if test x"${MISSING+set}" != xset; then esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) @@ -783,14 +755,12 @@ fi # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 6 - # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], @@ -814,13 +784,12 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2012 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 9 # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # --------------------------------------------------------------------------- @@ -849,7 +818,7 @@ AC_DEFUN([AM_PATH_PYTHON], dnl Find a Python interpreter. Python versions prior to 2.0 are not dnl supported. (2.0 was released on October 16, 2000). m4_define_default([_AM_PYTHON_INTERPRETER_LIST], -[python python2 python3 python3.2 python3.1 python3.0 python2.7 dnl +[python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 dnl python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0]) AC_ARG_VAR([PYTHON], [the Python interpreter]) @@ -918,6 +887,25 @@ AC_DEFUN([AM_PATH_PYTHON], [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`]) AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) + # Just factor out some code duplication. + am_python_setup_sysconfig="\ +import sys +# Prefer sysconfig over distutils.sysconfig, for better compatibility +# with python 3.x. See automake bug#10227. +try: + import sysconfig +except ImportError: + can_use_sysconfig = 0 +else: + can_use_sysconfig = 1 +# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs: +# +try: + from platform import python_implementation + if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7': + can_use_sysconfig = 0 +except ImportError: + pass" dnl Set up 4 directories: @@ -934,7 +922,14 @@ AC_DEFUN([AM_PATH_PYTHON], else am_py_prefix=$prefix fi - am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null` + am_cv_python_pythondir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` case $am_cv_python_pythondir in $am_py_prefix*) am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` @@ -969,7 +964,14 @@ AC_DEFUN([AM_PATH_PYTHON], else am_py_exec_prefix=$exec_prefix fi - am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null` + am_cv_python_pyexecdir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` case $am_cv_python_pyexecdir in $am_py_exec_prefix*) am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` @@ -1017,14 +1019,12 @@ for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]] sys.exit(sys.hexversion < minverhex)" AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) -# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 1 - # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. @@ -1038,14 +1038,12 @@ AC_DEFUN([AM_RUN_LOG], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 9 - # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], @@ -1121,14 +1119,12 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2012 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 3 - # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT @@ -1183,14 +1179,12 @@ AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't @@ -1213,14 +1207,12 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2012 Free Software Foundation, Inc. +# Copyright (C) 2006-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 3 - # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. @@ -1234,14 +1226,12 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2012 Free Software Foundation, Inc. +# Copyright (C) 2004-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 3 - # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. diff --git a/build-aux/compile b/build-aux/compile index 7b4a9a7..531136b 100755 --- a/build-aux/compile +++ b/build-aux/compile @@ -1,9 +1,9 @@ #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2012-03-05.13; # UTC +scriptversion=2012-10-14.11; # UTC -# Copyright (C) 1999-2012 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify @@ -112,6 +112,11 @@ func_cl_dashl () lib=$dir/$lib.lib break fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi done IFS=$save_IFS diff --git a/build-aux/config.guess b/build-aux/config.guess index c0adba9..1804e9f 100755 --- a/build-aux/config.guess +++ b/build-aux/config.guess @@ -2,13 +2,13 @@ # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. +# 2011, 2012, 2013 Free Software Foundation, Inc. -timestamp='2012-06-10' +timestamp='2012-12-29' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -22,19 +22,17 @@ timestamp='2012-06-10' # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). # -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. +# Originally written by Per Bothner. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# +# Please send patches with a ChangeLog entry to config-patches@gnu.org. + me=`echo "$0" | sed -e 's,.*/,,'` @@ -55,8 +53,8 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc. +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, +2012, 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -200,6 +198,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} @@ -302,7 +304,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) + arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) @@ -801,6 +803,9 @@ EOF i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; @@ -1201,6 +1206,9 @@ EOF BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; @@ -1330,9 +1338,6 @@ EOF exit ;; esac -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - eval $set_cc_for_build cat >$dummy.c <. @@ -26,11 +22,12 @@ timestamp='2012-04-18' # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. +# Please send patches with a ChangeLog entry to config-patches@gnu.org. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -74,8 +71,8 @@ version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc. +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, +2012, 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -123,7 +120,7 @@ esac maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) @@ -156,7 +153,7 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) + -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; @@ -259,8 +256,10 @@ case $basic_machine in | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | be32 | be64 \ + | arc \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ @@ -273,7 +272,7 @@ case $basic_machine in | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -389,7 +388,8 @@ case $basic_machine in | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -788,9 +788,13 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; - microblaze) + microblaze*) basic_machine=microblaze-xilinx ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; mingw32) basic_machine=i386-pc os=-mingw32 @@ -1019,7 +1023,11 @@ case $basic_machine in basic_machine=i586-unknown os=-pw32 ;; - rdos) + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) basic_machine=i386-pc os=-rdos ;; @@ -1352,15 +1360,15 @@ case $os in | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ + | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-uclibc* \ + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ diff --git a/build-aux/depcomp b/build-aux/depcomp index debb6ff..06b0882 100755 --- a/build-aux/depcomp +++ b/build-aux/depcomp @@ -1,9 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2012-03-27.16; # UTC +scriptversion=2012-10-18.11; # UTC -# Copyright (C) 1999-2012 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -27,9 +27,9 @@ scriptversion=2012-03-27.16; # UTC case $1 in '') - echo "$0: No command. Try '$0 --help' for more information." 1>&2 - exit 1; - ;; + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] @@ -56,11 +56,65 @@ EOF ;; esac +# Get the directory component of the given path, and save it in the +# global variables '$dir'. Note that this directory component will +# be either empty or ending with a '/' character. This is deliberate. +set_dir_from () +{ + case $1 in + */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; + *) dir=;; + esac +} + +# Get the suffix-stripped basename of the given path, and save it the +# global variable '$base'. +set_base_from () +{ + base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` +} + +# If no dependency file was actually created by the compiler invocation, +# we still have to create a dummy depfile, to avoid errors with the +# Makefile "include basename.Plo" scheme. +make_dummy_depfile () +{ + echo "#dummy" > "$depfile" +} + +# Factor out some common post-processing of the generated depfile. +# Requires the auxiliary global variable '$tmpdepfile' to be set. +aix_post_process_depfile () +{ + # If the compiler actually managed to produce a dependency file, + # post-process it. + if test -f "$tmpdepfile"; then + # Each line is of the form 'foo.o: dependency.h'. + # Do two passes, one to just change these to + # $object: dependency.h + # and one to simply output + # dependency.h: + # which is needed to avoid the deleted-header problem. + { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" + sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" + } > "$depfile" + rm -f "$tmpdepfile" + else + make_dummy_depfile + fi +} + # A tabulation character. tab=' ' # A newline character. nl=' ' +# Character ranges might be problematic outside the C locale. +# These definitions help. +upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ +lower=abcdefghijklmnopqrstuvwxyz +digits=0123456789 +alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 @@ -74,6 +128,9 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" +# Avoid interferences from the environment. +gccflag= dashmflag= + # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case @@ -85,32 +142,32 @@ if test "$depmode" = hp; then fi if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then - # This is just like msvisualcpp but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u='sed s,\\\\,/,g' - depmode=msvisualcpp + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then - # This is just like msvc7 but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u='sed s,\\\\,/,g' - depmode=msvc7 + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 fi if test "$depmode" = xlc; then - # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations. - gccflag=-qmakedep=gcc,-MF - depmode=gcc + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. + gccflag=-qmakedep=gcc,-MF + depmode=gcc fi case "$depmode" in @@ -133,8 +190,7 @@ gcc3) done "$@" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -142,13 +198,17 @@ gcc3) ;; gcc) +## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. +## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. +## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). +## -MM, not -M (despite what the docs say). Also, it might not be +## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then @@ -156,15 +216,14 @@ gcc) fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. + # The second -e expression handles DOS-style file names with drive + # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. @@ -173,15 +232,15 @@ gcc) ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. - tr ' ' "$nl" < "$tmpdepfile" | ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ - | sed -e 's/$/ :/' >> "$depfile" + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -199,8 +258,7 @@ sgi) "$@" -MDupdate "$tmpdepfile" fi stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -208,7 +266,6 @@ sgi) if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" - # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in @@ -216,19 +273,15 @@ sgi) # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr "$nl" ' ' >> "$depfile" + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ + | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" - # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> "$depfile" + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" + make_dummy_depfile fi rm -f "$tmpdepfile" ;; @@ -246,9 +299,8 @@ aix) # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + set_dir_from "$object" + set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u @@ -261,9 +313,7 @@ aix) "$@" -M fi stat=$? - - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi @@ -272,65 +322,113 @@ aix) do test -f "$tmpdepfile" && break done - if test -f "$tmpdepfile"; then - # Each line is of the form 'foo.o: dependent.h'. - # Do two passes, one to just change these to - # '$object: dependent.h' and one to simply 'dependent.h:'. - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" + aix_post_process_depfile + ;; + +tcc) + # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 + # FIXME: That version still under development at the moment of writing. + # Make that this statement remains true also for stable, released + # versions. + # It will wrap lines (doesn't matter whether long or short) with a + # trailing '\', as in: + # + # foo.o : \ + # foo.c \ + # foo.h \ + # + # It will put a trailing '\' even on the last line, and will use leading + # spaces rather than leading tabs (at least since its commit 0394caf7 + # "Emit spaces for -MD"). + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat fi + rm -f "$depfile" + # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. + # We have to change lines of the first kind to '$object: \'. + sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" + # And for each line of the second kind, we have to emit a 'dep.h:' + # dummy dependency, to avoid the deleted-header problem. + sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; -icc) - # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'. - # However on - # $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output +## The order of this option in the case statement is important, since the +## shell code in configure will try each of these formats in the order +## listed in this file. A plain '-MD' option would be understood by many +## compilers, so we must ensure this comes after the gcc and icc options. +pgcc) + # Portland's C compiler understands '-MD'. + # Will always output deps to 'file.d' where file is the root name of the + # source file under compilation, even if file resides in a subdirectory. + # The object file name does not affect the name of the '.d' file. + # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using '\': + # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... - # tcc 0.9.26 (FIXME still under development at the moment of writing) - # will emit a similar output, but also prepend the continuation lines - # with horizontal tabulation characters. - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else + set_dir_from "$object" + # Use the source, not the object, to determine the base name, since + # that's sadly what pgcc will do too. + set_base_from "$source" + tmpdepfile=$base.d + + # For projects that build the same source file twice into different object + # files, the pgcc approach of using the *source* file root name can cause + # problems in parallel builds. Use a locking strategy to avoid stomping on + # the same $tmpdepfile. + lockdir=$base.d-lock + trap " + echo '$0: caught signal, cleaning up...' >&2 + rmdir '$lockdir' + exit 1 + " 1 2 13 15 + numtries=100 + i=$numtries + while test $i -gt 0; do + # mkdir is a portable test-and-set. + if mkdir "$lockdir" 2>/dev/null; then + # This process acquired the lock. + "$@" -MD + stat=$? + # Release the lock. + rmdir "$lockdir" + break + else + # If the lock is being held by a different process, wait + # until the winning process is done or we timeout. + while test -d "$lockdir" && test $i -gt 0; do + sleep 1 + i=`expr $i - 1` + done + fi + i=`expr $i - 1` + done + trap - 1 2 13 15 + if test $i -le 0; then + echo "$0: failed to acquire lock after $numtries attempts" >&2 + echo "$0: check lockdir '$lockdir'" >&2 + exit 1 + fi + + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" - # Each line is of the form 'foo.o: dependent.h', - # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'. + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to - # '$object: dependent.h' and one to simply 'dependent.h:'. - sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \ - < "$tmpdepfile" > "$depfile" - sed ' - s/[ '"$tab"'][ '"$tab"']*/ /g - s/^ *// - s/ *\\*$// - s/^[^:]*: *// - /^$/d - /:$/d - s/$/ :/ - ' < "$tmpdepfile" >> "$depfile" + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -341,9 +439,8 @@ hp2) # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + set_dir_from "$object" + set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d @@ -354,8 +451,7 @@ hp2) "$@" +Maked fi stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi @@ -365,76 +461,61 @@ hp2) test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" else - echo "#dummy" > "$depfile" + make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in 'foo.d' instead, so we check for that too. - # Subdirectories are respected. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - - if test "$libtool" = yes; then - # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in 'foo.d' instead, so we check for that too. + # Subdirectories are respected. + set_dir_from "$object" + set_base_from "$object" + + if test "$libtool" = yes; then + # Libtool generates 2 separate objects for the 2 libraries. These + # two compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir$base.o.d # libtool 1.5 + tmpdepfile2=$dir.libs/$base.o.d # Likewise. + tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + # Same post-processing that is required for AIX mode. + aix_post_process_depfile + ;; msvc7) if test "$libtool" = yes; then @@ -445,8 +526,7 @@ msvc7) "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" - if test "$stat" = 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -523,13 +603,14 @@ dashmstdout) # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | - sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile" + sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" - tr ' ' "$nl" < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + # Some versions of the HPUX 10.20 sed can't process this sed invocation + # correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -582,10 +663,12 @@ makedepend) # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + # Some versions of the HPUX 10.20 sed can't process the last invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed '1,2d' "$tmpdepfile" \ + | tr ' ' "$nl" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; @@ -621,10 +704,10 @@ cpp) esac done - "$@" -E | - sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" + "$@" -E \ + | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" @@ -656,15 +739,15 @@ msvisualcpp) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; + set fnord "$@" + shift + shift + ;; *) - set fnord "$@" "$arg" - shift - shift - ;; + set fnord "$@" "$arg" + shift + shift + ;; esac done "$@" -E 2>/dev/null | diff --git a/build-aux/missing b/build-aux/missing index 9a55648..cdea514 100755 --- a/build-aux/missing +++ b/build-aux/missing @@ -1,10 +1,10 @@ #! /bin/sh -# Common stub for a few missing GNU programs while installing. +# Common wrapper for a few potentially missing GNU programs. -scriptversion=2012-01-06.18; # UTC +scriptversion=2012-06-26.16; # UTC -# Copyright (C) 1996-2012 Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -29,61 +29,33 @@ if test $# -eq 0; then exit 1 fi -run=: -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' -sed_minuso='s/.* -o \([^ ]*\).*/\1/p' - -# In the cases where this matters, 'missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi +case $1 in -msg="missing on your system" + --is-lightweight) + # Used by our autoconf macros to check whether the available missing + # script is modern enough. + exit 0 + ;; -case $1 in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; + --run) + # Back-compat with the calling convention used by older automake. + shift + ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... -Handle 'PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due +to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails Supported PROGRAM values: - aclocal touch file 'aclocal.m4' - autoconf touch file 'configure' - autoheader touch file 'config.h.in' - autom4te touch the output file, or create a stub one - automake touch all 'Makefile.in' files - bison create 'y.tab.[ch]', if possible, from existing .[ch] - flex create 'lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create 'lex.yy.c', if possible, from existing .c - makeinfo touch the output file - yacc create 'y.tab.[ch]', if possible, from existing .[ch] + aclocal autoconf autoheader autom4te automake makeinfo + bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. @@ -98,228 +70,141 @@ Send bug reports to ." ;; -*) - echo 1>&2 "$0: Unknown '$1' option" + echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac -# normalize program name to check for. -program=`echo "$1" | sed ' - s/^gnu-//; t - s/^gnu//; t - s/^g//; t'` - -# Now exit if we have it, but it failed. Also exit now if we -# don't have it and --version was passed (most likely to detect -# the program). This is about non-GNU programs, so use $1 not -# $program. -case $1 in - lex*|yacc*) - # Not GNU programs, they don't have --version. - ;; - - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running '$TOOL --version' or '$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $program in - aclocal*) - echo 1>&2 "\ -WARNING: '$1' is $msg. You should only need it if - you modified 'acinclude.m4' or '${configure_ac}'. You might want - to install the Automake and Perl packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf*) - echo 1>&2 "\ -WARNING: '$1' is $msg. You should only need it if - you modified '${configure_ac}'. You might want to install the - Autoconf and GNU m4 packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader*) - echo 1>&2 "\ -WARNING: '$1' is $msg. You should only need it if - you modified 'acconfig.h' or '${configure_ac}'. You might want - to install the Autoconf and GNU m4 packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case $f in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - echo 1>&2 "\ -WARNING: '$1' is $msg. You should only need it if - you modified 'Makefile.am', 'acinclude.m4' or '${configure_ac}'. - You might want to install the Automake and Perl packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te*) - echo 1>&2 "\ -WARNING: '$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get '$1' as part of Autoconf from any GNU - archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison*|yacc*) - echo 1>&2 "\ -WARNING: '$1' $msg. You should only need it if - you modified a '.y' file. You may need the Bison package - in order for those modifications to take effect. You can get - Bison from any GNU archive site." - rm -f y.tab.c y.tab.h - if test $# -ne 1; then - eval LASTARG=\${$#} - case $LASTARG in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if test ! -f y.tab.h; then - echo >y.tab.h - fi - if test ! -f y.tab.c; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex*|flex*) - echo 1>&2 "\ -WARNING: '$1' is $msg. You should only need it if - you modified a '.l' file. You may need the Flex package - in order for those modifications to take effect. You can get - Flex from any GNU archive site." - rm -f lex.yy.c - if test $# -ne 1; then - eval LASTARG=\${$#} - case $LASTARG in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if test ! -f lex.yy.c; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man*) - echo 1>&2 "\ -WARNING: '$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - Help2man package in order for those modifications to take - effect. You can get Help2man from any GNU archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit $? - fi - ;; - - makeinfo*) - echo 1>&2 "\ -WARNING: '$1' is $msg. You should only need it if - you modified a '.texi' or '.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy 'make' (AIX, - DU, IRIX). You might want to install the Texinfo package or - the GNU make package. Grab either from any GNU archive site." - # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -z "$file"; then - # ... or it is the one specified with @setfilename ... - infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n ' - /^@setfilename/{ - s/.* \([^ ]*\) *$/\1/ - p - q - }' $infile` - # ... or it is derived from the source name (dir/f.texi becomes f.info) - test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info - fi - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 - touch $file - ;; +# Run the given program, remember its exit status. +"$@"; st=$? + +# If it succeeded, we are done. +test $st -eq 0 && exit 0 + +# Also exit now if we it failed (or wasn't found), and '--version' was +# passed; such an option is passed most likely to detect whether the +# program is present and works. +case $2 in --version|--help) exit $st;; esac + +# Exit code 63 means version mismatch. This often happens when the user +# tries to use an ancient version of a tool on a file that requires a +# minimum version. +if test $st -eq 63; then + msg="probably too old" +elif test $st -eq 127; then + # Program was missing. + msg="missing on your system" +else + # Program was found and executed, but failed. Give up. + exit $st +fi - *) - echo 1>&2 "\ -WARNING: '$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the 'README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing '$1' program." - exit 1 +perl_URL=http://www.perl.org/ +flex_URL=http://flex.sourceforge.net/ +gnu_software_URL=http://www.gnu.org/software + +program_details () +{ + case $1 in + aclocal|automake) + echo "The '$1' program is part of the GNU Automake package:" + echo "<$gnu_software_URL/automake>" + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/autoconf>" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + autoconf|autom4te|autoheader) + echo "The '$1' program is part of the GNU Autoconf package:" + echo "<$gnu_software_URL/autoconf/>" + echo "It also requires GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + esac +} + +give_advice () +{ + # Normalize program name to check for. + normalized_program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + + printf '%s\n' "'$1' is $msg." + + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + case $normalized_program in + autoconf*) + echo "You should only need it if you modified 'configure.ac'," + echo "or m4 files included by it." + program_details 'autoconf' + ;; + autoheader*) + echo "You should only need it if you modified 'acconfig.h' or" + echo "$configure_deps." + program_details 'autoheader' + ;; + automake*) + echo "You should only need it if you modified 'Makefile.am' or" + echo "$configure_deps." + program_details 'automake' + ;; + aclocal*) + echo "You should only need it if you modified 'acinclude.m4' or" + echo "$configure_deps." + program_details 'aclocal' + ;; + autom4te*) + echo "You might have modified some maintainer files that require" + echo "the 'automa4te' program to be rebuilt." + program_details 'autom4te' + ;; + bison*|yacc*) + echo "You should only need it if you modified a '.y' file." + echo "You may want to install the GNU Bison package:" + echo "<$gnu_software_URL/bison/>" + ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; + help2man*) + echo "You should only need it if you modified a dependency" \ + "of a man page." + echo "You may want to install the GNU Help2man package:" + echo "<$gnu_software_URL/help2man/>" ;; -esac - -exit 0 + makeinfo*) + echo "You should only need it if you modified a '.texi' file, or" + echo "any other file indirectly affecting the aspect of the manual." + echo "You might want to install the Texinfo package:" + echo "<$gnu_software_URL/texinfo/>" + echo "The spurious makeinfo call might also be the consequence of" + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" + echo "want to install GNU make:" + echo "<$gnu_software_URL/make/>" + ;; + *) + echo "You might have modified some files without having the proper" + echo "tools for further handling them. Check the 'README' file, it" + echo "often tells you about the needed prerequisites for installing" + echo "this package. You may also peek at any GNU archive site, in" + echo "case some other package contains this missing '$1' program." + ;; + esac +} + +give_advice "$1" | sed -e '1s/^/WARNING: /' \ + -e '2,$s/^/ /' >&2 + +# Propagate the correct exit status (expected to be 127 for a program +# not found, 63 for a program that failed due to version mismatch). +exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) diff --git a/build-aux/py-compile b/build-aux/py-compile index 6916903..46ea866 100755 --- a/build-aux/py-compile +++ b/build-aux/py-compile @@ -3,7 +3,7 @@ scriptversion=2011-06-08.12; # UTC -# Copyright (C) 2000-2012 Free Software Foundation, Inc. +# Copyright (C) 2000-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -116,7 +116,7 @@ else fi $PYTHON -c " -import sys, os, py_compile +import sys, os, py_compile, imp files = '''$files''' @@ -129,12 +129,19 @@ for file in files.split(): continue sys.stdout.write(file) sys.stdout.flush() - py_compile.compile(filepath, filepath + 'c', path) + if hasattr(imp, 'get_tag'): + py_compile.compile(filepath, imp.cache_from_source(filepath), path) + else: + py_compile.compile(filepath, filepath + 'c', path) sys.stdout.write('\n')" || exit $? # this will fail for python < 1.5, but that doesn't matter ... $PYTHON -O -c " -import sys, os, py_compile +import sys, os, py_compile, imp + +# pypy does not use .pyo optimization +if hasattr(sys, 'pypy_translation_info'): + sys.exit(0) files = '''$files''' sys.stdout.write('Byte-compiling python modules (optimized versions) ...\n') @@ -146,7 +153,10 @@ for file in files.split(): continue sys.stdout.write(file) sys.stdout.flush() - py_compile.compile(filepath, filepath + 'o', path) + if hasattr(imp, 'get_tag'): + py_compile.compile(filepath, imp.cache_from_source(filepath, False), path) + else: + py_compile.compile(filepath, filepath + 'o', path) sys.stdout.write('\n')" 2>/dev/null || : # Local Variables: diff --git a/build-aux/test-driver b/build-aux/test-driver new file mode 100755 index 0000000..32bf39e --- /dev/null +++ b/build-aux/test-driver @@ -0,0 +1,127 @@ +#! /bin/sh +# test-driver - basic testsuite driver script. + +scriptversion=2012-06-27.10; # UTC + +# Copyright (C) 2011-2013 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +# Make unconditional expansion of undefined variables an error. This +# helps a lot in preventing typo-related bugs. +set -u + +usage_error () +{ + echo "$0: $*" >&2 + print_usage >&2 + exit 2 +} + +print_usage () +{ + cat <$log_file 2>&1 +estatus=$? +if test $enable_hard_errors = no && test $estatus -eq 99; then + estatus=1 +fi + +case $estatus:$expect_failure in + 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; + 0:*) col=$grn res=PASS recheck=no gcopy=no;; + 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; + 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; + *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; + *:*) col=$red res=FAIL recheck=yes gcopy=yes;; +esac + +# Report outcome to console. +echo "${col}${res}${std}: $test_name" + +# Register the test result, and other relevant metadata. +echo ":test-result: $res" > $trs_file +echo ":global-test-result: $res" >> $trs_file +echo ":recheck: $recheck" >> $trs_file +echo ":copy-in-global-log: $gcopy" >> $trs_file + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/build-aux/ylwrap b/build-aux/ylwrap index 6879d8d..1c4d776 100755 --- a/build-aux/ylwrap +++ b/build-aux/ylwrap @@ -1,9 +1,9 @@ #! /bin/sh # ylwrap - wrapper for lex/yacc invocations. -scriptversion=2011-08-25.18; # UTC +scriptversion=2012-12-21.17; # UTC -# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # Written by Tom Tromey . # @@ -29,6 +29,38 @@ scriptversion=2011-08-25.18; # UTC # bugs to or send patches to # . +get_dirname () +{ + case $1 in + */*|*\\*) printf '%s\n' "$1" | sed -e 's|\([\\/]\)[^\\/]*$|\1|';; + # Otherwise, we want the empty string (not "."). + esac +} + +# guard FILE +# ---------- +# The CPP macro used to guard inclusion of FILE. +guard() +{ + printf '%s\n' "$1" \ + | sed \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ + -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g' \ + -e 's/__*/_/g' +} + +# quote_for_sed [STRING] +# ---------------------- +# Return STRING (or stdin) quoted to be used as a sed pattern. +quote_for_sed () +{ + case $# in + 0) cat;; + 1) printf '%s\n' "$1";; + esac \ + | sed -e 's|[][\\.*]|\\&|g' +} + case "$1" in '') echo "$0: No files given. Try '$0 --help' for more information." 1>&2 @@ -62,19 +94,6 @@ EOF ;; esac -get_dirname () -{ - case $1 in - */*|*\\*) printf '%s\n' "$1" | sed -e 's,\([\\/]\)[^\\/]*$,\1,';; - # Otherwise, we want the empty string (not "."). - esac -} - -quote_for_sed () -{ - # FIXME: really we should care about more than '.' and '\'. - sed -e 's,[\\.],\\&,g' -} # The input. input="$1" @@ -90,15 +109,47 @@ case "$input" in input="`pwd`/$input" ;; esac +input_rx=`get_dirname "$input" | quote_for_sed` + +# Since DOS filename conventions don't allow two dots, +# the DOS version of Bison writes out y_tab.c instead of y.tab.c +# and y_tab.h instead of y.tab.h. Test to see if this is the case. +y_tab_nodot=false +if test -f y_tab.c || test -f y_tab.h; then + y_tab_nodot=true +fi + +# The parser itself, the first file, is the destination of the .y.c +# rule in the Makefile. +parser=$1 + +# A sed program to s/FROM/TO/g for all the FROM/TO so that, for +# instance, we rename #include "y.tab.h" into #include "parse.h" +# during the conversion from y.tab.c to parse.c. +sed_fix_filenames= + +# Also rename header guards, as Bison 2.7 for instance uses its header +# guard in its implementation file. +sed_fix_header_guards= -pairlist= while test "$#" -ne 0; do if test "$1" = "--"; then shift break fi - pairlist="$pairlist $1" + from=$1 + # Handle y_tab.c and y_tab.h output by DOS + if $y_tab_nodot; then + case $from in + "y.tab.c") from=y_tab.c;; + "y.tab.h") from=y_tab.h;; + esac + fi + shift + to=$1 shift + sed_fix_filenames="${sed_fix_filenames}s|"`quote_for_sed "$from"`"|$to|g;" + sed_fix_header_guards="${sed_fix_header_guards}s|"`guard "$from"`"|"`guard "$to"`"|g;" done # The program to run. @@ -129,90 +180,56 @@ esac ret=$? if test $ret -eq 0; then - set X $pairlist - shift - first=yes - # Since DOS filename conventions don't allow two dots, - # the DOS version of Bison writes out y_tab.c instead of y.tab.c - # and y_tab.h instead of y.tab.h. Test to see if this is the case. - y_tab_nodot="no" - if test -f y_tab.c || test -f y_tab.h; then - y_tab_nodot="yes" - fi - - input_rx=`get_dirname "$input" | quote_for_sed` - - while test "$#" -ne 0; do - from="$1" - # Handle y_tab.c and y_tab.h output by DOS - if test $y_tab_nodot = "yes"; then - if test $from = "y.tab.c"; then - from="y_tab.c" - else - if test $from = "y.tab.h"; then - from="y_tab.h" - fi - fi - fi + for from in * + do + to=`printf '%s\n' "$from" | sed "$sed_fix_filenames"` if test -f "$from"; then # If $2 is an absolute path name, then just use that, # otherwise prepend '../'. - case "$2" in - [\\/]* | ?:[\\/]*) target="$2";; - *) target="../$2";; + case $to in + [\\/]* | ?:[\\/]*) target=$to;; + *) target="../$to";; esac - # We do not want to overwrite a header file if it hasn't - # changed. This avoid useless recompilations. However the - # parser itself (the first file) should always be updated, - # because it is the destination of the .y.c rule in the - # Makefile. Divert the output of all other files to a temporary - # file so we can compare them to existing versions. - if test $first = no; then + # Do not overwrite unchanged header files to avoid useless + # recompilations. Always update the parser itself: it is the + # destination of the .y.c rule in the Makefile. Divert the + # output of all other files to a temporary file so we can + # compare them to existing versions. + if test $from != $parser; then realtarget="$target" - target="tmp-`echo $target | sed s/.*[\\/]//g`" + target=tmp-`printf '%s\n' "$target" | sed 's|.*[\\/]||g'` fi - # Munge "#line" or "#" directives. - # We don't want the resulting debug information to point at - # an absolute srcdir. - # We want to use the real output file name, not yy.lex.c for - # instance. - # We want the include guards to be adjusted too. - FROM=`echo "$from" | sed \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\ - -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'` - TARGET=`echo "$2" | sed \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\ - -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'` - - sed -e "/^#/!b" -e "s,$input_rx,$input_sub_rx," -e "s,$from,$2," \ - -e "s,$FROM,$TARGET," "$from" >"$target" || ret=$? - - # Check whether header files must be updated. - if test $first = no; then + + # Munge "#line" or "#" directives. Don't let the resulting + # debug information point at an absolute srcdir. Use the real + # output file name, not yy.lex.c for instance. Adjust the + # include guards too. + sed -e "/^#/!b" \ + -e "s|$input_rx|$input_sub_rx|" \ + -e "$sed_fix_filenames" \ + -e "$sed_fix_header_guards" \ + "$from" >"$target" || ret=$? + + # Check whether files must be updated. + if test "$from" != "$parser"; then if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then - echo "$2" is unchanged + echo "$to is unchanged" rm -f "$target" else - echo updating "$2" + echo "updating $to" mv -f "$target" "$realtarget" fi fi else - # A missing file is only an error for the first file. This - # is a blatant hack to let us support using "yacc -d". If -d - # is not specified, we don't want an error when the header - # file is "missing". - if test $first = yes; then + # A missing file is only an error for the parser. This is a + # blatant hack to let us support using "yacc -d". If -d is not + # specified, don't fail when the header file is "missing". + if test "$from" = "$parser"; then ret=1 fi fi - shift - shift - first=no done -else - ret=$? fi # Remove the directory. diff --git a/build/Makefile.in b/build/Makefile.in index b44fb52..3dbfc8e 100644 --- a/build/Makefile.in +++ b/build/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.12.2 from Makefile.am. +# Makefile.in generated by automake 1.13.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. @@ -50,7 +50,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = build -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -77,13 +77,14 @@ am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -91,9 +92,29 @@ am__can_run_installinfo = \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -344,7 +365,7 @@ clean-libtool: # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. -$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): +$(am__recursive_targets): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ @@ -372,31 +393,13 @@ $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done -cscopelist-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \ - done -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -412,12 +415,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -429,15 +427,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -446,9 +440,10 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive -cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP)'; \ +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ @@ -620,23 +615,20 @@ ps-am: uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \ - cscopelist-recursive ctags-recursive install-am install-strip \ - tags-recursive +.MAKE: $(am__recursive_targets) install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - cscopelist cscopelist-recursive ctags ctags-recursive \ - distclean distclean-generic distclean-libtool distclean-tags \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-dvi \ +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags tags-recursive uninstall uninstall-am + ps ps-am tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/build/win32/Makefile.am b/build/win32/Makefile.am index 499c5cf..f404aa1 100644 --- a/build/win32/Makefile.am +++ b/build/win32/Makefile.am @@ -5,6 +5,7 @@ EXTRA_DIST = \ everything.def \ foo.def \ gengir.bat \ + create_nonglib_gir.py \ gettype.def \ gimarshallingtests.def \ gtkfrob.def \ diff --git a/build/win32/Makefile.in b/build/win32/Makefile.in index 049e950..207e8a3 100644 --- a/build/win32/Makefile.in +++ b/build/win32/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.12.2 from Makefile.am. +# Makefile.in generated by automake 1.13.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. @@ -50,7 +50,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = build/win32 -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -77,13 +77,14 @@ am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -91,9 +92,29 @@ am__can_run_installinfo = \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -303,6 +324,7 @@ EXTRA_DIST = \ everything.def \ foo.def \ gengir.bat \ + create_nonglib_gir.py \ gettype.def \ gimarshallingtests.def \ gtkfrob.def \ @@ -358,7 +380,7 @@ clean-libtool: # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. -$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): +$(am__recursive_targets): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ @@ -386,31 +408,13 @@ $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done -cscopelist-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \ - done -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -426,12 +430,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -443,15 +442,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -460,9 +455,10 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive -cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP)'; \ +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ @@ -634,23 +630,20 @@ ps-am: uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \ - cscopelist-recursive ctags-recursive install-am install-strip \ - tags-recursive +.MAKE: $(am__recursive_targets) install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - cscopelist cscopelist-recursive ctags ctags-recursive \ - distclean distclean-generic distclean-libtool distclean-tags \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-dvi \ +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags tags-recursive uninstall uninstall-am + ps ps-am tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/build/win32/Regress.def b/build/win32/Regress.def index ebef4e0..693f053 100644 --- a/build/win32/Regress.def +++ b/build/win32/Regress.def @@ -138,6 +138,7 @@ regress_test_unsigned_enum_param regress_global_get_flags_out regress_test_struct_a_clone +regress_test_struct_a_parse regress_test_struct_b_clone @@ -163,6 +164,14 @@ regress_test_boxed_b_get_type regress_test_boxed_b_new regress_test_boxed_b_copy +regress_test_boxed_c_get_type +regress_test_boxed_c_new + +regress_test_boxed_d_get_type +regress_test_boxed_d_new +regress_test_boxed_d_copy +regress_test_boxed_d_free +regress_test_boxed_d_get_magic regress_test_obj_get_type regress_test_obj_new @@ -170,6 +179,9 @@ regress_constructor regress_test_obj_new_from_file regress_test_obj_set_bare regress_test_obj_emit_sig_with_obj +regress_test_obj_emit_sig_with_foreign_struct +regress_test_obj_emit_sig_with_int64 +regress_test_obj_emit_sig_with_uint64 regress_test_obj_instance_method regress_test_obj_static_method regress_forced_method @@ -189,6 +201,7 @@ regress_test_sub_obj_get_type regress_test_sub_obj_new regress_test_sub_obj_unset_bare regress_test_sub_obj_instance_method +regress_test_skip_unannotated_callback regress_test_fundamental_object_get_type regress_test_fundamental_object_ref @@ -206,6 +219,7 @@ regress_test_multi_callback regress_test_array_callback regress_test_callback_user_data regress_test_callback_destroy_notify +regress_test_callback_destroy_notify_no_user_data regress_test_callback_thaw_notifications regress_test_callback_async @@ -253,3 +267,6 @@ regress_test_boxed_c_get_type regress_test_unconventional_error_get_type regress_test_abc_error_get_type regress_test_error_get_type + + +regress_test_versioning diff --git a/build/win32/annotation.def b/build/win32/annotation.def index c4e4594..2745228 100644 --- a/build/win32/annotation.def +++ b/build/win32/annotation.def @@ -1,48 +1,48 @@ EXPORTS -annotation_object_get_type -annotation_object_method -annotation_object_out -annotation_object_create_object -annotation_object_allow_none -annotation_object_notrans -annotation_object_inout -annotation_object_inout2 -annotation_object_inout3 -annotation_object_in -annotation_object_calleeowns -annotation_object_calleesowns -annotation_object_get_strings -annotation_object_get_hash -annotation_object_with_voidp -annotation_object_get_objects -annotation_object_use_buffer -annotation_object_compute_sum -annotation_object_compute_sum_n -annotation_object_compute_sum_nz -annotation_object_parse_args -annotation_object_string_out -annotation_object_foreach -annotation_object_set_data -annotation_object_set_data2 -annotation_object_set_data3 -annotation_object_do_not_use -annotation_object_watch -annotation_object_watch_full -annotation_object_hidden_self -annotation_init -annotation_return_array -annotation_versioned -annotation_string_zero_terminated -annotation_string_zero_terminated_out -annotation_string_array_length -annotation_object_extra_annos -annotation_custom_destroy -annotation_get_source_file -annotation_set_source_file -annotation_attribute_func -annotation_invalid_annotation -annotation_ptr_array -annotation_test_parsing_bug630862 -annotation_space_after_comment_bug631690 -annotation_return_filename -annotation_transfer_floating +regress_annotation_object_get_type +regress_annotation_object_method +regress_annotation_object_out +regress_annotation_object_create_object +regress_annotation_object_allow_none +regress_annotation_object_notrans +regress_annotation_object_inout +regress_annotation_object_inout2 +regress_annotation_object_inout3 +regress_annotation_object_in +regress_annotation_object_calleeowns +regress_annotation_object_calleesowns +regress_annotation_object_get_strings +regress_annotation_object_get_hash +regress_annotation_object_with_voidp +regress_annotation_object_get_objects +regress_annotation_object_use_buffer +regress_annotation_object_compute_sum +regress_annotation_object_compute_sum_n +regress_annotation_object_compute_sum_nz +regress_annotation_object_parse_args +regress_annotation_object_string_out +regress_annotation_object_foreach +regress_annotation_object_set_data +regress_annotation_object_set_data2 +regress_annotation_object_set_data3 +regress_annotation_object_do_not_use +regress_annotation_object_watch +regress_annotation_object_watch_full +regress_annotation_object_hidden_self +regress_annotation_init +regress_annotation_return_array +regress_annotation_versioned +regress_annotation_string_zero_terminated +regress_annotation_string_zero_terminated_out +regress_annotation_string_array_length +regress_annotation_object_extra_annos +regress_annotation_custom_destroy +regress_annotation_get_source_file +regress_annotation_set_source_file +regress_annotation_attribute_func +regress_annotation_invalid_regress_annotation +regress_annotation_ptr_array +regress_annotation_test_parsing_bug630862 +regress_annotation_space_after_comment_bug631690 +regress_annotation_return_filename +regress_annotation_transfer_floating diff --git a/build/win32/create_nonglib_gir.py b/build/win32/create_nonglib_gir.py new file mode 100644 index 0000000..e3df714 --- /dev/null +++ b/build/win32/create_nonglib_gir.py @@ -0,0 +1,72 @@ +#!/usr/bin/python +# +# Expand the bundled *.gir.in files +# for use in Visual C++ builds of G-I +# +# Author: Fan, Chun-wei +# Date: January 21, 2013 +# +# (Adapted from setup.py in +# $(glib_src_root)/build/win32/setup.py written by Shixin Zeng) + +import os +import sys +import re +import string +import subprocess +import optparse + +def process_in(src, dest, vars): + RE_VARS = re.compile(r'%(\w+?)%') + with open(src, 'r') as s: + with open(dest, 'w') as d: + for i in s: + i = RE_VARS.sub(lambda x: str(vars[x.group(1)]), i) + d.write(i) + +def get_vsver(vsver): + return { + '9': '9', + '10': '10', + '11': '11', + '2008': '9', + '2010': '10', + '2012': '11', + }.get(vsver, '0') + +def parent_dir(path): + if not os.path.isabs(path): + path = os.path.abspath(path) + if os.path.isfile(path): + path = os.path.dirname(path) + return os.path.split(path)[0] + +def setup_vars_cairo(src, dest, vsver): + vars = {} + vars['CAIRO_GIR_PACKAGE'] = 'cairo-gobject' + vars['CAIRO_SHARED_LIBRARY'] = '%s-vs%s.dll' % (vars['CAIRO_GIR_PACKAGE'], vsver) + process_in (src, dest, vars) + +def main(argv): + parser = optparse.OptionParser() + parser.add_option('--vsver', dest='vsver', action='store', help='Version of Visual Studio used, 9 or 2008 for VS 2008, 10 or 2010 for VS2010, 11 or 2012 for VS2012') + opt, args = parser.parse_args(argv) + if opt.vsver is None: + print ('vsver must be specified. Please use %s -h to see the valid values' % os.path.basename(__file__)) + sys.exit() + vsver = get_vsver(opt.vsver) + if vsver is '0': + print ('You must specify a valid vsver. Please use %s -h to see the valid values' % os.path.basename(__file__)) + sys.exit() + + # Get the srcroot and the path where the bundled .gir files reside in the package + srcroot = parent_dir(parent_dir(__file__)) + preset_gir_path = os.path.join(srcroot, 'gir') + + # Set up variables in cairo-1.0.gir.in to produce cairo-1.0.gir + setup_vars_cairo(os.path.join(preset_gir_path, 'cairo-1.0.gir.in'), + os.path.join(preset_gir_path, 'cairo-1.0.gir'), + vsver) + +if __name__ == '__main__': + sys.exit(main(sys.argv)) diff --git a/build/win32/foo.def b/build/win32/foo.def index afa66ae..cba3e2a 100644 --- a/build/win32/foo.def +++ b/build/win32/foo.def @@ -1,49 +1,48 @@ EXPORTS -foo_interface_do_foo -foo_interface_static_method -foo_sub_interface_get_type -foo_sub_interface_do_bar -foo_sub_interface_do_moo -foo_sub_interface_do_baz -foo_init -foo_object_get_type -foo_object_new -foo_object_external_type -foo_object_new_as_super -foo_object_take_all -foo_object_new_cookie -foo_object_is_it_time_yet -foo_object_get_name -foo_object_dup_name -foo_object_read -foo_object_skipped_method -foo_subobject_get_type -foo_object_get_default -foo_buffer_get_type -foo_buffer_some_method -foo_other_object_get_type -foo_not_a_constructor_new -foo_enum_type_get_type -foo_flags_type_get_type -foo_boxed_get_type -foo_boxed_new -foo_boxed_method -foo_dbus_data_get_type -foo_rectangle_add -foo_rectangle_new -foo_brect_get_type -foo_bunion_get_type -foo_test_string_array -foo_test_string_array_with_g -foo_test_array -foo_test_varargs_callback -foo_test_varargs_callback2 -foo_test_varargs_callback3 -foo_error_get_type -foo_error_quark -foo_some_variant -foo_skip_me -foo_foreign_struct_new -foo_foreign_struct_copy -foo_object_append_new_stack_layer -foo_interface_get_type +regress_foo_interface_do_regress_foo +regress_foo_interface_static_method +regress_foo_sub_interface_get_type +regress_foo_sub_interface_do_bar +regress_foo_sub_interface_do_baz +regress_foo_init +regress_foo_object_get_type +regress_foo_object_new +regress_foo_object_external_type +regress_foo_object_new_as_super +regress_foo_object_take_all +regress_foo_object_new_cookie +regress_foo_object_is_it_time_yet +regress_foo_object_get_name +regress_foo_object_dup_name +regress_foo_object_read +regress_foo_object_skipped_method +regress_foo_subobject_get_type +regress_foo_object_get_default +regress_foo_buffer_get_type +regress_foo_buffer_some_method +regress_foo_other_object_get_type +regress_foo_not_a_constructor_new +regress_foo_enum_type_get_type +regress_foo_flags_type_get_type +regress_foo_boxed_get_type +regress_foo_boxed_new +regress_foo_boxed_method +regress_foo_dbus_data_get_type +regress_foo_rectangle_add +regress_foo_rectangle_new +regress_foo_brect_get_type +regress_foo_bunion_get_type +regress_foo_test_string_array +regress_foo_test_string_array_with_g +regress_foo_test_array +regress_foo_test_varargs_callback +regress_foo_test_varargs_callback2 +regress_foo_test_varargs_callback3 +regress_foo_error_get_type +regress_foo_error_quark +regress_foo_some_variant +regress_foo_skip_me +regress_foo_foreign_struct_new +regress_foo_foreign_struct_copy +regress_foo_object_append_new_stack_layer +regress_foo_interface_get_type diff --git a/build/win32/gengir.bat b/build/win32/gengir.bat index 70c5b85..f7eedbf 100644 --- a/build/win32/gengir.bat +++ b/build/win32/gengir.bat @@ -257,8 +257,10 @@ g-ir-compiler --includedir=. --debug --verbose Gio-2.0.gir -o Gio-2.0.typelib g-ir-compiler --includedir=. --debug --verbose GIRepository-2.0.gir -o GIRepository-2.0.typelib rem Now process the bundled .gir files +python create_nonglib_gir.py --vsver=%VSVER% set CURRDIR=%CD% cd ..\..\gir +g-ir-compiler --includedir=. --debug --verbose cairo-1.0.gir -o cairo-1.0.typelib g-ir-compiler --includedir=. --debug --verbose freetype2-2.0.gir -o freetype2-2.0.typelib g-ir-compiler --includedir=. --debug --verbose GL-1.0.gir -o GL-1.0.typelib g-ir-compiler --includedir=. --debug --verbose libxml2-2.0.gir -o libxml2-2.0.typelib @@ -271,6 +273,7 @@ move /y *.gir ..\..\build\win32\vs%VSVER%\%CONF%\%PLAT%\share\gir-1.0\ copy /y ..\..\gir\freetype2-2.0.gir ..\..\build\win32\vs%VSVER%\%CONF%\%PLAT%\share\gir-1.0\ copy /y ..\..\gir\GL-1.0.gir ..\..\build\win32\vs%VSVER%\%CONF%\%PLAT%\share\gir-1.0\ copy /y ..\..\gir\libxml2-2.0.gir ..\..\build\win32\vs%VSVER%\%CONF%\%PLAT%\share\gir-1.0\ +copy /y ..\..\gir\cairo-1.0.gir ..\..\build\win32\vs%VSVER%\%CONF%\%PLAT%\share\gir-1.0\ mkdir ..\..\build\win32\vs%VSVER%\%CONF%\%PLAT%\lib\girepository-1.0 move /y *.typelib ..\..\build\win32\vs%VSVER%\%CONF%\%PLAT%\lib\girepository-1.0\ diff --git a/build/win32/gimarshallingtests.def b/build/win32/gimarshallingtests.def index f957b5a..268284d 100644 --- a/build/win32/gimarshallingtests.def +++ b/build/win32/gimarshallingtests.def @@ -206,6 +206,7 @@ gi_marshalling_tests_utf8_dangling_out gi_marshalling_tests_utf8_none_inout gi_marshalling_tests_utf8_full_inout +gi_marshalling_tests_utf8_as_uint8array_in gi_marshalling_tests_filename_list_return @@ -262,6 +263,8 @@ gi_marshalling_tests_array_fixed_out_struct gi_marshalling_tests_array_fixed_inout +gi_marshalling_tests_array_in_nonzero_nonlen + gi_marshalling_tests_array_return gi_marshalling_tests_array_return_etc @@ -272,6 +275,7 @@ gi_marshalling_tests_array_string_in gi_marshalling_tests_array_uint8_in gi_marshalling_tests_array_struct_in gi_marshalling_tests_array_struct_take_in +gi_marshalling_tests_array_struct_value_in gi_marshalling_tests_array_simple_struct_in gi_marshalling_tests_multi_array_key_value_in gi_marshalling_tests_array_enum_in @@ -303,16 +307,19 @@ gi_marshalling_tests_array_gvariant_full_in gi_marshalling_tests_garray_int_none_return +gi_marshalling_tests_garray_uint64_none_return gi_marshalling_tests_garray_utf8_none_return gi_marshalling_tests_garray_utf8_container_return gi_marshalling_tests_garray_utf8_full_return gi_marshalling_tests_garray_int_none_in +gi_marshalling_tests_garray_uint64_none_in gi_marshalling_tests_garray_utf8_none_in gi_marshalling_tests_garray_utf8_none_out gi_marshalling_tests_garray_utf8_container_out gi_marshalling_tests_garray_utf8_full_out +gi_marshalling_tests_garray_utf8_full_out_caller_allocated gi_marshalling_tests_garray_utf8_none_inout gi_marshalling_tests_garray_utf8_container_inout @@ -346,11 +353,13 @@ gi_marshalling_tests_gstrv_inout gi_marshalling_tests_glist_int_none_return +gi_marshalling_tests_glist_uint32_none_return gi_marshalling_tests_glist_utf8_none_return gi_marshalling_tests_glist_utf8_container_return gi_marshalling_tests_glist_utf8_full_return gi_marshalling_tests_glist_int_none_in +gi_marshalling_tests_glist_uint32_none_in gi_marshalling_tests_glist_utf8_none_in gi_marshalling_tests_glist_utf8_none_out @@ -401,10 +410,13 @@ gi_marshalling_tests_gvalue_return gi_marshalling_tests_gvalue_in gi_marshalling_tests_gvalue_in_with_type +gi_marshalling_tests_gvalue_int64_in +gi_marshalling_tests_gvalue_int64_out gi_marshalling_tests_gvalue_in_enum gi_marshalling_tests_gvalue_out +gi_marshalling_tests_gvalue_out_caller_allocates gi_marshalling_tests_gvalue_inout @@ -469,6 +481,13 @@ gi_marshalling_tests_object_method gi_marshalling_tests_object_overridden_method gi_marshalling_tests_object_new +gi_marshalling_tests_object_get_ref_info_for_vfunc_return_object_transfer_none +gi_marshalling_tests_object_get_ref_info_for_vfunc_return_object_transfer_full +gi_marshalling_tests_object_get_ref_info_for_vfunc_out_object_transfer_none +gi_marshalling_tests_object_get_ref_info_for_vfunc_out_object_transfer_full +gi_marshalling_tests_object_get_ref_info_for_vfunc_in_object_transfer_none +gi_marshalling_tests_object_get_ref_info_for_vfunc_in_object_transfer_full + gi_marshalling_tests_object_method_array_in gi_marshalling_tests_object_method_array_out gi_marshalling_tests_object_method_array_inout @@ -476,11 +495,17 @@ gi_marshalling_tests_object_method_array_return gi_marshalling_tests_object_method_int8_in gi_marshalling_tests_object_method_int8_out +gi_marshalling_tests_object_method_int8_arg_and_out_caller +gi_marshalling_tests_object_method_int8_arg_and_out_callee +gi_marshalling_tests_object_method_str_arg_out_ret gi_marshalling_tests_object_method_with_default_implementation +;gi_marshalling_tests_object_method_variant_array_in ;unimplemented gi_marshalling_tests_object_vfunc_return_value_only gi_marshalling_tests_object_vfunc_one_out_parameter gi_marshalling_tests_object_vfunc_multiple_out_parameters +gi_marshalling_tests_object_vfunc_caller_allocated_out_parameter +gi_marshalling_tests_object_vfunc_array_out_parameter gi_marshalling_tests_object_vfunc_return_value_and_one_out_parameter gi_marshalling_tests_object_vfunc_return_value_and_multiple_out_parameters gi_marshalling_tests_object_vfunc_meth_with_error @@ -548,3 +573,11 @@ gi_marshalling_tests_overrides_object_returnv gi_marshalling_tests_properties_object_get_type gi_marshalling_tests_properties_object_new gi_marshalling_tests_interface3_get_type +gi_marshalling_tests_interface3_test_variant_array_in + +gi_marshalling_tests_param_spec_return +gi_marshalling_tests_param_spec_out +gi_marshalling_tests_param_spec_in_bool + +gi_marshalling_tests_gbytes_full_return +gi_marshalling_tests_gbytes_none_in \ No newline at end of file diff --git a/build/win32/testinherit.def b/build/win32/testinherit.def index 633a4e3..8881dab 100644 --- a/build/win32/testinherit.def +++ b/build/win32/testinherit.def @@ -1,6 +1,6 @@ EXPORTS -test_inherit_drawable_get_type -test_inherit_drawable_do_foo -test_inherit_drawable_get_origin -test_inherit_drawable_get_size -test_inherit_drawable_do_foo_maybe_throw +regress_test_inherit_drawable_get_type +regress_test_inherit_drawable_do_foo +regress_test_inherit_drawable_get_origin +regress_test_inherit_drawable_get_size +regress_test_inherit_drawable_do_foo_maybe_throw diff --git a/build/win32/vs10/Makefile.in b/build/win32/vs10/Makefile.in index dc2fa84..b320134 100644 --- a/build/win32/vs10/Makefile.in +++ b/build/win32/vs10/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.12.2 from Makefile.am. +# Makefile.in generated by automake 1.13.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. @@ -50,7 +50,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = build/win32/vs10 -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -82,6 +82,7 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -339,11 +340,9 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: cscope cscopelist: @@ -482,15 +481,16 @@ uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am gir.props: $(top_srcdir)/build/win32/vs10/gir.propsin gir.vs10.install diff --git a/build/win32/vs9/Makefile.in b/build/win32/vs9/Makefile.in index f0c675b..3e269d3 100644 --- a/build/win32/vs9/Makefile.in +++ b/build/win32/vs9/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.12.2 from Makefile.am. +# Makefile.in generated by automake 1.13.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. @@ -50,7 +50,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = build/win32/vs9 -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -82,6 +82,7 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -322,11 +323,9 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: cscope cscopelist: @@ -465,15 +464,16 @@ uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am gir.vsprops: $(top_srcdir)/build/win32/vs9/gir.vspropsin gir.vs9.install diff --git a/config.h.win32 b/config.h.win32 index e566356..11a06c6 100644 --- a/config.h.win32 +++ b/config.h.win32 @@ -96,7 +96,7 @@ #define PACKAGE_NAME "gobject-introspection" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "gojbect-introspection 1.35.8" +#define PACKAGE_STRING "gojbect-introspection 1.35.9" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "gobject-introspection" @@ -105,7 +105,7 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.35.8" +#define PACKAGE_VERSION "1.35.9" /* Define to the platform's shared library suffix */ #define SHLIB_SUFFIX ".dll" @@ -126,7 +126,7 @@ #define STDC_HEADERS 1 /* Version number of package */ -#define VERSION "1.35.8" +#define VERSION "1.35.9" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ diff --git a/configure b/configure index 81cbc93..4258bff 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for gobject-introspection 1.35.8. +# Generated by GNU Autoconf 2.69 for gobject-introspection 1.35.9. # # Report bugs to . # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='gobject-introspection' PACKAGE_TARNAME='gobject-introspection' -PACKAGE_VERSION='1.35.8' -PACKAGE_STRING='gobject-introspection 1.35.8' +PACKAGE_VERSION='1.35.9' +PACKAGE_STRING='gobject-introspection 1.35.9' PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=glib&component=introspection' PACKAGE_URL='' @@ -762,13 +762,13 @@ build_os build_vendor build_cpu build +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V -MAINT -MAINTAINER_MODE_FALSE -MAINTAINER_MODE_TRUE am__untar am__tar AMTAR @@ -833,8 +833,8 @@ SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking -enable_maintainer_mode enable_silent_rules +enable_maintainer_mode enable_dependency_tracking enable_shared enable_static @@ -1425,7 +1425,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures gobject-introspection 1.35.8 to adapt to many kinds of systems. +\`configure' configures gobject-introspection 1.35.9 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1496,7 +1496,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of gobject-introspection 1.35.8:";; + short | recursive ) echo "Configuration of gobject-introspection 1.35.9:";; esac cat <<\_ACEOF @@ -1504,11 +1504,11 @@ Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") --disable-maintainer-mode disable make rules and dependencies not useful (and sometimes confusing) to the casual installer - --enable-silent-rules less verbose build output (undo: "make V=1") - --disable-silent-rules verbose build output (undo: "make V=0") --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking @@ -1650,7 +1650,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -gobject-introspection configure 1.35.8 +gobject-introspection configure 1.35.9 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2202,7 +2202,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by gobject-introspection $as_me 1.35.8, which was +It was created by gobject-introspection $as_me 1.35.9, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2584,7 +2584,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. -am__api_version='1.12' +am__api_version='1.13' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -2768,8 +2768,8 @@ if test x"${MISSING+set}" != xset; then esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 @@ -3009,6 +3009,45 @@ else fi rmdir .tst 2>/dev/null +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." @@ -3031,7 +3070,7 @@ fi # Define the identity of the package. PACKAGE='gobject-introspection' - VERSION='1.35.8' + VERSION='1.35.9' cat >>confdefs.h <<_ACEOF @@ -12569,12 +12608,12 @@ if test -n "$GLIB_CFLAGS"; then pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.35.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.35.0") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.35.9\""; } >&5 + ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.35.9") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.35.0" 2>/dev/null` + pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.35.9" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -12586,12 +12625,12 @@ if test -n "$GLIB_LIBS"; then pkg_cv_GLIB_LIBS="$GLIB_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.35.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.35.0") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.35.9\""; } >&5 + ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.35.9") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.35.0" 2>/dev/null` + pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.35.9" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -12612,14 +12651,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.35.0" 2>&1` + GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.35.9" 2>&1` else - GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.35.0" 2>&1` + GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.35.9" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GLIB_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (glib-2.0 >= 2.35.0) were not met: + as_fn_error $? "Package requirements (glib-2.0 >= 2.35.9) were not met: $GLIB_PKG_ERRORS @@ -14330,7 +14369,7 @@ if ${am_cv_pathless_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else - for am_cv_pathless_PYTHON in python python2 python3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do + for am_cv_pathless_PYTHON in python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do test "$am_cv_pathless_PYTHON" = none && break prog="import sys # split strings by '.' and convert to numeric. Append some zeros @@ -14437,6 +14476,25 @@ $as_echo "$am_cv_python_platform" >&6; } PYTHON_PLATFORM=$am_cv_python_platform + # Just factor out some code duplication. + am_python_setup_sysconfig="\ +import sys +# Prefer sysconfig over distutils.sysconfig, for better compatibility +# with python 3.x. See automake bug#10227. +try: + import sysconfig +except ImportError: + can_use_sysconfig = 0 +else: + can_use_sysconfig = 1 +# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs: +# +try: + from platform import python_implementation + if python_implementation() == 'CPython' and sys.version[:3] == '2.7': + can_use_sysconfig = 0 +except ImportError: + pass" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 @@ -14450,7 +14508,14 @@ else else am_py_prefix=$prefix fi - am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null` + am_cv_python_pythondir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` case $am_cv_python_pythondir in $am_py_prefix*) am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` @@ -14487,7 +14552,14 @@ else else am_py_exec_prefix=$exec_prefix fi - am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null` + am_cv_python_pyexecdir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` case $am_cv_python_pyexecdir in $am_py_exec_prefix*) am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` @@ -15293,7 +15365,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by gobject-introspection $as_me 1.35.8, which was +This file was extended by gobject-introspection $as_me 1.35.9, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15359,7 +15431,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -gobject-introspection config.status 1.35.8 +gobject-introspection config.status 1.35.9 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -16380,7 +16452,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in diff --git a/configure.ac b/configure.ac index 83e86ae..399d98d 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ dnl the gi version number m4_define(gi_major_version, 1) m4_define(gi_minor_version, 35) -m4_define(gi_micro_version, 8) +m4_define(gi_micro_version, 9) m4_define(gi_version, gi_major_version.gi_minor_version.gi_micro_version) AC_PREREQ([2.63]) @@ -124,7 +124,7 @@ GIR_DIR="$EXPANDED_DATADIR/$GIR_SUFFIX" AC_SUBST(GIR_DIR) AC_DEFINE_UNQUOTED(GIR_DIR, "$GIR_DIR", [Director prefix for gir installation]) -PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.35.0]) +PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.35.9]) PKG_CHECK_MODULES(GOBJECT, [gobject-2.0]) PKG_CHECK_MODULES(GMODULE, [gmodule-2.0]) PKG_CHECK_MODULES(GIO, [gio-2.0]) diff --git a/docs/Makefile.in b/docs/Makefile.in index 1e39e70..c94da91 100644 --- a/docs/Makefile.in +++ b/docs/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.12.2 from Makefile.am. +# Makefile.in generated by automake 1.13.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. @@ -50,7 +50,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = docs -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -77,13 +77,14 @@ am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -91,9 +92,29 @@ am__can_run_installinfo = \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = reference @@ -344,7 +365,7 @@ clean-libtool: # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. -$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): +$(am__recursive_targets): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ @@ -372,31 +393,13 @@ $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done -cscopelist-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \ - done -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -412,12 +415,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -429,15 +427,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -446,9 +440,10 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive -cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP)'; \ +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ @@ -620,23 +615,20 @@ ps-am: uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \ - cscopelist-recursive ctags-recursive install-am install-strip \ - tags-recursive +.MAKE: $(am__recursive_targets) install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - cscopelist cscopelist-recursive ctags ctags-recursive \ - distclean distclean-generic distclean-libtool distclean-tags \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-dvi \ +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags tags-recursive uninstall uninstall-am + ps ps-am tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/docs/reference/Makefile.in b/docs/reference/Makefile.in index d8126fd..bd2ca82 100644 --- a/docs/reference/Makefile.in +++ b/docs/reference/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.12.2 from Makefile.am. +# Makefile.in generated by automake 1.13.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. @@ -55,8 +55,8 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/gtk-doc.make +DIST_COMMON = $(top_srcdir)/gtk-doc.make $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am subdir = docs/reference ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ @@ -89,6 +89,7 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -424,11 +425,9 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: cscope cscopelist: @@ -571,18 +570,18 @@ uninstall-am: uninstall-local .MAKE: install-am install-strip .PHONY: all all-am all-local check check-am clean clean-generic \ - clean-libtool clean-local dist-hook distclean \ - distclean-generic distclean-libtool distclean-local distdir \ - dvi dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-data-local install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic \ + clean-libtool clean-local cscopelist-am ctags-am dist-hook \ + distclean distclean-generic distclean-libtool distclean-local \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-data install-data-am install-data-local \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ maintainer-clean-local mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-local + mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ + uninstall-am uninstall-local @ENABLE_GTK_DOC_TRUE@all-local: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) diff --git a/docs/reference/gi-sections.txt b/docs/reference/gi-sections.txt index b7565a1..8b880cf 100644 --- a/docs/reference/gi-sections.txt +++ b/docs/reference/gi-sections.txt @@ -7,6 +7,7 @@ GIRepositoryLoadFlags GITypelib g_irepository_get_default g_irepository_prepend_search_path +g_irepository_prepend_library_path g_irepository_get_search_path g_irepository_load_typelib g_irepository_is_registered diff --git a/docs/reference/html/annotation-glossary.html b/docs/reference/html/annotation-glossary.html index 93f76be..dfaf003 100644 --- a/docs/reference/html/annotation-glossary.html +++ b/docs/reference/html/annotation-glossary.html @@ -52,6 +52,9 @@ transfer full

Free data after the code is done.

+type
+

Override the parsed C type with given type.

+
transfer none

Don't free data after the code is done.

diff --git a/docs/reference/html/gi-GIBaseInfo.html b/docs/reference/html/gi-GIBaseInfo.html index 6d144b8..71f5bb8 100644 --- a/docs/reference/html/gi-GIBaseInfo.html +++ b/docs/reference/html/gi-GIBaseInfo.html @@ -67,7 +67,7 @@ accessible through the All other structs can be casted to a GIBaseInfo, for instance:

-

Example 1. Casting a GIFunctionInfo to GIBaseInfo

+

Example 1. Casting a GIFunctionInfo to GIBaseInfo

@@ -91,7 +91,7 @@ GIBaseInfos are normally accessed by calling either

-

Example 2. Getting the Button of the Gtk typelib

+

Example 2. Getting the Button of the Gtk typelib

@@ -507,7 +507,7 @@ and must not be freed.

-

Example 3. Iterating over attributes

+

Example 3. Iterating over attributes

diff --git a/docs/reference/html/gi-gir-reference.html b/docs/reference/html/gi-gir-reference.html index 166072c..b23cac7 100644 --- a/docs/reference/html/gi-gir-reference.html +++ b/docs/reference/html/gi-gir-reference.html @@ -34,7 +34,7 @@ Possible children: namespace.
-

Example 4. A GIR fragment showing an api node

+

Example 4. A GIR fragment showing an api node

@@ -65,7 +65,7 @@ interface.
-

Example 5. A GIR fragment showing an namespace node

+

Example 5. A GIR fragment showing an namespace node

@@ -101,7 +101,7 @@ method, property.
-

Example 6. A GIR fragment showing an class node

+

Example 6. A GIR fragment showing an class node

@@ -144,7 +144,7 @@ method, property.
-

Example 7. A GIR fragment showing an interface node

+

Example 7. A GIR fragment showing an interface node

@@ -182,7 +182,7 @@ Parent node: namespace.
-

Example 8. A GIR fragment showing an function node

+

Example 8. A GIR fragment showing an function node

diff --git a/docs/reference/html/gi-girepository.html b/docs/reference/html/gi-girepository.html index ee6358c..3595acb 100644 --- a/docs/reference/html/gi-girepository.html +++ b/docs/reference/html/gi-girepository.html @@ -46,6 +46,7 @@ enum GITypelib; GIRepository * g_irepository_get_default (void); voidg_irepository_prepend_search_path (const char *directory); +voidg_irepository_prepend_library_path (const char *directory); GSList * g_irepository_get_search_path (void); const char * g_irepository_load_typelib (GIRepository *repository, GITypelib *typelib, @@ -240,6 +241,38 @@ convenient for C.
+

g_irepository_prepend_library_path ()

+
void                g_irepository_prepend_library_path  (const char *directory);
+

+Prepends directory to the search path that is used to +search shared libraries referenced by imported namespaces. +Multiple calls to this function all contribute to the final +list of paths. +The list of paths is unique and shared for all GIRepository +instances across the process, but it doesn't affect namespaces +imported before the call. +

+

+If the library is not found in the directories configured +in this way, loading will fall back to the system library +path (ie. LD_LIBRARY_PATH and DT_RPATH in ELF systems). +See the documentation of your dynamic linker for full details. +

+
++++ + + + + +

directory :

a single directory to scan for shared libraries. [type filename] +
+

Since 1.35.8

+
+
+

g_irepository_get_search_path ()

GSList *            g_irepository_get_search_path       (void);

diff --git a/docs/reference/html/gi.devhelp2 b/docs/reference/html/gi.devhelp2 index 652a1da..c482da4 100644 --- a/docs/reference/html/gi.devhelp2 +++ b/docs/reference/html/gi.devhelp2 @@ -49,6 +49,7 @@ + diff --git a/docs/reference/html/index.sgml b/docs/reference/html/index.sgml index bda33a2..1ec6ef6 100644 --- a/docs/reference/html/index.sgml +++ b/docs/reference/html/index.sgml @@ -17,6 +17,7 @@ + @@ -458,4 +459,5 @@ + diff --git a/examples/glib-print.c b/examples/glib-print.c index 606a29f..4e117d9 100644 --- a/examples/glib-print.c +++ b/examples/glib-print.c @@ -1,44 +1,48 @@ #include -int main(void) +int +main (void) { - GIRepository *repository; - GError *error = NULL; - GIBaseInfo *base_info; - GIArgument in_args[5]; - GIArgument retval; + GIRepository *repository; + GError *error = NULL; + GIBaseInfo *base_info; + GIArgument in_args[5]; + GIArgument retval; - repository = g_irepository_get_default(); - g_irepository_require(repository, "GLib", "2.0", 0, &error); - if (error) { - g_error("ERROR: %s\n", error->message); + repository = g_irepository_get_default (); + g_irepository_require (repository, "GLib", "2.0", 0, &error); + if (error) + { + g_error ("ERROR: %s\n", error->message); return 1; } - base_info = g_irepository_find_by_name(repository, "GLib", "assertion_message"); - if (!base_info) { - g_error("ERROR: %s\n", "Could not find GLib.warn_message"); + base_info = g_irepository_find_by_name (repository, "GLib", "assertion_message"); + if (!base_info) + { + g_error ("ERROR: %s\n", "Could not find GLib.warn_message"); return 1; } - in_args[0].v_pointer = "domain"; - in_args[1].v_pointer = "glib-print.c"; - in_args[2].v_pointer = "30"; - in_args[3].v_pointer = "main"; - in_args[4].v_pointer = "hello world"; + in_args[0].v_pointer = "domain"; + in_args[1].v_pointer = "glib-print.c"; + in_args[2].v_pointer = "30"; + in_args[3].v_pointer = "main"; + in_args[4].v_pointer = "hello world"; - if (!g_function_info_invoke ((GIFunctionInfo *)base_info, - (const GIArgument*)&in_args, - 5, - NULL, - 0, - &retval, - &error)) { - g_error("ERROR: %s\n", error->message); + if (!g_function_info_invoke ((GIFunctionInfo *) base_info, + (const GIArgument *) &in_args, + 5, + NULL, + 0, + &retval, + &error)) + { + g_error ("ERROR: %s\n", error->message); return 1; } - g_base_info_unref (base_info); + g_base_info_unref (base_info); - return 0; + return 0; } diff --git a/gir/gio-2.0.c b/gir/gio-2.0.c index 6758137..2e516f5 100644 --- a/gir/gio-2.0.c +++ b/gir/gio-2.0.c @@ -3300,15 +3300,6 @@ /** - * SECTION:_GFreedesktopDBus - * @title: _GFreedesktopDBus - * @short_description: Generated C code for the org.freedesktop.DBus D-Bus interface - * - * This section contains code for working with the org.freedesktop.DBus D-Bus interface in C. - */ - - -/** * SECTION:extensionpoints * @short_description: Extension Points * @include: gio.h @@ -7914,1449 +7905,6 @@ /** - * _GFreedesktopDBus: - * - * Abstract interface type for the D-Bus interface org.freedesktop.DBus. - */ - - -/** - * _GFreedesktopDBus::handle-add-match: - * @object: A #_GFreedesktopDBus. - * @invocation: A #GDBusMethodInvocation. - * @arg_rule: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the AddMatch() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call _g_freedesktop_dbus_complete_add_match() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * _GFreedesktopDBus::handle-get-connection-selinux-security-context: - * @object: A #_GFreedesktopDBus. - * @invocation: A #GDBusMethodInvocation. - * @arg_name: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the GetConnectionSELinuxSecurityContext() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call _g_freedesktop_dbus_complete_get_connection_selinux_security_context() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * _GFreedesktopDBus::handle-get-connection-unix-process-id: - * @object: A #_GFreedesktopDBus. - * @invocation: A #GDBusMethodInvocation. - * @arg_name: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the GetConnectionUnixProcessID() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call _g_freedesktop_dbus_complete_get_connection_unix_process_id() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * _GFreedesktopDBus::handle-get-connection-unix-user: - * @object: A #_GFreedesktopDBus. - * @invocation: A #GDBusMethodInvocation. - * @arg_name: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the GetConnectionUnixUser() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call _g_freedesktop_dbus_complete_get_connection_unix_user() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * _GFreedesktopDBus::handle-get-id: - * @object: A #_GFreedesktopDBus. - * @invocation: A #GDBusMethodInvocation. - * - * Signal emitted when a remote caller is invoking the GetId() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call _g_freedesktop_dbus_complete_get_id() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * _GFreedesktopDBus::handle-get-name-owner: - * @object: A #_GFreedesktopDBus. - * @invocation: A #GDBusMethodInvocation. - * @arg_name: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the GetNameOwner() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call _g_freedesktop_dbus_complete_get_name_owner() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * _GFreedesktopDBus::handle-hello: - * @object: A #_GFreedesktopDBus. - * @invocation: A #GDBusMethodInvocation. - * - * Signal emitted when a remote caller is invoking the Hello() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call _g_freedesktop_dbus_complete_hello() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * _GFreedesktopDBus::handle-list-activatable-names: - * @object: A #_GFreedesktopDBus. - * @invocation: A #GDBusMethodInvocation. - * - * Signal emitted when a remote caller is invoking the ListActivatableNames() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call _g_freedesktop_dbus_complete_list_activatable_names() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * _GFreedesktopDBus::handle-list-names: - * @object: A #_GFreedesktopDBus. - * @invocation: A #GDBusMethodInvocation. - * - * Signal emitted when a remote caller is invoking the ListNames() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call _g_freedesktop_dbus_complete_list_names() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * _GFreedesktopDBus::handle-list-queued-owners: - * @object: A #_GFreedesktopDBus. - * @invocation: A #GDBusMethodInvocation. - * @arg_name: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the ListQueuedOwners() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call _g_freedesktop_dbus_complete_list_queued_owners() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * _GFreedesktopDBus::handle-name-has-owner: - * @object: A #_GFreedesktopDBus. - * @invocation: A #GDBusMethodInvocation. - * @arg_name: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the NameHasOwner() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call _g_freedesktop_dbus_complete_name_has_owner() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * _GFreedesktopDBus::handle-release-name: - * @object: A #_GFreedesktopDBus. - * @invocation: A #GDBusMethodInvocation. - * @arg_name: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the ReleaseName() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call _g_freedesktop_dbus_complete_release_name() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * _GFreedesktopDBus::handle-reload-config: - * @object: A #_GFreedesktopDBus. - * @invocation: A #GDBusMethodInvocation. - * - * Signal emitted when a remote caller is invoking the ReloadConfig() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call _g_freedesktop_dbus_complete_reload_config() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * _GFreedesktopDBus::handle-remove-match: - * @object: A #_GFreedesktopDBus. - * @invocation: A #GDBusMethodInvocation. - * @arg_rule: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the RemoveMatch() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call _g_freedesktop_dbus_complete_remove_match() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * _GFreedesktopDBus::handle-request-name: - * @object: A #_GFreedesktopDBus. - * @invocation: A #GDBusMethodInvocation. - * @arg_name: Argument passed by remote caller. - * @arg_flags: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the RequestName() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call _g_freedesktop_dbus_complete_request_name() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * _GFreedesktopDBus::handle-start-service-by-name: - * @object: A #_GFreedesktopDBus. - * @invocation: A #GDBusMethodInvocation. - * @arg_name: Argument passed by remote caller. - * @arg_flags: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the StartServiceByName() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call _g_freedesktop_dbus_complete_start_service_by_name() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * _GFreedesktopDBus::handle-update-activation-environment: - * @object: A #_GFreedesktopDBus. - * @invocation: A #GDBusMethodInvocation. - * @arg_environment: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the UpdateActivationEnvironment() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call _g_freedesktop_dbus_complete_update_activation_environment() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * _GFreedesktopDBus::name-acquired: - * @object: A #_GFreedesktopDBus. - * @arg_name: Argument. - * - * On the client-side, this signal is emitted whenever the D-Bus signal "NameAcquired" is received. - * - * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. - */ - - -/** - * _GFreedesktopDBus::name-lost: - * @object: A #_GFreedesktopDBus. - * @arg_name: Argument. - * - * On the client-side, this signal is emitted whenever the D-Bus signal "NameLost" is received. - * - * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. - */ - - -/** - * _GFreedesktopDBus::name-owner-changed: - * @object: A #_GFreedesktopDBus. - * @arg_name: Argument. - * @arg_old_owner: Argument. - * @arg_new_owner: Argument. - * - * On the client-side, this signal is emitted whenever the D-Bus signal "NameOwnerChanged" is received. - * - * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. - */ - - -/** - * _GFreedesktopDBusIface: - * @parent_iface: The parent interface. - * @handle_add_match: Handler for the #_GFreedesktopDBus::handle-add-match signal. - * @handle_get_connection_selinux_security_context: Handler for the #_GFreedesktopDBus::handle-get-connection-selinux-security-context signal. - * @handle_get_connection_unix_process_id: Handler for the #_GFreedesktopDBus::handle-get-connection-unix-process-id signal. - * @handle_get_connection_unix_user: Handler for the #_GFreedesktopDBus::handle-get-connection-unix-user signal. - * @handle_get_id: Handler for the #_GFreedesktopDBus::handle-get-id signal. - * @handle_get_name_owner: Handler for the #_GFreedesktopDBus::handle-get-name-owner signal. - * @handle_hello: Handler for the #_GFreedesktopDBus::handle-hello signal. - * @handle_list_activatable_names: Handler for the #_GFreedesktopDBus::handle-list-activatable-names signal. - * @handle_list_names: Handler for the #_GFreedesktopDBus::handle-list-names signal. - * @handle_list_queued_owners: Handler for the #_GFreedesktopDBus::handle-list-queued-owners signal. - * @handle_name_has_owner: Handler for the #_GFreedesktopDBus::handle-name-has-owner signal. - * @handle_release_name: Handler for the #_GFreedesktopDBus::handle-release-name signal. - * @handle_reload_config: Handler for the #_GFreedesktopDBus::handle-reload-config signal. - * @handle_remove_match: Handler for the #_GFreedesktopDBus::handle-remove-match signal. - * @handle_request_name: Handler for the #_GFreedesktopDBus::handle-request-name signal. - * @handle_start_service_by_name: Handler for the #_GFreedesktopDBus::handle-start-service-by-name signal. - * @handle_update_activation_environment: Handler for the #_GFreedesktopDBus::handle-update-activation-environment signal. - * @name_acquired: Handler for the #_GFreedesktopDBus::name-acquired signal. - * @name_lost: Handler for the #_GFreedesktopDBus::name-lost signal. - * @name_owner_changed: Handler for the #_GFreedesktopDBus::name-owner-changed signal. - * - * Virtual table for the D-Bus interface org.freedesktop.DBus. - */ - - -/** - * _GFreedesktopDBusProxy: - * - * The #_GFreedesktopDBusProxy structure contains only private data and should only be accessed using the provided API. - */ - - -/** - * _GFreedesktopDBusProxyClass: - * @parent_class: The parent class. - * - * Class structure for #_GFreedesktopDBusProxy. - */ - - -/** - * _GFreedesktopDBusSkeleton: - * - * The #_GFreedesktopDBusSkeleton structure contains only private data and should only be accessed using the provided API. - */ - - -/** - * _GFreedesktopDBusSkeletonClass: - * @parent_class: The parent class. - * - * Class structure for #_GFreedesktopDBusSkeleton. - */ - - -/** - * _g_freedesktop_dbus_call_add_match: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_rule: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the AddMatch() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_call_add_match_finish() to get the result of the operation. - * - * See _g_freedesktop_dbus_call_add_match_sync() for the synchronous, blocking version of this method. - */ - - -/** - * _g_freedesktop_dbus_call_add_match_finish: - * @proxy: A #_GFreedesktopDBusProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_add_match(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with _g_freedesktop_dbus_call_add_match(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_add_match_sync: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_rule: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the AddMatch() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See _g_freedesktop_dbus_call_add_match() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_get_connection_selinux_security_context: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the GetConnectionSELinuxSecurityContext() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_call_get_connection_selinux_security_context_finish() to get the result of the operation. - * - * See _g_freedesktop_dbus_call_get_connection_selinux_security_context_sync() for the synchronous, blocking version of this method. - */ - - -/** - * _g_freedesktop_dbus_call_get_connection_selinux_security_context_finish: - * @proxy: A #_GFreedesktopDBusProxy. - * @out_security_context: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_get_connection_selinux_security_context(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with _g_freedesktop_dbus_call_get_connection_selinux_security_context(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_get_connection_selinux_security_context_sync: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @out_security_context: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the GetConnectionSELinuxSecurityContext() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See _g_freedesktop_dbus_call_get_connection_selinux_security_context() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_get_connection_unix_process_id: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the GetConnectionUnixProcessID() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_call_get_connection_unix_process_id_finish() to get the result of the operation. - * - * See _g_freedesktop_dbus_call_get_connection_unix_process_id_sync() for the synchronous, blocking version of this method. - */ - - -/** - * _g_freedesktop_dbus_call_get_connection_unix_process_id_finish: - * @proxy: A #_GFreedesktopDBusProxy. - * @out_pid: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_get_connection_unix_process_id(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with _g_freedesktop_dbus_call_get_connection_unix_process_id(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_get_connection_unix_process_id_sync: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @out_pid: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the GetConnectionUnixProcessID() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See _g_freedesktop_dbus_call_get_connection_unix_process_id() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_get_connection_unix_user: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the GetConnectionUnixUser() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_call_get_connection_unix_user_finish() to get the result of the operation. - * - * See _g_freedesktop_dbus_call_get_connection_unix_user_sync() for the synchronous, blocking version of this method. - */ - - -/** - * _g_freedesktop_dbus_call_get_connection_unix_user_finish: - * @proxy: A #_GFreedesktopDBusProxy. - * @out_uid: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_get_connection_unix_user(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with _g_freedesktop_dbus_call_get_connection_unix_user(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_get_connection_unix_user_sync: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @out_uid: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the GetConnectionUnixUser() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See _g_freedesktop_dbus_call_get_connection_unix_user() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_get_id: - * @proxy: A #_GFreedesktopDBusProxy. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the GetId() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_call_get_id_finish() to get the result of the operation. - * - * See _g_freedesktop_dbus_call_get_id_sync() for the synchronous, blocking version of this method. - */ - - -/** - * _g_freedesktop_dbus_call_get_id_finish: - * @proxy: A #_GFreedesktopDBusProxy. - * @out_unique_id: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_get_id(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with _g_freedesktop_dbus_call_get_id(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_get_id_sync: - * @proxy: A #_GFreedesktopDBusProxy. - * @out_unique_id: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the GetId() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See _g_freedesktop_dbus_call_get_id() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_get_name_owner: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the GetNameOwner() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_call_get_name_owner_finish() to get the result of the operation. - * - * See _g_freedesktop_dbus_call_get_name_owner_sync() for the synchronous, blocking version of this method. - */ - - -/** - * _g_freedesktop_dbus_call_get_name_owner_finish: - * @proxy: A #_GFreedesktopDBusProxy. - * @out_unique_name: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_get_name_owner(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with _g_freedesktop_dbus_call_get_name_owner(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_get_name_owner_sync: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @out_unique_name: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the GetNameOwner() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See _g_freedesktop_dbus_call_get_name_owner() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_hello: - * @proxy: A #_GFreedesktopDBusProxy. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the Hello() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_call_hello_finish() to get the result of the operation. - * - * See _g_freedesktop_dbus_call_hello_sync() for the synchronous, blocking version of this method. - */ - - -/** - * _g_freedesktop_dbus_call_hello_finish: - * @proxy: A #_GFreedesktopDBusProxy. - * @out_assigned_name: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_hello(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with _g_freedesktop_dbus_call_hello(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_hello_sync: - * @proxy: A #_GFreedesktopDBusProxy. - * @out_assigned_name: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the Hello() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See _g_freedesktop_dbus_call_hello() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_list_activatable_names: - * @proxy: A #_GFreedesktopDBusProxy. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the ListActivatableNames() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_call_list_activatable_names_finish() to get the result of the operation. - * - * See _g_freedesktop_dbus_call_list_activatable_names_sync() for the synchronous, blocking version of this method. - */ - - -/** - * _g_freedesktop_dbus_call_list_activatable_names_finish: - * @proxy: A #_GFreedesktopDBusProxy. - * @out_activatable_names: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_list_activatable_names(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with _g_freedesktop_dbus_call_list_activatable_names(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_list_activatable_names_sync: - * @proxy: A #_GFreedesktopDBusProxy. - * @out_activatable_names: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the ListActivatableNames() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See _g_freedesktop_dbus_call_list_activatable_names() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_list_names: - * @proxy: A #_GFreedesktopDBusProxy. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the ListNames() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_call_list_names_finish() to get the result of the operation. - * - * See _g_freedesktop_dbus_call_list_names_sync() for the synchronous, blocking version of this method. - */ - - -/** - * _g_freedesktop_dbus_call_list_names_finish: - * @proxy: A #_GFreedesktopDBusProxy. - * @out_names: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_list_names(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with _g_freedesktop_dbus_call_list_names(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_list_names_sync: - * @proxy: A #_GFreedesktopDBusProxy. - * @out_names: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the ListNames() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See _g_freedesktop_dbus_call_list_names() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_list_queued_owners: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the ListQueuedOwners() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_call_list_queued_owners_finish() to get the result of the operation. - * - * See _g_freedesktop_dbus_call_list_queued_owners_sync() for the synchronous, blocking version of this method. - */ - - -/** - * _g_freedesktop_dbus_call_list_queued_owners_finish: - * @proxy: A #_GFreedesktopDBusProxy. - * @out_queued_owners: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_list_queued_owners(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with _g_freedesktop_dbus_call_list_queued_owners(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_list_queued_owners_sync: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @out_queued_owners: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the ListQueuedOwners() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See _g_freedesktop_dbus_call_list_queued_owners() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_name_has_owner: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the NameHasOwner() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_call_name_has_owner_finish() to get the result of the operation. - * - * See _g_freedesktop_dbus_call_name_has_owner_sync() for the synchronous, blocking version of this method. - */ - - -/** - * _g_freedesktop_dbus_call_name_has_owner_finish: - * @proxy: A #_GFreedesktopDBusProxy. - * @out_has_owner: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_name_has_owner(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with _g_freedesktop_dbus_call_name_has_owner(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_name_has_owner_sync: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @out_has_owner: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the NameHasOwner() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See _g_freedesktop_dbus_call_name_has_owner() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_release_name: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the ReleaseName() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_call_release_name_finish() to get the result of the operation. - * - * See _g_freedesktop_dbus_call_release_name_sync() for the synchronous, blocking version of this method. - */ - - -/** - * _g_freedesktop_dbus_call_release_name_finish: - * @proxy: A #_GFreedesktopDBusProxy. - * @out_value: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_release_name(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with _g_freedesktop_dbus_call_release_name(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_release_name_sync: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @out_value: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the ReleaseName() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See _g_freedesktop_dbus_call_release_name() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_reload_config: - * @proxy: A #_GFreedesktopDBusProxy. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the ReloadConfig() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_call_reload_config_finish() to get the result of the operation. - * - * See _g_freedesktop_dbus_call_reload_config_sync() for the synchronous, blocking version of this method. - */ - - -/** - * _g_freedesktop_dbus_call_reload_config_finish: - * @proxy: A #_GFreedesktopDBusProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_reload_config(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with _g_freedesktop_dbus_call_reload_config(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_reload_config_sync: - * @proxy: A #_GFreedesktopDBusProxy. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the ReloadConfig() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See _g_freedesktop_dbus_call_reload_config() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_remove_match: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_rule: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the RemoveMatch() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_call_remove_match_finish() to get the result of the operation. - * - * See _g_freedesktop_dbus_call_remove_match_sync() for the synchronous, blocking version of this method. - */ - - -/** - * _g_freedesktop_dbus_call_remove_match_finish: - * @proxy: A #_GFreedesktopDBusProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_remove_match(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with _g_freedesktop_dbus_call_remove_match(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_remove_match_sync: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_rule: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the RemoveMatch() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See _g_freedesktop_dbus_call_remove_match() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_request_name: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @arg_flags: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the RequestName() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_call_request_name_finish() to get the result of the operation. - * - * See _g_freedesktop_dbus_call_request_name_sync() for the synchronous, blocking version of this method. - */ - - -/** - * _g_freedesktop_dbus_call_request_name_finish: - * @proxy: A #_GFreedesktopDBusProxy. - * @out_value: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_request_name(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with _g_freedesktop_dbus_call_request_name(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_request_name_sync: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @arg_flags: Argument to pass with the method invocation. - * @out_value: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the RequestName() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See _g_freedesktop_dbus_call_request_name() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_start_service_by_name: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @arg_flags: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the StartServiceByName() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_call_start_service_by_name_finish() to get the result of the operation. - * - * See _g_freedesktop_dbus_call_start_service_by_name_sync() for the synchronous, blocking version of this method. - */ - - -/** - * _g_freedesktop_dbus_call_start_service_by_name_finish: - * @proxy: A #_GFreedesktopDBusProxy. - * @out_value: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_start_service_by_name(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with _g_freedesktop_dbus_call_start_service_by_name(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_start_service_by_name_sync: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @arg_flags: Argument to pass with the method invocation. - * @out_value: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the StartServiceByName() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See _g_freedesktop_dbus_call_start_service_by_name() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_update_activation_environment: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_environment: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the UpdateActivationEnvironment() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_call_update_activation_environment_finish() to get the result of the operation. - * - * See _g_freedesktop_dbus_call_update_activation_environment_sync() for the synchronous, blocking version of this method. - */ - - -/** - * _g_freedesktop_dbus_call_update_activation_environment_finish: - * @proxy: A #_GFreedesktopDBusProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_update_activation_environment(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with _g_freedesktop_dbus_call_update_activation_environment(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_update_activation_environment_sync: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_environment: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the UpdateActivationEnvironment() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See _g_freedesktop_dbus_call_update_activation_environment() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_complete_add_match: - * @object: A #_GFreedesktopDBus. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the AddMatch() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ - - -/** - * _g_freedesktop_dbus_complete_get_connection_selinux_security_context: - * @object: A #_GFreedesktopDBus. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @security_context: Parameter to return. - * - * Helper function used in service implementations to finish handling invocations of the GetConnectionSELinuxSecurityContext() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ - - -/** - * _g_freedesktop_dbus_complete_get_connection_unix_process_id: - * @object: A #_GFreedesktopDBus. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @pid: Parameter to return. - * - * Helper function used in service implementations to finish handling invocations of the GetConnectionUnixProcessID() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ - - -/** - * _g_freedesktop_dbus_complete_get_connection_unix_user: - * @object: A #_GFreedesktopDBus. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @uid: Parameter to return. - * - * Helper function used in service implementations to finish handling invocations of the GetConnectionUnixUser() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ - - -/** - * _g_freedesktop_dbus_complete_get_id: - * @object: A #_GFreedesktopDBus. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @unique_id: Parameter to return. - * - * Helper function used in service implementations to finish handling invocations of the GetId() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ - - -/** - * _g_freedesktop_dbus_complete_get_name_owner: - * @object: A #_GFreedesktopDBus. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @unique_name: Parameter to return. - * - * Helper function used in service implementations to finish handling invocations of the GetNameOwner() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ - - -/** - * _g_freedesktop_dbus_complete_hello: - * @object: A #_GFreedesktopDBus. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @assigned_name: Parameter to return. - * - * Helper function used in service implementations to finish handling invocations of the Hello() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ - - -/** - * _g_freedesktop_dbus_complete_list_activatable_names: - * @object: A #_GFreedesktopDBus. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @activatable_names: Parameter to return. - * - * Helper function used in service implementations to finish handling invocations of the ListActivatableNames() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ - - -/** - * _g_freedesktop_dbus_complete_list_names: - * @object: A #_GFreedesktopDBus. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @names: Parameter to return. - * - * Helper function used in service implementations to finish handling invocations of the ListNames() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ - - -/** - * _g_freedesktop_dbus_complete_list_queued_owners: - * @object: A #_GFreedesktopDBus. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @queued_owners: Parameter to return. - * - * Helper function used in service implementations to finish handling invocations of the ListQueuedOwners() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ - - -/** - * _g_freedesktop_dbus_complete_name_has_owner: - * @object: A #_GFreedesktopDBus. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @has_owner: Parameter to return. - * - * Helper function used in service implementations to finish handling invocations of the NameHasOwner() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ - - -/** - * _g_freedesktop_dbus_complete_release_name: - * @object: A #_GFreedesktopDBus. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @value: Parameter to return. - * - * Helper function used in service implementations to finish handling invocations of the ReleaseName() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ - - -/** - * _g_freedesktop_dbus_complete_reload_config: - * @object: A #_GFreedesktopDBus. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the ReloadConfig() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ - - -/** - * _g_freedesktop_dbus_complete_remove_match: - * @object: A #_GFreedesktopDBus. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the RemoveMatch() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ - - -/** - * _g_freedesktop_dbus_complete_request_name: - * @object: A #_GFreedesktopDBus. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @value: Parameter to return. - * - * Helper function used in service implementations to finish handling invocations of the RequestName() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ - - -/** - * _g_freedesktop_dbus_complete_start_service_by_name: - * @object: A #_GFreedesktopDBus. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @value: Parameter to return. - * - * Helper function used in service implementations to finish handling invocations of the StartServiceByName() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ - - -/** - * _g_freedesktop_dbus_complete_update_activation_environment: - * @object: A #_GFreedesktopDBus. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the UpdateActivationEnvironment() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ - - -/** - * _g_freedesktop_dbus_emit_name_acquired: - * @object: A #_GFreedesktopDBus. - * @arg_name: Argument to pass with the signal. - * - * Emits the "NameAcquired" D-Bus signal. - */ - - -/** - * _g_freedesktop_dbus_emit_name_lost: - * @object: A #_GFreedesktopDBus. - * @arg_name: Argument to pass with the signal. - * - * Emits the "NameLost" D-Bus signal. - */ - - -/** - * _g_freedesktop_dbus_emit_name_owner_changed: - * @object: A #_GFreedesktopDBus. - * @arg_name: Argument to pass with the signal. - * @arg_old_owner: Argument to pass with the signal. - * @arg_new_owner: Argument to pass with the signal. - * - * Emits the "NameOwnerChanged" D-Bus signal. - */ - - -/** - * _g_freedesktop_dbus_interface_info: - * - * Gets a machine-readable description of the org.freedesktop.DBus D-Bus interface. - * - * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free. - */ - - -/** - * _g_freedesktop_dbus_override_properties: - * @klass: The class structure for a #GObject-derived class. - * @property_id_begin: The property id to assign to the first overridden property. - * - * Overrides all #GObject properties in the #_GFreedesktopDBus interface for a concrete class. - * The properties are overridden in the order they are defined. - * - * Returns: The last property id. - */ - - -/** - * _g_freedesktop_dbus_proxy_new: - * @connection: A #GDBusConnection. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied. - * @user_data: User data to pass to @callback. - * - * Asynchronously creates a proxy for the D-Bus interface org.freedesktop.DBus. See g_dbus_proxy_new() for more details. - * - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_proxy_new_finish() to get the result of the operation. - * - * See _g_freedesktop_dbus_proxy_new_sync() for the synchronous, blocking version of this constructor. - */ - - -/** - * _g_freedesktop_dbus_proxy_new_finish: - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_proxy_new(). - * @error: Return location for error or %NULL - * - * Finishes an operation started with _g_freedesktop_dbus_proxy_new(). - * - * Returns: (transfer full) (type _GFreedesktopDBusProxy): The constructed proxy object or %NULL if @error is set. - */ - - -/** - * _g_freedesktop_dbus_proxy_new_for_bus: - * @bus_type: A #GBusType. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: A bus name (well-known or unique). - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied. - * @user_data: User data to pass to @callback. - * - * Like _g_freedesktop_dbus_proxy_new() but takes a #GBusType instead of a #GDBusConnection. - * - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_proxy_new_for_bus_finish() to get the result of the operation. - * - * See _g_freedesktop_dbus_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. - */ - - -/** - * _g_freedesktop_dbus_proxy_new_for_bus_finish: - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_proxy_new_for_bus(). - * @error: Return location for error or %NULL - * - * Finishes an operation started with _g_freedesktop_dbus_proxy_new_for_bus(). - * - * Returns: (transfer full) (type _GFreedesktopDBusProxy): The constructed proxy object or %NULL if @error is set. - */ - - -/** - * _g_freedesktop_dbus_proxy_new_for_bus_sync: - * @bus_type: A #GBusType. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: A bus name (well-known or unique). - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL - * - * Like _g_freedesktop_dbus_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection. - * - * The calling thread is blocked until a reply is received. - * - * See _g_freedesktop_dbus_proxy_new_for_bus() for the asynchronous version of this constructor. - * - * Returns: (transfer full) (type _GFreedesktopDBusProxy): The constructed proxy object or %NULL if @error is set. - */ - - -/** - * _g_freedesktop_dbus_proxy_new_sync: - * @connection: A #GDBusConnection. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL - * - * Synchronously creates a proxy for the D-Bus interface org.freedesktop.DBus. See g_dbus_proxy_new_sync() for more details. - * - * The calling thread is blocked until a reply is received. - * - * See _g_freedesktop_dbus_proxy_new() for the asynchronous version of this constructor. - * - * Returns: (transfer full) (type _GFreedesktopDBusProxy): The constructed proxy object or %NULL if @error is set. - */ - - -/** - * _g_freedesktop_dbus_skeleton_new: - * - * Creates a skeleton object for the D-Bus interface org.freedesktop.DBus. - * - * Returns: (transfer full) (type _GFreedesktopDBusSkeleton): The skeleton object. - */ - - -/** * _g_io_module_get_default: * @extension_point: the name of an extension point * @envvar: (allow-none): the name of an environment variable to override the default implementation. @@ -11055,9 +9603,12 @@ * non-zero then the default main context is iterated until the use count * falls to zero, at which point 0 is returned. * - * If the %G_APPLICATION_IS_SERVICE flag is set, then the exiting at - * use count of zero is delayed for a while (ie: the instance stays - * around to provide its service to others). + * If the %G_APPLICATION_IS_SERVICE flag is set, then the service will + * run for as much as 10 seconds with a use count of zero while waiting + * for the message that caused the activation to arrive. After that, + * if the use count falls to zero the application will exit immediately, + * except in the case that g_application_set_inactivity_timeout() is in + * use. * * Returns: the exit status * Since: 2.28 diff --git a/gir/glib-2.0.c b/gir/glib-2.0.c index ae5aaf4..dc98af0 100644 --- a/gir/glib-2.0.c +++ b/gir/glib-2.0.c @@ -9522,7 +9522,9 @@ * @text: zero-terminated string with base64 text to decode * @out_len: (out): The length of the decoded data is written here * - * Decode a sequence of Base-64 encoded text into binary data + * Decode a sequence of Base-64 encoded text into binary data. Note + * that the returned binary data is not necessarily zero-terminated, + * so it should not be used as a character string. * * Returns: (transfer full) (array length=out_len) (element-type guint8): newly allocated buffer containing the binary data that @text represents. The returned buffer must be freed with g_free(). * Since: 2.12 @@ -15049,8 +15051,8 @@ * g_hash_table_get_keys: * @hash_table: a #GHashTable * - * Retrieves every key inside @hash_table. The returned data - * is valid until @hash_table is modified. + * Retrieves every key inside @hash_table. The returned data is valid + * until changes to the hash release those keys. * * Returns: a #GList containing all the keys inside the hash table. The content of the list is owned by the hash table and should not be modified or freed. Use g_list_free() when done using the list. * Since: 2.14 @@ -20571,7 +20573,7 @@ /** * g_option_context_new: - * @parameter_string: a string which is displayed in the first line of output, after the usage summary programname [OPTION...] + * @parameter_string: (allow-none): a string which is displayed in the first line of output, after the usage summary programname [OPTION...] * * Creates a new option context. * @@ -26953,7 +26955,7 @@ * characters of the strings. * * Returns: 0 if the strings match, a negative value if @s1 < @s2, or a positive value if @s1 > @s2. - * Deprecated: 2.2: The problem with g_strncasecmp() is that it does the comparison by calling toupper()/tolower(). These functions are locale-specific and operate on single bytes. However, it is impossible to handle things correctly from an I18N standpoint by operating on bytes, since characters may be multibyte. Thus g_strncasecmp() is broken if your string is guaranteed to be ASCII, since it's locale-sensitive, and it's broken if your string is localized, since it doesn't work on many encodings at all, including UTF-8, EUC-JP, etc. There are therefore two replacement functions: g_ascii_strncasecmp(), which only works on ASCII and is not locale-sensitive, and g_utf8_casefold(), which is good for case-insensitive sorting of UTF-8. + * Deprecated: 2.2: The problem with g_strncasecmp() is that it does the comparison by calling toupper()/tolower(). These functions are locale-specific and operate on single bytes. However, it is impossible to handle things correctly from an I18N standpoint by operating on bytes, since characters may be multibyte. Thus g_strncasecmp() is broken if your string is guaranteed to be ASCII, since it's locale-sensitive, and it's broken if your string is localized, since it doesn't work on many encodings at all, including UTF-8, EUC-JP, etc. There are therefore two replacement techniques: g_ascii_strncasecmp(), which only works on ASCII and is not locale-sensitive, and g_utf8_casefold() followed by strcmp() on the resulting strings, which is good for case-insensitive sorting of UTF-8. */ diff --git a/gir/gobject-2.0.c b/gir/gobject-2.0.c index 23faa5f..05d5ee0 100644 --- a/gir/gobject-2.0.c +++ b/gir/gobject-2.0.c @@ -3588,7 +3588,7 @@ * ensures that the @gobject stays alive during the call to @c_handler * by temporarily adding a reference count to @gobject. * - * When the object is destroyed the signal handler will be automatically + * When the @gobject is destroyed the signal handler will be automatically * disconnected. Note that this is not currently threadsafe (ie: * emitting a signal while @gobject is being destroyed in another thread * is not safe). diff --git a/girepository/girepository.h b/girepository/girepository.h index eb990a2..2b2b171 100644 --- a/girepository/girepository.h +++ b/girepository/girepository.h @@ -90,6 +90,7 @@ typedef enum GType g_irepository_get_type (void) G_GNUC_CONST; GIRepository *g_irepository_get_default (void); void g_irepository_prepend_search_path (const char *directory); +void g_irepository_prepend_library_path (const char *directory); GSList * g_irepository_get_search_path (void); const char * g_irepository_load_typelib (GIRepository *repository, GITypelib *typelib, diff --git a/girepository/girepository.symbols b/girepository/girepository.symbols index 8cb6c83..5f01adf 100644 --- a/girepository/girepository.symbols +++ b/girepository/girepository.symbols @@ -134,6 +134,7 @@ g_irepository_get_typelib_path g_irepository_get_version g_irepository_is_registered g_irepository_load_typelib +g_irepository_prepend_library_path g_irepository_prepend_search_path g_irepository_require g_irepository_require_private diff --git a/girepository/gitypelib.c b/girepository/gitypelib.c index 2af17e9..76a55de 100644 --- a/girepository/gitypelib.c +++ b/girepository/gitypelib.c @@ -2062,6 +2062,72 @@ g_typelib_error_quark (void) return quark; } +static GSList *library_paths; + +/** + * g_irepository_prepend_library_path: + * @directory: (type filename): a single directory to scan for shared libraries + * + * Prepends @directory to the search path that is used to + * search shared libraries referenced by imported namespaces. + * Multiple calls to this function all contribute to the final + * list of paths. + * The list of paths is unique and shared for all #GIRepository + * instances across the process, but it doesn't affect namespaces + * imported before the call. + * + * If the library is not found in the directories configured + * in this way, loading will fall back to the system library + * path (ie. LD_LIBRARY_PATH and DT_RPATH in ELF systems). + * See the documentation of your dynamic linker for full details. + * + * Since: 1.35.8 + */ +void +g_irepository_prepend_library_path (const char *directory) +{ + library_paths = g_slist_prepend (library_paths, + g_strdup (directory)); +} + +/* Note on the GModule flags used by this function: + + * Glade's autoconnect feature and OpenGL's extension mechanism + * as used by Clutter rely on g_module_open(NULL) to work as a means of + * accessing the app's symbols. This keeps us from using + * G_MODULE_BIND_LOCAL. BIND_LOCAL may have other issues as well; + * in general libraries are not expecting multiple copies of + * themselves and are not expecting to be unloaded. So we just + * load modules globally for now. + */ +static GModule * +load_one_shared_library (const char *shlib) +{ + GSList *p; + GModule *m; + + if (!g_path_is_absolute (shlib)) + { + /* First try in configured library paths */ + for (p = library_paths; p; p = p->next) + { + char *path = g_build_filename (p->data, shlib, NULL); + + m = g_module_open (path, G_MODULE_BIND_LAZY); + + g_free (path); + if (m != NULL) + return m; + } + } + + /* Then try loading from standard paths */ + /* Do not attempt to fix up shlib to replace .la with .so: + it's done by GModule anyway. + */ + return g_module_open (shlib, G_MODULE_BIND_LAZY); +} + static void _g_typelib_do_dlopen (GITypelib *typelib) { @@ -2091,30 +2157,7 @@ _g_typelib_do_dlopen (GITypelib *typelib) { GModule *module; - /* Glade's autoconnect feature and OpenGL's extension mechanism - * as used by Clutter rely on g_module_open(NULL) to work as a means of - * accessing the app's symbols. This keeps us from using - * G_MODULE_BIND_LOCAL. BIND_LOCAL may have other issues as well; - * in general libraries are not expecting multiple copies of - * themselves and are not expecting to be unloaded. So we just - * load modules globally for now. - */ - - module = g_module_open (shlibs[i], G_MODULE_BIND_LAZY); - - if (module == NULL) - { - GString *shlib_full = g_string_new (shlibs[i]); - - module = g_module_open (shlib_full->str, G_MODULE_BIND_LAZY); - if (module == NULL) - { - g_string_overwrite (shlib_full, strlen (shlib_full->str)-2, SHLIB_SUFFIX); - module = g_module_open (shlib_full->str, G_MODULE_BIND_LAZY); - } - - g_string_free (shlib_full, TRUE); - } + module = load_one_shared_library (shlibs[i]); if (module == NULL) { diff --git a/giscanner/ast.py b/giscanner/ast.py index c2f89a6..5854091 100644 --- a/giscanner/ast.py +++ b/giscanner/ast.py @@ -372,6 +372,10 @@ class Namespace(object): self.type_names = {} # Maps from GTName -> node self.ctypes = {} # Maps from CType -> node self.symbols = {} # Maps from function symbols -> Function + self.includes = set() # Include + self.shared_libraries = [] # str + self.c_includes = [] # str + self.exported_packages = [] # str def type_from_name(self, name, ctype=None): """Backwards compatibility method for older .gir files, which @@ -1020,6 +1024,8 @@ class Class(Node, Registered): field.anonymous_node.walk(callback, chain) for sig in self.signals: sig.walk(callback, chain) + for prop in self.properties: + prop.walk(callback, chain) class Interface(Node, Registered): diff --git a/giscanner/docmain.py b/giscanner/docmain.py index fc78ed6..afd509f 100644 --- a/giscanner/docmain.py +++ b/giscanner/docmain.py @@ -32,7 +32,7 @@ def doc_main(args): help="Directory to write output to") parser.add_option("-l", "--language", action="store", dest="language", - default="Python", + default="c", help="Output language") parser.add_option("", "--add-include-path", action="append", dest="include_paths", default=[], diff --git a/giscanner/docwriter.py b/giscanner/docwriter.py index e962b91..7924b2d 100644 --- a/giscanner/docwriter.py +++ b/giscanner/docwriter.py @@ -38,10 +38,18 @@ def make_page_id(node, recursive=False): else: return 'index' + if hasattr(node, '_chain') and node._chain: + parent = node._chain[-1] + else: + parent = None + + if parent is None: + return '%s.%s' % (node.namespace.name, node.name) + if isinstance(node, (ast.Property, ast.Signal, ast.VFunction)): - return '%s-%s' % (make_page_id(node.parent, recursive=True), node.name) + return '%s-%s' % (make_page_id(parent, recursive=True), node.name) else: - return '%s.%s' % (make_page_id(node.parent, recursive=True), node.name) + return '%s.%s' % (make_page_id(parent, recursive=True), node.name) def get_node_kind(node): if isinstance(node, ast.Namespace): @@ -314,7 +322,10 @@ class DocFormatter(object): return make_page_id(node) def format_xref(self, node, **attrdict): - if isinstance(node, ast.Member): + if node is None: + attrs = [('xref', 'index')] + attrdict.items() + return xmlwriter.build_xml_tag('link', attrs) + elif isinstance(node, ast.Member): # Enum/BitField members are linked to the main enum page. return self.format_xref(node.parent, **attrdict) + '.' + node.name else: @@ -587,27 +598,25 @@ class DocWriter(object): # directory already made pass - nodes = [self._transformer.namespace] - for node in self._transformer.namespace.itervalues(): - if isinstance(node, ast.Function) and node.moved_to is not None: - continue - if getattr(node, 'disguised', False): - continue - nodes.append(node) - if isinstance(node, (ast.Class, ast.Interface, ast.Record)): - nodes += getattr(node, 'methods', []) - nodes += getattr(node, 'static_methods', []) - nodes += getattr(node, 'virtual_methods', []) - nodes += getattr(node, 'properties', []) - nodes += getattr(node, 'signals', []) - nodes += getattr(node, 'constructors', []) - for node in nodes: - if self._formatter.should_render_node(node): - self._render_node(node, output) - - def _render_node(self, node, output): + self._walk_node(output, self._transformer.namespace, []) + self._transformer.namespace.walk(lambda node, chain: self._walk_node(output, node, chain)) + + def _walk_node(self, output, node, chain): + if isinstance(node, ast.Function) and node.moved_to is not None: + return False + if getattr(node, 'disguised', False): + return False + if self._formatter.should_render_node(node): + self._render_node(node, chain, output) + return True + return False + + def _render_node(self, node, chain, output): namespace = self._transformer.namespace + # A bit of a hack...maybe this should be an official API + node._chain = list(chain) + page_kind = get_node_kind(node) template_name = '%s/%s.tmpl' % (self._language, page_kind) page_id = make_page_id(node) diff --git a/giscanner/dumper.py b/giscanner/dumper.py index dd1813f..d95ea6b 100644 --- a/giscanner/dumper.py +++ b/giscanner/dumper.py @@ -206,7 +206,12 @@ class DumpCompiler(object): # header of the library being introspected if self._compiler_cmd == 'gcc' and not self._options.init_sections: args.append('-Wall') - args.append("-Wno-deprecated-declarations") + # The Microsoft compiler uses different option flags for + # silencing warnings on deprecated function usage + if self._pkgconfig_msvc_flags: + args.append("-wd4996") + else: + args.append("-Wno-deprecated-declarations") pkgconfig_flags = self._run_pkgconfig('--cflags') args.extend(pkgconfig_flags) cflags = os.environ.get('CFLAGS', '') diff --git a/giscanner/girparser.py b/giscanner/girparser.py index 4cba506..63a3fd0 100644 --- a/giscanner/girparser.py +++ b/giscanner/girparser.py @@ -46,9 +46,6 @@ class GIRParser(object): def __init__(self, types_only=False): self._types_only = types_only - self._shared_libraries = [] - self._includes = set() - self._pkgconfig_packages = set() self._namespace = None self._filename_stack = [] @@ -62,10 +59,9 @@ class GIRParser(object): self._filename_stack.pop() def parse_tree(self, tree): - self._includes.clear() self._namespace = None - self._shared_libraries = [] self._pkgconfig_packages = set() + self._includes = set() self._c_includes = set() self._c_prefix = None self._parse_api(tree.getroot()) @@ -73,23 +69,9 @@ class GIRParser(object): def get_namespace(self): return self._namespace - def get_shared_libraries(self): - return self._shared_libraries - - def get_includes(self): - return self._includes - - def get_c_includes(self): - return self._c_includes - def get_c_prefix(self): return self._c_prefix - def get_pkgconfig_packages(self): - if not hasattr(self, '_pkgconfig_packages'): - self._pkgconfig_packages = [] - return self._pkgconfig_packages - # Private def _find_first_child(self, node, name_or_names): @@ -144,8 +126,10 @@ class GIRParser(object): identifier_prefixes=identifier_prefixes, symbol_prefixes=symbol_prefixes) if 'shared-library' in ns.attrib: - self._shared_libraries.extend( - ns.attrib['shared-library'].split(',')) + self._namespace.shared_libraries = ns.attrib['shared-library'].split(',') + self._namespace.includes = self._includes + self._namespace.c_includes = self._c_includes + self._namespace.exported_packages = self._pkgconfig_packages parser_methods = { _corens('alias'): self._parse_alias, diff --git a/giscanner/girwriter.py b/giscanner/girwriter.py index ea9305c..d6b3485 100644 --- a/giscanner/girwriter.py +++ b/giscanner/girwriter.py @@ -30,23 +30,15 @@ COMPATIBLE_GIR_VERSION = '1.2' class GIRWriter(XMLWriter): - def __init__(self, namespace, shlibs, includes, pkgs, c_includes): + def __init__(self, namespace): super(GIRWriter, self).__init__() self.write_comment( '''This file was automatically generated from C sources - DO NOT EDIT! To affect the contents of this file, edit the original C definitions, and/or use gtk-doc annotations. ''') - self._write_repository(namespace, shlibs, includes, pkgs, - c_includes) - - def _write_repository(self, namespace, shlibs, includes=None, - packages=None, c_includes=None): - if includes is None: - includes = frozenset() - if packages is None: - packages = frozenset() - if c_includes is None: - c_includes = frozenset() + self._write_repository(namespace) + + def _write_repository(self, namespace): attrs = [ ('version', COMPATIBLE_GIR_VERSION), ('xmlns', 'http://www.gtk.org/introspection/core/1.0'), @@ -54,14 +46,14 @@ and/or use gtk-doc annotations. ''') ('xmlns:glib', 'http://www.gtk.org/introspection/glib/1.0'), ] with self.tagcontext('repository', attrs): - for include in sorted(includes): + for include in sorted(namespace.includes): self._write_include(include) - for pkg in sorted(set(packages)): + for pkg in sorted(set(namespace.exported_packages)): self._write_pkgconfig_pkg(pkg) - for c_include in sorted(set(c_includes)): + for c_include in sorted(set(namespace.c_includes)): self._write_c_include(c_include) self._namespace = namespace - self._write_namespace(namespace, shlibs) + self._write_namespace(namespace) self._namespace = None def _write_include(self, include): @@ -76,10 +68,10 @@ and/or use gtk-doc annotations. ''') attrs = [('name', c_include)] self.write_tag('c:include', attrs) - def _write_namespace(self, namespace, shlibs): + def _write_namespace(self, namespace): attrs = [('name', namespace.name), ('version', namespace.version), - ('shared-library', ','.join(shlibs)), + ('shared-library', ','.join(namespace.shared_libraries)), ('c:identifier-prefixes', ','.join(namespace.identifier_prefixes)), ('c:symbol-prefixes', ','.join(namespace.symbol_prefixes))] with self.tagcontext('namespace', attrs): diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py index 56d73f8..42867f0 100755 --- a/giscanner/scannermain.py +++ b/giscanner/scannermain.py @@ -42,8 +42,23 @@ from giscanner.sourcescanner import SourceScanner from giscanner.transformer import Transformer from . import utils +def process_cflags_begin(option, opt, value, parser): + cflags = getattr(parser.values, option.dest) + while len(parser.rargs) > 0 and parser.rargs[0] != '--cflags-end': + cflags.append(parser.rargs.pop(0)) + +def process_cflags_end(option, opt, value, parser): + pass + def get_preprocessor_option_group(parser): group = optparse.OptionGroup(parser, "Preprocessor options") + group.add_option("", "--cflags-begin", + help="Start preprocessor/compiler flags", + dest="cflags", default=[], + action="callback", callback=process_cflags_begin) + group.add_option("", "--cflags-end", + help="End preprocessor/compiler flags", + action="callback", callback=process_cflags_end) group.add_option("-I", help="Pre-processor include file", action="append", dest="cpp_includes", default=[]) @@ -193,11 +208,7 @@ def passthrough_gir(path, f): parser = GIRParser() parser.parse(path) - writer = GIRWriter(parser.get_namespace(), - parser.get_shared_libraries(), - parser.get_includes(), - parser.get_pkgconfig_packages(), - parser.get_c_includes()) + writer = GIRWriter(parser.get_namespace()) f.write(writer.get_xml()) def test_codegen(optstring): @@ -357,7 +368,8 @@ def create_source_scanner(options, args): ss = SourceScanner() ss.set_cpp_options(options.cpp_includes, options.cpp_defines, - options.cpp_undefines) + options.cpp_undefines, + cflags=options.cflags) ss.parse_files(filenames) ss.parse_macros(filenames) return ss @@ -451,6 +463,8 @@ def scanner_main(args): else: shlibs = [] + transformer.namespace.shared_libraries = shlibs + main = MainTransformer(transformer, blocks) main.transform() @@ -473,8 +487,9 @@ def scanner_main(args): else: exported_packages = options.packages - writer = Writer(transformer.namespace, shlibs, transformer.get_includes(), - exported_packages, options.c_includes) + transformer.namespace.c_includes = options.c_includes + transformer.namespace.exported_packages = exported_packages + writer = Writer(transformer.namespace) data = writer.get_xml() write_output(data, options) diff --git a/giscanner/sourcescanner.py b/giscanner/sourcescanner.py index 9eb4ab4..de13776 100644 --- a/giscanner/sourcescanner.py +++ b/giscanner/sourcescanner.py @@ -223,7 +223,8 @@ class SourceScanner(object): # Public API - def set_cpp_options(self, includes, defines, undefines): + def set_cpp_options(self, includes, defines, undefines, cflags=[]): + self._cpp_options.extend(cflags) for prefix, args in [('-I', includes), ('-D', defines), ('-U', undefines)]: diff --git a/giscanner/transformer.py b/giscanner/transformer.py index d6a5f8f..3513fc8 100644 --- a/giscanner/transformer.py +++ b/giscanner/transformer.py @@ -54,15 +54,11 @@ class Transformer(object): self._namespace = namespace self._pkg_config_packages = set() self._typedefs_ns = {} - self._includes = {} # Namespace> - self._include_names = set() # string namespace + self._parsed_includes = {} # Namespace> self._includepaths = [] self._passthrough_mode = False self._annotations = {} - def get_includes(self): - return self._include_names - def get_pkgconfig_packages(self): return self._pkg_config_packages @@ -125,11 +121,11 @@ class Transformer(object): self._includepaths = list(paths) def register_include(self, include): - if include in self._include_names: + if include in self._namespace.includes: return + self._namespace.includes.add(include) filename = self._find_include(include) self._parse_include(filename) - self._include_names.add(include) def register_include_uninstalled(self, include_path): basename = os.path.basename(include_path) @@ -138,10 +134,10 @@ class Transformer(object): "Include path %r must be a filename path ending in .gir" % (include_path, )) girname = basename[:-4] include = ast.Include.from_string(girname) - if include in self._include_names: + if include in self._namespace.includes: return + self._namespace.includes.add(include) self._parse_include(include_path, uninstalled=True) - self._include_names.add(include) def lookup_giname(self, name): """Given a name of the form Foo or Bar.Foo, @@ -155,11 +151,11 @@ namespaces.""" if ns == self._namespace.name: return self._namespace.get(giname) # Fallback to the main namespace if not a dependency and matches a prefix - if ns in self._namespace.identifier_prefixes and not ns in self._includes: + if ns in self._namespace.identifier_prefixes and not ns in self._parsed_includes: message.warn(("Deprecated reference to identifier " + "prefix %s in GIName %s") % (ns, name)) return self._namespace.get(giname) - include = self._includes[ns] + include = self._parsed_includes[ns] return include.get(giname) def lookup_typenode(self, typeobj): @@ -196,7 +192,7 @@ None.""" self._parse_include(filename) parser = self._cachestore.load(filename) self._namespace = parser.get_namespace() - del self._includes[self._namespace.name] + del self._parsed_includes[self._namespace.name] return self def _parse_include(self, filename, uninstalled=False): @@ -209,20 +205,22 @@ None.""" if self._cachestore is not None: self._cachestore.store(filename, parser) - for include in parser.get_includes(): - self.register_include(include) + for include in parser.get_namespace().includes: + if include.name not in self._parsed_includes: + dep_filename = self._find_include(include) + self._parse_include(dep_filename) if not uninstalled: - for pkg in parser.get_pkgconfig_packages(): + for pkg in parser.get_namespace().exported_packages: self._pkg_config_packages.add(pkg) namespace = parser.get_namespace() - self._includes[namespace.name] = namespace + self._parsed_includes[namespace.name] = namespace def _iter_namespaces(self): """Return an iterator over all included namespaces; the currently-scanned namespace is first.""" yield self._namespace - for ns in self._includes.itervalues(): + for ns in self._parsed_includes.itervalues(): yield ns def _sort_matches(self, x, y): @@ -481,8 +479,8 @@ raise ValueError.""" def _create_parameters(self, symbol, base_type): # warn if we see annotations for unknown parameters param_names = set(child.ident for child in base_type.child_list) - for child in base_type.child_list: - yield self._create_parameter(symbol, child) + for i, child in enumerate(base_type.child_list): + yield self._create_parameter(symbol, i, child) def _synthesize_union_type(self, symbol, parent_symbol): # Synthesize a named union so that it can be referenced. @@ -695,16 +693,20 @@ raise ValueError.""" return container return ast.Type(ctype=ctype, is_const=is_const, complete_ctype=complete_ctype) - def _create_parameter(self, parent_symbol, symbol): + def _create_parameter(self, parent_symbol, index, symbol): if symbol.type == CSYMBOL_TYPE_ELLIPSIS: ptype = ast.Varargs() else: ptype = self._create_type_from_base(symbol.base_type, is_parameter=True) - if symbol.ident is None and symbol.base_type and symbol.base_type.type != CTYPE_VOID: - message.warn_symbol(parent_symbol, "missing parameter name; undocumentable") + if symbol.ident is None: + if symbol.base_type and symbol.base_type.type != CTYPE_VOID: + message.warn_symbol(parent_symbol, "missing parameter name; undocumentable") + ident = 'arg%d' % (index, ) + else: + ident = symbol.ident - return ast.Parameter(symbol.ident, ptype) + return ast.Parameter(ident, ptype) def _create_return(self, source_type): typeval = self._create_type_from_base(source_type, is_return=True) @@ -895,7 +897,7 @@ Note that type resolution may not succeed.""" # which has nominal namespace of "Meta", but a few classes are # "Mutter". We don't export that data in introspection currently. # Basically the library should be fixed, but we'll hack around it here. - for namespace in self._includes.itervalues(): + for namespace in self._parsed_includes.itervalues(): target = namespace.get_by_ctype(pointer_stripped) if target: typeval.target_giname = '%s.%s' % (namespace.name, target.name) diff --git a/gobject-introspection-1.0.pc b/gobject-introspection-1.0.pc index cd99588..72c538c 100644 --- a/gobject-introspection-1.0.pc +++ b/gobject-introspection-1.0.pc @@ -21,4 +21,4 @@ Libs.private: Name: gobject-introspection Description: GObject Introspection -Version: 1.35.8 +Version: 1.35.9 diff --git a/gobject-introspection-no-export-1.0.pc b/gobject-introspection-no-export-1.0.pc index 13d23ba..125fdde 100644 --- a/gobject-introspection-no-export-1.0.pc +++ b/gobject-introspection-no-export-1.0.pc @@ -20,4 +20,4 @@ Libs.private: Name: gobject-introspection Description: GObject Introspection -Version: 1.35.8 +Version: 1.35.9 diff --git a/m4/Makefile.in b/m4/Makefile.in index c1c18bc..4c79657 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.12.2 from Makefile.am. +# Makefile.in generated by automake 1.13.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. @@ -50,7 +50,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = m4 -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -82,6 +82,7 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -297,11 +298,9 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: cscope cscopelist: @@ -439,15 +438,16 @@ uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/scannerparser.c b/scannerparser.c index 2f6dd7d..6f4575b 100644 --- a/scannerparser.c +++ b/scannerparser.c @@ -188,8 +188,8 @@ out: /* In a future release of Bison, this section will be replaced by #include "y.tab.h". */ -#ifndef YY_Y_TAB_H -# define YY_Y_TAB_H +#ifndef YY_SCANNERPARSER_H +# define YY_SCANNERPARSER_H /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 1 @@ -386,7 +386,7 @@ int yyparse (); #endif #endif /* ! YYPARSE_PARAM */ -#endif /* !YY_Y_TAB_H */ +#endif /* !YY_SCANNERPARSER_H */ /* Copy the second part of user declarations. */ diff --git a/tests/Makefile.in b/tests/Makefile.in index 4c6f202..ef899fb 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.12.2 from Makefile.am. +# Makefile.in generated by automake 1.13.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. @@ -58,8 +58,8 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/build-aux/depcomp $(top_srcdir)/common.mk +DIST_COMMON = $(top_srcdir)/common.mk $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am $(top_srcdir)/build-aux/depcomp subdir = tests ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ @@ -122,13 +122,14 @@ SOURCES = $(libeverything_1_0_la_SOURCES) \ $(libgimarshallingtests_1_0_la_SOURCES) DIST_SOURCES = $(libeverything_1_0_la_SOURCES) \ $(libgimarshallingtests_1_0_la_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -165,9 +166,29 @@ am__installdirs = "$(DESTDIR)$(testsdir)" DATA = $(tests_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -544,7 +565,7 @@ uninstall-testsDATA: # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. -$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): +$(am__recursive_targets): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ @@ -572,31 +593,13 @@ $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done -cscopelist-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \ - done -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -612,12 +615,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -629,15 +627,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -646,9 +640,10 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive -cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP)'; \ +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ @@ -833,25 +828,23 @@ ps-am: uninstall-am: uninstall-testsDATA -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ - check-am cscopelist-recursive ctags-recursive install \ - install-am install-strip tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-checkLTLIBRARIES \ - clean-generic clean-libtool cscopelist cscopelist-recursive \ - ctags ctags-recursive distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - install-testsDATA installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-testsDATA +.MAKE: $(am__recursive_targets) all check check-am install install-am \ + install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-checkLTLIBRARIES clean-generic \ + clean-libtool cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip install-testsDATA installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-testsDATA everything-stamp.h: Makefile diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c index 2e1279a..1998161 100644 --- a/tests/gimarshallingtests.c +++ b/tests/gimarshallingtests.c @@ -1,5 +1,5 @@ /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- - * vim: tabstop=4 shiftwidth=4 expandtab + *vim: tabstop=4 shiftwidth=4 expandtab */ #include "gimarshallingtests.h" @@ -13,25 +13,25 @@ static void gi_marshalling_tests_boxed_struct_free (GIMarshallingTestsBoxedStruc gboolean gi_marshalling_tests_boolean_return_true (void) { - return TRUE; + return TRUE; } gboolean gi_marshalling_tests_boolean_return_false (void) { - return FALSE; + return FALSE; } void gi_marshalling_tests_boolean_in_true (gboolean v) { - g_assert (v == TRUE); + g_assert (v == TRUE); } void gi_marshalling_tests_boolean_in_false (gboolean v) { - g_assert (v == FALSE); + g_assert (v == FALSE); } /** @@ -41,7 +41,7 @@ gi_marshalling_tests_boolean_in_false (gboolean v) void gi_marshalling_tests_boolean_out_true (gboolean *v) { - *v = TRUE; + *v = TRUE; } /** @@ -51,7 +51,7 @@ gi_marshalling_tests_boolean_out_true (gboolean *v) void gi_marshalling_tests_boolean_out_false (gboolean *v) { - *v = FALSE; + *v = FALSE; } /** @@ -61,8 +61,8 @@ gi_marshalling_tests_boolean_out_false (gboolean *v) void gi_marshalling_tests_boolean_inout_true_false (gboolean *v) { - g_assert (*v == TRUE); - *v = FALSE; + g_assert (*v == TRUE); + *v = FALSE; } /** @@ -72,8 +72,8 @@ gi_marshalling_tests_boolean_inout_true_false (gboolean *v) void gi_marshalling_tests_boolean_inout_false_true (gboolean *v) { - g_assert (*v == FALSE); - *v = TRUE; + g_assert (*v == FALSE); + *v = TRUE; } @@ -82,25 +82,25 @@ gi_marshalling_tests_boolean_inout_false_true (gboolean *v) gint8 gi_marshalling_tests_int8_return_max (void) { - return G_MAXINT8; + return G_MAXINT8; } gint8 gi_marshalling_tests_int8_return_min (void) { - return G_MININT8; + return G_MININT8; } void gi_marshalling_tests_int8_in_max (gint8 v) { - g_assert_cmpint(v, ==, G_MAXINT8); + g_assert_cmpint (v, ==, G_MAXINT8); } void gi_marshalling_tests_int8_in_min (gint8 v) { - g_assert_cmpint(v, ==, G_MININT8); + g_assert_cmpint (v, ==, G_MININT8); } /** @@ -110,7 +110,7 @@ gi_marshalling_tests_int8_in_min (gint8 v) void gi_marshalling_tests_int8_out_max (gint8 *v) { - *v = G_MAXINT8; + *v = G_MAXINT8; } /** @@ -120,7 +120,7 @@ gi_marshalling_tests_int8_out_max (gint8 *v) void gi_marshalling_tests_int8_out_min (gint8 *v) { - *v = G_MININT8; + *v = G_MININT8; } /** @@ -130,8 +130,8 @@ gi_marshalling_tests_int8_out_min (gint8 *v) void gi_marshalling_tests_int8_inout_max_min (gint8 *v) { - g_assert_cmpint(*v, ==, G_MAXINT8); - *v = G_MININT8; + g_assert_cmpint (*v, ==, G_MAXINT8); + *v = G_MININT8; } /** @@ -141,21 +141,21 @@ gi_marshalling_tests_int8_inout_max_min (gint8 *v) void gi_marshalling_tests_int8_inout_min_max (gint8 *v) { - g_assert_cmpint(*v, ==, G_MININT8); - *v = G_MAXINT8; + g_assert_cmpint (*v, ==, G_MININT8); + *v = G_MAXINT8; } guint8 gi_marshalling_tests_uint8_return (void) { - return G_MAXUINT8; + return G_MAXUINT8; } void gi_marshalling_tests_uint8_in (guint8 v) { - g_assert_cmpuint(v, ==, G_MAXUINT8); + g_assert_cmpuint (v, ==, G_MAXUINT8); } /** @@ -165,7 +165,7 @@ gi_marshalling_tests_uint8_in (guint8 v) void gi_marshalling_tests_uint8_out (guint8 *v) { - *v = G_MAXUINT8; + *v = G_MAXUINT8; } /** @@ -175,33 +175,33 @@ gi_marshalling_tests_uint8_out (guint8 *v) void gi_marshalling_tests_uint8_inout (guint8 *v) { - g_assert_cmpuint(*v, ==, G_MAXUINT8); - *v = 0; + g_assert_cmpuint (*v, ==, G_MAXUINT8); + *v = 0; } gint16 gi_marshalling_tests_int16_return_max (void) { - return G_MAXINT16; + return G_MAXINT16; } gint16 gi_marshalling_tests_int16_return_min (void) { - return G_MININT16; + return G_MININT16; } void gi_marshalling_tests_int16_in_max (gint16 v) { - g_assert_cmpint(v, ==, G_MAXINT16); + g_assert_cmpint (v, ==, G_MAXINT16); } void gi_marshalling_tests_int16_in_min (gint16 v) { - g_assert_cmpint(v, ==, G_MININT16); + g_assert_cmpint (v, ==, G_MININT16); } /** @@ -211,7 +211,7 @@ gi_marshalling_tests_int16_in_min (gint16 v) void gi_marshalling_tests_int16_out_max (gint16 *v) { - *v = G_MAXINT16; + *v = G_MAXINT16; } /** @@ -221,7 +221,7 @@ gi_marshalling_tests_int16_out_max (gint16 *v) void gi_marshalling_tests_int16_out_min (gint16 *v) { - *v = G_MININT16; + *v = G_MININT16; } /** @@ -231,8 +231,8 @@ gi_marshalling_tests_int16_out_min (gint16 *v) void gi_marshalling_tests_int16_inout_max_min (gint16 *v) { - g_assert_cmpint(*v, ==, G_MAXINT16); - *v = G_MININT16; + g_assert_cmpint (*v, ==, G_MAXINT16); + *v = G_MININT16; } /** @@ -242,21 +242,21 @@ gi_marshalling_tests_int16_inout_max_min (gint16 *v) void gi_marshalling_tests_int16_inout_min_max (gint16 *v) { - g_assert_cmpint(*v, ==, G_MININT16); - *v = G_MAXINT16; + g_assert_cmpint (*v, ==, G_MININT16); + *v = G_MAXINT16; } guint16 gi_marshalling_tests_uint16_return (void) { - return G_MAXUINT16; + return G_MAXUINT16; } void gi_marshalling_tests_uint16_in (guint16 v) { - g_assert_cmpuint(v, ==, G_MAXUINT16); + g_assert_cmpuint (v, ==, G_MAXUINT16); } /** @@ -266,7 +266,7 @@ gi_marshalling_tests_uint16_in (guint16 v) void gi_marshalling_tests_uint16_out (guint16 *v) { - *v = G_MAXUINT16; + *v = G_MAXUINT16; } /** @@ -276,33 +276,33 @@ gi_marshalling_tests_uint16_out (guint16 *v) void gi_marshalling_tests_uint16_inout (guint16 *v) { - g_assert_cmpuint(*v, ==, G_MAXUINT16); - *v = 0; + g_assert_cmpuint (*v, ==, G_MAXUINT16); + *v = 0; } gint32 gi_marshalling_tests_int32_return_max (void) { - return G_MAXINT32; + return G_MAXINT32; } gint32 gi_marshalling_tests_int32_return_min (void) { - return G_MININT32; + return G_MININT32; } void gi_marshalling_tests_int32_in_max (gint32 v) { - g_assert_cmpint(v, ==, G_MAXINT32); + g_assert_cmpint (v, ==, G_MAXINT32); } void gi_marshalling_tests_int32_in_min (gint32 v) { - g_assert_cmpint(v, ==, G_MININT32); + g_assert_cmpint (v, ==, G_MININT32); } /** @@ -312,7 +312,7 @@ gi_marshalling_tests_int32_in_min (gint32 v) void gi_marshalling_tests_int32_out_max (gint32 *v) { - *v = G_MAXINT32; + *v = G_MAXINT32; } /** @@ -322,7 +322,7 @@ gi_marshalling_tests_int32_out_max (gint32 *v) void gi_marshalling_tests_int32_out_min (gint32 *v) { - *v = G_MININT32; + *v = G_MININT32; } /** @@ -332,8 +332,8 @@ gi_marshalling_tests_int32_out_min (gint32 *v) void gi_marshalling_tests_int32_inout_max_min (gint32 *v) { - g_assert_cmpint(*v, ==, G_MAXINT32); - *v = G_MININT32; + g_assert_cmpint (*v, ==, G_MAXINT32); + *v = G_MININT32; } /** @@ -343,21 +343,21 @@ gi_marshalling_tests_int32_inout_max_min (gint32 *v) void gi_marshalling_tests_int32_inout_min_max (gint32 *v) { - g_assert_cmpint(*v, ==, G_MININT32); - *v = G_MAXINT32; + g_assert_cmpint (*v, ==, G_MININT32); + *v = G_MAXINT32; } guint32 gi_marshalling_tests_uint32_return (void) { - return G_MAXUINT32; + return G_MAXUINT32; } void gi_marshalling_tests_uint32_in (guint32 v) { - g_assert_cmpuint(v, ==, G_MAXUINT32); + g_assert_cmpuint (v, ==, G_MAXUINT32); } /** @@ -367,7 +367,7 @@ gi_marshalling_tests_uint32_in (guint32 v) void gi_marshalling_tests_uint32_out (guint32 *v) { - *v = G_MAXUINT32; + *v = G_MAXUINT32; } /** @@ -377,33 +377,33 @@ gi_marshalling_tests_uint32_out (guint32 *v) void gi_marshalling_tests_uint32_inout (guint32 *v) { - g_assert_cmpuint(*v, ==, G_MAXUINT32); - *v = 0; + g_assert_cmpuint (*v, ==, G_MAXUINT32); + *v = 0; } gint64 gi_marshalling_tests_int64_return_max (void) { - return G_MAXINT64; + return G_MAXINT64; } gint64 gi_marshalling_tests_int64_return_min (void) { - return G_MININT64; + return G_MININT64; } void gi_marshalling_tests_int64_in_max (gint64 v) { - g_assert_cmpint(v, ==, G_MAXINT64); + g_assert_cmpint (v, ==, G_MAXINT64); } void gi_marshalling_tests_int64_in_min (gint64 v) { - g_assert_cmpint(v, ==, G_MININT64); + g_assert_cmpint (v, ==, G_MININT64); } /** @@ -413,7 +413,7 @@ gi_marshalling_tests_int64_in_min (gint64 v) void gi_marshalling_tests_int64_out_max (gint64 *v) { - *v = G_MAXINT64; + *v = G_MAXINT64; } /** @@ -423,7 +423,7 @@ gi_marshalling_tests_int64_out_max (gint64 *v) void gi_marshalling_tests_int64_out_min (gint64 *v) { - *v = G_MININT64; + *v = G_MININT64; } /** @@ -433,8 +433,8 @@ gi_marshalling_tests_int64_out_min (gint64 *v) void gi_marshalling_tests_int64_inout_max_min (gint64 *v) { - g_assert_cmpint(*v, ==, G_MAXINT64); - *v = G_MININT64; + g_assert_cmpint (*v, ==, G_MAXINT64); + *v = G_MININT64; } /** @@ -444,21 +444,21 @@ gi_marshalling_tests_int64_inout_max_min (gint64 *v) void gi_marshalling_tests_int64_inout_min_max (gint64 *v) { - g_assert_cmpint(*v, ==, G_MININT64); - *v = G_MAXINT64; + g_assert_cmpint (*v, ==, G_MININT64); + *v = G_MAXINT64; } guint64 gi_marshalling_tests_uint64_return (void) { - return G_MAXUINT64; + return G_MAXUINT64; } void gi_marshalling_tests_uint64_in (guint64 v) { - g_assert_cmpuint(v, ==, G_MAXUINT64); + g_assert_cmpuint (v, ==, G_MAXUINT64); } /** @@ -468,7 +468,7 @@ gi_marshalling_tests_uint64_in (guint64 v) void gi_marshalling_tests_uint64_out (guint64 *v) { - *v = G_MAXUINT64; + *v = G_MAXUINT64; } /** @@ -478,33 +478,33 @@ gi_marshalling_tests_uint64_out (guint64 *v) void gi_marshalling_tests_uint64_inout (guint64 *v) { - g_assert_cmpuint(*v, ==, G_MAXUINT64); - *v = 0; + g_assert_cmpuint (*v, ==, G_MAXUINT64); + *v = 0; } gshort gi_marshalling_tests_short_return_max (void) { - return G_MAXSHORT; + return G_MAXSHORT; } gshort gi_marshalling_tests_short_return_min (void) { - return G_MINSHORT; + return G_MINSHORT; } void gi_marshalling_tests_short_in_max (gshort short_) { - g_assert_cmpint(short_, ==, G_MAXSHORT); + g_assert_cmpint (short_, ==, G_MAXSHORT); } void gi_marshalling_tests_short_in_min (gshort short_) { - g_assert_cmpint(short_, ==, G_MINSHORT); + g_assert_cmpint (short_, ==, G_MINSHORT); } /** @@ -514,7 +514,7 @@ gi_marshalling_tests_short_in_min (gshort short_) void gi_marshalling_tests_short_out_max (gshort *short_) { - *short_ = G_MAXSHORT; + *short_ = G_MAXSHORT; } /** @@ -524,7 +524,7 @@ gi_marshalling_tests_short_out_max (gshort *short_) void gi_marshalling_tests_short_out_min (gshort *short_) { - *short_ = G_MINSHORT; + *short_ = G_MINSHORT; } /** @@ -534,8 +534,8 @@ gi_marshalling_tests_short_out_min (gshort *short_) void gi_marshalling_tests_short_inout_max_min (gshort *short_) { - g_assert_cmpint(*short_, ==, G_MAXSHORT); - *short_ = G_MINSHORT; + g_assert_cmpint (*short_, ==, G_MAXSHORT); + *short_ = G_MINSHORT; } /** @@ -545,21 +545,21 @@ gi_marshalling_tests_short_inout_max_min (gshort *short_) void gi_marshalling_tests_short_inout_min_max (gshort *short_) { - g_assert_cmpint(*short_, ==, G_MINSHORT); - *short_ = G_MAXSHORT; + g_assert_cmpint (*short_, ==, G_MINSHORT); + *short_ = G_MAXSHORT; } gushort gi_marshalling_tests_ushort_return (void) { - return G_MAXUSHORT; + return G_MAXUSHORT; } void gi_marshalling_tests_ushort_in (gushort ushort_) { - g_assert_cmpuint(ushort_, ==, G_MAXUSHORT); + g_assert_cmpuint (ushort_, ==, G_MAXUSHORT); } /** @@ -569,7 +569,7 @@ gi_marshalling_tests_ushort_in (gushort ushort_) void gi_marshalling_tests_ushort_out (gushort *ushort_) { - *ushort_ = G_MAXUSHORT; + *ushort_ = G_MAXUSHORT; } /** @@ -579,33 +579,33 @@ gi_marshalling_tests_ushort_out (gushort *ushort_) void gi_marshalling_tests_ushort_inout (gushort *ushort_) { - g_assert_cmpuint(*ushort_, ==, G_MAXUSHORT); - *ushort_ = 0; + g_assert_cmpuint (*ushort_, ==, G_MAXUSHORT); + *ushort_ = 0; } gint gi_marshalling_tests_int_return_max (void) { - return G_MAXINT; + return G_MAXINT; } gint gi_marshalling_tests_int_return_min (void) { - return G_MININT; + return G_MININT; } void gi_marshalling_tests_int_in_max (gint int_) { - g_assert_cmpint(int_, ==, G_MAXINT); + g_assert_cmpint (int_, ==, G_MAXINT); } void gi_marshalling_tests_int_in_min (gint int_) { - g_assert_cmpint(int_, ==, G_MININT); + g_assert_cmpint (int_, ==, G_MININT); } /** @@ -615,7 +615,7 @@ gi_marshalling_tests_int_in_min (gint int_) void gi_marshalling_tests_int_out_max (gint *int_) { - *int_ = G_MAXINT; + *int_ = G_MAXINT; } /** @@ -625,7 +625,7 @@ gi_marshalling_tests_int_out_max (gint *int_) void gi_marshalling_tests_int_out_min (gint *int_) { - *int_ = G_MININT; + *int_ = G_MININT; } /** @@ -635,8 +635,8 @@ gi_marshalling_tests_int_out_min (gint *int_) void gi_marshalling_tests_int_inout_max_min (gint *int_) { - g_assert_cmpint(*int_, ==, G_MAXINT); - *int_ = G_MININT; + g_assert_cmpint (*int_, ==, G_MAXINT); + *int_ = G_MININT; } /** @@ -646,21 +646,21 @@ gi_marshalling_tests_int_inout_max_min (gint *int_) void gi_marshalling_tests_int_inout_min_max (gint *int_) { - g_assert_cmpint(*int_, ==, G_MININT); - *int_ = G_MAXINT; + g_assert_cmpint (*int_, ==, G_MININT); + *int_ = G_MAXINT; } guint gi_marshalling_tests_uint_return (void) { - return G_MAXUINT; + return G_MAXUINT; } void gi_marshalling_tests_uint_in (guint uint_) { - g_assert_cmpuint(uint_, ==, G_MAXUINT); + g_assert_cmpuint (uint_, ==, G_MAXUINT); } /** @@ -670,7 +670,7 @@ gi_marshalling_tests_uint_in (guint uint_) void gi_marshalling_tests_uint_out (guint *uint_) { - *uint_ = G_MAXUINT; + *uint_ = G_MAXUINT; } /** @@ -680,33 +680,33 @@ gi_marshalling_tests_uint_out (guint *uint_) void gi_marshalling_tests_uint_inout (guint *uint_) { - g_assert_cmpuint(*uint_, ==, G_MAXUINT); - *uint_ = 0; + g_assert_cmpuint (*uint_, ==, G_MAXUINT); + *uint_ = 0; } glong gi_marshalling_tests_long_return_max (void) { - return G_MAXLONG; + return G_MAXLONG; } glong gi_marshalling_tests_long_return_min (void) { - return G_MINLONG; + return G_MINLONG; } void gi_marshalling_tests_long_in_max (glong long_) { - g_assert_cmpint(long_, ==, G_MAXLONG); + g_assert_cmpint (long_, ==, G_MAXLONG); } void gi_marshalling_tests_long_in_min (glong long_) { - g_assert_cmpint(long_, ==, G_MINLONG); + g_assert_cmpint (long_, ==, G_MINLONG); } /** @@ -716,7 +716,7 @@ gi_marshalling_tests_long_in_min (glong long_) void gi_marshalling_tests_long_out_max (glong *long_) { - *long_ = G_MAXLONG; + *long_ = G_MAXLONG; } /** @@ -726,7 +726,7 @@ gi_marshalling_tests_long_out_max (glong *long_) void gi_marshalling_tests_long_out_min (glong *long_) { - *long_ = G_MINLONG; + *long_ = G_MINLONG; } /** @@ -736,8 +736,8 @@ gi_marshalling_tests_long_out_min (glong *long_) void gi_marshalling_tests_long_inout_max_min (glong *long_) { - g_assert_cmpint(*long_, ==, G_MAXLONG); - *long_ = G_MINLONG; + g_assert_cmpint (*long_, ==, G_MAXLONG); + *long_ = G_MINLONG; } /** @@ -747,21 +747,21 @@ gi_marshalling_tests_long_inout_max_min (glong *long_) void gi_marshalling_tests_long_inout_min_max (glong *long_) { - g_assert_cmpint(*long_, ==, G_MINLONG); - *long_ = G_MAXLONG; + g_assert_cmpint (*long_, ==, G_MINLONG); + *long_ = G_MAXLONG; } gulong gi_marshalling_tests_ulong_return (void) { - return G_MAXULONG; + return G_MAXULONG; } void gi_marshalling_tests_ulong_in (gulong ulong_) { - g_assert_cmpuint(ulong_, ==, G_MAXULONG); + g_assert_cmpuint (ulong_, ==, G_MAXULONG); } /** @@ -771,7 +771,7 @@ gi_marshalling_tests_ulong_in (gulong ulong_) void gi_marshalling_tests_ulong_out (gulong *ulong_) { - *ulong_ = G_MAXULONG; + *ulong_ = G_MAXULONG; } /** @@ -781,33 +781,33 @@ gi_marshalling_tests_ulong_out (gulong *ulong_) void gi_marshalling_tests_ulong_inout (gulong *ulong_) { - g_assert_cmpuint(*ulong_, ==, G_MAXULONG); - *ulong_ = 0; + g_assert_cmpuint (*ulong_, ==, G_MAXULONG); + *ulong_ = 0; } gssize gi_marshalling_tests_ssize_return_max (void) { - return G_MAXSSIZE; + return G_MAXSSIZE; } gssize gi_marshalling_tests_ssize_return_min (void) { - return G_MINSSIZE; + return G_MINSSIZE; } void gi_marshalling_tests_ssize_in_max (gssize ssize) { - g_assert_cmpint(ssize, ==, G_MAXSSIZE); + g_assert_cmpint (ssize, ==, G_MAXSSIZE); } void gi_marshalling_tests_ssize_in_min (gssize ssize) { - g_assert_cmpint(ssize, ==, G_MINSSIZE); + g_assert_cmpint (ssize, ==, G_MINSSIZE); } /** @@ -817,7 +817,7 @@ gi_marshalling_tests_ssize_in_min (gssize ssize) void gi_marshalling_tests_ssize_out_max (gssize *ssize) { - *ssize = G_MAXSSIZE; + *ssize = G_MAXSSIZE; } /** @@ -827,7 +827,7 @@ gi_marshalling_tests_ssize_out_max (gssize *ssize) void gi_marshalling_tests_ssize_out_min (gssize *ssize) { - *ssize = G_MINSSIZE; + *ssize = G_MINSSIZE; } /** @@ -837,8 +837,8 @@ gi_marshalling_tests_ssize_out_min (gssize *ssize) void gi_marshalling_tests_ssize_inout_max_min (gssize *ssize) { - g_assert_cmpint(*ssize, ==, G_MAXSSIZE); - *ssize = G_MINSSIZE; + g_assert_cmpint (*ssize, ==, G_MAXSSIZE); + *ssize = G_MINSSIZE; } /** @@ -848,21 +848,21 @@ gi_marshalling_tests_ssize_inout_max_min (gssize *ssize) void gi_marshalling_tests_ssize_inout_min_max (gssize *ssize) { - g_assert_cmpint(*ssize, ==, G_MINSSIZE); - *ssize = G_MAXSSIZE; + g_assert_cmpint (*ssize, ==, G_MINSSIZE); + *ssize = G_MAXSSIZE; } gsize gi_marshalling_tests_size_return (void) { - return G_MAXSIZE; + return G_MAXSIZE; } void gi_marshalling_tests_size_in (gsize size) { - g_assert_cmpuint(size, ==, G_MAXSIZE); + g_assert_cmpuint (size, ==, G_MAXSIZE); } /** @@ -872,7 +872,7 @@ gi_marshalling_tests_size_in (gsize size) void gi_marshalling_tests_size_out (gsize *size) { - *size = G_MAXSIZE; + *size = G_MAXSIZE; } /** @@ -882,21 +882,21 @@ gi_marshalling_tests_size_out (gsize *size) void gi_marshalling_tests_size_inout (gsize *size) { - g_assert_cmpuint(*size, ==, G_MAXSIZE); - *size = 0; + g_assert_cmpuint (*size, ==, G_MAXSIZE); + *size = 0; } gfloat gi_marshalling_tests_float_return (void) { - return G_MAXFLOAT; + return G_MAXFLOAT; } void gi_marshalling_tests_float_in (gfloat v) { - g_assert_cmpfloat(v, ==, G_MAXFLOAT); + g_assert_cmpfloat (v, ==, G_MAXFLOAT); } /** @@ -906,7 +906,7 @@ gi_marshalling_tests_float_in (gfloat v) void gi_marshalling_tests_float_out (gfloat *v) { - *v = G_MAXFLOAT; + *v = G_MAXFLOAT; } /** @@ -916,21 +916,21 @@ gi_marshalling_tests_float_out (gfloat *v) void gi_marshalling_tests_float_inout (gfloat *v) { - g_assert_cmpfloat(*v, ==, G_MAXFLOAT); - *v = G_MINFLOAT; + g_assert_cmpfloat (*v, ==, G_MAXFLOAT); + *v = G_MINFLOAT; } gdouble gi_marshalling_tests_double_return (void) { - return G_MAXDOUBLE; + return G_MAXDOUBLE; } void gi_marshalling_tests_double_in (gdouble v) { - g_assert_cmpfloat(v, ==, G_MAXDOUBLE); + g_assert_cmpfloat (v, ==, G_MAXDOUBLE); } /** @@ -940,7 +940,7 @@ gi_marshalling_tests_double_in (gdouble v) void gi_marshalling_tests_double_out (gdouble *v) { - *v = G_MAXDOUBLE; + *v = G_MAXDOUBLE; } /** @@ -950,21 +950,21 @@ gi_marshalling_tests_double_out (gdouble *v) void gi_marshalling_tests_double_inout (gdouble *v) { - g_assert_cmpfloat(*v, ==, G_MAXDOUBLE); - *v = G_MINDOUBLE; + g_assert_cmpfloat (*v, ==, G_MAXDOUBLE); + *v = G_MINDOUBLE; } time_t gi_marshalling_tests_time_t_return (void) { - return 1234567890; + return 1234567890; } void gi_marshalling_tests_time_t_in (time_t v) { - g_assert_cmpuint(v, ==, 1234567890); + g_assert_cmpuint (v, ==, 1234567890); } /** @@ -974,7 +974,7 @@ gi_marshalling_tests_time_t_in (time_t v) void gi_marshalling_tests_time_t_out (time_t *v) { - *v = 1234567890; + *v = 1234567890; } /** @@ -984,33 +984,33 @@ gi_marshalling_tests_time_t_out (time_t *v) void gi_marshalling_tests_time_t_inout (time_t *v) { - g_assert_cmpuint(*v, ==, 1234567890); - *v = 0; + g_assert_cmpuint (*v, ==, 1234567890); + *v = 0; } GType gi_marshalling_tests_gtype_return (void) { - return G_TYPE_NONE; + return G_TYPE_NONE; } GType gi_marshalling_tests_gtype_string_return (void) { - return G_TYPE_STRING; + return G_TYPE_STRING; } void gi_marshalling_tests_gtype_in (GType gtype) { - g_assert(gtype == G_TYPE_NONE); + g_assert (gtype == G_TYPE_NONE); } void gi_marshalling_tests_gtype_string_in (GType gtype) { - g_assert(gtype == G_TYPE_STRING); + g_assert (gtype == G_TYPE_STRING); } @@ -1021,7 +1021,7 @@ gi_marshalling_tests_gtype_string_in (GType gtype) void gi_marshalling_tests_gtype_out (GType *gtype) { - *gtype = G_TYPE_NONE; + *gtype = G_TYPE_NONE; } /** @@ -1031,7 +1031,7 @@ gi_marshalling_tests_gtype_out (GType *gtype) void gi_marshalling_tests_gtype_string_out (GType *gtype) { - *gtype = G_TYPE_STRING; + *gtype = G_TYPE_STRING; } /** @@ -1041,27 +1041,27 @@ gi_marshalling_tests_gtype_string_out (GType *gtype) void gi_marshalling_tests_gtype_inout (GType *gtype) { - g_assert(*gtype == G_TYPE_NONE); - *gtype = G_TYPE_INT; + g_assert (*gtype == G_TYPE_NONE); + *gtype = G_TYPE_INT; } const gchar * gi_marshalling_tests_utf8_none_return (void) { - return GI_MARSHALLING_TESTS_CONSTANT_UTF8; + return GI_MARSHALLING_TESTS_CONSTANT_UTF8; } gchar * gi_marshalling_tests_utf8_full_return (void) { - return g_strdup(GI_MARSHALLING_TESTS_CONSTANT_UTF8); + return g_strdup (GI_MARSHALLING_TESTS_CONSTANT_UTF8); } void gi_marshalling_tests_utf8_none_in (const gchar *utf8) { - g_assert_cmpstr(GI_MARSHALLING_TESTS_CONSTANT_UTF8, ==, utf8); + g_assert_cmpstr (GI_MARSHALLING_TESTS_CONSTANT_UTF8, ==, utf8); } /** @@ -1074,8 +1074,7 @@ gi_marshalling_tests_utf8_none_in (const gchar *utf8) * UTF-16) to UTF-8. */ void -gi_marshalling_tests_utf8_as_uint8array_in (const guint8 *array, - gsize len) +gi_marshalling_tests_utf8_as_uint8array_in (const guint8 *array, gsize len) { gsize orig_len = strlen (GI_MARSHALLING_TESTS_CONSTANT_UTF8); g_assert_cmpint (orig_len, ==, len); @@ -1089,7 +1088,7 @@ gi_marshalling_tests_utf8_as_uint8array_in (const guint8 *array, void gi_marshalling_tests_utf8_none_out (gchar **utf8) { - *utf8 = GI_MARSHALLING_TESTS_CONSTANT_UTF8; + *utf8 = GI_MARSHALLING_TESTS_CONSTANT_UTF8; } /** @@ -1099,7 +1098,7 @@ gi_marshalling_tests_utf8_none_out (gchar **utf8) void gi_marshalling_tests_utf8_full_out (gchar **utf8) { - *utf8 = g_strdup(GI_MARSHALLING_TESTS_CONSTANT_UTF8); + *utf8 = g_strdup (GI_MARSHALLING_TESTS_CONSTANT_UTF8); } /** @@ -1109,11 +1108,11 @@ gi_marshalling_tests_utf8_full_out (gchar **utf8) void gi_marshalling_tests_utf8_dangling_out (gchar **utf8) { - /* Intentionally don't touch the pointer to see how - the bindings handle this case. Bindings should be - robust against broken C functions and can initialize - even OUT vlues to NULL. - */ + /* Intentionally don't touch the pointer to see how + the bindings handle this case. Bindings should be + robust against broken C functions and can initialize + even OUT vlues to NULL. + */ } /** @@ -1123,8 +1122,8 @@ gi_marshalling_tests_utf8_dangling_out (gchar **utf8) void gi_marshalling_tests_utf8_none_inout (gchar **utf8) { - g_assert_cmpstr(GI_MARSHALLING_TESTS_CONSTANT_UTF8, ==, *utf8); - *utf8 = ""; + g_assert_cmpstr (GI_MARSHALLING_TESTS_CONSTANT_UTF8, ==, *utf8); + *utf8 = ""; } /** @@ -1134,9 +1133,9 @@ gi_marshalling_tests_utf8_none_inout (gchar **utf8) void gi_marshalling_tests_utf8_full_inout (gchar **utf8) { - g_assert_cmpstr(GI_MARSHALLING_TESTS_CONSTANT_UTF8, ==, *utf8); - g_free(*utf8); - *utf8 = g_strdup(""); + g_assert_cmpstr (GI_MARSHALLING_TESTS_CONSTANT_UTF8, ==, *utf8); + g_free (*utf8); + *utf8 = g_strdup (""); } @@ -1150,15 +1149,17 @@ gi_marshalling_tests_utf8_full_inout (gchar **utf8) gboolean gi_marshalling_tests_init_function (gint *n_args, char ***argv) { - if (n_args == NULL) - return TRUE; + if (n_args == NULL) + return TRUE; - if (*n_args == 0) - return TRUE; - (*n_args)--; - g_assert (argv != NULL); - (*argv)[*n_args] = NULL; + if (*n_args == 0) return TRUE; + (*n_args)--; + g_assert (argv != NULL); + /* we have transfer ownership full, so we need to free the element ourself */ + g_free ((*argv)[*n_args]); + (*argv)[*n_args] = NULL; + return TRUE; } /** @@ -1169,8 +1170,8 @@ gi_marshalling_tests_init_function (gint *n_args, char ***argv) const gint * gi_marshalling_tests_array_fixed_int_return (void) { - static gint ints[] = {-1, 0, 1, 2}; - return ints; + static gint ints[] = { -1, 0, 1, 2 }; + return ints; } /** @@ -1181,8 +1182,8 @@ gi_marshalling_tests_array_fixed_int_return (void) const gshort * gi_marshalling_tests_array_fixed_short_return (void) { - static gshort shorts[] = {-1, 0, 1, 2}; - return shorts; + static gshort shorts[] = { -1, 0, 1, 2 }; + return shorts; } /** @@ -1192,10 +1193,10 @@ gi_marshalling_tests_array_fixed_short_return (void) void gi_marshalling_tests_array_fixed_int_in (const gint *ints) { - g_assert_cmpint(ints[0], ==, -1); - g_assert_cmpint(ints[1], ==, 0); - g_assert_cmpint(ints[2], ==, 1); - g_assert_cmpint(ints[3], ==, 2); + g_assert_cmpint (ints[0], ==, -1); + g_assert_cmpint (ints[1], ==, 0); + g_assert_cmpint (ints[2], ==, 1); + g_assert_cmpint (ints[3], ==, 2); } /** @@ -1205,10 +1206,10 @@ gi_marshalling_tests_array_fixed_int_in (const gint *ints) void gi_marshalling_tests_array_fixed_short_in (const gshort *shorts) { - g_assert_cmpint(shorts[0], ==, -1); - g_assert_cmpint(shorts[1], ==, 0); - g_assert_cmpint(shorts[2], ==, 1); - g_assert_cmpint(shorts[3], ==, 2); + g_assert_cmpint (shorts[0], ==, -1); + g_assert_cmpint (shorts[1], ==, 0); + g_assert_cmpint (shorts[2], ==, 1); + g_assert_cmpint (shorts[3], ==, 2); } /** @@ -1218,8 +1219,8 @@ gi_marshalling_tests_array_fixed_short_in (const gshort *shorts) void gi_marshalling_tests_array_fixed_out (gint **ints) { - static gint values[] = {-1, 0, 1, 2}; - *ints = values; + static gint values[] = { -1, 0, 1, 2 }; + *ints = values; } /** @@ -1229,19 +1230,20 @@ gi_marshalling_tests_array_fixed_out (gint **ints) void gi_marshalling_tests_array_fixed_out_struct (GIMarshallingTestsSimpleStruct **structs) { - static GIMarshallingTestsSimpleStruct *values; + static GIMarshallingTestsSimpleStruct *values; - if (values == NULL) { - values = g_new(GIMarshallingTestsSimpleStruct, 2); + if (values == NULL) + { + values = g_new (GIMarshallingTestsSimpleStruct, 2); - values[0].long_ = 7; - values[0].int8 = 6; + values[0].long_ = 7; + values[0].int8 = 6; - values[1].long_ = 6; - values[1].int8 = 7; + values[1].long_ = 6; + values[1].int8 = 7; } - *structs = values; + *structs = values; } /** @@ -1251,14 +1253,14 @@ gi_marshalling_tests_array_fixed_out_struct (GIMarshallingTestsSimpleStruct **st void gi_marshalling_tests_array_fixed_inout (gint **ints) { - static gint values[] = {2, 1, 0, -1}; + static gint values[] = { 2, 1, 0, -1 }; - g_assert_cmpint((*ints)[0], ==, -1); - g_assert_cmpint((*ints)[1], ==, 0); - g_assert_cmpint((*ints)[2], ==, 1); - g_assert_cmpint((*ints)[3], ==, 2); + g_assert_cmpint ((*ints)[0], ==, -1); + g_assert_cmpint ((*ints)[1], ==, 0); + g_assert_cmpint ((*ints)[2], ==, 1); + g_assert_cmpint ((*ints)[3], ==, 2); - *ints = values; + *ints = values; } @@ -1270,10 +1272,10 @@ gi_marshalling_tests_array_fixed_inout (gint **ints) const gint * gi_marshalling_tests_array_return (gint *length) { - static gint ints[] = {-1, 0, 1, 2}; + static gint ints[] = { -1, 0, 1, 2 }; - *length = 4; - return ints; + *length = 4; + return ints; } /** @@ -1288,13 +1290,13 @@ gi_marshalling_tests_array_return (gint *length) const gint * gi_marshalling_tests_array_return_etc (gint first, gint *length, gint last, gint *sum) { - static gint ints[] = {-1, 0, 1, 2}; + static gint ints[] = { -1, 0, 1, 2 }; - ints[0] = first; - ints[3] = last; - *sum = first + last; - *length = 4; - return ints; + ints[0] = first; + ints[3] = last; + *sum = first + last; + *length = 4; + return ints; } /** @@ -1305,11 +1307,11 @@ gi_marshalling_tests_array_return_etc (gint first, gint *length, gint last, gint void gi_marshalling_tests_array_in (const gint *ints, gint length) { - g_assert_cmpint(length, ==, 4); - g_assert_cmpint(ints[0], ==, -1); - g_assert_cmpint(ints[1], ==, 0); - g_assert_cmpint(ints[2], ==, 1); - g_assert_cmpint(ints[3], ==, 2); + g_assert_cmpint (length, ==, 4); + g_assert_cmpint (ints[0], ==, -1); + g_assert_cmpint (ints[1], ==, 0); + g_assert_cmpint (ints[2], ==, 1); + g_assert_cmpint (ints[3], ==, 2); } /** @@ -1320,7 +1322,7 @@ gi_marshalling_tests_array_in (const gint *ints, gint length) void gi_marshalling_tests_array_in_len_before (gint length, const gint *ints) { - gi_marshalling_tests_array_in (ints, length); + gi_marshalling_tests_array_in (ints, length); } /** @@ -1331,15 +1333,15 @@ gi_marshalling_tests_array_in_len_before (gint length, const gint *ints) void gi_marshalling_tests_array_in_len_zero_terminated (const gint *ints, gint length) { - g_assert_cmpint(length, ==, 4); + g_assert_cmpint (length, ==, 4); - g_assert_cmpint(ints[0], ==, -1); - g_assert_cmpint(ints[1], ==, 0); - g_assert_cmpint(ints[2], ==, 1); - g_assert_cmpint(ints[3], ==, 2); + g_assert_cmpint (ints[0], ==, -1); + g_assert_cmpint (ints[1], ==, 0); + g_assert_cmpint (ints[2], ==, 1); + g_assert_cmpint (ints[3], ==, 2); - /* One past the end, null terminator */ - g_assert_cmpint(ints[4], ==, 0); + /* One past the end, null terminator */ + g_assert_cmpint (ints[4], ==, 0); } /** @@ -1349,9 +1351,9 @@ gi_marshalling_tests_array_in_len_zero_terminated (const gint *ints, gint length void gi_marshalling_tests_array_string_in (const gchar **strings, gint length) { - g_assert_cmpint(length, ==, 2); - g_assert_cmpstr(strings[0], ==, "foo"); - g_assert_cmpstr(strings[1], ==, "bar"); + g_assert_cmpint (length, ==, 2); + g_assert_cmpstr (strings[0], ==, "foo"); + g_assert_cmpstr (strings[1], ==, "bar"); } /** @@ -1361,11 +1363,11 @@ gi_marshalling_tests_array_string_in (const gchar **strings, gint length) void gi_marshalling_tests_array_uint8_in (const guint8 *chars, gint length) { - g_assert_cmpint(length, ==, 4); - g_assert(chars[0] == 'a'); - g_assert(chars[1] == 'b'); - g_assert(chars[2] == 'c'); - g_assert(chars[3] == 'd'); + g_assert_cmpint (length, ==, 4); + g_assert (chars[0] == 'a'); + g_assert (chars[1] == 'b'); + g_assert (chars[2] == 'c'); + g_assert (chars[3] == 'd'); } /** @@ -1375,10 +1377,10 @@ gi_marshalling_tests_array_uint8_in (const guint8 *chars, gint length) void gi_marshalling_tests_array_struct_in (GIMarshallingTestsBoxedStruct **structs, gint length) { - g_assert_cmpint(length, ==, 3); - g_assert_cmpint(structs[0]->long_, ==, 1); - g_assert_cmpint(structs[1]->long_, ==, 2); - g_assert_cmpint(structs[2]->long_, ==, 3); + g_assert_cmpint (length, ==, 3); + g_assert_cmpint (structs[0]->long_, ==, 1); + g_assert_cmpint (structs[1]->long_, ==, 2); + g_assert_cmpint (structs[2]->long_, ==, 3); } /** @@ -1388,10 +1390,10 @@ gi_marshalling_tests_array_struct_in (GIMarshallingTestsBoxedStruct **structs, g void gi_marshalling_tests_array_struct_value_in (GIMarshallingTestsBoxedStruct *structs, gint length) { - g_assert_cmpint(length, ==, 3); - g_assert_cmpint(structs[0].long_, ==, 1); - g_assert_cmpint(structs[1].long_, ==, 2); - g_assert_cmpint(structs[2].long_, ==, 3); + g_assert_cmpint (length, ==, 3); + g_assert_cmpint (structs[0].long_, ==, 1); + g_assert_cmpint (structs[1].long_, ==, 2); + g_assert_cmpint (structs[2].long_, ==, 3); } /** @@ -1401,10 +1403,10 @@ gi_marshalling_tests_array_struct_value_in (GIMarshallingTestsBoxedStruct *struc void gi_marshalling_tests_array_simple_struct_in (GIMarshallingTestsSimpleStruct *structs, gint length) { - g_assert_cmpint(length, ==, 3); - g_assert_cmpint(structs[0].long_, ==, 1); - g_assert_cmpint(structs[1].long_, ==, 2); - g_assert_cmpint(structs[2].long_, ==, 3); + g_assert_cmpint (length, ==, 3); + g_assert_cmpint (structs[0].long_, ==, 1); + g_assert_cmpint (structs[1].long_, ==, 2); + g_assert_cmpint (structs[2].long_, ==, 3); } /** @@ -1415,13 +1417,13 @@ gi_marshalling_tests_array_simple_struct_in (GIMarshallingTestsSimpleStruct *str void gi_marshalling_tests_multi_array_key_value_in (gint length, const gchar **keys, const GValue *values) { - g_assert_cmpint(length, ==, 3); - g_assert_cmpstr("one", ==, keys[0]); - g_assert_cmpint(g_value_get_int(&values[0]), ==, 1); - g_assert_cmpstr("two", ==, keys[1]); - g_assert_cmpint(g_value_get_int(&values[1]), ==, 2); - g_assert_cmpstr("three", ==, keys[2]); - g_assert_cmpint(g_value_get_int(&values[2]), ==, 3); + g_assert_cmpint (length, ==, 3); + g_assert_cmpstr ("one", ==, keys[0]); + g_assert_cmpint (g_value_get_int (&values[0]), ==, 1); + g_assert_cmpstr ("two", ==, keys[1]); + g_assert_cmpint (g_value_get_int (&values[1]), ==, 2); + g_assert_cmpstr ("three", ==, keys[2]); + g_assert_cmpint (g_value_get_int (&values[2]), ==, 3); } @@ -1432,13 +1434,13 @@ gi_marshalling_tests_multi_array_key_value_in (gint length, const gchar **keys, void gi_marshalling_tests_array_struct_take_in (GIMarshallingTestsBoxedStruct **structs, gint length) { - gi_marshalling_tests_array_struct_in (structs, length); + gi_marshalling_tests_array_struct_in (structs, length); - /* only really useful if run in valgrind actually */ - gi_marshalling_tests_boxed_struct_free (structs[0]); - gi_marshalling_tests_boxed_struct_free (structs[1]); - gi_marshalling_tests_boxed_struct_free (structs[2]); - g_free (structs); + /* only really useful if run in valgrind actually */ + gi_marshalling_tests_boxed_struct_free (structs[0]); + gi_marshalling_tests_boxed_struct_free (structs[1]); + gi_marshalling_tests_boxed_struct_free (structs[2]); + g_free (structs); } /** @@ -1449,10 +1451,10 @@ gi_marshalling_tests_array_struct_take_in (GIMarshallingTestsBoxedStruct **struc void gi_marshalling_tests_array_enum_in (GIMarshallingTestsEnum *v, gint length) { - g_assert_cmpint(length, ==, 3); - g_assert_cmpint(v[0], ==, GI_MARSHALLING_TESTS_ENUM_VALUE1); - g_assert_cmpint(v[1], ==, GI_MARSHALLING_TESTS_ENUM_VALUE2); - g_assert_cmpint(v[2], ==, GI_MARSHALLING_TESTS_ENUM_VALUE3); + g_assert_cmpint (length, ==, 3); + g_assert_cmpint (v[0], ==, GI_MARSHALLING_TESTS_ENUM_VALUE1); + g_assert_cmpint (v[1], ==, GI_MARSHALLING_TESTS_ENUM_VALUE2); + g_assert_cmpint (v[2], ==, GI_MARSHALLING_TESTS_ENUM_VALUE3); } /** @@ -1463,9 +1465,9 @@ gi_marshalling_tests_array_enum_in (GIMarshallingTestsEnum *v, gint length) void gi_marshalling_tests_array_in_guint64_len (const gint *ints, guint64 length) { - g_assert_cmpint(length, ==, 4); + g_assert_cmpint (length, ==, 4); - gi_marshalling_tests_array_in (ints, length); + gi_marshalling_tests_array_in (ints, length); } /** @@ -1476,9 +1478,9 @@ gi_marshalling_tests_array_in_guint64_len (const gint *ints, guint64 length) void gi_marshalling_tests_array_in_guint8_len (const gint *ints, guint8 length) { - g_assert_cmpint(length, ==, 4); + g_assert_cmpint (length, ==, 4); - gi_marshalling_tests_array_in (ints, length); + gi_marshalling_tests_array_in (ints, length); } /** @@ -1488,10 +1490,10 @@ gi_marshalling_tests_array_in_guint8_len (const gint *ints, guint8 length) void gi_marshalling_tests_array_out (gint **ints, gint *length) { - static gint values[] = {-1, 0, 1, 2}; + static gint values[] = { -1, 0, 1, 2 }; - *length = 4; - *ints = values; + *length = 4; + *ints = values; } /** @@ -1505,13 +1507,13 @@ gi_marshalling_tests_array_out (gint **ints, gint *length) void gi_marshalling_tests_array_out_etc (gint first, gint **ints, gint *length, gint last, gint *sum) { - static gint values[] = {-1, 0, 1, 2}; + static gint values[] = { -1, 0, 1, 2 }; - values[0] = first; - values[3] = last; - *sum = first + last; - *length = 4; - *ints = values; + values[0] = first; + values[3] = last; + *sum = first + last; + *length = 4; + *ints = values; } /** @@ -1522,16 +1524,16 @@ gi_marshalling_tests_array_out_etc (gint first, gint **ints, gint *length, gint void gi_marshalling_tests_array_inout (gint **ints, gint *length) { - static gint values[] = {-2, -1, 0, 1, 2}; + static gint values[] = { -2, -1, 0, 1, 2 }; - g_assert_cmpint(*length, ==, 4); - g_assert_cmpint((*ints)[0], ==, -1); - g_assert_cmpint((*ints)[1], ==, 0); - g_assert_cmpint((*ints)[2], ==, 1); - g_assert_cmpint((*ints)[3], ==, 2); + g_assert_cmpint (*length, ==, 4); + g_assert_cmpint ((*ints)[0], ==, -1); + g_assert_cmpint ((*ints)[1], ==, 0); + g_assert_cmpint ((*ints)[2], ==, 1); + g_assert_cmpint ((*ints)[3], ==, 2); - *length = 5; - *ints = values; + *length = 5; + *ints = values; } /** @@ -1545,19 +1547,19 @@ gi_marshalling_tests_array_inout (gint **ints, gint *length) void gi_marshalling_tests_array_inout_etc (gint first, gint **ints, gint *length, gint last, gint *sum) { - static gint values[] = {-2, -1, 0, 1, 2}; + static gint values[] = { -2, -1, 0, 1, 2 }; - g_assert_cmpint(*length, ==, 4); - g_assert_cmpint((*ints)[0], ==, -1); - g_assert_cmpint((*ints)[1], ==, 0); - g_assert_cmpint((*ints)[2], ==, 1); - g_assert_cmpint((*ints)[3], ==, 2); + g_assert_cmpint (*length, ==, 4); + g_assert_cmpint ((*ints)[0], ==, -1); + g_assert_cmpint ((*ints)[1], ==, 0); + g_assert_cmpint ((*ints)[2], ==, 1); + g_assert_cmpint ((*ints)[3], ==, 2); - values[0] = first; - values[4] = last; - *sum = first + last; - *length = 5; - *ints = values; + values[0] = first; + values[4] = last; + *sum = first + last; + *length = 5; + *ints = values; } /** @@ -1568,10 +1570,10 @@ gi_marshalling_tests_array_inout_etc (gint first, gint **ints, gint *length, gin void gi_marshalling_tests_array_in_nonzero_nonlen (gint first, const guint8 *chars) { - g_assert(chars[0] == 'a'); - g_assert(chars[1] == 'b'); - g_assert(chars[2] == 'c'); - g_assert(chars[3] == 'd'); + g_assert (chars[0] == 'a'); + g_assert (chars[1] == 'b'); + g_assert (chars[2] == 'c'); + g_assert (chars[3] == 'd'); } /** @@ -1582,8 +1584,8 @@ gi_marshalling_tests_array_in_nonzero_nonlen (gint first, const guint8 *chars) gchar ** gi_marshalling_tests_array_zero_terminated_return (void) { - static gchar *values[] = {"0", "1", "2", NULL}; - return values; + static gchar *values[] = { "0", "1", "2", NULL }; + return values; } /** @@ -1594,7 +1596,7 @@ gi_marshalling_tests_array_zero_terminated_return (void) gchar ** gi_marshalling_tests_array_zero_terminated_return_null (void) { - return NULL; + return NULL; } /** @@ -1605,20 +1607,20 @@ gi_marshalling_tests_array_zero_terminated_return_null (void) GIMarshallingTestsBoxedStruct ** gi_marshalling_tests_array_zero_terminated_return_struct (void) { - GIMarshallingTestsBoxedStruct **ret = (GIMarshallingTestsBoxedStruct**) g_new (gpointer, 4); + GIMarshallingTestsBoxedStruct **ret = (GIMarshallingTestsBoxedStruct **) g_new (gpointer, 4); - ret[0] = gi_marshalling_tests_boxed_struct_new (); - ret[0]->long_ = 42; + ret[0] = gi_marshalling_tests_boxed_struct_new (); + ret[0]->long_ = 42; - ret[1] = gi_marshalling_tests_boxed_struct_new (); - ret[1]->long_ = 43; + ret[1] = gi_marshalling_tests_boxed_struct_new (); + ret[1]->long_ = 43; - ret[2] = gi_marshalling_tests_boxed_struct_new (); - ret[2]->long_ = 44; + ret[2] = gi_marshalling_tests_boxed_struct_new (); + ret[2]->long_ = 44; - ret[3] = NULL; + ret[3] = NULL; - return ret; + return ret; } /** @@ -1628,10 +1630,10 @@ gi_marshalling_tests_array_zero_terminated_return_struct (void) void gi_marshalling_tests_array_zero_terminated_in (gchar **utf8s) { - g_assert(g_strv_length(utf8s)); - g_assert_cmpstr(utf8s[0], ==, "0"); - g_assert_cmpstr(utf8s[1], ==, "1"); - g_assert_cmpstr(utf8s[2], ==, "2"); + g_assert (g_strv_length (utf8s)); + g_assert_cmpstr (utf8s[0], ==, "0"); + g_assert_cmpstr (utf8s[1], ==, "1"); + g_assert_cmpstr (utf8s[2], ==, "2"); } /** @@ -1639,10 +1641,10 @@ gi_marshalling_tests_array_zero_terminated_in (gchar **utf8s) * @utf8s: (out) (array zero-terminated=1) (transfer none): */ void -gi_marshalling_tests_array_zero_terminated_out (gchar ***utf8s) +gi_marshalling_tests_array_zero_terminated_out (gchar *** utf8s) { - static gchar *values[] = {"0", "1", "2", NULL}; - *utf8s = values; + static gchar *values[] = { "0", "1", "2", NULL }; + *utf8s = values; } /** @@ -1650,16 +1652,16 @@ gi_marshalling_tests_array_zero_terminated_out (gchar ***utf8s) * @utf8s: (inout) (array zero-terminated=1) (transfer none): */ void -gi_marshalling_tests_array_zero_terminated_inout (gchar ***utf8s) +gi_marshalling_tests_array_zero_terminated_inout (gchar *** utf8s) { - static gchar *values[] = {"-1", "0", "1", "2", NULL}; + static gchar *values[] = { "-1", "0", "1", "2", NULL }; - g_assert(g_strv_length(*utf8s)); - g_assert_cmpstr((*utf8s)[0], ==, "0"); - g_assert_cmpstr((*utf8s)[1], ==, "1"); - g_assert_cmpstr((*utf8s)[2], ==, "2"); + g_assert (g_strv_length (*utf8s)); + g_assert_cmpstr ((*utf8s)[0], ==, "0"); + g_assert_cmpstr ((*utf8s)[1], ==, "1"); + g_assert_cmpstr ((*utf8s)[2], ==, "2"); - *utf8s = values; + *utf8s = values; } /** @@ -1671,20 +1673,21 @@ gi_marshalling_tests_array_zero_terminated_inout (gchar ***utf8s) GVariant ** gi_marshalling_tests_array_gvariant_none_in (GVariant **variants) { - /* Use a static container to detect if someone tries to free it */ - static GVariant *private_container[3] = { NULL, NULL, NULL }; - - if (private_container[0] == NULL) { + /* Use a static container to detect if someone tries to free it */ + static GVariant *private_container[3] = { NULL, NULL, NULL }; + + if (private_container[0] == NULL) + { private_container[0] = g_variant_new_int32 (27); private_container[1] = g_variant_new_string ("Hello"); } - g_assert (variants != NULL); - g_assert_cmpint (g_variant_get_int32 (variants[0]), ==, 27); - g_assert_cmpstr (g_variant_get_string (variants[1], NULL), ==, "Hello"); - g_assert (variants[2] == NULL); + g_assert (variants != NULL); + g_assert_cmpint (g_variant_get_int32 (variants[0]), ==, 27); + g_assert_cmpstr (g_variant_get_string (variants[1], NULL), ==, "Hello"); + g_assert (variants[2] == NULL); - return private_container; + return private_container; } /** @@ -1696,19 +1699,19 @@ gi_marshalling_tests_array_gvariant_none_in (GVariant **variants) GVariant ** gi_marshalling_tests_array_gvariant_container_in (GVariant **variants) { - GVariant **container; + GVariant **container; - g_assert (variants != NULL); - g_assert_cmpint (g_variant_get_int32 (variants[0]), ==, 27); - g_assert_cmpstr (g_variant_get_string (variants[1], NULL), ==, "Hello"); - g_assert (variants[2] == NULL); - - container = g_new0 (GVariant*, 3); - container[0] = variants[0]; - container[1] = variants[1]; - g_free (variants); - - return container; + g_assert (variants != NULL); + g_assert_cmpint (g_variant_get_int32 (variants[0]), ==, 27); + g_assert_cmpstr (g_variant_get_string (variants[1], NULL), ==, "Hello"); + g_assert (variants[2] == NULL); + + container = g_new0 (GVariant *, 3); + container[0] = variants[0]; + container[1] = variants[1]; + g_free (variants); + + return container; } /** @@ -1720,23 +1723,23 @@ gi_marshalling_tests_array_gvariant_container_in (GVariant **variants) GVariant ** gi_marshalling_tests_array_gvariant_full_in (GVariant **variants) { - GVariant **container; + GVariant **container; + + g_assert (variants != NULL); + g_assert_cmpint (g_variant_get_int32 (variants[0]), ==, 27); + g_assert_cmpstr (g_variant_get_string (variants[1], NULL), ==, "Hello"); + g_assert (variants[2] == NULL); - g_assert (variants != NULL); - g_assert_cmpint (g_variant_get_int32 (variants[0]), ==, 27); - g_assert_cmpstr (g_variant_get_string (variants[1], NULL), ==, "Hello"); - g_assert (variants[2] == NULL); - - /* To catch different behaviors we reconstruct one variant from scratch, - * while leaving the other untouched. Both approaches are legal with full - * transfer in and out */ - container = g_new0 (GVariant*, 3); - container[0] = g_variant_new_int32 (g_variant_get_int32 (variants[0])); - g_variant_unref (variants[0]); - container[1] = variants[1]; - g_free (variants); + /* To catch different behaviors we reconstruct one variant from scratch, + * while leaving the other untouched. Both approaches are legal with full + * transfer in and out */ + container = g_new0 (GVariant *, 3); + container[0] = g_variant_new_int32 (g_variant_get_int32 (variants[0])); + g_variant_unref (variants[0]); + container[1] = variants[1]; + g_free (variants); - return container; + return container; } /** @@ -1747,16 +1750,17 @@ gi_marshalling_tests_array_gvariant_full_in (GVariant **variants) GArray * gi_marshalling_tests_garray_int_none_return (void) { - static GArray *v = NULL; - gint i; + static GArray *v = NULL; + gint i; - if (v == NULL) { - v = g_array_new (TRUE, TRUE, sizeof (gint)); - for (i = -1; i < 3; i++) - g_array_append_val (v, i); + if (v == NULL) + { + v = g_array_new (TRUE, TRUE, sizeof (gint)); + for (i = -1; i < 3; i++) + g_array_append_val (v, i); } - return v; + return v; } /** @@ -1767,18 +1771,19 @@ gi_marshalling_tests_garray_int_none_return (void) GArray * gi_marshalling_tests_garray_uint64_none_return (void) { - static GArray *array = NULL; - guint64 i; + static GArray *array = NULL; + guint64 i; - if (array == NULL) { - array = g_array_new (TRUE, TRUE, sizeof (guint64)); - i = 0; - g_array_append_val (array, i); - i = G_MAXUINT64; - g_array_append_val (array, i); + if (array == NULL) + { + array = g_array_new (TRUE, TRUE, sizeof (guint64)); + i = 0; + g_array_append_val (array, i); + i = G_MAXUINT64; + g_array_append_val (array, i); } - return array; + return array; } /** @@ -1789,17 +1794,18 @@ gi_marshalling_tests_garray_uint64_none_return (void) GArray * gi_marshalling_tests_garray_utf8_none_return (void) { - static GArray *array = NULL; - static gchar *values[] = {"0", "1", "2", NULL}; - gint i; + static GArray *array = NULL; + static gchar *values[] = { "0", "1", "2", NULL }; + gint i; - if (array == NULL) { - array = g_array_new (TRUE, TRUE, sizeof (gchar *)); - for (i = 0; values[i]; i++) - g_array_append_val (array, values[i]); + if (array == NULL) + { + array = g_array_new (TRUE, TRUE, sizeof (gchar *)); + for (i = 0; values[i]; i++) + g_array_append_val (array, values[i]); } - return array; + return array; } /** @@ -1810,15 +1816,15 @@ gi_marshalling_tests_garray_utf8_none_return (void) GArray * gi_marshalling_tests_garray_utf8_container_return (void) { - GArray *array = NULL; - static gchar *values[] = {"0", "1", "2", NULL}; - gint i; + GArray *array = NULL; + static gchar *values[] = { "0", "1", "2", NULL }; + gint i; - array = g_array_new (TRUE, TRUE, sizeof (gchar *)); - for (i = 0; values[i]; i++) - g_array_append_val (array, values[i]); + array = g_array_new (TRUE, TRUE, sizeof (gchar *)); + for (i = 0; values[i]; i++) + g_array_append_val (array, values[i]); - return array; + return array; } /** @@ -1829,17 +1835,18 @@ gi_marshalling_tests_garray_utf8_container_return (void) GArray * gi_marshalling_tests_garray_utf8_full_return (void) { - GArray *array = NULL; - static gchar *values[] = {"0", "1", "2", NULL}; - gint i; + GArray *array = NULL; + static gchar *values[] = { "0", "1", "2", NULL }; + gint i; - array = g_array_new (TRUE, TRUE, sizeof (gchar *)); - for (i = 0; values[i]; i++) { - gchar *str = g_strdup (values[i]); - g_array_append_val (array, str); + array = g_array_new (TRUE, TRUE, sizeof (gchar *)); + for (i = 0; values[i]; i++) + { + gchar *str = g_strdup (values[i]); + g_array_append_val (array, str); } - return array; + return array; } /** @@ -1849,11 +1856,11 @@ gi_marshalling_tests_garray_utf8_full_return (void) void gi_marshalling_tests_garray_int_none_in (GArray *array_) { - g_assert_cmpint(array_->len, ==, 4); - g_assert_cmpint(g_array_index (array_, gint, 0), ==, -1); - g_assert_cmpint(g_array_index (array_, gint, 1), ==, 0); - g_assert_cmpint(g_array_index (array_, gint, 2), ==, 1); - g_assert_cmpint(g_array_index (array_, gint, 3), ==, 2); + g_assert_cmpint (array_->len, ==, 4); + g_assert_cmpint (g_array_index (array_, gint, 0), ==, -1); + g_assert_cmpint (g_array_index (array_, gint, 1), ==, 0); + g_assert_cmpint (g_array_index (array_, gint, 2), ==, 1); + g_assert_cmpint (g_array_index (array_, gint, 3), ==, 2); } /** @@ -1863,9 +1870,9 @@ gi_marshalling_tests_garray_int_none_in (GArray *array_) void gi_marshalling_tests_garray_uint64_none_in (GArray *array_) { - g_assert_cmpint(array_->len, ==, 2); - g_assert_cmpint(g_array_index (array_, guint64, 0), ==, 0); - g_assert_cmpint(g_array_index (array_, guint64, 1), ==, G_MAXUINT64); + g_assert_cmpint (array_->len, ==, 2); + g_assert_cmpint (g_array_index (array_, guint64, 0), ==, 0); + g_assert_cmpint (g_array_index (array_, guint64, 1), ==, G_MAXUINT64); } /** @@ -1875,10 +1882,10 @@ gi_marshalling_tests_garray_uint64_none_in (GArray *array_) void gi_marshalling_tests_garray_utf8_none_in (GArray *array_) { - g_assert_cmpint(array_->len, ==, 3); - g_assert_cmpstr(g_array_index (array_, gchar*, 0), ==, "0"); - g_assert_cmpstr(g_array_index (array_, gchar*, 1), ==, "1"); - g_assert_cmpstr(g_array_index (array_, gchar*, 2), ==, "2"); + g_assert_cmpint (array_->len, ==, 3); + g_assert_cmpstr (g_array_index (array_, gchar *, 0), ==, "0"); + g_assert_cmpstr (g_array_index (array_, gchar *, 1), ==, "1"); + g_assert_cmpstr (g_array_index (array_, gchar *, 2), ==, "2"); } /** @@ -1888,17 +1895,18 @@ gi_marshalling_tests_garray_utf8_none_in (GArray *array_) void gi_marshalling_tests_garray_utf8_none_out (GArray **array_) { - static GArray *internal = NULL; - static gchar *values[] = {"0", "1", "2", NULL}; - gint i; + static GArray *internal = NULL; + static gchar *values[] = { "0", "1", "2", NULL }; + gint i; - if (internal == NULL) { - internal = g_array_new (TRUE, TRUE, sizeof (gchar *)); - for (i = 0; values[i]; i++) - g_array_append_val (internal, values[i]); + if (internal == NULL) + { + internal = g_array_new (TRUE, TRUE, sizeof (gchar *)); + for (i = 0; values[i]; i++) + g_array_append_val (internal, values[i]); } - *array_ = internal; + *array_ = internal; } /** @@ -1908,14 +1916,14 @@ gi_marshalling_tests_garray_utf8_none_out (GArray **array_) void gi_marshalling_tests_garray_utf8_container_out (GArray **array_) { - static gchar *values[] = {"0", "1", "2", NULL}; - gint i; + static gchar *values[] = { "0", "1", "2", NULL }; + gint i; - *array_ = NULL; + *array_ = NULL; - *array_ = g_array_new (TRUE, TRUE, sizeof (gchar *)); - for (i = 0; values[i]; i++) - g_array_append_val (*array_, values[i]); + *array_ = g_array_new (TRUE, TRUE, sizeof (gchar *)); + for (i = 0; values[i]; i++) + g_array_append_val (*array_, values[i]); } /** @@ -1925,15 +1933,16 @@ gi_marshalling_tests_garray_utf8_container_out (GArray **array_) void gi_marshalling_tests_garray_utf8_full_out (GArray **array_) { - static gchar *values[] = {"0", "1", "2", NULL}; - gint i; + static gchar *values[] = { "0", "1", "2", NULL }; + gint i; - *array_ = NULL; + *array_ = NULL; - *array_ = g_array_new (TRUE, TRUE, sizeof (gchar *)); - for (i = 0; values[i]; i++) { - gchar *str = g_strdup (values[i]); - g_array_append_val (*array_, str); + *array_ = g_array_new (TRUE, TRUE, sizeof (gchar *)); + for (i = 0; values[i]; i++) + { + gchar *str = g_strdup (values[i]); + g_array_append_val (*array_, str); } } @@ -1944,13 +1953,14 @@ gi_marshalling_tests_garray_utf8_full_out (GArray **array_) void gi_marshalling_tests_garray_utf8_full_out_caller_allocated (GArray *array_) { - static gchar *values[] = {"0", "1", "2", NULL}; - gint i; + static gchar *values[] = { "0", "1", "2", NULL }; + gint i; - g_array_set_size (array_, 0); - for (i = 0; values[i]; i++) { - gchar *str = g_strdup (values[i]); - g_array_append_val (array_, str); + g_array_set_size (array_, 0); + for (i = 0; values[i]; i++) + { + gchar *str = g_strdup (values[i]); + g_array_append_val (array_, str); } } @@ -1961,22 +1971,23 @@ gi_marshalling_tests_garray_utf8_full_out_caller_allocated (GArray *array_) void gi_marshalling_tests_garray_utf8_none_inout (GArray **array_) { - static GArray *internal = NULL; - static gchar *values[] = {"-2", "-1", "0", "1", NULL}; - gint i; + static GArray *internal = NULL; + static gchar *values[] = { "-2", "-1", "0", "1", NULL }; + gint i; - g_assert_cmpint((*array_)->len, ==, 3); - g_assert_cmpstr(g_array_index (*array_, gchar*, 0), ==, "0"); - g_assert_cmpstr(g_array_index (*array_, gchar*, 1), ==, "1"); - g_assert_cmpstr(g_array_index (*array_, gchar*, 2), ==, "2"); + g_assert_cmpint ((*array_)->len, ==, 3); + g_assert_cmpstr (g_array_index (*array_, gchar *, 0), ==, "0"); + g_assert_cmpstr (g_array_index (*array_, gchar *, 1), ==, "1"); + g_assert_cmpstr (g_array_index (*array_, gchar *, 2), ==, "2"); - if (internal == NULL) { - internal = g_array_new (TRUE, TRUE, sizeof (gchar *)); - for (i = 0; values[i]; i++) - g_array_append_val (internal, values[i]); + if (internal == NULL) + { + internal = g_array_new (TRUE, TRUE, sizeof (gchar *)); + for (i = 0; values[i]; i++) + g_array_append_val (internal, values[i]); } - *array_ = internal; + *array_ = internal; } /** @@ -1986,24 +1997,24 @@ gi_marshalling_tests_garray_utf8_none_inout (GArray **array_) void gi_marshalling_tests_garray_utf8_container_inout (GArray **array_) { - static gchar *val1 = "-2"; - static gchar *val2 = "-1"; - static gchar *val3 = "0"; - static gchar *val4 = "1"; - GArray *result; + static gchar *val1 = "-2"; + static gchar *val2 = "-1"; + static gchar *val3 = "0"; + static gchar *val4 = "1"; + GArray *result; - g_assert_cmpint((*array_)->len, ==, 3); - g_assert_cmpstr(g_array_index (*array_, gchar*, 0), ==, "0"); - g_assert_cmpstr(g_array_index (*array_, gchar*, 1), ==, "1"); - g_assert_cmpstr(g_array_index (*array_, gchar*, 2), ==, "2"); + g_assert_cmpint ((*array_)->len, ==, 3); + g_assert_cmpstr (g_array_index (*array_, gchar *, 0), ==, "0"); + g_assert_cmpstr (g_array_index (*array_, gchar *, 1), ==, "1"); + g_assert_cmpstr (g_array_index (*array_, gchar *, 2), ==, "2"); - result = g_array_new (TRUE, TRUE, sizeof (gchar *)); - g_array_append_val (result, val1); - g_array_append_val (result, val2); - g_array_append_val (result, val3); - g_array_append_val (result, val4); + result = g_array_new (TRUE, TRUE, sizeof (gchar *)); + g_array_append_val (result, val1); + g_array_append_val (result, val2); + g_array_append_val (result, val3); + g_array_append_val (result, val4); - *array_ = result; + *array_ = result; } /** @@ -2013,27 +2024,27 @@ gi_marshalling_tests_garray_utf8_container_inout (GArray **array_) void gi_marshalling_tests_garray_utf8_full_inout (GArray **array_) { - static gchar *val1 = "-1"; - static gchar *val2 = "-2"; - gchar *val; - GArray *result; + static gchar *val1 = "-1"; + static gchar *val2 = "-2"; + gchar *val; + GArray *result; - g_assert_cmpint((*array_)->len, ==, 3); - g_assert_cmpstr(g_array_index (*array_, gchar*, 0), ==, "0"); - g_assert_cmpstr(g_array_index (*array_, gchar*, 1), ==, "1"); - g_assert_cmpstr(g_array_index (*array_, gchar*, 2), ==, "2"); + g_assert_cmpint ((*array_)->len, ==, 3); + g_assert_cmpstr (g_array_index (*array_, gchar *, 0), ==, "0"); + g_assert_cmpstr (g_array_index (*array_, gchar *, 1), ==, "1"); + g_assert_cmpstr (g_array_index (*array_, gchar *, 2), ==, "2"); - result = g_array_new (TRUE, TRUE, sizeof (gchar *)); - val = g_strdup (val2); - g_array_append_val(result, val); - val = g_strdup (val1); - g_array_append_val(result, val); - val = g_strdup ("0"); - g_array_append_val(result, val); - val = g_strdup ("1"); - g_array_append_val(result, val); + result = g_array_new (TRUE, TRUE, sizeof (gchar *)); + val = g_strdup (val2); + g_array_append_val (result, val); + val = g_strdup (val1); + g_array_append_val (result, val); + val = g_strdup ("0"); + g_array_append_val (result, val); + val = g_strdup ("1"); + g_array_append_val (result, val); - *array_ = result; + *array_ = result; } /** @@ -2044,17 +2055,18 @@ gi_marshalling_tests_garray_utf8_full_inout (GArray **array_) GPtrArray * gi_marshalling_tests_gptrarray_utf8_none_return (void) { - static GPtrArray *parray = NULL; - static gchar *values[] = {"0", "1", "2"}; - gint i; + static GPtrArray *parray = NULL; + static gchar *values[] = { "0", "1", "2" }; + gint i; - if (parray == NULL) { - parray = g_ptr_array_new (); - for (i = 0; i < 3; i++) - g_ptr_array_add (parray, (gpointer) values[i]); + if (parray == NULL) + { + parray = g_ptr_array_new (); + for (i = 0; i < 3; i++) + g_ptr_array_add (parray, (gpointer) values[i]); } - return parray; + return parray; } /** @@ -2065,15 +2077,15 @@ gi_marshalling_tests_gptrarray_utf8_none_return (void) GPtrArray * gi_marshalling_tests_gptrarray_utf8_container_return (void) { - GPtrArray *parray = NULL; - static gchar *values[] = {"0", "1", "2", NULL}; - gint i; + GPtrArray *parray = NULL; + static gchar *values[] = { "0", "1", "2", NULL }; + gint i; - parray = g_ptr_array_new (); - for (i = 0; values[i]; i++) - g_ptr_array_add (parray, (gpointer)values[i]); + parray = g_ptr_array_new (); + for (i = 0; values[i]; i++) + g_ptr_array_add (parray, (gpointer) values[i]); - return parray; + return parray; } /** @@ -2084,17 +2096,18 @@ gi_marshalling_tests_gptrarray_utf8_container_return (void) GPtrArray * gi_marshalling_tests_gptrarray_utf8_full_return (void) { - GPtrArray *parray = NULL; - static gchar *values[] = {"0", "1", "2", NULL}; - gint i; + GPtrArray *parray = NULL; + static gchar *values[] = { "0", "1", "2", NULL }; + gint i; - parray = g_ptr_array_new (); - for (i = 0; values[i]; i++) { - gchar *str = g_strdup (values[i]); - g_ptr_array_add (parray, (gpointer)str); + parray = g_ptr_array_new (); + for (i = 0; values[i]; i++) + { + gchar *str = g_strdup (values[i]); + g_ptr_array_add (parray, (gpointer) str); } - return parray; + return parray; } /** @@ -2104,10 +2117,10 @@ gi_marshalling_tests_gptrarray_utf8_full_return (void) void gi_marshalling_tests_gptrarray_utf8_none_in (GPtrArray *parray_) { - g_assert_cmpint(parray_->len, ==, 3); - g_assert_cmpstr(g_ptr_array_index (parray_, 0), ==, "0"); - g_assert_cmpstr(g_ptr_array_index (parray_, 1), ==, "1"); - g_assert_cmpstr(g_ptr_array_index (parray_, 2), ==, "2"); + g_assert_cmpint (parray_->len, ==, 3); + g_assert_cmpstr (g_ptr_array_index (parray_, 0), ==, "0"); + g_assert_cmpstr (g_ptr_array_index (parray_, 1), ==, "1"); + g_assert_cmpstr (g_ptr_array_index (parray_, 2), ==, "2"); } /** @@ -2117,17 +2130,18 @@ gi_marshalling_tests_gptrarray_utf8_none_in (GPtrArray *parray_) void gi_marshalling_tests_gptrarray_utf8_none_out (GPtrArray **parray_) { - static GPtrArray *internal = NULL; - static gchar *values[] = {"0", "1", "2", NULL}; - gint i; + static GPtrArray *internal = NULL; + static gchar *values[] = { "0", "1", "2", NULL }; + gint i; - if (internal == NULL) { - internal = g_ptr_array_new (); - for (i = 0; values[i]; i++) - g_ptr_array_add (internal, (gpointer)values[i]); + if (internal == NULL) + { + internal = g_ptr_array_new (); + for (i = 0; values[i]; i++) + g_ptr_array_add (internal, (gpointer) values[i]); } - *parray_ = internal; + *parray_ = internal; } /** @@ -2137,14 +2151,14 @@ gi_marshalling_tests_gptrarray_utf8_none_out (GPtrArray **parray_) void gi_marshalling_tests_gptrarray_utf8_container_out (GPtrArray **parray_) { - static gchar *values[] = {"0", "1", "2", NULL}; - gint i; + static gchar *values[] = { "0", "1", "2", NULL }; + gint i; - *parray_ = NULL; + *parray_ = NULL; - *parray_ = g_ptr_array_new (); - for (i = 0; values[i]; i++) - g_ptr_array_add (*parray_, (gpointer)values[i]); + *parray_ = g_ptr_array_new (); + for (i = 0; values[i]; i++) + g_ptr_array_add (*parray_, (gpointer) values[i]); } /** @@ -2154,15 +2168,16 @@ gi_marshalling_tests_gptrarray_utf8_container_out (GPtrArray **parray_) void gi_marshalling_tests_gptrarray_utf8_full_out (GPtrArray **parray_) { - static gchar *values[] = {"0", "1", "2", NULL}; - gint i; + static gchar *values[] = { "0", "1", "2", NULL }; + gint i; - *parray_ = NULL; + *parray_ = NULL; - *parray_ = g_ptr_array_new (); - for (i = 0; values[i]; i++) { - gchar *str = g_strdup (values[i]); - g_ptr_array_add (*parray_, (gpointer)str); + *parray_ = g_ptr_array_new (); + for (i = 0; values[i]; i++) + { + gchar *str = g_strdup (values[i]); + g_ptr_array_add (*parray_, (gpointer) str); } } @@ -2173,22 +2188,23 @@ gi_marshalling_tests_gptrarray_utf8_full_out (GPtrArray **parray_) void gi_marshalling_tests_gptrarray_utf8_none_inout (GPtrArray **parray_) { - static GPtrArray *internal = NULL; - static gchar *values[] = {"-2", "-1", "0", "1", NULL}; - gint i; + static GPtrArray *internal = NULL; + static gchar *values[] = { "-2", "-1", "0", "1", NULL }; + gint i; - g_assert_cmpint((*parray_)->len, ==, 3); - g_assert_cmpstr(g_ptr_array_index (*parray_, 0), ==, "0"); - g_assert_cmpstr(g_ptr_array_index (*parray_, 1), ==, "1"); - g_assert_cmpstr(g_ptr_array_index (*parray_, 2), ==, "2"); + g_assert_cmpint ((*parray_)->len, ==, 3); + g_assert_cmpstr (g_ptr_array_index (*parray_, 0), ==, "0"); + g_assert_cmpstr (g_ptr_array_index (*parray_, 1), ==, "1"); + g_assert_cmpstr (g_ptr_array_index (*parray_, 2), ==, "2"); - if (internal == NULL) { - internal = g_ptr_array_new (); - for (i = 0; values[i]; i++) - g_ptr_array_add (internal, (gpointer) values[i]); + if (internal == NULL) + { + internal = g_ptr_array_new (); + for (i = 0; values[i]; i++) + g_ptr_array_add (internal, (gpointer) values[i]); } - *parray_ = internal; + *parray_ = internal; } /** @@ -2198,24 +2214,24 @@ gi_marshalling_tests_gptrarray_utf8_none_inout (GPtrArray **parray_) void gi_marshalling_tests_gptrarray_utf8_container_inout (GPtrArray **parray_) { - static gchar *val1 = "-2"; - static gchar *val2 = "-1"; - static gchar *val3 = "0"; - static gchar *val4 = "1"; - GPtrArray *result; + static gchar *val1 = "-2"; + static gchar *val2 = "-1"; + static gchar *val3 = "0"; + static gchar *val4 = "1"; + GPtrArray *result; - g_assert_cmpint((*parray_)->len, ==, 3); - g_assert_cmpstr(g_ptr_array_index (*parray_, 0), ==, "0"); - g_assert_cmpstr(g_ptr_array_index (*parray_, 1), ==, "1"); - g_assert_cmpstr(g_ptr_array_index (*parray_, 2), ==, "2"); + g_assert_cmpint ((*parray_)->len, ==, 3); + g_assert_cmpstr (g_ptr_array_index (*parray_, 0), ==, "0"); + g_assert_cmpstr (g_ptr_array_index (*parray_, 1), ==, "1"); + g_assert_cmpstr (g_ptr_array_index (*parray_, 2), ==, "2"); - result = g_ptr_array_new (); - g_ptr_array_add (result, (gpointer) val1); - g_ptr_array_add (result, (gpointer) val2); - g_ptr_array_add (result, (gpointer) val3); - g_ptr_array_add (result, (gpointer) val4); + result = g_ptr_array_new (); + g_ptr_array_add (result, (gpointer) val1); + g_ptr_array_add (result, (gpointer) val2); + g_ptr_array_add (result, (gpointer) val3); + g_ptr_array_add (result, (gpointer) val4); - *parray_ = result; + *parray_ = result; } /** @@ -2225,27 +2241,27 @@ gi_marshalling_tests_gptrarray_utf8_container_inout (GPtrArray **parray_) void gi_marshalling_tests_gptrarray_utf8_full_inout (GPtrArray **parray_) { - static gchar *val1 = "-1"; - static gchar *val2 = "-2"; - gchar *val; - GPtrArray *result; + static gchar *val1 = "-1"; + static gchar *val2 = "-2"; + gchar *val; + GPtrArray *result; - g_assert_cmpint((*parray_)->len, ==, 3); - g_assert_cmpstr(g_ptr_array_index (*parray_, 0), ==, "0"); - g_assert_cmpstr(g_ptr_array_index (*parray_, 1), ==, "1"); - g_assert_cmpstr(g_ptr_array_index (*parray_, 2), ==, "2"); + g_assert_cmpint ((*parray_)->len, ==, 3); + g_assert_cmpstr (g_ptr_array_index (*parray_, 0), ==, "0"); + g_assert_cmpstr (g_ptr_array_index (*parray_, 1), ==, "1"); + g_assert_cmpstr (g_ptr_array_index (*parray_, 2), ==, "2"); - result = g_ptr_array_new (); - val = g_strdup (val2); - g_ptr_array_add(result, (gpointer) val); - val = g_strdup (val1); - g_ptr_array_add(result, (gpointer) val); - val = g_strdup ("0"); - g_ptr_array_add(result, (gpointer) val); - val = g_strdup ("1"); - g_ptr_array_add(result, (gpointer) val); + result = g_ptr_array_new (); + val = g_strdup (val2); + g_ptr_array_add (result, (gpointer) val); + val = g_strdup (val1); + g_ptr_array_add (result, (gpointer) val); + val = g_strdup ("0"); + g_ptr_array_add (result, (gpointer) val); + val = g_strdup ("1"); + g_ptr_array_add (result, (gpointer) val); - *parray_ = result; + *parray_ = result; } /** @@ -2256,13 +2272,13 @@ gi_marshalling_tests_gptrarray_utf8_full_inout (GPtrArray **parray_) GByteArray * gi_marshalling_tests_bytearray_full_return (void) { - GByteArray *array = NULL; - guint8 data[] = {'\0', '1', '\xFF', '3'}; + GByteArray *array = NULL; + guint8 data[] = { '\0', '1', '\xFF', '3' }; - array = g_byte_array_new (); - g_byte_array_append (array, (const guint8*)data, G_N_ELEMENTS(data)); + array = g_byte_array_new (); + g_byte_array_append (array, (const guint8 *) data, G_N_ELEMENTS (data)); - return array; + return array; } @@ -2273,11 +2289,11 @@ gi_marshalling_tests_bytearray_full_return (void) void gi_marshalling_tests_bytearray_none_in (GByteArray *v) { - g_assert_cmpuint (v->len, ==, 4); - g_assert_cmpuint (g_array_index (v, unsigned char, 0), ==, 0); - g_assert_cmpuint (g_array_index (v, unsigned char, 1), ==, 49); - g_assert_cmpuint (g_array_index (v, unsigned char, 2), ==, 0xFF); - g_assert_cmpuint (g_array_index (v, unsigned char, 3), ==, 51); + g_assert_cmpuint (v->len, ==, 4); + g_assert_cmpuint (g_array_index (v, unsigned char, 0), ==, 0); + g_assert_cmpuint (g_array_index (v, unsigned char, 1), ==, 49); + g_assert_cmpuint (g_array_index (v, unsigned char, 2), ==, 0xFF); + g_assert_cmpuint (g_array_index (v, unsigned char, 3), ==, 51); } /** @@ -2288,9 +2304,9 @@ gi_marshalling_tests_bytearray_none_in (GByteArray *v) GBytes * gi_marshalling_tests_gbytes_full_return (void) { - static guint8 data[] = {0, 49, 0xFF, 51}; + static guint8 data[] = { 0, 49, 0xFF, 51 }; - return g_bytes_new_static (data, G_N_ELEMENTS(data)); + return g_bytes_new_static (data, G_N_ELEMENTS (data)); } /** @@ -2318,12 +2334,12 @@ gi_marshalling_tests_gbytes_none_in (GBytes *v) GStrv gi_marshalling_tests_gstrv_return (void) { - GStrv values = g_new0 (gchar*, 4); - values[0] = g_strdup ("0"); - values[1] = g_strdup ("1"); - values[2] = g_strdup ("2"); - values[3] = NULL; - return values; + GStrv values = g_new0 (gchar *, 4); + values[0] = g_strdup ("0"); + values[1] = g_strdup ("1"); + values[2] = g_strdup ("2"); + values[3] = NULL; + return values; } /** @@ -2333,10 +2349,10 @@ gi_marshalling_tests_gstrv_return (void) void gi_marshalling_tests_gstrv_in (GStrv g_strv) { - g_assert_cmpint(g_strv_length(g_strv), ==, 3); - g_assert_cmpstr(g_strv[0], ==, "0"); - g_assert_cmpstr(g_strv[1], ==, "1"); - g_assert_cmpstr(g_strv[2], ==, "2"); + g_assert_cmpint (g_strv_length (g_strv), ==, 3); + g_assert_cmpstr (g_strv[0], ==, "0"); + g_assert_cmpstr (g_strv[1], ==, "1"); + g_assert_cmpstr (g_strv[2], ==, "2"); } /** @@ -2346,8 +2362,8 @@ gi_marshalling_tests_gstrv_in (GStrv g_strv) void gi_marshalling_tests_gstrv_out (GStrv *g_strv) { - static gchar *values[] = {"0", "1", "2", NULL}; - *g_strv = values; + static gchar *values[] = { "0", "1", "2", NULL }; + *g_strv = values; } /** @@ -2357,14 +2373,14 @@ gi_marshalling_tests_gstrv_out (GStrv *g_strv) void gi_marshalling_tests_gstrv_inout (GStrv *g_strv) { - static gchar *values[] = {"-1", "0", "1", "2", NULL}; + static gchar *values[] = { "-1", "0", "1", "2", NULL }; - g_assert(g_strv_length(*g_strv) == 3); - g_assert(strcmp((*g_strv)[0], "0") == 0); - g_assert(strcmp((*g_strv)[1], "1") == 0); - g_assert(strcmp((*g_strv)[2], "2") == 0); + g_assert (g_strv_length (*g_strv) == 3); + g_assert (strcmp ((*g_strv)[0], "0") == 0); + g_assert (strcmp ((*g_strv)[1], "1") == 0); + g_assert (strcmp ((*g_strv)[2], "2") == 0); - *g_strv = values; + *g_strv = values; } /** @@ -2375,16 +2391,17 @@ gi_marshalling_tests_gstrv_inout (GStrv *g_strv) GList * gi_marshalling_tests_glist_int_none_return (void) { - static GList *list = NULL; + static GList *list = NULL; - if (list == NULL) { - list = g_list_append(list, GINT_TO_POINTER(-1)); - list = g_list_append(list, GINT_TO_POINTER(0)); - list = g_list_append(list, GINT_TO_POINTER(1)); - list = g_list_append(list, GINT_TO_POINTER(2)); + if (list == NULL) + { + list = g_list_append (list, GINT_TO_POINTER (-1)); + list = g_list_append (list, GINT_TO_POINTER (0)); + list = g_list_append (list, GINT_TO_POINTER (1)); + list = g_list_append (list, GINT_TO_POINTER (2)); } - return list; + return list; } /** @@ -2395,14 +2412,15 @@ gi_marshalling_tests_glist_int_none_return (void) GList * gi_marshalling_tests_glist_uint32_none_return (void) { - static GList *list = NULL; + static GList *list = NULL; - if (list == NULL) { - list = g_list_append(list, GUINT_TO_POINTER(0)); - list = g_list_append(list, GUINT_TO_POINTER(G_MAXUINT32)); + if (list == NULL) + { + list = g_list_append (list, GUINT_TO_POINTER (0)); + list = g_list_append (list, GUINT_TO_POINTER (G_MAXUINT32)); } - return list; + return list; } /** @@ -2413,15 +2431,16 @@ gi_marshalling_tests_glist_uint32_none_return (void) GList * gi_marshalling_tests_glist_utf8_none_return (void) { - static GList *list = NULL; + static GList *list = NULL; - if (list == NULL) { - list = g_list_append(list, "0"); - list = g_list_append(list, "1"); - list = g_list_append(list, "2"); + if (list == NULL) + { + list = g_list_append (list, "0"); + list = g_list_append (list, "1"); + list = g_list_append (list, "2"); } - return list; + return list; } /** @@ -2432,13 +2451,13 @@ gi_marshalling_tests_glist_utf8_none_return (void) GList * gi_marshalling_tests_glist_utf8_container_return (void) { - GList *list = NULL; + GList *list = NULL; - list = g_list_append(list, "0"); - list = g_list_append(list, "1"); - list = g_list_append(list, "2"); + list = g_list_append (list, "0"); + list = g_list_append (list, "1"); + list = g_list_append (list, "2"); - return list; + return list; } /** @@ -2449,13 +2468,13 @@ gi_marshalling_tests_glist_utf8_container_return (void) GList * gi_marshalling_tests_glist_utf8_full_return (void) { - GList *list = NULL; + GList *list = NULL; - list = g_list_append(list, g_strdup("0")); - list = g_list_append(list, g_strdup("1")); - list = g_list_append(list, g_strdup("2")); + list = g_list_append (list, g_strdup ("0")); + list = g_list_append (list, g_strdup ("1")); + list = g_list_append (list, g_strdup ("2")); - return list; + return list; } /** @@ -2465,11 +2484,11 @@ gi_marshalling_tests_glist_utf8_full_return (void) void gi_marshalling_tests_glist_int_none_in (GList *list) { - g_assert_cmpint(g_list_length(list), ==, 4); - g_assert_cmpint(GPOINTER_TO_INT(g_list_nth_data(list, 0)), ==, -1); - g_assert_cmpint(GPOINTER_TO_INT(g_list_nth_data(list, 1)), ==, 0); - g_assert_cmpint(GPOINTER_TO_INT(g_list_nth_data(list, 2)), ==, 1); - g_assert_cmpint(GPOINTER_TO_INT(g_list_nth_data(list, 3)), ==, 2); + g_assert_cmpint (g_list_length (list), ==, 4); + g_assert_cmpint (GPOINTER_TO_INT (g_list_nth_data (list, 0)), ==, -1); + g_assert_cmpint (GPOINTER_TO_INT (g_list_nth_data (list, 1)), ==, 0); + g_assert_cmpint (GPOINTER_TO_INT (g_list_nth_data (list, 2)), ==, 1); + g_assert_cmpint (GPOINTER_TO_INT (g_list_nth_data (list, 3)), ==, 2); } /** @@ -2479,9 +2498,9 @@ gi_marshalling_tests_glist_int_none_in (GList *list) void gi_marshalling_tests_glist_uint32_none_in (GList *list) { - g_assert_cmpint(g_list_length(list), ==, 2); - g_assert_cmpint(GPOINTER_TO_UINT(g_list_nth_data(list, 0)), ==, 0); - g_assert_cmpint(GPOINTER_TO_UINT(g_list_nth_data(list, 1)), ==, G_MAXUINT32); + g_assert_cmpint (g_list_length (list), ==, 2); + g_assert_cmpint (GPOINTER_TO_UINT (g_list_nth_data (list, 0)), ==, 0); + g_assert_cmpint (GPOINTER_TO_UINT (g_list_nth_data (list, 1)), ==, G_MAXUINT32); } /** @@ -2491,10 +2510,10 @@ gi_marshalling_tests_glist_uint32_none_in (GList *list) void gi_marshalling_tests_glist_utf8_none_in (GList *list) { - g_assert_cmpint(g_list_length(list), ==, 3); - g_assert_cmpint(strcmp(g_list_nth_data(list, 0), "0"), ==, 0); - g_assert_cmpint(strcmp(g_list_nth_data(list, 1), "1"), ==, 0); - g_assert_cmpint(strcmp(g_list_nth_data(list, 2), "2"), ==, 0); + g_assert_cmpint (g_list_length (list), ==, 3); + g_assert_cmpint (strcmp (g_list_nth_data (list, 0), "0"), ==, 0); + g_assert_cmpint (strcmp (g_list_nth_data (list, 1), "1"), ==, 0); + g_assert_cmpint (strcmp (g_list_nth_data (list, 2), "2"), ==, 0); } /** @@ -2504,15 +2523,16 @@ gi_marshalling_tests_glist_utf8_none_in (GList *list) void gi_marshalling_tests_glist_utf8_none_out (GList **list) { - static GList *values = NULL; + static GList *values = NULL; - if (values == NULL) { - values = g_list_append(values, "0"); - values = g_list_append(values, "1"); - values = g_list_append(values, "2"); + if (values == NULL) + { + values = g_list_append (values, "0"); + values = g_list_append (values, "1"); + values = g_list_append (values, "2"); } - *list = values; + *list = values; } /** @@ -2522,11 +2542,11 @@ gi_marshalling_tests_glist_utf8_none_out (GList **list) void gi_marshalling_tests_glist_utf8_container_out (GList **list) { - *list = NULL; + *list = NULL; - *list = g_list_append(*list, "0"); - *list = g_list_append(*list, "1"); - *list = g_list_append(*list, "2"); + *list = g_list_append (*list, "0"); + *list = g_list_append (*list, "1"); + *list = g_list_append (*list, "2"); } /** @@ -2536,11 +2556,11 @@ gi_marshalling_tests_glist_utf8_container_out (GList **list) void gi_marshalling_tests_glist_utf8_full_out (GList **list) { - *list = NULL; + *list = NULL; - *list = g_list_append(*list, g_strdup("0")); - *list = g_list_append(*list, g_strdup("1")); - *list = g_list_append(*list, g_strdup("2")); + *list = g_list_append (*list, g_strdup ("0")); + *list = g_list_append (*list, g_strdup ("1")); + *list = g_list_append (*list, g_strdup ("2")); } /** @@ -2550,21 +2570,22 @@ gi_marshalling_tests_glist_utf8_full_out (GList **list) void gi_marshalling_tests_glist_utf8_none_inout (GList **list) { - static GList *values = NULL; + static GList *values = NULL; - g_assert_cmpint(g_list_length(*list), ==, 3); - g_assert_cmpstr(g_list_nth_data(*list, 0), ==, "0"); - g_assert_cmpstr(g_list_nth_data(*list, 1), ==, "1"); - g_assert_cmpstr(g_list_nth_data(*list, 2), ==, "2"); + g_assert_cmpint (g_list_length (*list), ==, 3); + g_assert_cmpstr (g_list_nth_data (*list, 0), ==, "0"); + g_assert_cmpstr (g_list_nth_data (*list, 1), ==, "1"); + g_assert_cmpstr (g_list_nth_data (*list, 2), ==, "2"); - if (values == NULL) { - values = g_list_append(values, "-2"); - values = g_list_append(values, "-1"); - values = g_list_append(values, "0"); - values = g_list_append(values, "1"); + if (values == NULL) + { + values = g_list_append (values, "-2"); + values = g_list_append (values, "-1"); + values = g_list_append (values, "0"); + values = g_list_append (values, "1"); } - *list = values; + *list = values; } /** @@ -2574,19 +2595,19 @@ gi_marshalling_tests_glist_utf8_none_inout (GList **list) void gi_marshalling_tests_glist_utf8_container_inout (GList **list) { - GList *result = NULL; + GList *result = NULL; - g_assert_cmpint(g_list_length(*list), ==, 3); - g_assert_cmpstr(g_list_nth_data(*list, 0), ==, "0"); - g_assert_cmpstr(g_list_nth_data(*list, 1), ==, "1"); - g_assert_cmpstr(g_list_nth_data(*list, 2), ==, "2"); + g_assert_cmpint (g_list_length (*list), ==, 3); + g_assert_cmpstr (g_list_nth_data (*list, 0), ==, "0"); + g_assert_cmpstr (g_list_nth_data (*list, 1), ==, "1"); + g_assert_cmpstr (g_list_nth_data (*list, 2), ==, "2"); - result = g_list_prepend(result, "1"); - result = g_list_prepend(result, "0"); - result = g_list_prepend(result, "-1"); - result = g_list_prepend(result, "-2"); + result = g_list_prepend (result, "1"); + result = g_list_prepend (result, "0"); + result = g_list_prepend (result, "-1"); + result = g_list_prepend (result, "-2"); - *list = result; + *list = result; } /** @@ -2596,19 +2617,19 @@ gi_marshalling_tests_glist_utf8_container_inout (GList **list) void gi_marshalling_tests_glist_utf8_full_inout (GList **list) { - GList *result = NULL; + GList *result = NULL; - g_assert_cmpint(g_list_length(*list), ==, 3); - g_assert_cmpstr(g_list_nth_data(*list, 0), ==, "0"); - g_assert_cmpstr(g_list_nth_data(*list, 1), ==, "1"); - g_assert_cmpstr(g_list_nth_data(*list, 2), ==, "2"); + g_assert_cmpint (g_list_length (*list), ==, 3); + g_assert_cmpstr (g_list_nth_data (*list, 0), ==, "0"); + g_assert_cmpstr (g_list_nth_data (*list, 1), ==, "1"); + g_assert_cmpstr (g_list_nth_data (*list, 2), ==, "2"); - result = g_list_prepend(result, g_strdup("1")); - result = g_list_prepend(result, g_strdup("0")); - result = g_list_prepend(result, g_strdup("-1")); - result = g_list_prepend(result, g_strdup("-2")); + result = g_list_prepend (result, g_strdup ("1")); + result = g_list_prepend (result, g_strdup ("0")); + result = g_list_prepend (result, g_strdup ("-1")); + result = g_list_prepend (result, g_strdup ("-2")); - *list = result; + *list = result; } @@ -2620,17 +2641,18 @@ gi_marshalling_tests_glist_utf8_full_inout (GList **list) GSList * gi_marshalling_tests_gslist_int_none_return (void) { - static GSList *list = NULL; + static GSList *list = NULL; - if (list == NULL) { - list = g_slist_prepend(list, GINT_TO_POINTER(-1)); - list = g_slist_prepend(list, GINT_TO_POINTER(0)); - list = g_slist_prepend(list, GINT_TO_POINTER(1)); - list = g_slist_prepend(list, GINT_TO_POINTER(2)); - list = g_slist_reverse(list); + if (list == NULL) + { + list = g_slist_prepend (list, GINT_TO_POINTER (-1)); + list = g_slist_prepend (list, GINT_TO_POINTER (0)); + list = g_slist_prepend (list, GINT_TO_POINTER (1)); + list = g_slist_prepend (list, GINT_TO_POINTER (2)); + list = g_slist_reverse (list); } - return list; + return list; } /** @@ -2641,16 +2663,17 @@ gi_marshalling_tests_gslist_int_none_return (void) GSList * gi_marshalling_tests_gslist_utf8_none_return (void) { - static GSList *list = NULL; + static GSList *list = NULL; - if (list == NULL) { - list = g_slist_prepend(list, "0"); - list = g_slist_prepend(list, "1"); - list = g_slist_prepend(list, "2"); - list = g_slist_reverse(list); + if (list == NULL) + { + list = g_slist_prepend (list, "0"); + list = g_slist_prepend (list, "1"); + list = g_slist_prepend (list, "2"); + list = g_slist_reverse (list); } - return list; + return list; } /** @@ -2661,14 +2684,14 @@ gi_marshalling_tests_gslist_utf8_none_return (void) GSList * gi_marshalling_tests_gslist_utf8_container_return (void) { - GSList *list = NULL; + GSList *list = NULL; - list = g_slist_prepend(list, "0"); - list = g_slist_prepend(list, "1"); - list = g_slist_prepend(list, "2"); - list = g_slist_reverse(list); + list = g_slist_prepend (list, "0"); + list = g_slist_prepend (list, "1"); + list = g_slist_prepend (list, "2"); + list = g_slist_reverse (list); - return list; + return list; } /** @@ -2679,14 +2702,14 @@ gi_marshalling_tests_gslist_utf8_container_return (void) GSList * gi_marshalling_tests_gslist_utf8_full_return (void) { - GSList *list = NULL; + GSList *list = NULL; - list = g_slist_prepend(list, g_strdup("0")); - list = g_slist_prepend(list, g_strdup("1")); - list = g_slist_prepend(list, g_strdup("2")); - list = g_slist_reverse(list); + list = g_slist_prepend (list, g_strdup ("0")); + list = g_slist_prepend (list, g_strdup ("1")); + list = g_slist_prepend (list, g_strdup ("2")); + list = g_slist_reverse (list); - return list; + return list; } /** @@ -2696,11 +2719,11 @@ gi_marshalling_tests_gslist_utf8_full_return (void) void gi_marshalling_tests_gslist_int_none_in (GSList *list) { - g_assert_cmpint(g_slist_length(list), ==, 4); - g_assert_cmpint(GPOINTER_TO_INT(g_slist_nth_data(list, 0)), ==, -1); - g_assert_cmpint(GPOINTER_TO_INT(g_slist_nth_data(list, 1)), ==, 0); - g_assert_cmpint(GPOINTER_TO_INT(g_slist_nth_data(list, 2)), ==, 1); - g_assert_cmpint(GPOINTER_TO_INT(g_slist_nth_data(list, 3)), ==, 2); + g_assert_cmpint (g_slist_length (list), ==, 4); + g_assert_cmpint (GPOINTER_TO_INT (g_slist_nth_data (list, 0)), ==, -1); + g_assert_cmpint (GPOINTER_TO_INT (g_slist_nth_data (list, 1)), ==, 0); + g_assert_cmpint (GPOINTER_TO_INT (g_slist_nth_data (list, 2)), ==, 1); + g_assert_cmpint (GPOINTER_TO_INT (g_slist_nth_data (list, 3)), ==, 2); } /** @@ -2710,10 +2733,10 @@ gi_marshalling_tests_gslist_int_none_in (GSList *list) void gi_marshalling_tests_gslist_utf8_none_in (GSList *list) { - g_assert_cmpint(g_slist_length(list), ==, 3); - g_assert_cmpstr(g_slist_nth_data(list, 0), ==, "0"); - g_assert_cmpstr(g_slist_nth_data(list, 1), ==, "1"); - g_assert_cmpstr(g_slist_nth_data(list, 2), ==, "2"); + g_assert_cmpint (g_slist_length (list), ==, 3); + g_assert_cmpstr (g_slist_nth_data (list, 0), ==, "0"); + g_assert_cmpstr (g_slist_nth_data (list, 1), ==, "1"); + g_assert_cmpstr (g_slist_nth_data (list, 2), ==, "2"); } /** @@ -2723,16 +2746,17 @@ gi_marshalling_tests_gslist_utf8_none_in (GSList *list) void gi_marshalling_tests_gslist_utf8_none_out (GSList **list) { - static GSList *values = NULL; + static GSList *values = NULL; - if (values == NULL) { - values = g_slist_prepend(values, "0"); - values = g_slist_prepend(values, "1"); - values = g_slist_prepend(values, "2"); - values = g_slist_reverse(values); + if (values == NULL) + { + values = g_slist_prepend (values, "0"); + values = g_slist_prepend (values, "1"); + values = g_slist_prepend (values, "2"); + values = g_slist_reverse (values); } - *list = values; + *list = values; } /** @@ -2742,12 +2766,12 @@ gi_marshalling_tests_gslist_utf8_none_out (GSList **list) void gi_marshalling_tests_gslist_utf8_container_out (GSList **list) { - *list = NULL; + *list = NULL; - *list = g_slist_prepend(*list, "0"); - *list = g_slist_prepend(*list, "1"); - *list = g_slist_prepend(*list, "2"); - *list = g_slist_reverse(*list); + *list = g_slist_prepend (*list, "0"); + *list = g_slist_prepend (*list, "1"); + *list = g_slist_prepend (*list, "2"); + *list = g_slist_reverse (*list); } /** @@ -2757,12 +2781,12 @@ gi_marshalling_tests_gslist_utf8_container_out (GSList **list) void gi_marshalling_tests_gslist_utf8_full_out (GSList **list) { - *list = NULL; + *list = NULL; - *list = g_slist_prepend(*list, g_strdup("0")); - *list = g_slist_prepend(*list, g_strdup("1")); - *list = g_slist_prepend(*list, g_strdup("2")); - *list = g_slist_reverse(*list); + *list = g_slist_prepend (*list, g_strdup ("0")); + *list = g_slist_prepend (*list, g_strdup ("1")); + *list = g_slist_prepend (*list, g_strdup ("2")); + *list = g_slist_reverse (*list); } /** @@ -2772,22 +2796,23 @@ gi_marshalling_tests_gslist_utf8_full_out (GSList **list) void gi_marshalling_tests_gslist_utf8_none_inout (GSList **list) { - static GSList *values = NULL; + static GSList *values = NULL; - g_assert_cmpint(g_slist_length(*list), ==, 3); - g_assert_cmpstr(g_slist_nth_data(*list, 0), ==, "0"); - g_assert_cmpstr(g_slist_nth_data(*list, 1), ==, "1"); - g_assert_cmpstr(g_slist_nth_data(*list, 2), ==, "2"); + g_assert_cmpint (g_slist_length (*list), ==, 3); + g_assert_cmpstr (g_slist_nth_data (*list, 0), ==, "0"); + g_assert_cmpstr (g_slist_nth_data (*list, 1), ==, "1"); + g_assert_cmpstr (g_slist_nth_data (*list, 2), ==, "2"); - if (values == NULL) { - values = g_slist_prepend(values, "-2"); - values = g_slist_prepend(values, "-1"); - values = g_slist_prepend(values, "0"); - values = g_slist_prepend(values, "1"); - values = g_slist_reverse(values); + if (values == NULL) + { + values = g_slist_prepend (values, "-2"); + values = g_slist_prepend (values, "-1"); + values = g_slist_prepend (values, "0"); + values = g_slist_prepend (values, "1"); + values = g_slist_reverse (values); } - *list = values; + *list = values; } /** @@ -2797,19 +2822,19 @@ gi_marshalling_tests_gslist_utf8_none_inout (GSList **list) void gi_marshalling_tests_gslist_utf8_container_inout (GSList **list) { - GSList *result = NULL; + GSList *result = NULL; - g_assert_cmpint(g_slist_length(*list), ==, 3); - g_assert_cmpstr(g_slist_nth_data(*list, 0), ==, "0"); - g_assert_cmpstr(g_slist_nth_data(*list, 1), ==, "1"); - g_assert_cmpstr(g_slist_nth_data(*list, 2), ==, "2"); + g_assert_cmpint (g_slist_length (*list), ==, 3); + g_assert_cmpstr (g_slist_nth_data (*list, 0), ==, "0"); + g_assert_cmpstr (g_slist_nth_data (*list, 1), ==, "1"); + g_assert_cmpstr (g_slist_nth_data (*list, 2), ==, "2"); - result = g_slist_prepend(result, "1"); - result = g_slist_prepend(result, "0"); - result = g_slist_prepend(result, "-1"); - result = g_slist_prepend(result, "-2"); + result = g_slist_prepend (result, "1"); + result = g_slist_prepend (result, "0"); + result = g_slist_prepend (result, "-1"); + result = g_slist_prepend (result, "-2"); - *list = result; + *list = result; } /** @@ -2819,19 +2844,19 @@ gi_marshalling_tests_gslist_utf8_container_inout (GSList **list) void gi_marshalling_tests_gslist_utf8_full_inout (GSList **list) { - GSList *result = NULL; + GSList *result = NULL; - g_assert_cmpint(g_slist_length(*list), ==, 3); - g_assert_cmpstr(g_slist_nth_data(*list, 0), ==, "0"); - g_assert_cmpstr(g_slist_nth_data(*list, 1), ==, "1"); - g_assert_cmpstr(g_slist_nth_data(*list, 2), ==, "2"); + g_assert_cmpint (g_slist_length (*list), ==, 3); + g_assert_cmpstr (g_slist_nth_data (*list, 0), ==, "0"); + g_assert_cmpstr (g_slist_nth_data (*list, 1), ==, "1"); + g_assert_cmpstr (g_slist_nth_data (*list, 2), ==, "2"); - result = g_slist_prepend(result, g_strdup("1")); - result = g_slist_prepend(result, g_strdup("0")); - result = g_slist_prepend(result, g_strdup("-1")); - result = g_slist_prepend(result, g_strdup("-2")); + result = g_slist_prepend (result, g_strdup ("1")); + result = g_slist_prepend (result, g_strdup ("0")); + result = g_slist_prepend (result, g_strdup ("-1")); + result = g_slist_prepend (result, g_strdup ("-2")); - *list = result; + *list = result; } @@ -2843,17 +2868,18 @@ gi_marshalling_tests_gslist_utf8_full_inout (GSList **list) GHashTable * gi_marshalling_tests_ghashtable_int_none_return (void) { - static GHashTable *hash_table = NULL; + static GHashTable *hash_table = NULL; - if (hash_table == NULL) { - hash_table = g_hash_table_new(NULL, NULL); - g_hash_table_insert(hash_table, GINT_TO_POINTER(-1), GINT_TO_POINTER(1)); - g_hash_table_insert(hash_table, GINT_TO_POINTER(0), GINT_TO_POINTER(0)); - g_hash_table_insert(hash_table, GINT_TO_POINTER(1), GINT_TO_POINTER(-1)); - g_hash_table_insert(hash_table, GINT_TO_POINTER(2), GINT_TO_POINTER(-2)); + if (hash_table == NULL) + { + hash_table = g_hash_table_new (NULL, NULL); + g_hash_table_insert (hash_table, GINT_TO_POINTER (-1), GINT_TO_POINTER (1)); + g_hash_table_insert (hash_table, GINT_TO_POINTER (0), GINT_TO_POINTER (0)); + g_hash_table_insert (hash_table, GINT_TO_POINTER (1), GINT_TO_POINTER (-1)); + g_hash_table_insert (hash_table, GINT_TO_POINTER (2), GINT_TO_POINTER (-2)); } - return hash_table; + return hash_table; } /** @@ -2864,17 +2890,18 @@ gi_marshalling_tests_ghashtable_int_none_return (void) GHashTable * gi_marshalling_tests_ghashtable_utf8_none_return (void) { - static GHashTable *hash_table = NULL; + static GHashTable *hash_table = NULL; - if (hash_table == NULL) { - hash_table = g_hash_table_new(g_str_hash, g_str_equal); - g_hash_table_insert(hash_table, "-1", "1"); - g_hash_table_insert(hash_table, "0", "0"); - g_hash_table_insert(hash_table, "1", "-1"); - g_hash_table_insert(hash_table, "2", "-2"); + if (hash_table == NULL) + { + hash_table = g_hash_table_new (g_str_hash, g_str_equal); + g_hash_table_insert (hash_table, "-1", "1"); + g_hash_table_insert (hash_table, "0", "0"); + g_hash_table_insert (hash_table, "1", "-1"); + g_hash_table_insert (hash_table, "2", "-2"); } - return hash_table; + return hash_table; } /** @@ -2885,15 +2912,15 @@ gi_marshalling_tests_ghashtable_utf8_none_return (void) GHashTable * gi_marshalling_tests_ghashtable_utf8_container_return (void) { - GHashTable *hash_table = NULL; + GHashTable *hash_table = NULL; - hash_table = g_hash_table_new(g_str_hash, g_str_equal); - g_hash_table_insert(hash_table, "-1", "1"); - g_hash_table_insert(hash_table, "0", "0"); - g_hash_table_insert(hash_table, "1", "-1"); - g_hash_table_insert(hash_table, "2", "-2"); + hash_table = g_hash_table_new (g_str_hash, g_str_equal); + g_hash_table_insert (hash_table, "-1", "1"); + g_hash_table_insert (hash_table, "0", "0"); + g_hash_table_insert (hash_table, "1", "-1"); + g_hash_table_insert (hash_table, "2", "-2"); - return hash_table; + return hash_table; } /** @@ -2904,15 +2931,15 @@ gi_marshalling_tests_ghashtable_utf8_container_return (void) GHashTable * gi_marshalling_tests_ghashtable_utf8_full_return (void) { - GHashTable *hash_table = NULL; + GHashTable *hash_table = NULL; - hash_table = g_hash_table_new(g_str_hash, g_str_equal); - g_hash_table_insert(hash_table, g_strdup("-1"), g_strdup("1")); - g_hash_table_insert(hash_table, g_strdup("0"), g_strdup("0")); - g_hash_table_insert(hash_table, g_strdup("1"), g_strdup("-1")); - g_hash_table_insert(hash_table, g_strdup("2"), g_strdup("-2")); + hash_table = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); + g_hash_table_insert (hash_table, g_strdup ("-1"), g_strdup ("1")); + g_hash_table_insert (hash_table, g_strdup ("0"), g_strdup ("0")); + g_hash_table_insert (hash_table, g_strdup ("1"), g_strdup ("-1")); + g_hash_table_insert (hash_table, g_strdup ("2"), g_strdup ("-2")); - return hash_table; + return hash_table; } /** @@ -2922,10 +2949,10 @@ gi_marshalling_tests_ghashtable_utf8_full_return (void) void gi_marshalling_tests_ghashtable_int_none_in (GHashTable *hash_table) { - g_assert_cmpint(GPOINTER_TO_INT(g_hash_table_lookup(hash_table, GINT_TO_POINTER(-1))), ==, 1); - g_assert_cmpint(GPOINTER_TO_INT(g_hash_table_lookup(hash_table, GINT_TO_POINTER(0))), ==, 0); - g_assert_cmpint(GPOINTER_TO_INT(g_hash_table_lookup(hash_table, GINT_TO_POINTER(1))), ==, -1); - g_assert_cmpint(GPOINTER_TO_INT(g_hash_table_lookup(hash_table, GINT_TO_POINTER(2))), ==, -2); + g_assert_cmpint (GPOINTER_TO_INT (g_hash_table_lookup (hash_table, GINT_TO_POINTER (-1))), ==, 1); + g_assert_cmpint (GPOINTER_TO_INT (g_hash_table_lookup (hash_table, GINT_TO_POINTER (0))), ==, 0); + g_assert_cmpint (GPOINTER_TO_INT (g_hash_table_lookup (hash_table, GINT_TO_POINTER (1))), ==, -1); + g_assert_cmpint (GPOINTER_TO_INT (g_hash_table_lookup (hash_table, GINT_TO_POINTER (2))), ==, -2); } /** @@ -2935,10 +2962,10 @@ gi_marshalling_tests_ghashtable_int_none_in (GHashTable *hash_table) void gi_marshalling_tests_ghashtable_utf8_none_in (GHashTable *hash_table) { - g_assert_cmpstr(g_hash_table_lookup(hash_table, "-1"), ==, "1"); - g_assert_cmpstr(g_hash_table_lookup(hash_table, "0"), ==, "0"); - g_assert_cmpstr(g_hash_table_lookup(hash_table, "1"), ==, "-1"); - g_assert_cmpstr(g_hash_table_lookup(hash_table, "2"), ==, "-2"); + g_assert_cmpstr (g_hash_table_lookup (hash_table, "-1"), ==, "1"); + g_assert_cmpstr (g_hash_table_lookup (hash_table, "0"), ==, "0"); + g_assert_cmpstr (g_hash_table_lookup (hash_table, "1"), ==, "-1"); + g_assert_cmpstr (g_hash_table_lookup (hash_table, "2"), ==, "-2"); } /** @@ -2948,17 +2975,18 @@ gi_marshalling_tests_ghashtable_utf8_none_in (GHashTable *hash_table) void gi_marshalling_tests_ghashtable_utf8_none_out (GHashTable **hash_table) { - static GHashTable *new_hash_table = NULL; + static GHashTable *new_hash_table = NULL; - if (new_hash_table == NULL) { - new_hash_table = g_hash_table_new(g_str_hash, g_str_equal); - g_hash_table_insert(new_hash_table, "-1", "1"); - g_hash_table_insert(new_hash_table, "0", "0"); - g_hash_table_insert(new_hash_table, "1", "-1"); - g_hash_table_insert(new_hash_table, "2", "-2"); + if (new_hash_table == NULL) + { + new_hash_table = g_hash_table_new (g_str_hash, g_str_equal); + g_hash_table_insert (new_hash_table, "-1", "1"); + g_hash_table_insert (new_hash_table, "0", "0"); + g_hash_table_insert (new_hash_table, "1", "-1"); + g_hash_table_insert (new_hash_table, "2", "-2"); } - *hash_table = new_hash_table; + *hash_table = new_hash_table; } /** @@ -2968,11 +2996,11 @@ gi_marshalling_tests_ghashtable_utf8_none_out (GHashTable **hash_table) void gi_marshalling_tests_ghashtable_utf8_container_out (GHashTable **hash_table) { - *hash_table = g_hash_table_new(g_str_hash, g_str_equal); - g_hash_table_insert(*hash_table, "-1", "1"); - g_hash_table_insert(*hash_table, "0", "0"); - g_hash_table_insert(*hash_table, "1", "-1"); - g_hash_table_insert(*hash_table, "2", "-2"); + *hash_table = g_hash_table_new (g_str_hash, g_str_equal); + g_hash_table_insert (*hash_table, "-1", "1"); + g_hash_table_insert (*hash_table, "0", "0"); + g_hash_table_insert (*hash_table, "1", "-1"); + g_hash_table_insert (*hash_table, "2", "-2"); } /** @@ -2982,11 +3010,11 @@ gi_marshalling_tests_ghashtable_utf8_container_out (GHashTable **hash_table) void gi_marshalling_tests_ghashtable_utf8_full_out (GHashTable **hash_table) { - *hash_table = g_hash_table_new(g_str_hash, g_str_equal); - g_hash_table_insert(*hash_table, g_strdup("-1"), g_strdup("1")); - g_hash_table_insert(*hash_table, g_strdup("0"), g_strdup("0")); - g_hash_table_insert(*hash_table, g_strdup("1"), g_strdup("-1")); - g_hash_table_insert(*hash_table, g_strdup("2"), g_strdup("-2")); + *hash_table = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); + g_hash_table_insert (*hash_table, g_strdup ("-1"), g_strdup ("1")); + g_hash_table_insert (*hash_table, g_strdup ("0"), g_strdup ("0")); + g_hash_table_insert (*hash_table, g_strdup ("1"), g_strdup ("-1")); + g_hash_table_insert (*hash_table, g_strdup ("2"), g_strdup ("-2")); } /** @@ -2996,21 +3024,22 @@ gi_marshalling_tests_ghashtable_utf8_full_out (GHashTable **hash_table) void gi_marshalling_tests_ghashtable_utf8_none_inout (GHashTable **hash_table) { - static GHashTable *new_hash_table = NULL; + static GHashTable *new_hash_table = NULL; - g_assert_cmpstr(g_hash_table_lookup(*hash_table, "-1"), ==, "1"); - g_assert_cmpstr(g_hash_table_lookup(*hash_table, "0"), ==, "0"); - g_assert_cmpstr(g_hash_table_lookup(*hash_table, "1"), ==, "-1"); - g_assert_cmpstr(g_hash_table_lookup(*hash_table, "2"), ==, "-2"); + g_assert_cmpstr (g_hash_table_lookup (*hash_table, "-1"), ==, "1"); + g_assert_cmpstr (g_hash_table_lookup (*hash_table, "0"), ==, "0"); + g_assert_cmpstr (g_hash_table_lookup (*hash_table, "1"), ==, "-1"); + g_assert_cmpstr (g_hash_table_lookup (*hash_table, "2"), ==, "-2"); - if (new_hash_table == NULL) { - new_hash_table = g_hash_table_new(g_str_hash, g_str_equal); - g_hash_table_insert(new_hash_table, "-1", "1"); - g_hash_table_insert(new_hash_table, "0", "0"); - g_hash_table_insert(new_hash_table, "1", "1"); + if (new_hash_table == NULL) + { + new_hash_table = g_hash_table_new (g_str_hash, g_str_equal); + g_hash_table_insert (new_hash_table, "-1", "1"); + g_hash_table_insert (new_hash_table, "0", "0"); + g_hash_table_insert (new_hash_table, "1", "1"); } - *hash_table = new_hash_table; + *hash_table = new_hash_table; } /** @@ -3020,18 +3049,18 @@ gi_marshalling_tests_ghashtable_utf8_none_inout (GHashTable **hash_table) void gi_marshalling_tests_ghashtable_utf8_container_inout (GHashTable **hash_table) { - GHashTable *result = g_hash_table_new(g_str_hash, g_str_equal); + GHashTable *result = g_hash_table_new (g_str_hash, g_str_equal); - g_assert_cmpstr(g_hash_table_lookup(*hash_table, "-1"), ==, "1"); - g_assert_cmpstr(g_hash_table_lookup(*hash_table, "0"), ==, "0"); - g_assert_cmpstr(g_hash_table_lookup(*hash_table, "1"), ==, "-1"); - g_assert_cmpstr(g_hash_table_lookup(*hash_table, "2"), ==, "-2"); + g_assert_cmpstr (g_hash_table_lookup (*hash_table, "-1"), ==, "1"); + g_assert_cmpstr (g_hash_table_lookup (*hash_table, "0"), ==, "0"); + g_assert_cmpstr (g_hash_table_lookup (*hash_table, "1"), ==, "-1"); + g_assert_cmpstr (g_hash_table_lookup (*hash_table, "2"), ==, "-2"); - g_hash_table_insert(result, "-1", "1"); - g_hash_table_insert(result, "0", "0"); - g_hash_table_insert(result, "1", "1"); + g_hash_table_insert (result, "-1", "1"); + g_hash_table_insert (result, "0", "0"); + g_hash_table_insert (result, "1", "1"); - *hash_table = result; + *hash_table = result; } /** @@ -3041,19 +3070,19 @@ gi_marshalling_tests_ghashtable_utf8_container_inout (GHashTable **hash_table) void gi_marshalling_tests_ghashtable_utf8_full_inout (GHashTable **hash_table) { - GHashTable *result = g_hash_table_new_full(g_str_hash, g_str_equal, - g_free, g_free); + GHashTable *result = g_hash_table_new_full (g_str_hash, g_str_equal, + g_free, g_free); - g_assert_cmpstr(g_hash_table_lookup(*hash_table, "-1"), ==, "1"); - g_assert_cmpstr(g_hash_table_lookup(*hash_table, "0"), ==, "0"); - g_assert_cmpstr(g_hash_table_lookup(*hash_table, "1"), ==, "-1"); - g_assert_cmpstr(g_hash_table_lookup(*hash_table, "2"), ==, "-2"); + g_assert_cmpstr (g_hash_table_lookup (*hash_table, "-1"), ==, "1"); + g_assert_cmpstr (g_hash_table_lookup (*hash_table, "0"), ==, "0"); + g_assert_cmpstr (g_hash_table_lookup (*hash_table, "1"), ==, "-1"); + g_assert_cmpstr (g_hash_table_lookup (*hash_table, "2"), ==, "-2"); - g_hash_table_insert(result, g_strdup("-1"), g_strdup("1")); - g_hash_table_insert(result, g_strdup("0"), g_strdup("0")); - g_hash_table_insert(result, g_strdup("1"), g_strdup("1")); + g_hash_table_insert (result, g_strdup ("-1"), g_strdup ("1")); + g_hash_table_insert (result, g_strdup ("0"), g_strdup ("0")); + g_hash_table_insert (result, g_strdup ("1"), g_strdup ("1")); - *hash_table = result; + *hash_table = result; } @@ -3065,15 +3094,16 @@ gi_marshalling_tests_ghashtable_utf8_full_inout (GHashTable **hash_table) GValue * gi_marshalling_tests_gvalue_return (void) { - static GValue *value = NULL; + static GValue *value = NULL; - if (value == NULL) { - value = g_new0(GValue, 1); - g_value_init(value, G_TYPE_INT); - g_value_set_int(value, 42); + if (value == NULL) + { + value = g_new0 (GValue, 1); + g_value_init (value, G_TYPE_INT); + g_value_set_int (value, 42); } - return value; + return value; } /** @@ -3083,7 +3113,7 @@ gi_marshalling_tests_gvalue_return (void) void gi_marshalling_tests_gvalue_in (GValue *value) { - g_assert_cmpint(g_value_get_int(value), ==, 42); + g_assert_cmpint (g_value_get_int (value), ==, 42); } /** @@ -3093,7 +3123,7 @@ gi_marshalling_tests_gvalue_in (GValue *value) void gi_marshalling_tests_gvalue_int64_in (GValue *value) { - g_assert_cmpint(g_value_get_int64(value), ==, G_MAXINT64); + g_assert_cmpint (g_value_get_int64 (value), ==, G_MAXINT64); } /** @@ -3104,7 +3134,7 @@ gi_marshalling_tests_gvalue_int64_in (GValue *value) void gi_marshalling_tests_gvalue_in_with_type (GValue *value, GType type) { - g_assert(g_type_is_a(G_VALUE_TYPE(value), type)); + g_assert (g_type_is_a (G_VALUE_TYPE (value), type)); } /** @@ -3114,7 +3144,7 @@ gi_marshalling_tests_gvalue_in_with_type (GValue *value, GType type) void gi_marshalling_tests_gvalue_in_enum (GValue *value) { - g_assert(g_value_get_enum(value) == GI_MARSHALLING_TESTS_ENUM_VALUE3); + g_assert (g_value_get_enum (value) == GI_MARSHALLING_TESTS_ENUM_VALUE3); } /** @@ -3124,15 +3154,16 @@ gi_marshalling_tests_gvalue_in_enum (GValue *value) void gi_marshalling_tests_gvalue_out (GValue **value) { - static GValue *new_value = NULL; + static GValue *new_value = NULL; - if (new_value == NULL) { - new_value = g_new0(GValue, 1); - g_value_init(new_value, G_TYPE_INT); - g_value_set_int(new_value, 42); + if (new_value == NULL) + { + new_value = g_new0 (GValue, 1); + g_value_init (new_value, G_TYPE_INT); + g_value_set_int (new_value, 42); } - *value = new_value; + *value = new_value; } /** @@ -3142,15 +3173,16 @@ gi_marshalling_tests_gvalue_out (GValue **value) void gi_marshalling_tests_gvalue_int64_out (GValue **value) { - static GValue *new_value = NULL; + static GValue *new_value = NULL; - if (new_value == NULL) { - new_value = g_new0(GValue, 1); - g_value_init(new_value, G_TYPE_INT64); - g_value_set_int64(new_value, G_MAXINT64); + if (new_value == NULL) + { + new_value = g_new0 (GValue, 1); + g_value_init (new_value, G_TYPE_INT64); + g_value_set_int64 (new_value, G_MAXINT64); } - *value = new_value; + *value = new_value; } /** @@ -3160,8 +3192,8 @@ gi_marshalling_tests_gvalue_int64_out (GValue **value) void gi_marshalling_tests_gvalue_out_caller_allocates (GValue *value) { - g_value_init(value, G_TYPE_INT); - g_value_set_int(value, 42); + g_value_init (value, G_TYPE_INT); + g_value_set_int (value, 42); } /** @@ -3171,10 +3203,10 @@ gi_marshalling_tests_gvalue_out_caller_allocates (GValue *value) void gi_marshalling_tests_gvalue_inout (GValue **value) { - g_assert_cmpint(g_value_get_int(*value), ==, 42); - g_value_unset(*value); - g_value_init(*value, G_TYPE_STRING); - g_value_set_string(*value, "42"); + g_assert_cmpint (g_value_get_int (*value), ==, 42); + g_value_unset (*value); + g_value_init (*value, G_TYPE_STRING); + g_value_set_string (*value, "42"); } /** @@ -3183,14 +3215,13 @@ gi_marshalling_tests_gvalue_inout (GValue **value) * @values: (array length=n_values): an array containing values */ void -gi_marshalling_tests_gvalue_flat_array (guint n_values, - const GValue *values) +gi_marshalling_tests_gvalue_flat_array (guint n_values, const GValue *values) { - g_assert (n_values == 3); + g_assert (n_values == 3); - g_assert_cmpint (g_value_get_int (&values[0]), ==, 42); - g_assert_cmpstr (g_value_get_string (&values[1]), ==, "42"); - g_assert_cmpint (g_value_get_boolean (&values[2]), ==, TRUE); + g_assert_cmpint (g_value_get_int (&values[0]), ==, 42); + g_assert_cmpstr (g_value_get_string (&values[1]), ==, "42"); + g_assert_cmpint (g_value_get_boolean (&values[2]), ==, TRUE); } /** @@ -3201,18 +3232,18 @@ gi_marshalling_tests_gvalue_flat_array (guint n_values, GValue * gi_marshalling_tests_return_gvalue_flat_array (void) { - GValue *array = g_new0 (GValue, 3); + GValue *array = g_new0 (GValue, 3); - g_value_init (&array[0], G_TYPE_INT); - g_value_set_int (&array[0], 42); + g_value_init (&array[0], G_TYPE_INT); + g_value_set_int (&array[0], 42); - g_value_init (&array[1], G_TYPE_STRING); - g_value_set_static_string (&array[1], "42"); + g_value_init (&array[1], G_TYPE_STRING); + g_value_set_static_string (&array[1], "42"); - g_value_init (&array[2], G_TYPE_BOOLEAN); - g_value_set_boolean (&array[2], TRUE); + g_value_init (&array[2], G_TYPE_BOOLEAN); + g_value_set_boolean (&array[2], TRUE); - return array; + return array; } /** @@ -3224,16 +3255,14 @@ gi_marshalling_tests_return_gvalue_flat_array (void) * Returns: (array fixed-size=3) (transfer full): a flat array of [@one, @two, @three] */ GValue * -gi_marshalling_tests_gvalue_flat_array_round_trip (const GValue one, - const GValue two, - const GValue three) +gi_marshalling_tests_gvalue_flat_array_round_trip (const GValue one, const GValue two, const GValue three) { - GValue *array = g_new (GValue, 3); - array[0] = one; - array[1] = two; - array[2] = three; + GValue *array = g_new (GValue, 3); + array[0] = one; + array[1] = two; + array[2] = three; - return array; + return array; } /** @@ -3243,18 +3272,15 @@ gi_marshalling_tests_gvalue_flat_array_round_trip (const GValue one, void gi_marshalling_tests_gclosure_in (GClosure *closure) { - GValue return_value = {0, }; + GValue return_value = { 0, }; - g_value_init (&return_value, G_TYPE_INT); + g_value_init (&return_value, G_TYPE_INT); - g_closure_invoke (closure, - &return_value, - 0, NULL, - NULL); + g_closure_invoke (closure, &return_value, 0, NULL, NULL); - g_assert_cmpint(g_value_get_int (&return_value), ==, 42); + g_assert_cmpint (g_value_get_int (&return_value), ==, 42); - g_value_unset(&return_value); + g_value_unset (&return_value); } static gint @@ -3266,17 +3292,14 @@ _closure_return_42 (void) static void _marshal_INT__VOID (GClosure *closure, GValue *return_value, - guint n_param_values, - const GValue *param_values, - gpointer invocation_hint, - gpointer marshal_data) + guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data) { typedef gint (*GMarshalFunc_INT__VOID) (void); register GMarshalFunc_INT__VOID callback; - register GCClosure *cc = (GCClosure*) closure; + register GCClosure *cc = (GCClosure *) closure; callback = (GMarshalFunc_INT__VOID) cc->callback; - g_value_set_int(return_value, callback()); + g_value_set_int (return_value, callback ()); } /** @@ -3287,11 +3310,11 @@ _marshal_INT__VOID (GClosure *closure, GClosure * gi_marshalling_tests_gclosure_return (void) { - GClosure *closure = g_cclosure_new ((GCallback)_closure_return_42, - NULL, NULL); - g_closure_set_marshal (closure, _marshal_INT__VOID); + GClosure *closure = g_cclosure_new ((GCallback) _closure_return_42, + NULL, NULL); + g_closure_set_marshal (closure, _marshal_INT__VOID); - return closure; + return closure; } @@ -3299,10 +3322,9 @@ gi_marshalling_tests_gclosure_return (void) * gi_marshalling_tests_callback_return_value_only: * @callback: (scope call): */ -glong -gi_marshalling_tests_callback_return_value_only (GIMarshallingTestsCallbackReturnValueOnly callback) +glong gi_marshalling_tests_callback_return_value_only (GIMarshallingTestsCallbackReturnValueOnly callback) { - return callback (); + return callback (); } /** @@ -3310,11 +3332,9 @@ gi_marshalling_tests_callback_return_value_only (GIMarshallingTestsCallbackRetur * @callback: (scope call): * @a: (out): */ -void -gi_marshalling_tests_callback_one_out_parameter (GIMarshallingTestsCallbackOneOutParameter callback, - gfloat *a) +void gi_marshalling_tests_callback_one_out_parameter (GIMarshallingTestsCallbackOneOutParameter callback, gfloat *a) { - callback (a); + callback (a); } /** @@ -3324,11 +3344,10 @@ gi_marshalling_tests_callback_one_out_parameter (GIMarshallingTestsCallbackOneOu * @b: (out): */ void -gi_marshalling_tests_callback_multiple_out_parameters (GIMarshallingTestsCallbackMultipleOutParameters callback, - gfloat *a, - gfloat *b) + gi_marshalling_tests_callback_multiple_out_parameters + (GIMarshallingTestsCallbackMultipleOutParameters callback, gfloat *a, gfloat *b) { - callback (a, b); + callback (a, b); } /** @@ -3337,10 +3356,10 @@ gi_marshalling_tests_callback_multiple_out_parameters (GIMarshallingTestsCallbac * @a: (out): */ glong -gi_marshalling_tests_callback_return_value_and_one_out_parameter (GIMarshallingTestsCallbackReturnValueAndOneOutParameter callback, - glong *a) + gi_marshalling_tests_callback_return_value_and_one_out_parameter + (GIMarshallingTestsCallbackReturnValueAndOneOutParameter callback, glong *a) { - return callback (a); + return callback (a); } /** @@ -3350,11 +3369,10 @@ gi_marshalling_tests_callback_return_value_and_one_out_parameter (GIMarshallingT * @b: (out): */ glong -gi_marshalling_tests_callback_return_value_and_multiple_out_parameters (GIMarshallingTestsCallbackReturnValueAndMultipleOutParameters callback, - glong *a, - glong *b) + gi_marshalling_tests_callback_return_value_and_multiple_out_parameters + (GIMarshallingTestsCallbackReturnValueAndMultipleOutParameters callback, glong *a, glong *b) { - return callback (a, b); + return callback (a, b); } @@ -3367,36 +3385,40 @@ gi_marshalling_tests_callback_return_value_and_multiple_out_parameters (GIMarsha gpointer gi_marshalling_tests_pointer_in_return (gpointer pointer) { - return pointer; + return pointer; } GType gi_marshalling_tests_genum_get_type (void) { - static GType type = 0; - if (G_UNLIKELY(type == 0)) { - static const GEnumValue values[] = { - { GI_MARSHALLING_TESTS_GENUM_VALUE1, "GI_MARSHALLING_TESTS_GENUM_VALUE1", "value1" }, - { GI_MARSHALLING_TESTS_GENUM_VALUE2, "GI_MARSHALLING_TESTS_GENUM_VALUE2", "value2" }, - { GI_MARSHALLING_TESTS_GENUM_VALUE3, "GI_MARSHALLING_TESTS_GENUM_VALUE3", "value3" }, - { 0, NULL, NULL } - }; - type = g_enum_register_static (g_intern_static_string ("GIMarshallingTestsGEnum"), values); + static GType type = 0; + if (G_UNLIKELY (type == 0)) + { + static const GEnumValue values[] = { + {GI_MARSHALLING_TESTS_GENUM_VALUE1, + "GI_MARSHALLING_TESTS_GENUM_VALUE1", "value1"}, + {GI_MARSHALLING_TESTS_GENUM_VALUE2, + "GI_MARSHALLING_TESTS_GENUM_VALUE2", "value2"}, + {GI_MARSHALLING_TESTS_GENUM_VALUE3, + "GI_MARSHALLING_TESTS_GENUM_VALUE3", "value3"}, + {0, NULL, NULL} + }; + type = g_enum_register_static (g_intern_static_string ("GIMarshallingTestsGEnum"), values); } - return type; + return type; } GIMarshallingTestsGEnum gi_marshalling_tests_genum_returnv (void) { - return GI_MARSHALLING_TESTS_GENUM_VALUE3; + return GI_MARSHALLING_TESTS_GENUM_VALUE3; } void gi_marshalling_tests_genum_in (GIMarshallingTestsGEnum v) { - g_assert_cmpint(v, ==, GI_MARSHALLING_TESTS_GENUM_VALUE3); + g_assert_cmpint (v, ==, GI_MARSHALLING_TESTS_GENUM_VALUE3); } /** @@ -3406,7 +3428,7 @@ gi_marshalling_tests_genum_in (GIMarshallingTestsGEnum v) void gi_marshalling_tests_genum_out (GIMarshallingTestsGEnum *v) { - *v = GI_MARSHALLING_TESTS_GENUM_VALUE3; + *v = GI_MARSHALLING_TESTS_GENUM_VALUE3; } /** @@ -3416,21 +3438,21 @@ gi_marshalling_tests_genum_out (GIMarshallingTestsGEnum *v) void gi_marshalling_tests_genum_inout (GIMarshallingTestsGEnum *v) { - g_assert_cmpint(*v, ==, GI_MARSHALLING_TESTS_GENUM_VALUE3); - *v = GI_MARSHALLING_TESTS_GENUM_VALUE1; + g_assert_cmpint (*v, ==, GI_MARSHALLING_TESTS_GENUM_VALUE3); + *v = GI_MARSHALLING_TESTS_GENUM_VALUE1; } GIMarshallingTestsEnum gi_marshalling_tests_enum_returnv (void) { - return GI_MARSHALLING_TESTS_ENUM_VALUE3; + return GI_MARSHALLING_TESTS_ENUM_VALUE3; } void gi_marshalling_tests_enum_in (GIMarshallingTestsEnum v) { - g_assert_cmpint(v, ==, GI_MARSHALLING_TESTS_ENUM_VALUE3); + g_assert_cmpint (v, ==, GI_MARSHALLING_TESTS_ENUM_VALUE3); } /** @@ -3440,7 +3462,7 @@ gi_marshalling_tests_enum_in (GIMarshallingTestsEnum v) void gi_marshalling_tests_enum_out (GIMarshallingTestsEnum *v) { - *v = GI_MARSHALLING_TESTS_ENUM_VALUE3; + *v = GI_MARSHALLING_TESTS_ENUM_VALUE3; } /** @@ -3450,46 +3472,52 @@ gi_marshalling_tests_enum_out (GIMarshallingTestsEnum *v) void gi_marshalling_tests_enum_inout (GIMarshallingTestsEnum *v) { - g_assert_cmpint(*v, ==, GI_MARSHALLING_TESTS_ENUM_VALUE3); - *v = GI_MARSHALLING_TESTS_ENUM_VALUE1; + g_assert_cmpint (*v, ==, GI_MARSHALLING_TESTS_ENUM_VALUE3); + *v = GI_MARSHALLING_TESTS_ENUM_VALUE1; } GType gi_marshalling_tests_flags_get_type (void) { - static GType type = 0; - if (G_UNLIKELY(type == 0)) { - static const GFlagsValue values[] = { - { GI_MARSHALLING_TESTS_FLAGS_VALUE1, "GI_MARSHALLING_TESTS_FLAGS_VALUE1", "value1" }, - { GI_MARSHALLING_TESTS_FLAGS_VALUE2, "GI_MARSHALLING_TESTS_FLAGS_VALUE2", "value2" }, - { GI_MARSHALLING_TESTS_FLAGS_VALUE3, "GI_MARSHALLING_TESTS_FLAGS_VALUE3", "value3" }, - { GI_MARSHALLING_TESTS_FLAGS_MASK, "GI_MARSHALLING_TESTS_FLAGS_MASK", "mask" }, - { GI_MARSHALLING_TESTS_FLAGS_MASK2, "GI_MARSHALLING_TESTS_FLAGS_MASK2", "mask2" }, - { 0, NULL, NULL } - }; - type = g_flags_register_static (g_intern_static_string ("GIMarshallingTestsFlags"), values); + static GType type = 0; + if (G_UNLIKELY (type == 0)) + { + static const GFlagsValue values[] = { + {GI_MARSHALLING_TESTS_FLAGS_VALUE1, + "GI_MARSHALLING_TESTS_FLAGS_VALUE1", "value1"}, + {GI_MARSHALLING_TESTS_FLAGS_VALUE2, + "GI_MARSHALLING_TESTS_FLAGS_VALUE2", "value2"}, + {GI_MARSHALLING_TESTS_FLAGS_VALUE3, + "GI_MARSHALLING_TESTS_FLAGS_VALUE3", "value3"}, + {GI_MARSHALLING_TESTS_FLAGS_MASK, "GI_MARSHALLING_TESTS_FLAGS_MASK", + "mask"}, + {GI_MARSHALLING_TESTS_FLAGS_MASK2, "GI_MARSHALLING_TESTS_FLAGS_MASK2", + "mask2"}, + {0, NULL, NULL} + }; + type = g_flags_register_static (g_intern_static_string ("GIMarshallingTestsFlags"), values); } - return type; + return type; } GIMarshallingTestsFlags gi_marshalling_tests_flags_returnv (void) { - return GI_MARSHALLING_TESTS_FLAGS_VALUE2; + return GI_MARSHALLING_TESTS_FLAGS_VALUE2; } void gi_marshalling_tests_flags_in (GIMarshallingTestsFlags v) { - g_assert(v == GI_MARSHALLING_TESTS_FLAGS_VALUE2); + g_assert (v == GI_MARSHALLING_TESTS_FLAGS_VALUE2); } void gi_marshalling_tests_flags_in_zero (GIMarshallingTestsFlags v) { - g_assert(v == 0); + g_assert (v == 0); } /** @@ -3499,7 +3527,7 @@ gi_marshalling_tests_flags_in_zero (GIMarshallingTestsFlags v) void gi_marshalling_tests_flags_out (GIMarshallingTestsFlags *v) { - *v = GI_MARSHALLING_TESTS_FLAGS_VALUE2; + *v = GI_MARSHALLING_TESTS_FLAGS_VALUE2; } /** @@ -3509,27 +3537,27 @@ gi_marshalling_tests_flags_out (GIMarshallingTestsFlags *v) void gi_marshalling_tests_flags_inout (GIMarshallingTestsFlags *v) { - g_assert(*v == GI_MARSHALLING_TESTS_FLAGS_VALUE2); - *v = GI_MARSHALLING_TESTS_FLAGS_VALUE1; + g_assert (*v == GI_MARSHALLING_TESTS_FLAGS_VALUE2); + *v = GI_MARSHALLING_TESTS_FLAGS_VALUE1; } GIMarshallingTestsNoTypeFlags gi_marshalling_tests_no_type_flags_returnv (void) { - return GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_VALUE2; + return GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_VALUE2; } void gi_marshalling_tests_no_type_flags_in (GIMarshallingTestsNoTypeFlags v) { - g_assert(v == GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_VALUE2); + g_assert (v == GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_VALUE2); } void gi_marshalling_tests_no_type_flags_in_zero (GIMarshallingTestsNoTypeFlags v) { - g_assert(v == 0); + g_assert (v == 0); } /** @@ -3539,7 +3567,7 @@ gi_marshalling_tests_no_type_flags_in_zero (GIMarshallingTestsNoTypeFlags v) void gi_marshalling_tests_no_type_flags_out (GIMarshallingTestsNoTypeFlags *v) { - *v = GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_VALUE2; + *v = GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_VALUE2; } /** @@ -3549,8 +3577,8 @@ gi_marshalling_tests_no_type_flags_out (GIMarshallingTestsNoTypeFlags *v) void gi_marshalling_tests_no_type_flags_inout (GIMarshallingTestsNoTypeFlags *v) { - g_assert(*v == GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_VALUE2); - *v = GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_VALUE1; + g_assert (*v == GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_VALUE2); + *v = GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_VALUE1; } @@ -3562,16 +3590,17 @@ gi_marshalling_tests_no_type_flags_inout (GIMarshallingTestsNoTypeFlags *v) GIMarshallingTestsSimpleStruct * gi_marshalling_tests_simple_struct_returnv (void) { - static GIMarshallingTestsSimpleStruct *struct_ = NULL; + static GIMarshallingTestsSimpleStruct *struct_ = NULL; - if (struct_ == NULL) { - struct_ = g_new(GIMarshallingTestsSimpleStruct, 1); + if (struct_ == NULL) + { + struct_ = g_new (GIMarshallingTestsSimpleStruct, 1); - struct_->long_ = 6; - struct_->int8 = 7; + struct_->long_ = 6; + struct_->int8 = 7; } - return struct_; + return struct_; } /** @@ -3581,28 +3610,29 @@ gi_marshalling_tests_simple_struct_returnv (void) void gi_marshalling_tests_simple_struct_inv (GIMarshallingTestsSimpleStruct *struct_) { - g_assert_cmpint(struct_->long_, ==, 6); - g_assert_cmpint(struct_->int8, ==, 7); + g_assert_cmpint (struct_->long_, ==, 6); + g_assert_cmpint (struct_->int8, ==, 7); } void gi_marshalling_tests_simple_struct_method (GIMarshallingTestsSimpleStruct *struct_) { - g_assert_cmpint(struct_->long_, ==, 6); - g_assert_cmpint(struct_->int8, ==, 7); + g_assert_cmpint (struct_->long_, ==, 6); + g_assert_cmpint (struct_->int8, ==, 7); } GType gi_marshalling_tests_pointer_struct_get_type (void) { - static GType type = 0; + static GType type = 0; - if (type == 0) { - type = g_pointer_type_register_static ("GIMarshallingTestsPointerStruct"); + if (type == 0) + { + type = g_pointer_type_register_static ("GIMarshallingTestsPointerStruct"); } - return type; + return type; } /** @@ -3613,15 +3643,16 @@ gi_marshalling_tests_pointer_struct_get_type (void) GIMarshallingTestsPointerStruct * gi_marshalling_tests_pointer_struct_returnv (void) { - static GIMarshallingTestsPointerStruct *struct_ = NULL; + static GIMarshallingTestsPointerStruct *struct_ = NULL; - if (struct_ == NULL) { - struct_ = g_new(GIMarshallingTestsPointerStruct, 1); + if (struct_ == NULL) + { + struct_ = g_new (GIMarshallingTestsPointerStruct, 1); - struct_->long_ = 42; + struct_->long_ = 42; } - return struct_; + return struct_; } /** @@ -3631,66 +3662,69 @@ gi_marshalling_tests_pointer_struct_returnv (void) void gi_marshalling_tests_pointer_struct_inv (GIMarshallingTestsPointerStruct *struct_) { - g_assert_cmpint(struct_->long_, ==, 42); + g_assert_cmpint (struct_->long_, ==, 42); } static GIMarshallingTestsBoxedStruct * gi_marshalling_tests_boxed_struct_copy (GIMarshallingTestsBoxedStruct *struct_) { - GIMarshallingTestsBoxedStruct *new_struct; + GIMarshallingTestsBoxedStruct *new_struct; - if (struct_ == NULL) - return NULL; + if (struct_ == NULL) + return NULL; - new_struct = g_slice_new (GIMarshallingTestsBoxedStruct); + new_struct = g_slice_new (GIMarshallingTestsBoxedStruct); - *new_struct = *struct_; - new_struct->string_ = g_strdup (struct_->string_); + *new_struct = *struct_; + new_struct->string_ = g_strdup (struct_->string_); - return new_struct; + return new_struct; } static void gi_marshalling_tests_boxed_struct_free (GIMarshallingTestsBoxedStruct *struct_) { - if (struct_ != NULL) { - g_free (struct_->string_); - g_slice_free (GIMarshallingTestsBoxedStruct, struct_); + if (struct_ != NULL) + { + g_free (struct_->string_); + g_slice_free (GIMarshallingTestsBoxedStruct, struct_); } } GType gi_marshalling_tests_boxed_struct_get_type (void) { - static GType type = 0; + static GType type = 0; - if (type == 0) { - type = g_boxed_type_register_static ("GIMarshallingTestsBoxedStruct", - (GBoxedCopyFunc) gi_marshalling_tests_boxed_struct_copy, - (GBoxedFreeFunc) gi_marshalling_tests_boxed_struct_free); + if (type == 0) + { + type = g_boxed_type_register_static ("GIMarshallingTestsBoxedStruct", + (GBoxedCopyFunc) + gi_marshalling_tests_boxed_struct_copy, + (GBoxedFreeFunc) gi_marshalling_tests_boxed_struct_free); } - return type; + return type; } static GType gi_marshalling_tests_boxed_glist_get_type (void) { - static GType type = 0; + static GType type = 0; - if (type == 0) { - type = g_boxed_type_register_static ("GIMarshallingTestsBoxedGList", - (GBoxedCopyFunc) g_list_copy, - (GBoxedFreeFunc) g_list_free); + if (type == 0) + { + type = g_boxed_type_register_static ("GIMarshallingTestsBoxedGList", + (GBoxedCopyFunc) g_list_copy, (GBoxedFreeFunc) g_list_free); } - return type; + return type; } GIMarshallingTestsBoxedStruct * gi_marshalling_tests_boxed_struct_new (void) { - return g_slice_new0 (GIMarshallingTestsBoxedStruct); + return g_slice_new0 (GIMarshallingTestsBoxedStruct); } /** @@ -3701,21 +3735,22 @@ gi_marshalling_tests_boxed_struct_new (void) GIMarshallingTestsBoxedStruct * gi_marshalling_tests_boxed_struct_returnv (void) { - static GIMarshallingTestsBoxedStruct *struct_ = NULL; + static GIMarshallingTestsBoxedStruct *struct_ = NULL; - if (struct_ == NULL) { - struct_ = g_new(GIMarshallingTestsBoxedStruct, 1); + if (struct_ == NULL) + { + struct_ = g_new (GIMarshallingTestsBoxedStruct, 1); - struct_->long_ = 42; - struct_->string_ = g_strdup("hello"); - struct_->g_strv = g_new0(gchar*, 4); - struct_->g_strv[0] = g_strdup("0"); - struct_->g_strv[1] = g_strdup("1"); - struct_->g_strv[2] = g_strdup("2"); - struct_->g_strv[3] = NULL; + struct_->long_ = 42; + struct_->string_ = g_strdup ("hello"); + struct_->g_strv = g_new0 (gchar *, 4); + struct_->g_strv[0] = g_strdup ("0"); + struct_->g_strv[1] = g_strdup ("1"); + struct_->g_strv[2] = g_strdup ("2"); + struct_->g_strv[3] = NULL; } - return struct_; + return struct_; } /** @@ -3725,7 +3760,7 @@ gi_marshalling_tests_boxed_struct_returnv (void) void gi_marshalling_tests_boxed_struct_inv (GIMarshallingTestsBoxedStruct *struct_) { - g_assert_cmpint(struct_->long_, ==, 42); + g_assert_cmpint (struct_->long_, ==, 42); } /** @@ -3735,15 +3770,16 @@ gi_marshalling_tests_boxed_struct_inv (GIMarshallingTestsBoxedStruct *struct_) void gi_marshalling_tests_boxed_struct_out (GIMarshallingTestsBoxedStruct **struct_) { - static GIMarshallingTestsBoxedStruct *new_struct = NULL; + static GIMarshallingTestsBoxedStruct *new_struct = NULL; - if (new_struct == NULL) { - new_struct = g_new0(GIMarshallingTestsBoxedStruct, 1); + if (new_struct == NULL) + { + new_struct = g_new0 (GIMarshallingTestsBoxedStruct, 1); - new_struct->long_ = 42; + new_struct->long_ = 42; } - *struct_ = new_struct; + *struct_ = new_struct; } /** @@ -3753,42 +3789,44 @@ gi_marshalling_tests_boxed_struct_out (GIMarshallingTestsBoxedStruct **struct_) void gi_marshalling_tests_boxed_struct_inout (GIMarshallingTestsBoxedStruct **struct_) { - g_assert_cmpint((*struct_)->long_, ==, 42); + g_assert_cmpint ((*struct_)->long_, ==, 42); - (*struct_) = g_slice_new0 (GIMarshallingTestsBoxedStruct); - (*struct_)->long_ = 0; + (*struct_) = g_slice_new0 (GIMarshallingTestsBoxedStruct); + (*struct_)->long_ = 0; } static GIMarshallingTestsUnion * gi_marshalling_tests_union_copy (GIMarshallingTestsUnion *union_) { - GIMarshallingTestsUnion *new_union; + GIMarshallingTestsUnion *new_union; - new_union = g_slice_new (GIMarshallingTestsUnion); + new_union = g_slice_new (GIMarshallingTestsUnion); - *new_union = *union_; + *new_union = *union_; - return new_union; + return new_union; } static void gi_marshalling_tests_union_free (GIMarshallingTestsUnion *union_) { - g_slice_free (GIMarshallingTestsUnion, union_); + g_slice_free (GIMarshallingTestsUnion, union_); } GType gi_marshalling_tests_union_get_type (void) { - static GType type = 0; + static GType type = 0; - if (type == 0) { - type = g_boxed_type_register_static ("GIMarshallingTestsUnion", - (GBoxedCopyFunc) gi_marshalling_tests_union_copy, - (GBoxedFreeFunc) gi_marshalling_tests_union_free); + if (type == 0) + { + type = g_boxed_type_register_static ("GIMarshallingTestsUnion", + (GBoxedCopyFunc) + gi_marshalling_tests_union_copy, + (GBoxedFreeFunc) gi_marshalling_tests_union_free); } - return type; + return type; } /** @@ -3799,15 +3837,16 @@ gi_marshalling_tests_union_get_type (void) GIMarshallingTestsUnion * gi_marshalling_tests_union_returnv (void) { - static GIMarshallingTestsUnion *union_ = NULL; + static GIMarshallingTestsUnion *union_ = NULL; - if (union_ == NULL) { - union_ = g_new(GIMarshallingTestsUnion, 1); + if (union_ == NULL) + { + union_ = g_new (GIMarshallingTestsUnion, 1); - union_->long_ = 42; + union_->long_ = 42; } - return union_; + return union_; } /** @@ -3817,25 +3856,25 @@ gi_marshalling_tests_union_returnv (void) void gi_marshalling_tests_union_inv (GIMarshallingTestsUnion *union_) { - g_assert_cmpint(union_->long_, ==, 42); + g_assert_cmpint (union_->long_, ==, 42); } void gi_marshalling_tests_union_method (GIMarshallingTestsUnion *union_) { - g_assert_cmpint(union_->long_, ==, 42); + g_assert_cmpint (union_->long_, ==, 42); } enum { - PROP_0, - PROP_INT_ + PROP_0, + PROP_INT_ }; -static void gi_marshalling_tests_object_real_method_with_default_implementation ( - GIMarshallingTestsObject *self, gint8 in); +static void + gi_marshalling_tests_object_real_method_with_default_implementation (GIMarshallingTestsObject *self, gint8 in); G_DEFINE_TYPE (GIMarshallingTestsObject, gi_marshalling_tests_object, G_TYPE_OBJECT); @@ -3847,56 +3886,60 @@ gi_marshalling_tests_object_init (GIMarshallingTestsObject *object) static void gi_marshalling_tests_object_finalize (GObject *object) { - G_OBJECT_CLASS (gi_marshalling_tests_object_parent_class)->finalize (object); + G_OBJECT_CLASS (gi_marshalling_tests_object_parent_class)->finalize (object); } static void gi_marshalling_tests_object_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { - g_return_if_fail (GI_MARSHALLING_TESTS_IS_OBJECT (object)); + g_return_if_fail (GI_MARSHALLING_TESTS_IS_OBJECT (object)); - switch (prop_id) { - case PROP_INT_: - GI_MARSHALLING_TESTS_OBJECT (object)->int_ = g_value_get_int (value); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } + switch (prop_id) + { + case PROP_INT_: + GI_MARSHALLING_TESTS_OBJECT (object)->int_ = g_value_get_int (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } } static void gi_marshalling_tests_object_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - g_return_if_fail (GI_MARSHALLING_TESTS_IS_OBJECT (object)); + g_return_if_fail (GI_MARSHALLING_TESTS_IS_OBJECT (object)); - switch (prop_id) { - case PROP_INT_: - g_value_set_int (value, GI_MARSHALLING_TESTS_OBJECT (object)->int_); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } + switch (prop_id) + { + case PROP_INT_: + g_value_set_int (value, GI_MARSHALLING_TESTS_OBJECT (object)->int_); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } } static void gi_marshalling_tests_object_class_init (GIMarshallingTestsObjectClass *klass) { - GObjectClass* object_class = G_OBJECT_CLASS (klass); + GObjectClass *object_class = G_OBJECT_CLASS (klass); #if 0 - GObjectClass* parent_class = G_OBJECT_CLASS (klass); + GObjectClass *parent_class = G_OBJECT_CLASS (klass); #endif - object_class->finalize = gi_marshalling_tests_object_finalize; - object_class->set_property = gi_marshalling_tests_object_set_property; - object_class->get_property = gi_marshalling_tests_object_get_property; + object_class->finalize = gi_marshalling_tests_object_finalize; + object_class->set_property = gi_marshalling_tests_object_set_property; + object_class->get_property = gi_marshalling_tests_object_get_property; - g_object_class_install_property (object_class, PROP_INT_, - g_param_spec_int ("int", "Integer", "An integer", G_MININT, G_MAXINT, 0, - G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); + g_object_class_install_property (object_class, PROP_INT_, + g_param_spec_int ("int", "Integer", + "An integer", G_MININT, + G_MAXINT, 0, + G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); - klass->method_with_default_implementation = gi_marshalling_tests_object_real_method_with_default_implementation; + klass->method_with_default_implementation = gi_marshalling_tests_object_real_method_with_default_implementation; } @@ -3908,21 +3951,21 @@ gi_marshalling_tests_object_static_method (void) void gi_marshalling_tests_object_method (GIMarshallingTestsObject *object) { - g_return_if_fail (GI_MARSHALLING_TESTS_IS_OBJECT (object)); - g_assert_cmpint (object->int_, ==, 42); + g_return_if_fail (GI_MARSHALLING_TESTS_IS_OBJECT (object)); + g_assert_cmpint (object->int_, ==, 42); } void gi_marshalling_tests_object_overridden_method (GIMarshallingTestsObject *object) { - g_return_if_fail (GI_MARSHALLING_TESTS_IS_OBJECT (object)); - g_assert_cmpint (object->int_, ==, 0); + g_return_if_fail (GI_MARSHALLING_TESTS_IS_OBJECT (object)); + g_assert_cmpint (object->int_, ==, 0); } GIMarshallingTestsObject * gi_marshalling_tests_object_new (gint int_) { - return g_object_new (GI_MARSHALLING_TESTS_TYPE_OBJECT, "int", int_, NULL); + return g_object_new (GI_MARSHALLING_TESTS_TYPE_OBJECT, "int", int_, NULL); } /** @@ -3932,11 +3975,11 @@ gi_marshalling_tests_object_new (gint int_) void gi_marshalling_tests_object_method_array_in (GIMarshallingTestsObject *object, const gint *ints, gint length) { - g_assert_cmpint(length, ==, 4); - g_assert_cmpint(ints[0], ==, -1); - g_assert_cmpint(ints[1], ==, 0); - g_assert_cmpint(ints[2], ==, 1); - g_assert_cmpint(ints[3], ==, 2); + g_assert_cmpint (length, ==, 4); + g_assert_cmpint (ints[0], ==, -1); + g_assert_cmpint (ints[1], ==, 0); + g_assert_cmpint (ints[2], ==, 1); + g_assert_cmpint (ints[3], ==, 2); } /** @@ -3946,10 +3989,10 @@ gi_marshalling_tests_object_method_array_in (GIMarshallingTestsObject *object, c void gi_marshalling_tests_object_method_array_out (GIMarshallingTestsObject *object, gint **ints, gint *length) { - static gint values[] = {-1, 0, 1, 2}; + static gint values[] = { -1, 0, 1, 2 }; - *length = 4; - *ints = values; + *length = 4; + *ints = values; } /** @@ -3960,16 +4003,16 @@ gi_marshalling_tests_object_method_array_out (GIMarshallingTestsObject *object, void gi_marshalling_tests_object_method_array_inout (GIMarshallingTestsObject *object, gint **ints, gint *length) { - static gint values[] = {-2, -1, 0, 1, 2}; + static gint values[] = { -2, -1, 0, 1, 2 }; - g_assert_cmpint(*length, ==, 4); - g_assert_cmpint((*ints)[0], ==, -1); - g_assert_cmpint((*ints)[1], ==, 0); - g_assert_cmpint((*ints)[2], ==, 1); - g_assert_cmpint((*ints)[3], ==, 2); + g_assert_cmpint (*length, ==, 4); + g_assert_cmpint ((*ints)[0], ==, -1); + g_assert_cmpint ((*ints)[1], ==, 0); + g_assert_cmpint ((*ints)[2], ==, 1); + g_assert_cmpint ((*ints)[3], ==, 2); - *length = 5; - *ints = values; + *length = 5; + *ints = values; } /** @@ -3980,10 +4023,10 @@ gi_marshalling_tests_object_method_array_inout (GIMarshallingTestsObject *object const gint * gi_marshalling_tests_object_method_array_return (GIMarshallingTestsObject *object, gint *length) { - static gint ints[] = {-1, 0, 1, 2}; + static gint ints[] = { -1, 0, 1, 2 }; - *length = 4; - return ints; + *length = 4; + return ints; } /** @@ -4011,7 +4054,7 @@ gi_marshalling_tests_object_method_int8_out (GIMarshallingTestsObject *self, gin * @out: (out caller-allocates): */ void -gi_marshalling_tests_object_method_int8_arg_and_out_caller (GIMarshallingTestsObject *self, gint8 arg, gint8 *out) + gi_marshalling_tests_object_method_int8_arg_and_out_caller (GIMarshallingTestsObject *self, gint8 arg, gint8 *out) { GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->method_int8_arg_and_out_caller (self, arg, out); } @@ -4021,7 +4064,7 @@ gi_marshalling_tests_object_method_int8_arg_and_out_caller (GIMarshallingTestsOb * @out: (out): */ void -gi_marshalling_tests_object_method_int8_arg_and_out_callee (GIMarshallingTestsObject *self, gint8 arg, gint8 **out) + gi_marshalling_tests_object_method_int8_arg_and_out_callee (GIMarshallingTestsObject *self, gint8 arg, gint8 **out) { GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->method_int8_arg_and_out_callee (self, arg, out); } @@ -4032,8 +4075,8 @@ gi_marshalling_tests_object_method_int8_arg_and_out_callee (GIMarshallingTestsOb * * Returns: (transfer none) */ -const gchar* -gi_marshalling_tests_object_method_str_arg_out_ret (GIMarshallingTestsObject *self, const gchar* arg, guint *out) +const gchar * +gi_marshalling_tests_object_method_str_arg_out_ret (GIMarshallingTestsObject *self, const gchar *arg, guint *out) { return GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->method_str_arg_out_ret (self, arg, out); } @@ -4042,19 +4085,18 @@ gi_marshalling_tests_object_method_str_arg_out_ret (GIMarshallingTestsObject *se * gi_marshalling_tests_object_method_with_default_implementation: * @in: (in): */ -void -gi_marshalling_tests_object_method_with_default_implementation (GIMarshallingTestsObject *self, gint8 in) +void gi_marshalling_tests_object_method_with_default_implementation (GIMarshallingTestsObject *self, gint8 in) { - GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->method_with_default_implementation (self, in); + GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->method_with_default_implementation (self, in); } static void -gi_marshalling_tests_object_real_method_with_default_implementation (GIMarshallingTestsObject *self, gint8 in) + gi_marshalling_tests_object_real_method_with_default_implementation (GIMarshallingTestsObject *self, gint8 in) { - GValue val = {0, }; - g_value_init (&val, G_TYPE_INT); - g_value_set_int (&val, in); - g_object_set_property (G_OBJECT (self), "int", &val); + GValue val = { 0, }; + g_value_init (&val, G_TYPE_INT); + g_value_set_int (&val, in); + g_object_set_property (G_OBJECT (self), "int", &val); } /** @@ -4065,9 +4107,8 @@ gi_marshalling_tests_object_real_method_with_default_implementation (GIMarshalli * Virtual: vfunc_with_callback */ void -gi_marshalling_tests_object_vfunc_with_callback (GIMarshallingTestsObject *object, - GIMarshallingTestsCallbackIntInt callback, - void *callback_data) +gi_marshalling_tests_object_vfunc_with_callback (GIMarshallingTestsObject * + object, GIMarshallingTestsCallbackIntInt callback, void *callback_data) { } @@ -4075,16 +4116,14 @@ gi_marshalling_tests_object_vfunc_with_callback (GIMarshallingTestsObject *objec static int _callback (int val, void *user_data) { - g_assert (user_data == (gpointer)0xdeadbeef); + g_assert (user_data == (gpointer) 0xdeadbeef); return val; } void gi_marshalling_tests_object_call_vfunc_with_callback (GIMarshallingTestsObject *object) { - GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (object)->vfunc_with_callback (object, - _callback, - (void *) 0xdeadbeef); + GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (object)->vfunc_with_callback (object, _callback, (void *) 0xdeadbeef); } /** @@ -4095,13 +4134,14 @@ gi_marshalling_tests_object_call_vfunc_with_callback (GIMarshallingTestsObject * GIMarshallingTestsObject * gi_marshalling_tests_object_none_return (void) { - static GIMarshallingTestsObject *object = NULL; + static GIMarshallingTestsObject *object = NULL; - if (object == NULL) { - object = g_object_new(GI_MARSHALLING_TESTS_TYPE_OBJECT, NULL); + if (object == NULL) + { + object = g_object_new (GI_MARSHALLING_TESTS_TYPE_OBJECT, NULL); } - return object; + return object; } /** @@ -4112,7 +4152,7 @@ gi_marshalling_tests_object_none_return (void) GIMarshallingTestsObject * gi_marshalling_tests_object_full_return (void) { - return g_object_new(GI_MARSHALLING_TESTS_TYPE_OBJECT, NULL); + return g_object_new (GI_MARSHALLING_TESTS_TYPE_OBJECT, NULL); } /** @@ -4122,7 +4162,7 @@ gi_marshalling_tests_object_full_return (void) void gi_marshalling_tests_object_none_in (GIMarshallingTestsObject *object) { - g_assert_cmpint(object->int_, ==, 42); + g_assert_cmpint (object->int_, ==, 42); } /** @@ -4132,13 +4172,14 @@ gi_marshalling_tests_object_none_in (GIMarshallingTestsObject *object) void gi_marshalling_tests_object_none_out (GIMarshallingTestsObject **object) { - static GIMarshallingTestsObject *new_object = NULL; + static GIMarshallingTestsObject *new_object = NULL; - if (new_object == NULL) { - new_object = g_object_new(GI_MARSHALLING_TESTS_TYPE_OBJECT, NULL); + if (new_object == NULL) + { + new_object = g_object_new (GI_MARSHALLING_TESTS_TYPE_OBJECT, NULL); } - *object = new_object; + *object = new_object; } /** @@ -4148,7 +4189,7 @@ gi_marshalling_tests_object_none_out (GIMarshallingTestsObject **object) void gi_marshalling_tests_object_full_out (GIMarshallingTestsObject **object) { - *object = g_object_new(GI_MARSHALLING_TESTS_TYPE_OBJECT, NULL); + *object = g_object_new (GI_MARSHALLING_TESTS_TYPE_OBJECT, NULL); } /** @@ -4158,16 +4199,17 @@ gi_marshalling_tests_object_full_out (GIMarshallingTestsObject **object) void gi_marshalling_tests_object_none_inout (GIMarshallingTestsObject **object) { - static GIMarshallingTestsObject *new_object = NULL; + static GIMarshallingTestsObject *new_object = NULL; - g_assert_cmpint((*object)->int_, ==, 42); + g_assert_cmpint ((*object)->int_, ==, 42); - if (new_object == NULL) { - new_object = g_object_new(GI_MARSHALLING_TESTS_TYPE_OBJECT, NULL); - new_object->int_ = 0; + if (new_object == NULL) + { + new_object = g_object_new (GI_MARSHALLING_TESTS_TYPE_OBJECT, NULL); + new_object->int_ = 0; } - *object = new_object; + *object = new_object; } /** @@ -4177,9 +4219,9 @@ gi_marshalling_tests_object_none_inout (GIMarshallingTestsObject **object) void gi_marshalling_tests_object_full_inout (GIMarshallingTestsObject **object) { - g_assert_cmpint((*object)->int_, ==, 42); + g_assert_cmpint ((*object)->int_, ==, 42); - *object = g_object_new(GI_MARSHALLING_TESTS_TYPE_OBJECT, NULL); + *object = g_object_new (GI_MARSHALLING_TESTS_TYPE_OBJECT, NULL); } /** @@ -4208,12 +4250,12 @@ gi_marshalling_tests_object_int8_out (GIMarshallingTestsObject *object, gint8 *o glong gi_marshalling_tests_object_vfunc_return_value_only (GIMarshallingTestsObject *self) { - /* make sure that local variables don't get smashed */ - glong return_value; - gulong local = 0x12345678; - return_value = GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_return_value_only (self); - g_assert_cmpint(local, ==, 0x12345678); - return return_value; + /* make sure that local variables don't get smashed */ + glong return_value; + gulong local = 0x12345678; + return_value = GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_return_value_only (self); + g_assert_cmpint (local, ==, 0x12345678); + return return_value; } /** @@ -4223,10 +4265,10 @@ gi_marshalling_tests_object_vfunc_return_value_only (GIMarshallingTestsObject *s void gi_marshalling_tests_object_vfunc_one_out_parameter (GIMarshallingTestsObject *self, gfloat *a) { - /* make sure that local variables don't get smashed */ - gulong local = 0x12345678; - GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_one_out_parameter (self, a); - g_assert_cmpint(local, ==, 0x12345678); + /* make sure that local variables don't get smashed */ + gulong local = 0x12345678; + GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_one_out_parameter (self, a); + g_assert_cmpint (local, ==, 0x12345678); } /** @@ -4234,54 +4276,50 @@ gi_marshalling_tests_object_vfunc_one_out_parameter (GIMarshallingTestsObject *s * @a: (out): * @b: (out): */ -void -gi_marshalling_tests_object_vfunc_multiple_out_parameters (GIMarshallingTestsObject *self, gfloat *a, gfloat *b) +void gi_marshalling_tests_object_vfunc_multiple_out_parameters (GIMarshallingTestsObject *self, gfloat *a, gfloat *b) { - /* make sure that local variables don't get smashed */ - gulong local = 0x12345678; - GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_multiple_out_parameters (self, a, b); - g_assert_cmpint(local, ==, 0x12345678); + /* make sure that local variables don't get smashed */ + gulong local = 0x12345678; + GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_multiple_out_parameters (self, a, b); + g_assert_cmpint (local, ==, 0x12345678); } /** * gi_marshalling_tests_object_vfunc_caller_allocated_out_parameter: * @a: (out): */ -void -gi_marshalling_tests_object_vfunc_caller_allocated_out_parameter (GIMarshallingTestsObject *self, GValue *a) +void gi_marshalling_tests_object_vfunc_caller_allocated_out_parameter (GIMarshallingTestsObject *self, GValue *a) { - /* make sure that local variables don't get smashed */ - gulong local = 0x12345678; - GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_caller_allocated_out_parameter (self, a); - g_assert_cmpint(local, ==, 0x12345678); + /* make sure that local variables don't get smashed */ + gulong local = 0x12345678; + GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_caller_allocated_out_parameter (self, a); + g_assert_cmpint (local, ==, 0x12345678); } /** * gi_marshalling_tests_object_vfunc_array_out_parameter: * @a: (out) (array zero-terminated=1): */ -void -gi_marshalling_tests_object_vfunc_array_out_parameter (GIMarshallingTestsObject *self, gfloat **a) +void gi_marshalling_tests_object_vfunc_array_out_parameter (GIMarshallingTestsObject *self, gfloat **a) { - /* make sure that local variables don't get smashed */ - gulong local = 0x12345678; - GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_array_out_parameter (self, a); - g_assert_cmpint(local, ==, 0x12345678); + /* make sure that local variables don't get smashed */ + gulong local = 0x12345678; + GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_array_out_parameter (self, a); + g_assert_cmpint (local, ==, 0x12345678); } /** * gi_marshalling_tests_object_vfunc_return_value_and_one_out_parameter: * @a: (out): */ -glong -gi_marshalling_tests_object_vfunc_return_value_and_one_out_parameter (GIMarshallingTestsObject *self, glong *a) +glong gi_marshalling_tests_object_vfunc_return_value_and_one_out_parameter (GIMarshallingTestsObject *self, glong *a) { - /* make sure that local variables don't get smashed */ - gulong return_value; - gulong local = 0x12345678; - return_value = GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_return_value_and_one_out_parameter (self, a); - g_assert_cmpint(local, ==, 0x12345678); - return return_value; + /* make sure that local variables don't get smashed */ + gulong return_value; + gulong local = 0x12345678; + return_value = GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_return_value_and_one_out_parameter (self, a); + g_assert_cmpint (local, ==, 0x12345678); + return return_value; } /** @@ -4290,26 +4328,56 @@ gi_marshalling_tests_object_vfunc_return_value_and_one_out_parameter (GIMarshall * @b: (out): */ glong -gi_marshalling_tests_object_vfunc_return_value_and_multiple_out_parameters (GIMarshallingTestsObject *self, glong *a, glong *b) + gi_marshalling_tests_object_vfunc_return_value_and_multiple_out_parameters + (GIMarshallingTestsObject *self, glong *a, glong *b) { - gulong return_value; - gulong local = 0x12345678; - return_value = GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_return_value_and_multiple_out_parameters (self, a, b); - g_assert_cmpint(local, ==, 0x12345678); - return return_value; + gulong return_value; + gulong local = 0x12345678; + return_value = + GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_return_value_and_multiple_out_parameters (self, a, b); + g_assert_cmpint (local, ==, 0x12345678); + return return_value; } gboolean -gi_marshalling_tests_object_vfunc_meth_with_error (GIMarshallingTestsObject *self, - gint x, - GError **error) +gi_marshalling_tests_object_vfunc_meth_with_error (GIMarshallingTestsObject *self, gint x, GError **error) { gulong local = 0x12345678; - gboolean ret = GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_meth_with_err (self, x, error); - g_assert_cmpint(local, ==, 0x12345678); + gboolean ret = GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_meth_with_err (self, + x, + error); + g_assert_cmpint (local, ==, 0x12345678); return ret; } +/** + * gi_marshalling_tests_object_vfunc_return_enum: + */ +GIMarshallingTestsEnum +gi_marshalling_tests_object_vfunc_return_enum (GIMarshallingTestsObject *self) +{ + /* make sure that local variables don't get smashed */ + GIMarshallingTestsEnum return_value; + glong local = 0x12345678; + return_value = GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_return_enum (self); + g_assert_cmpint (local, ==, 0x12345678); + return return_value; +} + +/** + * gi_marshalling_tests_object_vfunc_out_enum: + * @_enum: (out): + */ +void +gi_marshalling_tests_object_vfunc_out_enum (GIMarshallingTestsObject *self, GIMarshallingTestsEnum *_enum) +{ + /* make sure that local variables don't get smashed */ + gulong local = 0x12345678; + GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_out_enum (self, _enum); + g_assert_cmpint (local, ==, 0x12345678); +} + + /* NOTE: * * The following (get_ref_info_for_*) methods are designed to call vfuncs related @@ -4327,15 +4395,16 @@ gi_marshalling_tests_object_vfunc_meth_with_error (GIMarshallingTestsObject *sel * @is_floating: (out): Floating state object returned from the vfunc directly after vfunc call. */ void -gi_marshalling_tests_object_get_ref_info_for_vfunc_return_object_transfer_none (GIMarshallingTestsObject *self, guint *ref_count, gboolean *is_floating) + gi_marshalling_tests_object_get_ref_info_for_vfunc_return_object_transfer_none + (GIMarshallingTestsObject *self, guint *ref_count, gboolean *is_floating) { - GObject *object = GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_return_object_transfer_none (self); - *ref_count = object->ref_count; - *is_floating = g_object_is_floating(object); + GObject *object = GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_return_object_transfer_none (self); + *ref_count = object->ref_count; + *is_floating = g_object_is_floating (object); - /* Attempt to sink and unref the returned object and avoid any potential leaks */ - g_object_ref_sink(object); - g_object_unref(object); + /* Attempt to sink and unref the returned object and avoid any potential leaks */ + g_object_ref_sink (object); + g_object_unref (object); } /** @@ -4344,12 +4413,13 @@ gi_marshalling_tests_object_get_ref_info_for_vfunc_return_object_transfer_none ( * @is_floating: (out): Floating state object returned from the vfunc directly after vfunc call. */ void -gi_marshalling_tests_object_get_ref_info_for_vfunc_return_object_transfer_full (GIMarshallingTestsObject *self, guint *ref_count, gboolean *is_floating) + gi_marshalling_tests_object_get_ref_info_for_vfunc_return_object_transfer_full + (GIMarshallingTestsObject *self, guint *ref_count, gboolean *is_floating) { - GObject *object = GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_return_object_transfer_full (self); - *ref_count = object->ref_count; - *is_floating = g_object_is_floating(object); - g_object_unref(object); + GObject *object = GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_return_object_transfer_full (self); + *ref_count = object->ref_count; + *is_floating = g_object_is_floating (object); + g_object_unref (object); } /** @@ -4358,16 +4428,17 @@ gi_marshalling_tests_object_get_ref_info_for_vfunc_return_object_transfer_full ( * @is_floating: (out): Floating state object returned from the vfunc directly after vfunc call. */ void -gi_marshalling_tests_object_get_ref_info_for_vfunc_out_object_transfer_none (GIMarshallingTestsObject *self, guint *ref_count, gboolean *is_floating) + gi_marshalling_tests_object_get_ref_info_for_vfunc_out_object_transfer_none + (GIMarshallingTestsObject *self, guint *ref_count, gboolean *is_floating) { - GObject *object = NULL; - GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_out_object_transfer_none (self, &object); - *ref_count = object->ref_count; - *is_floating = g_object_is_floating(object); + GObject *object = NULL; + GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_out_object_transfer_none (self, &object); + *ref_count = object->ref_count; + *is_floating = g_object_is_floating (object); - /* Attempt to sink and unref the returned object and avoid any potential leaks */ - g_object_ref_sink(object); - g_object_unref(object); + /* Attempt to sink and unref the returned object and avoid any potential leaks */ + g_object_ref_sink (object); + g_object_unref (object); } /** @@ -4376,17 +4447,19 @@ gi_marshalling_tests_object_get_ref_info_for_vfunc_out_object_transfer_none (GIM * @is_floating: (out): Floating state object returned from the vfunc directly after vfunc call. */ void -gi_marshalling_tests_object_get_ref_info_for_vfunc_out_object_transfer_full (GIMarshallingTestsObject *self, guint *ref_count, gboolean *is_floating) + gi_marshalling_tests_object_get_ref_info_for_vfunc_out_object_transfer_full + (GIMarshallingTestsObject *self, guint *ref_count, gboolean *is_floating) { - GObject *object = NULL; - GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_out_object_transfer_full (self, &object); - *ref_count = object->ref_count; - *is_floating = g_object_is_floating(object); - g_object_unref(object); + GObject *object = NULL; + GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_out_object_transfer_full (self, &object); + *ref_count = object->ref_count; + *is_floating = g_object_is_floating (object); + g_object_unref (object); } static void -_vfunc_in_object_destroy_callback(gboolean *destroy_called, GObject *where_the_object_was) { +_vfunc_in_object_destroy_callback (gboolean *destroy_called, GObject *where_the_object_was) +{ *destroy_called = TRUE; } @@ -4399,22 +4472,27 @@ _vfunc_in_object_destroy_callback(gboolean *destroy_called, GObject *where_the_o * Calls vfunc_in_object_transfer_none with a new object of the given type. */ void -gi_marshalling_tests_object_get_ref_info_for_vfunc_in_object_transfer_none (GIMarshallingTestsObject *self, GType type, guint *ref_count, gboolean *is_floating) + gi_marshalling_tests_object_get_ref_info_for_vfunc_in_object_transfer_none + (GIMarshallingTestsObject *self, GType type, guint *ref_count, gboolean *is_floating) { - static gboolean destroy_called; - destroy_called = FALSE; + static gboolean destroy_called; + GObject *object; + destroy_called = FALSE; - GObject *object = g_object_new(type, NULL); - g_object_weak_ref (object, (GWeakNotify)_vfunc_in_object_destroy_callback, &destroy_called); + object = g_object_new (type, NULL); + g_object_weak_ref (object, (GWeakNotify) _vfunc_in_object_destroy_callback, &destroy_called); - GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_in_object_transfer_none (self, object); - if (destroy_called) { - *ref_count = 0; - *is_floating = FALSE; - } else { - *ref_count = object->ref_count; - *is_floating = g_object_is_floating (object); - g_object_unref (object); + GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_in_object_transfer_none (self, object); + if (destroy_called) + { + *ref_count = 0; + *is_floating = FALSE; + } + else + { + *ref_count = object->ref_count; + *is_floating = g_object_is_floating (object); + g_object_unref (object); } } @@ -4426,24 +4504,29 @@ gi_marshalling_tests_object_get_ref_info_for_vfunc_in_object_transfer_none (GIMa * @is_floating: (out): Floating state of in object directly after vfunc call. */ void -gi_marshalling_tests_object_get_ref_info_for_vfunc_in_object_transfer_full (GIMarshallingTestsObject *self, GType type, guint *ref_count, gboolean *is_floating) + gi_marshalling_tests_object_get_ref_info_for_vfunc_in_object_transfer_full + (GIMarshallingTestsObject *self, GType type, guint *ref_count, gboolean *is_floating) { - static gboolean destroy_called; - destroy_called = FALSE; + static gboolean destroy_called; + GObject *object; + destroy_called = FALSE; - GObject *object = g_object_new(type, NULL); - g_object_weak_ref (object, (GWeakNotify)_vfunc_in_object_destroy_callback, &destroy_called); + object = g_object_new (type, NULL); + g_object_weak_ref (object, (GWeakNotify) _vfunc_in_object_destroy_callback, &destroy_called); - /* Calling the vfunc takes ownership of the object, so we use a weak_ref to determine - * if the object gets destroyed after the call and appropriately return 0 as the ref count. - */ - GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_in_object_transfer_full (self, object); - if (destroy_called) { - *ref_count = 0; - *is_floating = FALSE; - } else { - *ref_count = object->ref_count; - *is_floating = g_object_is_floating (object); + /* Calling the vfunc takes ownership of the object, so we use a weak_ref to determine + * if the object gets destroyed after the call and appropriately return 0 as the ref count. + */ + GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_in_object_transfer_full (self, object); + if (destroy_called) + { + *ref_count = 0; + *is_floating = FALSE; + } + else + { + *ref_count = object->ref_count; + *is_floating = g_object_is_floating (object); } } @@ -4458,69 +4541,69 @@ gi_marshalling_tests_sub_object_init (GIMarshallingTestsSubObject *object) static void gi_marshalling_tests_sub_object_finalize (GObject *object) { - G_OBJECT_CLASS(gi_marshalling_tests_sub_object_parent_class)->finalize(object); + G_OBJECT_CLASS (gi_marshalling_tests_sub_object_parent_class)->finalize (object); } static void method_deep_hierarchy (GIMarshallingTestsObject *self, gint8 in) { - GValue val = {0, }; - g_value_init (&val, G_TYPE_INT); - g_value_set_int (&val, in); - g_object_set_property (G_OBJECT (self), "int", &val); + GValue val = { 0, }; + g_value_init (&val, G_TYPE_INT); + g_value_set_int (&val, in); + g_object_set_property (G_OBJECT (self), "int", &val); } static void gi_marshalling_tests_sub_object_class_init (GIMarshallingTestsSubObjectClass *klass) { - G_OBJECT_CLASS(klass)->finalize = gi_marshalling_tests_sub_object_finalize; - GI_MARSHALLING_TESTS_OBJECT_CLASS(klass)->method_deep_hierarchy = method_deep_hierarchy; + G_OBJECT_CLASS (klass)->finalize = gi_marshalling_tests_sub_object_finalize; + GI_MARSHALLING_TESTS_OBJECT_CLASS (klass)->method_deep_hierarchy = method_deep_hierarchy; } void gi_marshalling_tests_sub_object_sub_method (GIMarshallingTestsSubObject *object) { - g_assert_cmpint(GI_MARSHALLING_TESTS_OBJECT(object)->int_, ==, 0); + g_assert_cmpint (GI_MARSHALLING_TESTS_OBJECT (object)->int_, ==, 0); } -void -gi_marshalling_tests_sub_object_overwritten_method (GIMarshallingTestsSubObject *object) +void gi_marshalling_tests_sub_object_overwritten_method (GIMarshallingTestsSubObject *object) { - g_assert_cmpint(GI_MARSHALLING_TESTS_OBJECT(object)->int_, ==, 0); + g_assert_cmpint (GI_MARSHALLING_TESTS_OBJECT (object)->int_, ==, 0); } -G_DEFINE_TYPE (GIMarshallingTestsSubSubObject, gi_marshalling_tests_sub_sub_object, GI_MARSHALLING_TESTS_TYPE_SUB_OBJECT); +G_DEFINE_TYPE (GIMarshallingTestsSubSubObject, + gi_marshalling_tests_sub_sub_object, GI_MARSHALLING_TESTS_TYPE_SUB_OBJECT); static void gi_marshalling_tests_sub_sub_object_init (GIMarshallingTestsSubSubObject *object) { } -static void -gi_marshalling_tests_sub_sub_object_class_init (GIMarshallingTestsSubSubObjectClass *klass) +static void gi_marshalling_tests_sub_sub_object_class_init (GIMarshallingTestsSubSubObjectClass *klass) { } /* Interfaces */ static void -gi_marshalling_tests_interface_class_init(void *g_iface) +gi_marshalling_tests_interface_class_init (void *g_iface) { } GType -gi_marshalling_tests_interface_get_type(void) -{ - static GType type = 0; - if (type == 0) { - type = g_type_register_static_simple (G_TYPE_INTERFACE, - "GIMarshallingTestsInterface", - sizeof (GIMarshallingTestsInterfaceIface), - (GClassInitFunc) gi_marshalling_tests_interface_class_init, - 0, NULL, 0); +gi_marshalling_tests_interface_get_type (void) +{ + static GType type = 0; + if (type == 0) + { + type = g_type_register_static_simple (G_TYPE_INTERFACE, + "GIMarshallingTestsInterface", + sizeof + (GIMarshallingTestsInterfaceIface), + (GClassInitFunc) gi_marshalling_tests_interface_class_init, 0, NULL, 0); } - return type; + return type; } /** @@ -4545,43 +4628,45 @@ gi_marshalling_tests_test_interface_test_int8_in (GIMarshallingTestsInterface *t static void -gi_marshalling_tests_interface2_class_init(void *g_iface) +gi_marshalling_tests_interface2_class_init (void *g_iface) { } GType -gi_marshalling_tests_interface2_get_type(void) -{ - static GType type = 0; - if (type == 0) { - type = g_type_register_static_simple (G_TYPE_INTERFACE, - "GIMarshallingTestsInterface2", - sizeof (GIMarshallingTestsInterface2Iface), - (GClassInitFunc) gi_marshalling_tests_interface2_class_init, - 0, NULL, 0); +gi_marshalling_tests_interface2_get_type (void) +{ + static GType type = 0; + if (type == 0) + { + type = g_type_register_static_simple (G_TYPE_INTERFACE, + "GIMarshallingTestsInterface2", + sizeof + (GIMarshallingTestsInterface2Iface), + (GClassInitFunc) gi_marshalling_tests_interface2_class_init, 0, NULL, 0); } - return type; + return type; } static void -gi_marshalling_tests_interface3_class_init(void *g_iface) +gi_marshalling_tests_interface3_class_init (void *g_iface) { } GType -gi_marshalling_tests_interface3_get_type(void) -{ - static GType type = 0; - if (type == 0) { - type = g_type_register_static_simple (G_TYPE_INTERFACE, - "GIMarshallingTestsInterface3", - sizeof (GIMarshallingTestsInterface3Iface), - (GClassInitFunc) gi_marshalling_tests_interface3_class_init, - 0, NULL, 0); +gi_marshalling_tests_interface3_get_type (void) +{ + static GType type = 0; + if (type == 0) + { + type = g_type_register_static_simple (G_TYPE_INTERFACE, + "GIMarshallingTestsInterface3", + sizeof + (GIMarshallingTestsInterface3Iface), + (GClassInitFunc) gi_marshalling_tests_interface3_class_init, 0, NULL, 0); } - return type; + return type; } /** @@ -4590,9 +4675,8 @@ gi_marshalling_tests_interface3_get_type(void) * @n_in: */ void -gi_marshalling_tests_interface3_test_variant_array_in (GIMarshallingTestsInterface3 *self, - GVariant **in, - gsize n_in) + gi_marshalling_tests_interface3_test_variant_array_in + (GIMarshallingTestsInterface3 *self, GVariant **in, gsize n_in) { GI_MARSHALLING_TESTS_INTERFACE3_GET_IFACE (self)->test_variant_array_in (self, in, n_in); } @@ -4605,8 +4689,8 @@ gi_marshalling_tests_interface3_test_variant_array_in (GIMarshallingTestsInterfa void gi_marshalling_tests_int_out_out (gint *int0, gint *int1) { - *int0 = 6; - *int1 = 7; + *int0 = 6; + *int1 = 7; } /** @@ -4619,12 +4703,11 @@ gi_marshalling_tests_int_out_out (gint *int0, gint *int1) * @out2: (out): */ void -gi_marshalling_tests_int_three_in_three_out(gint a, gint b, gint c, - gint *out0, gint *out1, gint *out2) +gi_marshalling_tests_int_three_in_three_out (gint a, gint b, gint c, gint *out0, gint *out1, gint *out2) { - *out0 = a; - *out1 = b; - *out2 = c; + *out0 = a; + *out1 = b; + *out2 = c; } /** @@ -4634,20 +4717,18 @@ gi_marshalling_tests_int_three_in_three_out(gint a, gint b, gint c, gint gi_marshalling_tests_int_return_out (gint *int_) { - *int_ = 7; - return 6; + *int_ = 7; + return 6; } /* GError */ void -gi_marshalling_tests_gerror(GError **error) +gi_marshalling_tests_gerror (GError **error) { - GQuark quark = g_quark_from_static_string(GI_MARSHALLING_TESTS_CONSTANT_GERROR_DOMAIN); - g_set_error_literal(error, - quark, - GI_MARSHALLING_TESTS_CONSTANT_GERROR_CODE, - GI_MARSHALLING_TESTS_CONSTANT_GERROR_MESSAGE); + GQuark quark = g_quark_from_static_string (GI_MARSHALLING_TESTS_CONSTANT_GERROR_DOMAIN); + g_set_error_literal (error, quark, + GI_MARSHALLING_TESTS_CONSTANT_GERROR_CODE, GI_MARSHALLING_TESTS_CONSTANT_GERROR_MESSAGE); } /** @@ -4655,13 +4736,11 @@ gi_marshalling_tests_gerror(GError **error) * @in_ints: (array zero-terminated=1): */ void -gi_marshalling_tests_gerror_array_in(gint *in_ints, GError **error) +gi_marshalling_tests_gerror_array_in (gint *in_ints, GError **error) { - GQuark quark = g_quark_from_static_string(GI_MARSHALLING_TESTS_CONSTANT_GERROR_DOMAIN); - g_set_error_literal(error, - quark, - GI_MARSHALLING_TESTS_CONSTANT_GERROR_CODE, - GI_MARSHALLING_TESTS_CONSTANT_GERROR_MESSAGE); + GQuark quark = g_quark_from_static_string (GI_MARSHALLING_TESTS_CONSTANT_GERROR_DOMAIN); + g_set_error_literal (error, quark, + GI_MARSHALLING_TESTS_CONSTANT_GERROR_CODE, GI_MARSHALLING_TESTS_CONSTANT_GERROR_MESSAGE); } /** @@ -4672,16 +4751,15 @@ gi_marshalling_tests_gerror_array_in(gint *in_ints, GError **error) * Inspired by gst_message_parse_error. */ void -gi_marshalling_tests_gerror_out(GError **error, gchar **debug) +gi_marshalling_tests_gerror_out (GError **error, gchar **debug) { - GQuark quark = g_quark_from_static_string(GI_MARSHALLING_TESTS_CONSTANT_GERROR_DOMAIN); - g_set_error_literal(error, - quark, - GI_MARSHALLING_TESTS_CONSTANT_GERROR_CODE, - GI_MARSHALLING_TESTS_CONSTANT_GERROR_MESSAGE); + GQuark quark = g_quark_from_static_string (GI_MARSHALLING_TESTS_CONSTANT_GERROR_DOMAIN); + g_set_error_literal (error, quark, + GI_MARSHALLING_TESTS_CONSTANT_GERROR_CODE, GI_MARSHALLING_TESTS_CONSTANT_GERROR_MESSAGE); - if (debug != NULL) { - *debug = g_strdup (GI_MARSHALLING_TESTS_CONSTANT_GERROR_DEBUG_MESSAGE); + if (debug != NULL) + { + *debug = g_strdup (GI_MARSHALLING_TESTS_CONSTANT_GERROR_DEBUG_MESSAGE); } } @@ -4694,14 +4772,15 @@ gi_marshalling_tests_gerror_out(GError **error, gchar **debug) * must not free. */ void -gi_marshalling_tests_gerror_out_transfer_none(GError **err, const gchar **debug) +gi_marshalling_tests_gerror_out_transfer_none (GError **err, const gchar **debug) { - static GError error = { 0, - GI_MARSHALLING_TESTS_CONSTANT_GERROR_CODE, - GI_MARSHALLING_TESTS_CONSTANT_GERROR_MESSAGE }; - error.domain = g_quark_from_static_string(GI_MARSHALLING_TESTS_CONSTANT_GERROR_DOMAIN); - *err = &error; - *debug = GI_MARSHALLING_TESTS_CONSTANT_GERROR_DEBUG_MESSAGE; + static GError error = { 0, + GI_MARSHALLING_TESTS_CONSTANT_GERROR_CODE, + GI_MARSHALLING_TESTS_CONSTANT_GERROR_MESSAGE + }; + error.domain = g_quark_from_static_string (GI_MARSHALLING_TESTS_CONSTANT_GERROR_DOMAIN); + *err = &error; + *debug = GI_MARSHALLING_TESTS_CONSTANT_GERROR_DEBUG_MESSAGE; } /** @@ -4712,57 +4791,57 @@ gi_marshalling_tests_gerror_out_transfer_none(GError **err, const gchar **debug) * Returns: (transfer full): a GError */ GError * -gi_marshalling_tests_gerror_return(void) +gi_marshalling_tests_gerror_return (void) { - GQuark quark = g_quark_from_static_string(GI_MARSHALLING_TESTS_CONSTANT_GERROR_DOMAIN); + GQuark quark = g_quark_from_static_string (GI_MARSHALLING_TESTS_CONSTANT_GERROR_DOMAIN); - return g_error_new(quark, - GI_MARSHALLING_TESTS_CONSTANT_GERROR_CODE, - GI_MARSHALLING_TESTS_CONSTANT_GERROR_MESSAGE); + return g_error_new (quark, GI_MARSHALLING_TESTS_CONSTANT_GERROR_CODE, GI_MARSHALLING_TESTS_CONSTANT_GERROR_MESSAGE); } static GIMarshallingTestsOverridesStruct * gi_marshalling_tests_overrides_struct_copy (GIMarshallingTestsOverridesStruct *struct_) { - GIMarshallingTestsOverridesStruct *new_struct; + GIMarshallingTestsOverridesStruct *new_struct; - new_struct = g_slice_new (GIMarshallingTestsOverridesStruct); + new_struct = g_slice_new (GIMarshallingTestsOverridesStruct); - *new_struct = *struct_; + *new_struct = *struct_; - return new_struct; + return new_struct; } static void gi_marshalling_tests_overrides_struct_free (GIMarshallingTestsOverridesStruct *struct_) { - g_slice_free (GIMarshallingTestsOverridesStruct, struct_); + g_slice_free (GIMarshallingTestsOverridesStruct, struct_); } GType gi_marshalling_tests_overrides_struct_get_type (void) { - static GType type = 0; + static GType type = 0; - if (type == 0) { - type = g_boxed_type_register_static ("GIMarshallingTestsOverridesStruct", - (GBoxedCopyFunc) gi_marshalling_tests_overrides_struct_copy, - (GBoxedFreeFunc) gi_marshalling_tests_overrides_struct_free); + if (type == 0) + { + type = + g_boxed_type_register_static ("GIMarshallingTestsOverridesStruct", + (GBoxedCopyFunc) + gi_marshalling_tests_overrides_struct_copy, + (GBoxedFreeFunc) gi_marshalling_tests_overrides_struct_free); } - return type; + return type; } GIMarshallingTestsOverridesStruct * gi_marshalling_tests_overrides_struct_new (void) { - return g_slice_new (GIMarshallingTestsOverridesStruct); + return g_slice_new (GIMarshallingTestsOverridesStruct); } -glong -gi_marshalling_tests_overrides_struct_method (GIMarshallingTestsOverridesStruct *struct_) +glong gi_marshalling_tests_overrides_struct_method (GIMarshallingTestsOverridesStruct *struct_) { - return 42; + return 42; } @@ -4774,7 +4853,7 @@ gi_marshalling_tests_overrides_struct_method (GIMarshallingTestsOverridesStruct GIMarshallingTestsOverridesStruct * gi_marshalling_tests_overrides_struct_returnv (void) { - return gi_marshalling_tests_overrides_struct_new(); + return gi_marshalling_tests_overrides_struct_new (); } @@ -4788,30 +4867,28 @@ gi_marshalling_tests_overrides_object_init (GIMarshallingTestsOverridesObject *o static void gi_marshalling_tests_overrides_object_finalize (GObject *object) { - G_OBJECT_CLASS (gi_marshalling_tests_overrides_object_parent_class)->finalize (object); + G_OBJECT_CLASS (gi_marshalling_tests_overrides_object_parent_class)->finalize (object); } -static void -gi_marshalling_tests_overrides_object_class_init (GIMarshallingTestsOverridesObjectClass *klass) +static void gi_marshalling_tests_overrides_object_class_init (GIMarshallingTestsOverridesObjectClass *klass) { - GObjectClass* object_class = G_OBJECT_CLASS (klass); + GObjectClass *object_class = G_OBJECT_CLASS (klass); #if 0 - GObjectClass* parent_class = G_OBJECT_CLASS (klass); + GObjectClass *parent_class = G_OBJECT_CLASS (klass); #endif - object_class->finalize = gi_marshalling_tests_overrides_object_finalize; + object_class->finalize = gi_marshalling_tests_overrides_object_finalize; } GIMarshallingTestsOverridesObject * gi_marshalling_tests_overrides_object_new (void) { - return g_object_new (GI_MARSHALLING_TESTS_TYPE_OVERRIDES_OBJECT, NULL); + return g_object_new (GI_MARSHALLING_TESTS_TYPE_OVERRIDES_OBJECT, NULL); } -glong -gi_marshalling_tests_overrides_object_method (GIMarshallingTestsOverridesObject *object) +glong gi_marshalling_tests_overrides_object_method (GIMarshallingTestsOverridesObject *object) { - return 42; + return 42; } /** @@ -4822,7 +4899,7 @@ gi_marshalling_tests_overrides_object_method (GIMarshallingTestsOverridesObject GIMarshallingTestsOverridesObject * gi_marshalling_tests_overrides_object_returnv (void) { - return g_object_new (GI_MARSHALLING_TESTS_TYPE_OVERRIDES_OBJECT, NULL); + return g_object_new (GI_MARSHALLING_TESTS_TYPE_OVERRIDES_OBJECT, NULL); } /** @@ -4833,7 +4910,7 @@ gi_marshalling_tests_overrides_object_returnv (void) GSList * gi_marshalling_tests_filename_list_return (void) { - return NULL; + return NULL; } /** @@ -4842,9 +4919,9 @@ gi_marshalling_tests_filename_list_return (void) void gi_marshalling_tests_param_spec_in_bool (const GParamSpec *param) { - g_assert (G_IS_PARAM_SPEC (param)); - g_assert_cmpint (G_PARAM_SPEC_TYPE (param), ==, G_TYPE_BOOLEAN); - g_assert_cmpstr (g_param_spec_get_name((GParamSpec*) param), ==, "mybool"); + g_assert (G_IS_PARAM_SPEC (param)); + g_assert_cmpint (G_PARAM_SPEC_TYPE (param), ==, G_TYPE_BOOLEAN); + g_assert_cmpstr (g_param_spec_get_name ((GParamSpec *) param), ==, "mybool"); } /** @@ -4855,7 +4932,7 @@ gi_marshalling_tests_param_spec_in_bool (const GParamSpec *param) GParamSpec * gi_marshalling_tests_param_spec_return (void) { - return g_param_spec_string ("test-param", "test", "This is a test", "42", G_PARAM_READABLE); + return g_param_spec_string ("test-param", "test", "This is a test", "42", G_PARAM_READABLE); } /** @@ -4863,235 +4940,285 @@ gi_marshalling_tests_param_spec_return (void) * @param: (out): */ void -gi_marshalling_tests_param_spec_out(GParamSpec **param) +gi_marshalling_tests_param_spec_out (GParamSpec **param) { - *param = g_param_spec_string("test-param", "test", "This is a test", "42", G_PARAM_READABLE); + *param = g_param_spec_string ("test-param", "test", "This is a test", "42", G_PARAM_READABLE); } -enum { - DUMMY_PROPERTY, - SOME_BOOLEAN_PROPERTY, - SOME_CHAR_PROPERTY, - SOME_UCHAR_PROPERTY, - SOME_INT_PROPERTY, - SOME_UINT_PROPERTY, - SOME_LONG_PROPERTY, - SOME_ULONG_PROPERTY, - SOME_INT64_PROPERTY, - SOME_UINT64_PROPERTY, - SOME_FLOAT_PROPERTY, - SOME_DOUBLE_PROPERTY, - SOME_STRV_PROPERTY, - SOME_BOXED_STRUCT_PROPERTY, - SOME_VARIANT_PROPERTY, - SOME_BOXED_GLIST_PROPERTY, - SOME_OBJECT_PROPERTY, +enum +{ + DUMMY_PROPERTY, + SOME_BOOLEAN_PROPERTY, + SOME_CHAR_PROPERTY, + SOME_UCHAR_PROPERTY, + SOME_INT_PROPERTY, + SOME_UINT_PROPERTY, + SOME_LONG_PROPERTY, + SOME_ULONG_PROPERTY, + SOME_INT64_PROPERTY, + SOME_UINT64_PROPERTY, + SOME_FLOAT_PROPERTY, + SOME_DOUBLE_PROPERTY, + SOME_STRV_PROPERTY, + SOME_BOXED_STRUCT_PROPERTY, + SOME_VARIANT_PROPERTY, + SOME_BOXED_GLIST_PROPERTY, + SOME_OBJECT_PROPERTY, }; G_DEFINE_TYPE (GIMarshallingTestsPropertiesObject, gi_marshalling_tests_properties_object, G_TYPE_OBJECT); -static void -gi_marshalling_tests_properties_object_init (GIMarshallingTestsPropertiesObject * self) +static void gi_marshalling_tests_properties_object_init (GIMarshallingTestsPropertiesObject *self) { } static void -gi_marshalling_tests_properties_object_finalize (GObject* obj) +gi_marshalling_tests_properties_object_finalize (GObject *obj) { - G_OBJECT_CLASS (gi_marshalling_tests_properties_object_parent_class)->finalize (obj); + GIMarshallingTestsPropertiesObject *self; + self = GI_MARSHALLING_TESTS_PROPERTIES_OBJECT (obj); + + if (self->some_strv != NULL) { + g_strfreev (self->some_strv); + self->some_strv = NULL; + } + + G_OBJECT_CLASS (gi_marshalling_tests_properties_object_parent_class)->finalize (obj); } static void -gi_marshalling_tests_properties_object_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) -{ - GIMarshallingTestsPropertiesObject * self; - self = GI_MARSHALLING_TESTS_PROPERTIES_OBJECT (object); - switch (property_id) { - case SOME_BOOLEAN_PROPERTY: - g_value_set_boolean (value, self->some_boolean); - break; - case SOME_CHAR_PROPERTY: - g_value_set_schar (value, self->some_char); - break; - case SOME_UCHAR_PROPERTY: - g_value_set_uchar (value, self->some_uchar); - break; - case SOME_INT_PROPERTY: - g_value_set_int (value, self->some_int); - break; - case SOME_UINT_PROPERTY: - g_value_set_uint (value, self->some_uint); - break; - case SOME_LONG_PROPERTY: - g_value_set_long (value, self->some_long); - break; - case SOME_ULONG_PROPERTY: - g_value_set_ulong (value, self->some_ulong); - break; - case SOME_INT64_PROPERTY: - g_value_set_int64 (value, self->some_int64); - break; - case SOME_UINT64_PROPERTY: - g_value_set_uint64 (value, self->some_uint64); - break; - case SOME_FLOAT_PROPERTY: - g_value_set_float (value, self->some_float); - break; - case SOME_DOUBLE_PROPERTY: - g_value_set_double (value, self->some_double); - break; - case SOME_STRV_PROPERTY: - g_value_set_boxed (value, self->some_strv); - break; - case SOME_BOXED_STRUCT_PROPERTY: - g_value_set_boxed (value, self->some_boxed_struct); - break; - case SOME_BOXED_GLIST_PROPERTY: - g_value_set_boxed (value, self->some_boxed_glist); - break; - case SOME_VARIANT_PROPERTY: - g_value_set_variant (value, self->some_variant); - break; - case SOME_OBJECT_PROPERTY: - g_value_set_object (value, self->some_object); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; +gi_marshalling_tests_properties_object_get_property (GObject *object, + guint property_id, GValue *value, GParamSpec *pspec) +{ + GIMarshallingTestsPropertiesObject *self; + self = GI_MARSHALLING_TESTS_PROPERTIES_OBJECT (object); + switch (property_id) + { + case SOME_BOOLEAN_PROPERTY: + g_value_set_boolean (value, self->some_boolean); + break; + case SOME_CHAR_PROPERTY: + g_value_set_schar (value, self->some_char); + break; + case SOME_UCHAR_PROPERTY: + g_value_set_uchar (value, self->some_uchar); + break; + case SOME_INT_PROPERTY: + g_value_set_int (value, self->some_int); + break; + case SOME_UINT_PROPERTY: + g_value_set_uint (value, self->some_uint); + break; + case SOME_LONG_PROPERTY: + g_value_set_long (value, self->some_long); + break; + case SOME_ULONG_PROPERTY: + g_value_set_ulong (value, self->some_ulong); + break; + case SOME_INT64_PROPERTY: + g_value_set_int64 (value, self->some_int64); + break; + case SOME_UINT64_PROPERTY: + g_value_set_uint64 (value, self->some_uint64); + break; + case SOME_FLOAT_PROPERTY: + g_value_set_float (value, self->some_float); + break; + case SOME_DOUBLE_PROPERTY: + g_value_set_double (value, self->some_double); + break; + case SOME_STRV_PROPERTY: + g_value_set_boxed (value, self->some_strv); + break; + case SOME_BOXED_STRUCT_PROPERTY: + g_value_set_boxed (value, self->some_boxed_struct); + break; + case SOME_BOXED_GLIST_PROPERTY: + g_value_set_boxed (value, self->some_boxed_glist); + break; + case SOME_VARIANT_PROPERTY: + g_value_set_variant (value, self->some_variant); + break; + case SOME_OBJECT_PROPERTY: + g_value_set_object (value, self->some_object); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; } } static void -gi_marshalling_tests_properties_object_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) -{ - GIMarshallingTestsPropertiesObject * self; - self = GI_MARSHALLING_TESTS_PROPERTIES_OBJECT (object); - switch (property_id) { - case SOME_BOOLEAN_PROPERTY: - self->some_boolean = g_value_get_boolean (value); - break; - case SOME_CHAR_PROPERTY: - self->some_char = g_value_get_schar (value); - break; - case SOME_UCHAR_PROPERTY: - self->some_uchar = g_value_get_uchar (value); - break; - case SOME_INT_PROPERTY: - self->some_int = g_value_get_int (value); - break; - case SOME_UINT_PROPERTY: - self->some_uint = g_value_get_uint (value); - break; - case SOME_LONG_PROPERTY: - self->some_long = g_value_get_long (value); - break; - case SOME_ULONG_PROPERTY: - self->some_ulong = g_value_get_ulong (value); - break; - case SOME_INT64_PROPERTY: - self->some_int64 = g_value_get_int64 (value); - break; - case SOME_UINT64_PROPERTY: - self->some_uint64 = g_value_get_uint64 (value); - break; - case SOME_FLOAT_PROPERTY: - self->some_float = g_value_get_float (value); - break; - case SOME_DOUBLE_PROPERTY: - self->some_double = g_value_get_double (value); - break; - case SOME_STRV_PROPERTY: - g_strfreev (self->some_strv); - self->some_strv = g_strdupv (g_value_get_boxed (value)); - break; - case SOME_BOXED_STRUCT_PROPERTY: - gi_marshalling_tests_boxed_struct_free (self->some_boxed_struct); - self->some_boxed_struct = gi_marshalling_tests_boxed_struct_copy (g_value_get_boxed (value)); - break; - case SOME_BOXED_GLIST_PROPERTY: - g_list_free (self->some_boxed_glist); - self->some_boxed_glist = g_list_copy (g_value_get_boxed (value)); - break; - case SOME_VARIANT_PROPERTY: - if (self->some_variant != NULL) - g_variant_unref (self->some_variant); - self->some_variant = g_value_get_variant (value); - if (self->some_variant != NULL) - g_variant_ref (self->some_variant); - break; - case SOME_OBJECT_PROPERTY: - if (self->some_object != NULL) - g_object_unref (self->some_object); - self->some_object = g_value_dup_object (value); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; +gi_marshalling_tests_properties_object_set_property (GObject *object, + guint property_id, const GValue *value, GParamSpec *pspec) +{ + GIMarshallingTestsPropertiesObject *self; + self = GI_MARSHALLING_TESTS_PROPERTIES_OBJECT (object); + switch (property_id) + { + case SOME_BOOLEAN_PROPERTY: + self->some_boolean = g_value_get_boolean (value); + break; + case SOME_CHAR_PROPERTY: + self->some_char = g_value_get_schar (value); + break; + case SOME_UCHAR_PROPERTY: + self->some_uchar = g_value_get_uchar (value); + break; + case SOME_INT_PROPERTY: + self->some_int = g_value_get_int (value); + break; + case SOME_UINT_PROPERTY: + self->some_uint = g_value_get_uint (value); + break; + case SOME_LONG_PROPERTY: + self->some_long = g_value_get_long (value); + break; + case SOME_ULONG_PROPERTY: + self->some_ulong = g_value_get_ulong (value); + break; + case SOME_INT64_PROPERTY: + self->some_int64 = g_value_get_int64 (value); + break; + case SOME_UINT64_PROPERTY: + self->some_uint64 = g_value_get_uint64 (value); + break; + case SOME_FLOAT_PROPERTY: + self->some_float = g_value_get_float (value); + break; + case SOME_DOUBLE_PROPERTY: + self->some_double = g_value_get_double (value); + break; + case SOME_STRV_PROPERTY: + g_strfreev (self->some_strv); + self->some_strv = g_strdupv (g_value_get_boxed (value)); + break; + case SOME_BOXED_STRUCT_PROPERTY: + gi_marshalling_tests_boxed_struct_free (self->some_boxed_struct); + self->some_boxed_struct = gi_marshalling_tests_boxed_struct_copy (g_value_get_boxed (value)); + break; + case SOME_BOXED_GLIST_PROPERTY: + g_list_free (self->some_boxed_glist); + self->some_boxed_glist = g_list_copy (g_value_get_boxed (value)); + break; + case SOME_VARIANT_PROPERTY: + if (self->some_variant != NULL) + g_variant_unref (self->some_variant); + self->some_variant = g_value_get_variant (value); + if (self->some_variant != NULL) + g_variant_ref (self->some_variant); + break; + case SOME_OBJECT_PROPERTY: + if (self->some_object != NULL) + g_object_unref (self->some_object); + self->some_object = g_value_dup_object (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; } } -static void -gi_marshalling_tests_properties_object_class_init (GIMarshallingTestsPropertiesObjectClass * klass) -{ - GObjectClass* object_class = G_OBJECT_CLASS (klass); - - object_class->finalize = gi_marshalling_tests_properties_object_finalize; - object_class->get_property = gi_marshalling_tests_properties_object_get_property; - object_class->set_property = gi_marshalling_tests_properties_object_set_property; - - g_object_class_install_property (object_class, SOME_BOOLEAN_PROPERTY, - g_param_spec_boolean ("some-boolean", "some-boolean", "some-boolean", FALSE, - G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); - - g_object_class_install_property (object_class, SOME_CHAR_PROPERTY, - g_param_spec_char ("some-char", "some-char", "some-char", G_MININT8, G_MAXINT8, 0, - G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); - - g_object_class_install_property (object_class, SOME_UCHAR_PROPERTY, - g_param_spec_uchar ("some-uchar", "some-uchar", "some-uchar", 0, G_MAXUINT8, 0, - G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); - - g_object_class_install_property (object_class, SOME_INT_PROPERTY, - g_param_spec_int ("some-int", "some-int", "some-int", G_MININT, G_MAXINT, 0, - G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); - - g_object_class_install_property (object_class, SOME_UINT_PROPERTY, - g_param_spec_uint ("some-uint", "some-uint", "some-uint", 0, G_MAXUINT, 0, - G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); - - g_object_class_install_property (object_class, SOME_LONG_PROPERTY, - g_param_spec_long ("some-long", "some-long", "some-long", G_MINLONG, G_MAXLONG, 0, - G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); - - g_object_class_install_property (object_class, SOME_ULONG_PROPERTY, - g_param_spec_ulong ("some-ulong", "some-ulong", "some-ulong", 0, G_MAXULONG, 0, - G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); - - g_object_class_install_property (object_class, SOME_INT64_PROPERTY, - g_param_spec_int64 ("some-int64", "some-int64", "some-int64", G_MININT64, G_MAXINT64, 0, - G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); - - g_object_class_install_property (object_class, SOME_UINT64_PROPERTY, - g_param_spec_uint64 ("some-uint64", "some-uint64", "some-uint64", 0, G_MAXUINT64, 0, - G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); - - g_object_class_install_property (object_class, SOME_FLOAT_PROPERTY, - g_param_spec_float ("some-float", "some-float", "some-float", -1 * G_MAXFLOAT, G_MAXFLOAT, 0, - G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); - - g_object_class_install_property (object_class, SOME_DOUBLE_PROPERTY, - g_param_spec_double ("some-double", "some-double", "some-double", -1 * G_MAXDOUBLE, G_MAXDOUBLE, 0, - G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); - - g_object_class_install_property (object_class, SOME_STRV_PROPERTY, - g_param_spec_boxed ("some-strv", "some-strv", "some-strv", G_TYPE_STRV, - G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); - - g_object_class_install_property (object_class, SOME_BOXED_STRUCT_PROPERTY, - g_param_spec_boxed ("some-boxed-struct", "some-boxed-struct", "some-boxed-struct", - gi_marshalling_tests_boxed_struct_get_type(), - G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); +static void gi_marshalling_tests_properties_object_class_init (GIMarshallingTestsPropertiesObjectClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + object_class->finalize = gi_marshalling_tests_properties_object_finalize; + object_class->get_property = gi_marshalling_tests_properties_object_get_property; + object_class->set_property = gi_marshalling_tests_properties_object_set_property; + + g_object_class_install_property (object_class, SOME_BOOLEAN_PROPERTY, + g_param_spec_boolean ("some-boolean", + "some-boolean", + "some-boolean", + FALSE, + G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); + + g_object_class_install_property (object_class, SOME_CHAR_PROPERTY, + g_param_spec_char ("some-char", + "some-char", + "some-char", G_MININT8, + G_MAXINT8, 0, + G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); + + g_object_class_install_property (object_class, SOME_UCHAR_PROPERTY, + g_param_spec_uchar ("some-uchar", + "some-uchar", + "some-uchar", 0, + G_MAXUINT8, 0, + G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); + + g_object_class_install_property (object_class, SOME_INT_PROPERTY, + g_param_spec_int ("some-int", "some-int", + "some-int", G_MININT, + G_MAXINT, 0, + G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); + + g_object_class_install_property (object_class, SOME_UINT_PROPERTY, + g_param_spec_uint ("some-uint", + "some-uint", + "some-uint", 0, + G_MAXUINT, 0, + G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); + + g_object_class_install_property (object_class, SOME_LONG_PROPERTY, + g_param_spec_long ("some-long", + "some-long", + "some-long", G_MINLONG, + G_MAXLONG, 0, + G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); + + g_object_class_install_property (object_class, SOME_ULONG_PROPERTY, + g_param_spec_ulong ("some-ulong", + "some-ulong", + "some-ulong", 0, + G_MAXULONG, 0, + G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); + + g_object_class_install_property (object_class, SOME_INT64_PROPERTY, + g_param_spec_int64 ("some-int64", + "some-int64", + "some-int64", + G_MININT64, G_MAXINT64, + 0, G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); + + g_object_class_install_property (object_class, SOME_UINT64_PROPERTY, + g_param_spec_uint64 ("some-uint64", + "some-uint64", + "some-uint64", 0, + G_MAXUINT64, 0, + G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); + + g_object_class_install_property (object_class, SOME_FLOAT_PROPERTY, + g_param_spec_float ("some-float", + "some-float", + "some-float", + -1 * G_MAXFLOAT, + G_MAXFLOAT, 0, + G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); + + g_object_class_install_property (object_class, SOME_DOUBLE_PROPERTY, + g_param_spec_double ("some-double", + "some-double", + "some-double", + -1 * G_MAXDOUBLE, + G_MAXDOUBLE, 0, + G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); + + g_object_class_install_property (object_class, SOME_STRV_PROPERTY, + g_param_spec_boxed ("some-strv", + "some-strv", + "some-strv", + G_TYPE_STRV, + G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); + + g_object_class_install_property (object_class, SOME_BOXED_STRUCT_PROPERTY, + g_param_spec_boxed ("some-boxed-struct", + "some-boxed-struct", + "some-boxed-struct", + gi_marshalling_tests_boxed_struct_get_type + (), G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); /** * GIMarshallingTestsPropertiesObject:some-boxed-glist: @@ -5099,23 +5226,31 @@ gi_marshalling_tests_properties_object_class_init (GIMarshallingTestsPropertiesO * Type: GLib.List(gint) * Transfer: none */ - g_object_class_install_property (object_class, SOME_BOXED_GLIST_PROPERTY, - g_param_spec_boxed ("some-boxed-glist", "some-boxed-glist", "some-boxed-glist", - gi_marshalling_tests_boxed_glist_get_type(), - G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); - - g_object_class_install_property (object_class, SOME_VARIANT_PROPERTY, - g_param_spec_variant ("some-variant", "some-variant", "some-variant", - G_VARIANT_TYPE_ANY, NULL, - G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); - - g_object_class_install_property (object_class, SOME_OBJECT_PROPERTY, - g_param_spec_object ("some-object", "some-object", "some-object", G_TYPE_OBJECT, - G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); -} - -GIMarshallingTestsPropertiesObject* + g_object_class_install_property (object_class, SOME_BOXED_GLIST_PROPERTY, + g_param_spec_boxed ("some-boxed-glist", + "some-boxed-glist", + "some-boxed-glist", + gi_marshalling_tests_boxed_glist_get_type + (), G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); + + g_object_class_install_property (object_class, SOME_VARIANT_PROPERTY, + g_param_spec_variant ("some-variant", + "some-variant", + "some-variant", + G_VARIANT_TYPE_ANY, + NULL, + G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); + + g_object_class_install_property (object_class, SOME_OBJECT_PROPERTY, + g_param_spec_object ("some-object", + "some-object", + "some-object", + G_TYPE_OBJECT, + G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); +} + +GIMarshallingTestsPropertiesObject * gi_marshalling_tests_properties_object_new (void) { - return g_object_new (GI_MARSHALLING_TESTS_TYPE_PROPERTIES_OBJECT, NULL); + return g_object_new (GI_MARSHALLING_TESTS_TYPE_PROPERTIES_OBJECT, NULL); } diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h index a361de0..67c2f70 100644 --- a/tests/gimarshallingtests.h +++ b/tests/gimarshallingtests.h @@ -804,6 +804,16 @@ struct _GIMarshallingTestsObjectClass */ gboolean (*vfunc_meth_with_err) (GIMarshallingTestsObject *object, gint x, GError **error); + /** + * GIMarshallingTestsObjectClass::vfunc_return_enum: + */ + GIMarshallingTestsFlags (* vfunc_return_enum) (GIMarshallingTestsObject *self); + + /** + * GIMarshallingTestsObjectClass::vfunc_out_enum: + * @_enum: (out): + */ + void (* vfunc_out_enum) (GIMarshallingTestsObject *self, GIMarshallingTestsEnum *_enum); /** * GIMarshallingTestsObjectClass::vfunc_return_object_transfer_none: @@ -842,8 +852,6 @@ struct _GIMarshallingTestsObjectClass * @object: (in) (transfer full): */ void (* vfunc_in_object_transfer_full) (GIMarshallingTestsObject *self, GObject *object); - - }; struct _GIMarshallingTestsObject @@ -881,6 +889,9 @@ glong gi_marshalling_tests_object_vfunc_return_value_and_one_out_parameter (GIMa glong gi_marshalling_tests_object_vfunc_return_value_and_multiple_out_parameters (GIMarshallingTestsObject *self, glong *a, glong *b); gboolean gi_marshalling_tests_object_vfunc_meth_with_error (GIMarshallingTestsObject *object, gint x, GError **error); +GIMarshallingTestsEnum gi_marshalling_tests_object_vfunc_return_enum (GIMarshallingTestsObject *self); +void gi_marshalling_tests_object_vfunc_out_enum (GIMarshallingTestsObject *self, GIMarshallingTestsEnum *_enum); + void gi_marshalling_tests_object_get_ref_info_for_vfunc_return_object_transfer_none (GIMarshallingTestsObject *self, guint *ref_count, gboolean *is_floating); void gi_marshalling_tests_object_get_ref_info_for_vfunc_return_object_transfer_full (GIMarshallingTestsObject *self, guint *ref_count, gboolean *is_floating); void gi_marshalling_tests_object_get_ref_info_for_vfunc_out_object_transfer_none (GIMarshallingTestsObject *self, guint *ref_count, gboolean *is_floating); diff --git a/tests/offsets/Makefile.in b/tests/offsets/Makefile.in index f88eed3..b686550 100644 --- a/tests/offsets/Makefile.in +++ b/tests/offsets/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.12.2 from Makefile.am. +# Makefile.in generated by automake 1.13.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. @@ -97,9 +97,9 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/Makefile.introspection \ - $(top_srcdir)/build-aux/depcomp $(top_srcdir)/common.mk +DIST_COMMON = $(top_srcdir)/common.mk \ + $(top_srcdir)/Makefile.introspection $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am $(top_srcdir)/build-aux/depcomp check_PROGRAMS = gitestoffsets$(EXEEXT) subdir = tests/offsets ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -170,6 +170,23 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -566,26 +583,15 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -597,15 +603,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -614,9 +616,10 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am -cscopelist: $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP)'; \ +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ @@ -775,19 +778,19 @@ uninstall-am: .MAKE: all check check-am install install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am check-local clean \ +.PHONY: CTAGS GTAGS TAGS all all-am check check-am check-local clean \ clean-checkLTLIBRARIES clean-checkPROGRAMS clean-generic \ - clean-libtool cscopelist ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am + clean-libtool cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am # Make sure the required variables are set, these should under normal @@ -853,7 +856,9 @@ $(1): $$($(_gir_name)_FILES) $(_gir_program) \ $(_gir_libraries) \ $($(_gir_name)_SCANNERFLAGS) \ + --cflags-begin \ $($(_gir_name)_CFLAGS) \ + --cflags-end \ $($(_gir_name)_LDFLAGS) \ $$^ \ --output $(1) diff --git a/tests/repository/Makefile.in b/tests/repository/Makefile.in index 58a5679..ec1cd25 100644 --- a/tests/repository/Makefile.in +++ b/tests/repository/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.12.2 from Makefile.am. +# Makefile.in generated by automake 1.13.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. @@ -54,8 +54,9 @@ check_PROGRAMS = gitestrepo$(EXEEXT) gitestthrows$(EXEEXT) \ TESTS = gitestrepo$(EXEEXT) gitestthrows$(EXEEXT) \ gitypelibtest$(EXEEXT) subdir = tests/repository -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/build-aux/depcomp +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/build-aux/depcomp \ + $(top_srcdir)/build-aux/test-driver ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -128,12 +129,229 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no -am__tty_colors = $(am__tty_colors_dummy) +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + mgn=''; \ + brg=''; \ + std=''; \ + fi; \ +} +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = @EXEEXT@ .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -329,7 +547,7 @@ TESTS_ENVIRONMENT = env GI_TYPELIB_PATH="$(top_builddir):$(top_builddir)/gir:$(t all: all-am .SUFFIXES: -.SUFFIXES: .c .lo .o .obj +.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -458,26 +676,15 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -489,15 +696,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -506,9 +709,10 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am -cscopelist: $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP)'; \ +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ @@ -524,98 +728,182 @@ cscopelist: $(HEADERS) $(SOURCES) $(LISP) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; \ - srcdir=$(srcdir); export srcdir; \ - list=' $(TESTS) '; \ - $(am__tty_colors); \ - if test -n "$$list"; then \ - for tst in $$list; do \ - if test -f ./$$tst; then dir=./; \ - elif test -f $$tst; then dir=; \ - else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xpass=`expr $$xpass + 1`; \ - failed=`expr $$failed + 1`; \ - col=$$red; res=XPASS; \ - ;; \ - *) \ - col=$$grn; res=PASS; \ - ;; \ - esac; \ - elif test $$? -ne 77; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xfail=`expr $$xfail + 1`; \ - col=$$lgn; res=XFAIL; \ - ;; \ - *) \ - failed=`expr $$failed + 1`; \ - col=$$red; res=FAIL; \ - ;; \ - esac; \ - else \ - skip=`expr $$skip + 1`; \ - col=$$blu; res=SKIP; \ - fi; \ - echo "$${col}$$res$${std}: $$tst"; \ - done; \ - if test "$$all" -eq 1; then \ - tests="test"; \ - All=""; \ - else \ - tests="tests"; \ - All="All "; \ +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# exand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ - if test "$$failed" -eq 0; then \ - if test "$$xfail" -eq 0; then \ - banner="$$All$$all $$tests passed"; \ - else \ - if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ - banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ - fi; \ - else \ - if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all $$tests failed"; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + else \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ else \ - if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ - banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ - fi; \ - dashes="$$banner"; \ - skipped=""; \ - if test "$$skip" -ne 0; then \ - if test "$$skip" -eq 1; then \ - skipped="($$skip test was not run)"; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ else \ - skipped="($$skip tests were not run)"; \ + color_start= color_end=; \ fi; \ - test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$skipped"; \ - fi; \ - report=""; \ - if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ - report="Please report to $(PACKAGE_BUGREPORT)"; \ - test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$report"; \ - fi; \ - dashes=`echo "$$dashes" | sed s/./=/g`; \ - if test "$$failed" -eq 0; then \ - col="$$grn"; \ - else \ - col="$$red"; \ - fi; \ - echo "$${col}$$dashes$${std}"; \ - echo "$${col}$$banner$${std}"; \ - test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ - test -z "$$report" || echo "$${col}$$report$${std}"; \ - echo "$${col}$$dashes$${std}"; \ - test "$$failed" -eq 0; \ - else :; fi + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all $(check_PROGRAMS) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +gitestrepo.log: gitestrepo$(EXEEXT) + @p='gitestrepo$(EXEEXT)'; \ + b='gitestrepo'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +gitestthrows.log: gitestthrows$(EXEEXT) + @p='gitestthrows$(EXEEXT)'; \ + b='gitestthrows'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +gitypelibtest.log: gitypelibtest$(EXEEXT) + @p='gitypelibtest$(EXEEXT)'; \ + b='gitypelibtest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -673,6 +961,9 @@ install-strip: "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: @@ -756,9 +1047,9 @@ uninstall-am: .MAKE: check-am install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ - clean-checkPROGRAMS clean-generic clean-libtool cscopelist \ - ctags distclean distclean-compile distclean-generic \ +.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ @@ -768,7 +1059,7 @@ uninstall-am: installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am + recheck tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/tests/repository/gitypelibtest.c b/tests/repository/gitypelibtest.c index 54fe523..565c95c 100644 --- a/tests/repository/gitypelibtest.c +++ b/tests/repository/gitypelibtest.c @@ -1,5 +1,5 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * vim: tabstop=4 shiftwidth=4 expandtab +/* -*- Mode: C; c-basic-offset: 2 -*- + * vim: shiftwidth=2 expandtab */ #include "girepository.h" @@ -9,244 +9,289 @@ #include static void -test_enum_and_flags_cidentifier(GIRepository *repo) +test_enum_and_flags_cidentifier (GIRepository * repo) { - GITypelib *ret; - GError *error = NULL; - gint n_infos, i; + GITypelib *ret; + GError *error = NULL; + gint n_infos, i; - ret = g_irepository_require (repo, "GIMarshallingTests", NULL, 0, &error); - if (!ret) - g_error ("%s", error->message); + ret = g_irepository_require (repo, "GIMarshallingTests", NULL, 0, &error); + if (!ret) + g_error ("%s", error->message); - n_infos = g_irepository_get_n_infos (repo, "GIMarshallingTests"); + n_infos = g_irepository_get_n_infos (repo, "GIMarshallingTests"); - for (i = 0; i < n_infos; i++) { - GIBaseInfo *info; + for (i = 0; i < n_infos; i++) + { + GIBaseInfo *info; - info = g_irepository_get_info (repo, "GIMarshallingTests", i); + info = g_irepository_get_info (repo, "GIMarshallingTests", i); - /* both GI_INFO_TYPE_ENUM and GI_INFO_TYPE_FLAGS use GIEnumInfo */ - if (GI_IS_ENUM_INFO (info)) { - gint n_values, j; + /* both GI_INFO_TYPE_ENUM and GI_INFO_TYPE_FLAGS use GIEnumInfo */ + if (GI_IS_ENUM_INFO (info)) + { + gint n_values, j; - n_values = g_enum_info_get_n_values ((GIEnumInfo *) info); - for (j = 0; j < n_values; j++) { - GIValueInfo *value_info; - const gchar *c_identifier = NULL; + n_values = g_enum_info_get_n_values ((GIEnumInfo *) info); + for (j = 0; j < n_values; j++) + { + GIValueInfo *value_info; + const gchar *c_identifier = NULL; - value_info = g_enum_info_get_value ((GIEnumInfo *) info, j); - c_identifier = g_base_info_get_attribute ((GIBaseInfo *) value_info, "c:identifier"); + value_info = g_enum_info_get_value ((GIEnumInfo *) info, j); + c_identifier = g_base_info_get_attribute ((GIBaseInfo *) value_info, "c:identifier"); - if (c_identifier == NULL) { - g_error ("Error: no 'c:identifier' attribute on GIMarshallingTests.%s.%s\n", - g_base_info_get_name (info), - g_base_info_get_name ((GIBaseInfo *) value_info)); + if (c_identifier == NULL) + { + g_error + ("Error: no 'c:identifier' attribute on GIMarshallingTests.%s.%s\n", + g_base_info_get_name (info), g_base_info_get_name ((GIBaseInfo *) value_info)); } - g_base_info_unref ((GIBaseInfo *) value_info); + g_base_info_unref ((GIBaseInfo *) value_info); } } - g_base_info_unref (info); + g_base_info_unref (info); } } static void -_check_enum_methods (GIBaseInfo *info, const gchar *name, const gchar *prefix) +_check_enum_methods (GIBaseInfo * info, const gchar * name, const gchar * prefix) { - gint n_methods, i; - - n_methods = g_enum_info_get_n_methods ((GIEnumInfo *) info); - if (n_methods <= 0) - g_error ("%s should have methods", name); - - for (i = 0; i < n_methods; i += n_methods-1) { - GIBaseInfo *function_info; - GIFunctionInfoFlags flags; - const gchar *symbol; - function_info = g_enum_info_get_method ((GIEnumInfo *) info, i); - if (!function_info) - g_error ("Could not find %s method nr. %d", name, i+1); - flags = g_function_info_get_flags ((GIFunctionInfo *) function_info); - if (flags != 0) - g_error ("%s methods should be static", name); - symbol = g_function_info_get_symbol ((GIFunctionInfo *) function_info); - if (!symbol || !g_str_has_prefix (symbol, prefix)) - g_error ("Could not find valid function symbol"); - g_base_info_unref (function_info); + gint n_methods, i; + + n_methods = g_enum_info_get_n_methods ((GIEnumInfo *) info); + if (n_methods <= 0) + g_error ("%s should have methods", name); + + for (i = 0; i < n_methods; i += n_methods - 1) + { + GIBaseInfo *function_info; + GIFunctionInfoFlags flags; + const gchar *symbol; + function_info = g_enum_info_get_method ((GIEnumInfo *) info, i); + if (!function_info) + g_error ("Could not find %s method nr. %d", name, i + 1); + flags = g_function_info_get_flags ((GIFunctionInfo *) function_info); + if (flags != 0) + g_error ("%s methods should be static", name); + symbol = g_function_info_get_symbol ((GIFunctionInfo *) function_info); + if (!symbol || !g_str_has_prefix (symbol, prefix)) + g_error ("Could not find valid function symbol"); + g_base_info_unref (function_info); } } static void -test_enum_and_flags_static_methods(GIRepository *repo) +test_enum_and_flags_static_methods (GIRepository * repo) { - GITypelib *ret; - GError *error = NULL; - GIBaseInfo *enum_info; - - ret = g_irepository_require (repo, "GIMarshallingTests", NULL, 0, &error); - if (!ret) - g_error ("%s", error->message); - - enum_info = g_irepository_find_by_name (repo, "GIMarshallingTests", "GEnum"); - if (!enum_info) - g_error ("Could not find GIMarshallingTests.GEnum"); - _check_enum_methods (enum_info, - "GIMarshallingTests.GEnum", - "gi_marshalling_tests_genum_"); - g_base_info_unref (enum_info); - - enum_info = g_irepository_find_by_name (repo, "GIMarshallingTests", "Flags"); - if (!enum_info) - g_error ("Could not find GIMarshallingTests.Flags"); - _check_enum_methods (enum_info, - "GIMarshallingTests.Flags", - "gi_marshalling_tests_flags_"); - g_base_info_unref (enum_info); + GITypelib *ret; + GError *error = NULL; + GIBaseInfo *enum_info; + + ret = g_irepository_require (repo, "GIMarshallingTests", NULL, 0, &error); + if (!ret) + g_error ("%s", error->message); + + enum_info = g_irepository_find_by_name (repo, "GIMarshallingTests", "GEnum"); + if (!enum_info) + g_error ("Could not find GIMarshallingTests.GEnum"); + _check_enum_methods (enum_info, "GIMarshallingTests.GEnum", "gi_marshalling_tests_genum_"); + g_base_info_unref (enum_info); + + enum_info = g_irepository_find_by_name (repo, "GIMarshallingTests", "Flags"); + if (!enum_info) + g_error ("Could not find GIMarshallingTests.Flags"); + _check_enum_methods (enum_info, "GIMarshallingTests.Flags", "gi_marshalling_tests_flags_"); + g_base_info_unref (enum_info); } static void -test_size_of_gvalue(GIRepository *repo) +test_size_of_gvalue (GIRepository * repo) { - GIBaseInfo *struct_info; + GIBaseInfo *struct_info; - struct_info = g_irepository_find_by_name (repo, "GObject", "Value"); - if (!struct_info) - g_error ("Could not find GObject.Value"); - g_assert_cmpuint (g_struct_info_get_size (struct_info), ==, sizeof (GValue)); - g_base_info_unref (struct_info); + struct_info = g_irepository_find_by_name (repo, "GObject", "Value"); + if (!struct_info) + g_error ("Could not find GObject.Value"); + g_assert_cmpuint (g_struct_info_get_size (struct_info), ==, sizeof (GValue)); + g_base_info_unref (struct_info); } static void -test_is_pointer_for_struct_arg (GIRepository *repo) +test_is_pointer_for_struct_arg (GIRepository * repo) { - GITypelib *ret; - GError *error = NULL; - GIStructInfo *variant_info; - GIFunctionInfo *equal_info; - GIArgInfo *arg_info; - GITypeInfo *type_info; - - ret = g_irepository_require (repo, "GLib", NULL, 0, &error); - if (!ret) - g_error ("%s", error->message); - - variant_info = g_irepository_find_by_name (repo, "GLib", "Variant"); - if (!variant_info) - g_error ("Could not find GLib.Variant"); - - equal_info = g_struct_info_find_method (variant_info, "equal"); - if (!equal_info) - g_error ("Could not find GLib.Variant.equal()"); - - arg_info = g_callable_info_get_arg (equal_info, 0); - if (!arg_info) - g_error ("Could not find 1st arg of GLib.Variant.equal()"); - - type_info = g_arg_info_get_type (arg_info); - if (!type_info) - g_error ("Could not find typeinfo of 1st arg of GLib.Variant.equal()"); - - g_assert (g_type_info_is_pointer (type_info)); - - g_base_info_unref (type_info); - g_base_info_unref (arg_info); - g_base_info_unref (equal_info); - g_base_info_unref (variant_info); + GITypelib *ret; + GError *error = NULL; + GIStructInfo *variant_info; + GIFunctionInfo *equal_info; + GIArgInfo *arg_info; + GITypeInfo *type_info; + + ret = g_irepository_require (repo, "GLib", NULL, 0, &error); + if (!ret) + g_error ("%s", error->message); + + variant_info = g_irepository_find_by_name (repo, "GLib", "Variant"); + if (!variant_info) + g_error ("Could not find GLib.Variant"); + + equal_info = g_struct_info_find_method (variant_info, "equal"); + if (!equal_info) + g_error ("Could not find GLib.Variant.equal()"); + + arg_info = g_callable_info_get_arg (equal_info, 0); + if (!arg_info) + g_error ("Could not find 1st arg of GLib.Variant.equal()"); + + type_info = g_arg_info_get_type (arg_info); + if (!type_info) + g_error ("Could not find typeinfo of 1st arg of GLib.Variant.equal()"); + + g_assert (g_type_info_is_pointer (type_info)); + + g_base_info_unref (type_info); + g_base_info_unref (arg_info); + g_base_info_unref (equal_info); + g_base_info_unref (variant_info); } static void -test_fundamental_get_ref_function_pointer (GIRepository *repo) +test_fundamental_get_ref_function_pointer (GIRepository * repo) { - GIObjectInfo *info; + GIObjectInfo *info; - g_assert (g_irepository_require (repo, "Regress", NULL, 0, NULL)); - info = g_irepository_find_by_name (repo, "Regress", - "TestFundamentalObject"); - g_object_info_get_ref_function_pointer (info); - g_base_info_unref (info); + g_assert (g_irepository_require (repo, "Regress", NULL, 0, NULL)); + info = g_irepository_find_by_name (repo, "Regress", "TestFundamentalObject"); + g_object_info_get_ref_function_pointer (info); + g_base_info_unref (info); } static void -test_hash_with_cairo_typelib (GIRepository *repo) +test_hash_with_cairo_typelib (GIRepository * repo) { - GIBaseInfo *info; + GIBaseInfo *info; - g_assert (g_irepository_require (repo, "cairo", NULL, 0, NULL)); - info = g_irepository_find_by_name (repo, "cairo", "region"); - g_assert (info == NULL); + g_assert (g_irepository_require (repo, "cairo", NULL, 0, NULL)); + info = g_irepository_find_by_name (repo, "cairo", "region"); + g_assert (info == NULL); } static GIPropertyInfo * -lookup_property (GIObjectInfo *info, const gchar *name) +lookup_property (GIObjectInfo * info, const gchar * name) { - gssize n_props; - gssize i; - GIPropertyInfo *property_info; - - n_props = g_object_info_get_n_properties (info); - for (i = 0; i < n_props; i++) { - property_info = g_object_info_get_property (info, i); - if (strcmp (name, g_base_info_get_name (property_info)) == 0) - return property_info; - g_base_info_unref (property_info); + gssize n_props; + gssize i; + GIPropertyInfo *property_info; + + n_props = g_object_info_get_n_properties (info); + for (i = 0; i < n_props; i++) + { + property_info = g_object_info_get_property (info, i); + if (strcmp (name, g_base_info_get_name (property_info)) == 0) + return property_info; + g_base_info_unref (property_info); } - return NULL; + return NULL; } static void -test_char_types (GIRepository *repo) +test_char_types (GIRepository * repo) { - GITypelib *ret; - GError *error = NULL; - GIBaseInfo *prop_obj; - GIPropertyInfo *prop_info; - GITypeInfo *type_info; - - ret = g_irepository_require (repo, "GIMarshallingTests", NULL, 0, &error); - if (!ret) - g_error ("%s", error->message); - - prop_obj = g_irepository_find_by_name (repo, "GIMarshallingTests", "PropertiesObject"); - g_assert (prop_obj != NULL); - g_assert (GI_IS_OBJECT_INFO (prop_obj)); - - /* unsigned char */ - prop_info = lookup_property ((GIObjectInfo *) prop_obj, "some-uchar"); - g_assert (prop_info != NULL); - type_info = g_property_info_get_type (prop_info); - g_assert_cmpuint (g_type_info_get_tag (type_info), ==, GI_TYPE_TAG_UINT8); - g_base_info_unref (type_info); - g_base_info_unref (prop_info); - - /* signed char */ - prop_info = lookup_property ((GIObjectInfo *) prop_obj, "some-char"); - g_assert (prop_info != NULL); - type_info = g_property_info_get_type (prop_info); - g_assert_cmpuint (g_type_info_get_tag (type_info), ==, GI_TYPE_TAG_INT8); - g_base_info_unref (type_info); - g_base_info_unref (prop_info); - - g_base_info_unref (prop_obj); + GITypelib *ret; + GError *error = NULL; + GIBaseInfo *prop_obj; + GIPropertyInfo *prop_info; + GITypeInfo *type_info; + + ret = g_irepository_require (repo, "GIMarshallingTests", NULL, 0, &error); + if (!ret) + g_error ("%s", error->message); + + prop_obj = g_irepository_find_by_name (repo, "GIMarshallingTests", "PropertiesObject"); + g_assert (prop_obj != NULL); + g_assert (GI_IS_OBJECT_INFO (prop_obj)); + + /* unsigned char */ + prop_info = lookup_property ((GIObjectInfo *) prop_obj, "some-uchar"); + g_assert (prop_info != NULL); + type_info = g_property_info_get_type (prop_info); + g_assert_cmpuint (g_type_info_get_tag (type_info), ==, GI_TYPE_TAG_UINT8); + g_base_info_unref (type_info); + g_base_info_unref (prop_info); + + /* signed char */ + prop_info = lookup_property ((GIObjectInfo *) prop_obj, "some-char"); + g_assert (prop_info != NULL); + type_info = g_property_info_get_type (prop_info); + g_assert_cmpuint (g_type_info_get_tag (type_info), ==, GI_TYPE_TAG_INT8); + g_base_info_unref (type_info); + g_base_info_unref (prop_info); + + g_base_info_unref (prop_obj); +} + +static void +test_signal_array_len (GIRepository * repo) +{ + GIObjectInfo *testobj_info; + GISignalInfo *sig_info; + GIArgInfo arg_info; + GITypeInfo type_info; + int i; + + g_assert (g_irepository_require (repo, "Regress", NULL, 0, NULL)); + testobj_info = g_irepository_find_by_name (repo, "Regress", "TestObj"); + g_assert (testobj_info != NULL); + + /* find sig-with-array-len-prop signal */ + for (i = g_object_info_get_n_signals (testobj_info) - 1; i >= 0; --i) + { + sig_info = g_object_info_get_signal (testobj_info, i); + g_assert (sig_info != NULL); + if (strcmp (g_base_info_get_name (sig_info), "sig-with-array-len-prop") == 0) + break; + g_base_info_unref (sig_info); + } + g_assert (i >= 0); + + g_assert_cmpint (g_callable_info_get_n_args (sig_info), ==, 2); + + /* verify array argument */ + g_callable_info_load_arg (sig_info, 0, &arg_info); + g_assert_cmpstr (g_base_info_get_name (&arg_info), ==, "arr"); + g_arg_info_load_type (&arg_info, &type_info); + g_assert_cmpint (g_type_info_get_tag (&type_info), ==, GI_TYPE_TAG_ARRAY); + g_assert_cmpint (g_type_info_get_array_type (&type_info), ==, GI_ARRAY_TYPE_C); + g_assert (!g_type_info_is_zero_terminated (&type_info)); + g_assert_cmpint (g_type_info_get_array_length (&type_info), ==, 1); + + /* verify array length argument */ + g_callable_info_load_arg (sig_info, 1, &arg_info); + g_assert_cmpstr (g_base_info_get_name (&arg_info), ==, "len"); + + g_base_info_unref (sig_info); + g_base_info_unref (testobj_info); } int -main(int argc, char **argv) +main (int argc, char **argv) { - GIRepository *repo; + GIRepository *repo; - repo = g_irepository_get_default (); + repo = g_irepository_get_default (); - /* do tests */ - test_enum_and_flags_cidentifier (repo); - test_enum_and_flags_static_methods (repo); - test_size_of_gvalue (repo); - test_is_pointer_for_struct_arg (repo); - test_fundamental_get_ref_function_pointer (repo); - test_hash_with_cairo_typelib (repo); - test_char_types (repo); + /* do tests */ + test_enum_and_flags_cidentifier (repo); + test_enum_and_flags_static_methods (repo); + test_size_of_gvalue (repo); + test_is_pointer_for_struct_arg (repo); + test_fundamental_get_ref_function_pointer (repo); + test_hash_with_cairo_typelib (repo); + test_char_types (repo); + test_signal_array_len (repo); - exit(0); + exit (0); } diff --git a/tests/scanner/Bar-1.0-expected.gir b/tests/scanner/Bar-1.0-expected.gir index ef92fcc..245adff 100644 --- a/tests/scanner/Bar-1.0-expected.gir +++ b/tests/scanner/Bar-1.0-expected.gir @@ -6,7 +6,6 @@ and/or use gtk-doc annotations. --> xmlns="http://www.gtk.org/introspection/core/1.0" xmlns:c="http://www.gtk.org/introspection/c/1.0" xmlns:glib="http://www.gtk.org/introspection/glib/1.0"> - xmlns="http://www.gtk.org/introspection/core/1.0" xmlns:c="http://www.gtk.org/introspection/c/1.0" xmlns:glib="http://www.gtk.org/introspection/glib/1.0"> - diff --git a/tests/scanner/GtkFrob-1.0-expected.gir b/tests/scanner/GtkFrob-1.0-expected.gir index c875847..a4e39ef 100644 --- a/tests/scanner/GtkFrob-1.0-expected.gir +++ b/tests/scanner/GtkFrob-1.0-expected.gir @@ -6,7 +6,6 @@ and/or use gtk-doc annotations. --> xmlns="http://www.gtk.org/introspection/core/1.0" xmlns:c="http://www.gtk.org/introspection/c/1.0" xmlns:glib="http://www.gtk.org/introspection/glib/1.0"> - This is here just for the sake of being overriden by its -.

+.

diff --git a/tests/scanner/Regress-1.0-C-expected/Regress.FooBUnion.get_contained_type.page b/tests/scanner/Regress-1.0-C-expected/Regress.FooBUnion.get_contained_type.page new file mode 100644 index 0000000..1ee353f --- /dev/null +++ b/tests/scanner/Regress-1.0-C-expected/Regress.FooBUnion.get_contained_type.page @@ -0,0 +1,48 @@ + + + + + + + + int + + regress_foo_bunion_get_contained_type + + RegressFooBUnion* + bunion + + + + + regress_foo_bunion_get_contained_type + + +int regress_foo_bunion_get_contained_type (RegressFooBUnion* bunion); + + + + + + + + + + +<code>bunion</code> + + + +<code>Returns</code> + + + + + + + diff --git a/tests/scanner/Regress-1.0-C-expected/Regress.FooBUnion.new.page b/tests/scanner/Regress-1.0-C-expected/Regress.FooBUnion.new.page new file mode 100644 index 0000000..b760f20 --- /dev/null +++ b/tests/scanner/Regress-1.0-C-expected/Regress.FooBUnion.new.page @@ -0,0 +1,40 @@ + + + + + + + + RegressFooBUnion* + + regress_foo_bunion_new + + + + regress_foo_bunion_new + + +RegressFooBUnion* regress_foo_bunion_new (void); + + + + + + + + + + +<code>Returns</code> + + + + + + + diff --git a/tests/scanner/Regress-1.0-C-expected/Regress.FooEnumType.method.page b/tests/scanner/Regress-1.0-C-expected/Regress.FooEnumType.method.page new file mode 100644 index 0000000..6ecf2dd --- /dev/null +++ b/tests/scanner/Regress-1.0-C-expected/Regress.FooEnumType.method.page @@ -0,0 +1,48 @@ + + + + + + + + int + + regress_foo_enum_type_method + + RegressFooEnumType + regress_foo_enum + + + + + regress_foo_enum_type_method + + +int regress_foo_enum_type_method (RegressFooEnumType regress_foo_enum); + + + + + + + + + + +<code>regress_foo_enum</code> + + + +<code>Returns</code> + + + + + + + diff --git a/tests/scanner/Regress-1.0-C-expected/Regress.FooEnumType.returnv.page b/tests/scanner/Regress-1.0-C-expected/Regress.FooEnumType.returnv.page new file mode 100644 index 0000000..aa0c6c1 --- /dev/null +++ b/tests/scanner/Regress-1.0-C-expected/Regress.FooEnumType.returnv.page @@ -0,0 +1,48 @@ + + + + + + + + RegressFooEnumType + + regress_foo_enum_type_returnv + + int + x + + + + + regress_foo_enum_type_returnv + + +RegressFooEnumType regress_foo_enum_type_returnv (int x); + + + + + + + + + + +<code>x</code> + + + +<code>Returns</code> + + + + + + + diff --git a/tests/scanner/Regress-1.0-C-expected/Regress.FooError.quark.page b/tests/scanner/Regress-1.0-C-expected/Regress.FooError.quark.page new file mode 100644 index 0000000..dde46fb --- /dev/null +++ b/tests/scanner/Regress-1.0-C-expected/Regress.FooError.quark.page @@ -0,0 +1,40 @@ + + + + + + + + GQuark + + regress_foo_error_quark + + + + regress_foo_error_quark + + +GQuark regress_foo_error_quark (void); + + + + + + + + + + +<code>Returns</code> + + + + + + + diff --git a/tests/scanner/Regress-1.0-C-expected/Regress.FooInterfaceIface.do_regress_foo.page b/tests/scanner/Regress-1.0-C-expected/Regress.FooInterfaceIface.do_regress_foo.page new file mode 100644 index 0000000..0b90042 --- /dev/null +++ b/tests/scanner/Regress-1.0-C-expected/Regress.FooInterfaceIface.do_regress_foo.page @@ -0,0 +1,25 @@ + + + + + + + + Regress.FooInterfaceIface.do_regress_foo + + + + + + + + + + + + diff --git a/tests/scanner/Regress-1.0-C-expected/Regress.FooObject.take_all.page b/tests/scanner/Regress-1.0-C-expected/Regress.FooObject.take_all.page index 649824f..3947b3c 100644 --- a/tests/scanner/Regress-1.0-C-expected/Regress.FooObject.take_all.page +++ b/tests/scanner/Regress-1.0-C-expected/Regress.FooObject.take_all.page @@ -49,7 +49,7 @@ void regress_foo_object_take_all (RegressFooObject* object, -<code>None</code> +<code>arg2</code> diff --git a/tests/scanner/Regress-1.0-C-expected/Regress.FooObjectClass.read_fn.page b/tests/scanner/Regress-1.0-C-expected/Regress.FooObjectClass.read_fn.page new file mode 100644 index 0000000..39078bf --- /dev/null +++ b/tests/scanner/Regress-1.0-C-expected/Regress.FooObjectClass.read_fn.page @@ -0,0 +1,25 @@ + + + + + + + + Regress.FooObjectClass.read_fn + + + + + + + + + + + + diff --git a/tests/scanner/Regress-1.0-C-expected/Regress.FooObjectClass.virtual_method.page b/tests/scanner/Regress-1.0-C-expected/Regress.FooObjectClass.virtual_method.page new file mode 100644 index 0000000..2882c6d --- /dev/null +++ b/tests/scanner/Regress-1.0-C-expected/Regress.FooObjectClass.virtual_method.page @@ -0,0 +1,25 @@ + + + + + + + + Regress.FooObjectClass.virtual_method + + + + + + + + + + + + diff --git a/tests/scanner/Regress-1.0-C-expected/Regress.FooSubInterfaceIface.destroy_event.page b/tests/scanner/Regress-1.0-C-expected/Regress.FooSubInterfaceIface.destroy_event.page new file mode 100644 index 0000000..9513683 --- /dev/null +++ b/tests/scanner/Regress-1.0-C-expected/Regress.FooSubInterfaceIface.destroy_event.page @@ -0,0 +1,25 @@ + + + + + + + + Regress.FooSubInterfaceIface.destroy_event + + + + + + + + + + + + diff --git a/tests/scanner/Regress-1.0-C-expected/Regress.FooSubInterfaceIface.do_bar.page b/tests/scanner/Regress-1.0-C-expected/Regress.FooSubInterfaceIface.do_bar.page new file mode 100644 index 0000000..ec46cdd --- /dev/null +++ b/tests/scanner/Regress-1.0-C-expected/Regress.FooSubInterfaceIface.do_bar.page @@ -0,0 +1,25 @@ + + + + + + + + Regress.FooSubInterfaceIface.do_bar + + + + + + + + + + + + diff --git a/tests/scanner/Regress-1.0-C-expected/Regress.FooSubInterfaceIface.do_baz.page b/tests/scanner/Regress-1.0-C-expected/Regress.FooSubInterfaceIface.do_baz.page new file mode 100644 index 0000000..d0f5804 --- /dev/null +++ b/tests/scanner/Regress-1.0-C-expected/Regress.FooSubInterfaceIface.do_baz.page @@ -0,0 +1,25 @@ + + + + + + + + Regress.FooSubInterfaceIface.do_baz + + + + + + + + + + + + diff --git a/tests/scanner/Regress-1.0-C-expected/Regress.TestABCError.quark.page b/tests/scanner/Regress-1.0-C-expected/Regress.TestABCError.quark.page new file mode 100644 index 0000000..7ed5152 --- /dev/null +++ b/tests/scanner/Regress-1.0-C-expected/Regress.TestABCError.quark.page @@ -0,0 +1,40 @@ + + + + + + + + GQuark + + regress_test_abc_error_quark + + + + regress_test_abc_error_quark + + +GQuark regress_test_abc_error_quark (void); + + + + + + + + + + +<code>Returns</code> + + + + + + + diff --git a/tests/scanner/Regress-1.0-C-expected/Regress.TestEnum.param.page b/tests/scanner/Regress-1.0-C-expected/Regress.TestEnum.param.page new file mode 100644 index 0000000..542ba60 --- /dev/null +++ b/tests/scanner/Regress-1.0-C-expected/Regress.TestEnum.param.page @@ -0,0 +1,48 @@ + + + + + + + + const gchar* + + regress_test_enum_param + + RegressTestEnum + e + + + + + regress_test_enum_param + + +const gchar* regress_test_enum_param (RegressTestEnum e); + + + + + + + + + + +<code>e</code> + + + +<code>Returns</code> + + + + + + + diff --git a/tests/scanner/Regress-1.0-C-expected/Regress.TestError.quark.page b/tests/scanner/Regress-1.0-C-expected/Regress.TestError.quark.page new file mode 100644 index 0000000..9140ac5 --- /dev/null +++ b/tests/scanner/Regress-1.0-C-expected/Regress.TestError.quark.page @@ -0,0 +1,40 @@ + + + + + + + + GQuark + + regress_test_error_quark + + + + regress_test_error_quark + + +GQuark regress_test_error_quark (void); + + + + + + + + + + +<code>Returns</code> + + + + + + + diff --git a/tests/scanner/Regress-1.0-C-expected/Regress.TestObj-sig-with-array-len-prop.page b/tests/scanner/Regress-1.0-C-expected/Regress.TestObj-sig-with-array-len-prop.page new file mode 100644 index 0000000..9ec983b --- /dev/null +++ b/tests/scanner/Regress-1.0-C-expected/Regress.TestObj-sig-with-array-len-prop.page @@ -0,0 +1,44 @@ + + + + + + sig-with-array-len-prop + + + Regress.TestObj::sig-with-array-len-prop + + +void sig-with-array-len-prop (guint* arr, + gint len); + + + +

This test signal similar to GSettings::change-event

+ + + + + + +<code>arr</code> +

numbers, or NULL

+
+ +<code>len</code> +

length of arr, or 0

+
+ +<code>Returns</code> + + +
+ + + +
diff --git a/tests/scanner/Regress-1.0-C-expected/Regress.TestObjClass._regress_reserved1.page b/tests/scanner/Regress-1.0-C-expected/Regress.TestObjClass._regress_reserved1.page new file mode 100644 index 0000000..3aec143 --- /dev/null +++ b/tests/scanner/Regress-1.0-C-expected/Regress.TestObjClass._regress_reserved1.page @@ -0,0 +1,25 @@ + + + + + + + + Regress.TestObjClass._regress_reserved1 + + + + + + + + + + + + diff --git a/tests/scanner/Regress-1.0-C-expected/Regress.TestObjClass._regress_reserved2.page b/tests/scanner/Regress-1.0-C-expected/Regress.TestObjClass._regress_reserved2.page new file mode 100644 index 0000000..8bfc4d1 --- /dev/null +++ b/tests/scanner/Regress-1.0-C-expected/Regress.TestObjClass._regress_reserved2.page @@ -0,0 +1,25 @@ + + + + + + + + Regress.TestObjClass._regress_reserved2 + + + + + + + + + + + + diff --git a/tests/scanner/Regress-1.0-C-expected/Regress.TestObjClass.allow_none_vfunc.page b/tests/scanner/Regress-1.0-C-expected/Regress.TestObjClass.allow_none_vfunc.page new file mode 100644 index 0000000..b45f05d --- /dev/null +++ b/tests/scanner/Regress-1.0-C-expected/Regress.TestObjClass.allow_none_vfunc.page @@ -0,0 +1,25 @@ + + + + + + + + Regress.TestObjClass.allow_none_vfunc + + + + + + + + + + + + diff --git a/tests/scanner/Regress-1.0-C-expected/Regress.TestObjClass.matrix.page b/tests/scanner/Regress-1.0-C-expected/Regress.TestObjClass.matrix.page new file mode 100644 index 0000000..312b198 --- /dev/null +++ b/tests/scanner/Regress-1.0-C-expected/Regress.TestObjClass.matrix.page @@ -0,0 +1,25 @@ + + + + + + + + Regress.TestObjClass.matrix + + + + + + + + + + + + diff --git a/tests/scanner/Regress-1.0-C-expected/Regress.TestOtherError.quark.page b/tests/scanner/Regress-1.0-C-expected/Regress.TestOtherError.quark.page new file mode 100644 index 0000000..4ed8d53 --- /dev/null +++ b/tests/scanner/Regress-1.0-C-expected/Regress.TestOtherError.quark.page @@ -0,0 +1,40 @@ + + + + + + + + GQuark + + regress_test_unconventional_error_quark + + + + regress_test_unconventional_error_quark + + +GQuark regress_test_unconventional_error_quark (void); + + + + + + + + + + +<code>Returns</code> + + + + + + + diff --git a/tests/scanner/Regress-1.0-Gjs-expected/Regress.FooBUnion.get_contained_type.page b/tests/scanner/Regress-1.0-Gjs-expected/Regress.FooBUnion.get_contained_type.page new file mode 100644 index 0000000..7d82f4f --- /dev/null +++ b/tests/scanner/Regress-1.0-Gjs-expected/Regress.FooBUnion.get_contained_type.page @@ -0,0 +1,42 @@ + + + + + + + + Number + + regress_foo_bunion_get_contained_type + + + + Regress.FooBUnion.prototype.get_contained_type + + +function get_contained_type():Number { + // Gjs wrapper for regress_foo_bunion_get_contained_type() +} + + + + + + + + + + +<code>Returns</code> + + + + + + + diff --git a/tests/scanner/Regress-1.0-Gjs-expected/Regress.FooBUnion.new.page b/tests/scanner/Regress-1.0-Gjs-expected/Regress.FooBUnion.new.page new file mode 100644 index 0000000..e16397c --- /dev/null +++ b/tests/scanner/Regress-1.0-Gjs-expected/Regress.FooBUnion.new.page @@ -0,0 +1,42 @@ + + + + + + + + Regress.FooBUnion + + regress_foo_bunion_new + + + + Regress.FooBUnion.new + + +function new():Regress.FooBUnion { + // Gjs wrapper for regress_foo_bunion_new() +} + + + + + + + + + + +<code>Returns</code> + + + + + + + diff --git a/tests/scanner/Regress-1.0-Gjs-expected/Regress.FooEnumType.method.page b/tests/scanner/Regress-1.0-Gjs-expected/Regress.FooEnumType.method.page new file mode 100644 index 0000000..e3240c1 --- /dev/null +++ b/tests/scanner/Regress-1.0-Gjs-expected/Regress.FooEnumType.method.page @@ -0,0 +1,50 @@ + + + + + + + + Number + + regress_foo_enum_type_method + + Regress.FooEnumType + regress_foo_enum + + + + + method + + +function method(regress_foo_enum:Regress.FooEnumType):Number { + // Gjs wrapper for regress_foo_enum_type_method() +} + + + + + + + + + + +<code>regress_foo_enum</code> + + + +<code>Returns</code> + + + + + + + diff --git a/tests/scanner/Regress-1.0-Gjs-expected/Regress.FooEnumType.returnv.page b/tests/scanner/Regress-1.0-Gjs-expected/Regress.FooEnumType.returnv.page new file mode 100644 index 0000000..4e42fde --- /dev/null +++ b/tests/scanner/Regress-1.0-Gjs-expected/Regress.FooEnumType.returnv.page @@ -0,0 +1,50 @@ + + + + + + + + Regress.FooEnumType + + regress_foo_enum_type_returnv + + Number + x + + + + + returnv + + +function returnv(x:Number):Regress.FooEnumType { + // Gjs wrapper for regress_foo_enum_type_returnv() +} + + + + + + + + + + +<code>x</code> + + + +<code>Returns</code> + + + + + + + diff --git a/tests/scanner/Regress-1.0-Gjs-expected/Regress.FooError.quark.page b/tests/scanner/Regress-1.0-Gjs-expected/Regress.FooError.quark.page new file mode 100644 index 0000000..ed02376 --- /dev/null +++ b/tests/scanner/Regress-1.0-Gjs-expected/Regress.FooError.quark.page @@ -0,0 +1,42 @@ + + + + + + + + GLib.Quark + + regress_foo_error_quark + + + + quark + + +function quark():GLib.Quark { + // Gjs wrapper for regress_foo_error_quark() +} + + + + + + + + + + +<code>Returns</code> + + + + + + + diff --git a/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestABCError.quark.page b/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestABCError.quark.page new file mode 100644 index 0000000..72f9adc --- /dev/null +++ b/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestABCError.quark.page @@ -0,0 +1,42 @@ + + + + + + + + GLib.Quark + + regress_test_abc_error_quark + + + + quark + + +function quark():GLib.Quark { + // Gjs wrapper for regress_test_abc_error_quark() +} + + + + + + + + + + +<code>Returns</code> + + + + + + + diff --git a/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestEnum.param.page b/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestEnum.param.page new file mode 100644 index 0000000..b4dfb29 --- /dev/null +++ b/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestEnum.param.page @@ -0,0 +1,50 @@ + + + + + + + + String + + regress_test_enum_param + + Regress.TestEnum + e + + + + + param + + +function param(e:Regress.TestEnum):String { + // Gjs wrapper for regress_test_enum_param() +} + + + + + + + + + + +<code>e</code> + + + +<code>Returns</code> + + + + + + + diff --git a/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestError.quark.page b/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestError.quark.page new file mode 100644 index 0000000..f849bfe --- /dev/null +++ b/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestError.quark.page @@ -0,0 +1,42 @@ + + + + + + + + GLib.Quark + + regress_test_error_quark + + + + quark + + +function quark():GLib.Quark { + // Gjs wrapper for regress_test_error_quark() +} + + + + + + + + + + +<code>Returns</code> + + + + + + + diff --git a/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestObj-sig-with-array-len-prop.page b/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestObj-sig-with-array-len-prop.page new file mode 100644 index 0000000..c359b13 --- /dev/null +++ b/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestObj-sig-with-array-len-prop.page @@ -0,0 +1,39 @@ + + + + + + sig-with-array-len-prop + + + Regress.TestObj::sig-with-array-len-prop + + +function callback(test_obj, arr:[Number], ):void; + + + +

This test signal similar to GSettings::change-event

+ + + + + + +<code>test_obj</code> +

instance of that is emitting the signal

+
+ +<code>arr</code> +

numbers, or null

+
+
+ + + +
diff --git a/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestOtherError.quark.page b/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestOtherError.quark.page new file mode 100644 index 0000000..d75b6aa --- /dev/null +++ b/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestOtherError.quark.page @@ -0,0 +1,42 @@ + + + + + + + + GLib.Quark + + regress_test_unconventional_error_quark + + + + quark + + +function quark():GLib.Quark { + // Gjs wrapper for regress_test_unconventional_error_quark() +} + + + + + + + + + + +<code>Returns</code> + + + + + + + diff --git a/tests/scanner/Regress-1.0-Python-expected/Regress.FooBUnion.get_contained_type.page b/tests/scanner/Regress-1.0-Python-expected/Regress.FooBUnion.get_contained_type.page new file mode 100644 index 0000000..4052ec5 --- /dev/null +++ b/tests/scanner/Regress-1.0-Python-expected/Regress.FooBUnion.get_contained_type.page @@ -0,0 +1,51 @@ + + + + + + + + int + + regress_foo_bunion_get_contained_type + + Regress.FooBUnion + self + + + + + Regress.FooBUnion.get_contained_type + + +@accepts(Regress.FooBUnion) +@returns(int) +def get_contained_type(self): + # Python wrapper for regress_foo_bunion_get_contained_type() + + + + + + + + + + +<code>self</code> + + + +<code>Returns</code> +{formatter.format(node, node.retval.doc)} + + + + + + diff --git a/tests/scanner/Regress-1.0-Python-expected/Regress.FooEnumType.method.page b/tests/scanner/Regress-1.0-Python-expected/Regress.FooEnumType.method.page new file mode 100644 index 0000000..a802f26 --- /dev/null +++ b/tests/scanner/Regress-1.0-Python-expected/Regress.FooEnumType.method.page @@ -0,0 +1,51 @@ + + + + + + + + int + + regress_foo_enum_type_method + + Regress.FooEnumType + regress_foo_enum + + + + + Index.method + + +@accepts(Regress.FooEnumType) +@returns(int) +def method(regress_foo_enum): + # Python wrapper for regress_foo_enum_type_method() + + + + + + + + + + +<code>regress_foo_enum</code> + + + +<code>Returns</code> +{formatter.format(node, node.retval.doc)} + + + + + + diff --git a/tests/scanner/Regress-1.0-Python-expected/Regress.FooEnumType.returnv.page b/tests/scanner/Regress-1.0-Python-expected/Regress.FooEnumType.returnv.page new file mode 100644 index 0000000..149cc4f --- /dev/null +++ b/tests/scanner/Regress-1.0-Python-expected/Regress.FooEnumType.returnv.page @@ -0,0 +1,51 @@ + + + + + + + + Regress.FooEnumType + + regress_foo_enum_type_returnv + + int + x + + + + + Index.returnv + + +@accepts(int) +@returns(Regress.FooEnumType) +def returnv(x): + # Python wrapper for regress_foo_enum_type_returnv() + + + + + + + + + + +<code>x</code> + + + +<code>Returns</code> +{formatter.format(node, node.retval.doc)} + + + + + + diff --git a/tests/scanner/Regress-1.0-Python-expected/Regress.FooError.quark.page b/tests/scanner/Regress-1.0-Python-expected/Regress.FooError.quark.page new file mode 100644 index 0000000..81f81a7 --- /dev/null +++ b/tests/scanner/Regress-1.0-Python-expected/Regress.FooError.quark.page @@ -0,0 +1,42 @@ + + + + + + + + GLib.Quark + + regress_foo_error_quark + + + + Index.quark + + +@returns(GLib.Quark) +def quark(): + # Python wrapper for regress_foo_error_quark() + + + + + + + + + + +<code>Returns</code> +{formatter.format(node, node.retval.doc)} + + + + + + diff --git a/tests/scanner/Regress-1.0-Python-expected/Regress.TestABCError.quark.page b/tests/scanner/Regress-1.0-Python-expected/Regress.TestABCError.quark.page new file mode 100644 index 0000000..8a8114d --- /dev/null +++ b/tests/scanner/Regress-1.0-Python-expected/Regress.TestABCError.quark.page @@ -0,0 +1,42 @@ + + + + + + + + GLib.Quark + + regress_test_abc_error_quark + + + + Index.quark + + +@returns(GLib.Quark) +def quark(): + # Python wrapper for regress_test_abc_error_quark() + + + + + + + + + + +<code>Returns</code> +{formatter.format(node, node.retval.doc)} + + + + + + diff --git a/tests/scanner/Regress-1.0-Python-expected/Regress.TestEnum.param.page b/tests/scanner/Regress-1.0-Python-expected/Regress.TestEnum.param.page new file mode 100644 index 0000000..2468478 --- /dev/null +++ b/tests/scanner/Regress-1.0-Python-expected/Regress.TestEnum.param.page @@ -0,0 +1,51 @@ + + + + + + + + unicode + + regress_test_enum_param + + Regress.TestEnum + e + + + + + Index.param + + +@accepts(Regress.TestEnum) +@returns(unicode) +def param(e): + # Python wrapper for regress_test_enum_param() + + + + + + + + + + +<code>e</code> + + + +<code>Returns</code> +{formatter.format(node, node.retval.doc)} + + + + + + diff --git a/tests/scanner/Regress-1.0-Python-expected/Regress.TestError.quark.page b/tests/scanner/Regress-1.0-Python-expected/Regress.TestError.quark.page new file mode 100644 index 0000000..07a91a3 --- /dev/null +++ b/tests/scanner/Regress-1.0-Python-expected/Regress.TestError.quark.page @@ -0,0 +1,42 @@ + + + + + + + + GLib.Quark + + regress_test_error_quark + + + + Index.quark + + +@returns(GLib.Quark) +def quark(): + # Python wrapper for regress_test_error_quark() + + + + + + + + + + +<code>Returns</code> +{formatter.format(node, node.retval.doc)} + + + + + + diff --git a/tests/scanner/Regress-1.0-Python-expected/Regress.TestObj-sig-with-array-len-prop.page b/tests/scanner/Regress-1.0-Python-expected/Regress.TestObj-sig-with-array-len-prop.page new file mode 100644 index 0000000..a228de1 --- /dev/null +++ b/tests/scanner/Regress-1.0-Python-expected/Regress.TestObj-sig-with-array-len-prop.page @@ -0,0 +1,49 @@ + + + + + + sig-with-array-len-prop + + + Regress.TestObj::sig-with-array-len-prop + + +def callback(test_obj, arr, len, user_param1, ...) + + + +

This test signal similar to GSettings::change-event

+ + + + + + +<code>test_obj</code> +

instance of that is emitting the signal

+
+ +<code>arr</code> +

numbers, or None

+
+ +<code>len</code> +

length of arr, or 0

+
+<code>user_param1</code> +

first user parameter (if any) specified with the connect() method

+ +<code>...</code> +

additional user parameters (if any)

+
+
+ + + +
diff --git a/tests/scanner/Regress-1.0-Python-expected/Regress.TestOtherError.quark.page b/tests/scanner/Regress-1.0-Python-expected/Regress.TestOtherError.quark.page new file mode 100644 index 0000000..341e774 --- /dev/null +++ b/tests/scanner/Regress-1.0-Python-expected/Regress.TestOtherError.quark.page @@ -0,0 +1,42 @@ + + + + + + + + GLib.Quark + + regress_test_unconventional_error_quark + + + + Index.quark + + +@returns(GLib.Quark) +def quark(): + # Python wrapper for regress_test_unconventional_error_quark() + + + + + + + + + + +<code>Returns</code> +{formatter.format(node, node.retval.doc)} + + + + + + diff --git a/tests/scanner/Regress-1.0-expected.gir b/tests/scanner/Regress-1.0-expected.gir index b238631..53773ca 100644 --- a/tests/scanner/Regress-1.0-expected.gir +++ b/tests/scanner/Regress-1.0-expected.gir @@ -6,8 +6,6 @@ and/or use gtk-doc annotations. --> xmlns="http://www.gtk.org/introspection/core/1.0" xmlns:c="http://www.gtk.org/introspection/c/1.0" xmlns:glib="http://www.gtk.org/introspection/glib/1.0"> - - @@ -1472,7 +1470,7 @@ uses a C sugar return type. - + @@ -1902,7 +1900,7 @@ exposed to language bindings. - + @@ -3333,6 +3331,24 @@ raise an error. + + This test signal similar to GSettings::change-event + + + + + + numbers, or %NULL + + + + + + length of @arr, or 0 + + + + This test signal is like TelepathyGlib's TpChannel:: group-members-changed-detailed: diff --git a/tests/scanner/SLetter-1.0-expected.gir b/tests/scanner/SLetter-1.0-expected.gir index 0c43860..a98ebb2 100644 --- a/tests/scanner/SLetter-1.0-expected.gir +++ b/tests/scanner/SLetter-1.0-expected.gir @@ -6,8 +6,6 @@ and/or use gtk-doc annotations. --> xmlns="http://www.gtk.org/introspection/core/1.0" xmlns:c="http://www.gtk.org/introspection/c/1.0" xmlns:glib="http://www.gtk.org/introspection/glib/1.0"> - - xmlns="http://www.gtk.org/introspection/core/1.0" xmlns:c="http://www.gtk.org/introspection/c/1.0" xmlns:glib="http://www.gtk.org/introspection/glib/1.0"> - diff --git a/tests/scanner/WarnLib-1.0-expected.gir b/tests/scanner/WarnLib-1.0-expected.gir index 3f8be71..0fc0d84 100644 --- a/tests/scanner/WarnLib-1.0-expected.gir +++ b/tests/scanner/WarnLib-1.0-expected.gir @@ -6,8 +6,6 @@ and/or use gtk-doc annotations. --> xmlns="http://www.gtk.org/introspection/core/1.0" xmlns:c="http://www.gtk.org/introspection/c/1.0" xmlns:glib="http://www.gtk.org/introspection/glib/1.0"> - - - + - + @@ -45,10 +43,10 @@ and/or use gtk-doc annotations. --> - + - + @@ -69,10 +67,10 @@ and/or use gtk-doc annotations. --> - + - + diff --git a/tests/scanner/gettype.c b/tests/scanner/gettype.c index cd81673..a3c2d6b 100644 --- a/tests/scanner/gettype.c +++ b/tests/scanner/gettype.c @@ -1,14 +1,14 @@ #include "gettype.h" -G_DEFINE_TYPE(GetTypeObject, gettype_object, G_TYPE_OBJECT); +G_DEFINE_TYPE (GetTypeObject, gettype_object, G_TYPE_OBJECT); static void -gettype_object_class_init (GetTypeObjectClass *klass) +gettype_object_class_init (GetTypeObjectClass * klass) { } static void -gettype_object_init (GetTypeObject *object) +gettype_object_init (GetTypeObject * object) { } @@ -28,9 +28,9 @@ gettype_object_new (void) * Returns: 0 */ GType -gettype_object_nonmeta1_get_type (GetTypeObject *obj) +gettype_object_nonmeta1_get_type (GetTypeObject * obj) { - return 0; + return 0; } /** @@ -44,7 +44,7 @@ gettype_object_nonmeta1_get_type (GetTypeObject *obj) gboolean gettype_object_nonmeta2_get_type (void) { - return TRUE; + return TRUE; } /** @@ -58,5 +58,5 @@ gettype_object_nonmeta2_get_type (void) gboolean gettype_object_nonmeta_get_gtype (void) { - return TRUE; + return TRUE; } diff --git a/tests/scanner/regress.c b/tests/scanner/regress.c index b5fc858..f54c2f9 100644 --- a/tests/scanner/regress.c +++ b/tests/scanner/regress.c @@ -2173,6 +2173,7 @@ regress_test_obj_default_matrix (RegressTestObj *obj, const char *somestr) enum { REGRESS_TEST_OBJ_SIGNAL_SIG_NEW_WITH_ARRAY_PROP, + REGRESS_TEST_OBJ_SIGNAL_SIG_NEW_WITH_ARRAY_LEN_PROP, REGRESS_TEST_OBJ_SIGNAL_SIG_WITH_HASH_PROP, REGRESS_TEST_OBJ_SIGNAL_SIG_WITH_STRV, REGRESS_TEST_OBJ_SIGNAL_SIG_WITH_OBJ, @@ -2241,6 +2242,27 @@ regress_test_obj_class_init (RegressTestObjClass *klass) G_TYPE_ARRAY); /** + * RegressTestObj::sig-with-array-len-prop: + * @self: an object + * @arr: (array length=len) (element-type uint) (allow-none): numbers, or %NULL + * @len: length of @arr, or 0 + * + * This test signal similar to GSettings::change-event + */ + regress_test_obj_signals[REGRESS_TEST_OBJ_SIGNAL_SIG_NEW_WITH_ARRAY_LEN_PROP] = + g_signal_new ("sig-with-array-len-prop", + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_LAST, + 0, + NULL, + NULL, + NULL, + G_TYPE_NONE, + 2, + G_TYPE_POINTER, + G_TYPE_INT); + + /** * RegressTestObj::sig-with-hash-prop: * @self: an object * @hash: (element-type utf8 GObject.Value): diff --git a/tests/warn/Makefile.am b/tests/warn/Makefile.am index 8070230..875d8ef 100644 --- a/tests/warn/Makefile.am +++ b/tests/warn/Makefile.am @@ -1,6 +1,8 @@ include $(top_srcdir)/common.mk -TESTS = \ +TESTS = warntestrunner + +alltests = \ annotationparser.h \ callback-invalid-scope.h \ callback-missing-scope.h \ @@ -17,7 +19,6 @@ TESTS = \ unknown-parameter.h \ unresolved-type.h -EXTRA_DIST = warningtester.py common.h $(TESTS) +EXTRA_DIST = warningtester.py warntestrunner $(alltests) common.h $(TESTS) -TESTS_ENVIRONMENT = PYTHONPATH=$(top_builddir):$(top_srcdir) TOP_BUILDDIR=$(top_builddir) UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) -LOG_COMPILER = $(PYTHON) $(srcdir)/warningtester.py +TESTS_ENVIRONMENT = PYTHONPATH=$(top_builddir):$(top_srcdir) TOP_BUILDDIR=$(top_builddir) UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) PYTHON=$(PYTHON) srcdir=$(srcdir) alltests="$(alltests)" diff --git a/tests/warn/Makefile.in b/tests/warn/Makefile.in index 1a18576..a731e64 100644 --- a/tests/warn/Makefile.in +++ b/tests/warn/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.12.2 from Makefile.am. +# Makefile.in generated by automake 1.13.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. @@ -57,8 +57,8 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/common.mk +DIST_COMMON = $(top_srcdir)/common.mk $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am $(top_srcdir)/build-aux/test-driver subdir = tests/warn ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ @@ -91,10 +91,211 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no -am__tty_colors = $(am__tty_colors_dummy) +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + mgn=''; \ + brg=''; \ + std=''; \ + fi; \ +} +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = @EXEEXT@ .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -311,7 +512,8 @@ INTROSPECTION_DOCTOOL_ARGS = \ --add-include-path=$(builddir) \ --add-include-path=$(top_builddir) -TESTS = \ +TESTS = warntestrunner +alltests = \ annotationparser.h \ callback-invalid-scope.h \ callback-missing-scope.h \ @@ -328,12 +530,12 @@ TESTS = \ unknown-parameter.h \ unresolved-type.h -EXTRA_DIST = warningtester.py common.h $(TESTS) -TESTS_ENVIRONMENT = PYTHONPATH=$(top_builddir):$(top_srcdir) TOP_BUILDDIR=$(top_builddir) UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) -LOG_COMPILER = $(PYTHON) $(srcdir)/warningtester.py +EXTRA_DIST = warningtester.py warntestrunner $(alltests) common.h $(TESTS) +TESTS_ENVIRONMENT = PYTHONPATH=$(top_builddir):$(top_srcdir) TOP_BUILDDIR=$(top_builddir) UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) PYTHON=$(PYTHON) srcdir=$(srcdir) alltests="$(alltests)" all: all-am .SUFFIXES: +.SUFFIXES: .log .test .test$(EXEEXT) .trs $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/common.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -371,107 +573,175 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: cscope cscopelist: -check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; \ - srcdir=$(srcdir); export srcdir; \ - list=' $(TESTS) '; \ - $(am__tty_colors); \ - if test -n "$$list"; then \ - for tst in $$list; do \ - if test -f ./$$tst; then dir=./; \ - elif test -f $$tst; then dir=; \ - else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xpass=`expr $$xpass + 1`; \ - failed=`expr $$failed + 1`; \ - col=$$red; res=XPASS; \ - ;; \ - *) \ - col=$$grn; res=PASS; \ - ;; \ - esac; \ - elif test $$? -ne 77; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xfail=`expr $$xfail + 1`; \ - col=$$lgn; res=XFAIL; \ - ;; \ - *) \ - failed=`expr $$failed + 1`; \ - col=$$red; res=FAIL; \ - ;; \ - esac; \ - else \ - skip=`expr $$skip + 1`; \ - col=$$blu; res=SKIP; \ - fi; \ - echo "$${col}$$res$${std}: $$tst"; \ - done; \ - if test "$$all" -eq 1; then \ - tests="test"; \ - All=""; \ - else \ - tests="tests"; \ - All="All "; \ +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# exand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ - if test "$$failed" -eq 0; then \ - if test "$$xfail" -eq 0; then \ - banner="$$All$$all $$tests passed"; \ - else \ - if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ - banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ - fi; \ - else \ - if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all $$tests failed"; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + else \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ else \ - if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ - banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ - fi; \ - dashes="$$banner"; \ - skipped=""; \ - if test "$$skip" -ne 0; then \ - if test "$$skip" -eq 1; then \ - skipped="($$skip test was not run)"; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ else \ - skipped="($$skip tests were not run)"; \ + color_start= color_end=; \ fi; \ - test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$skipped"; \ - fi; \ - report=""; \ - if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ - report="Please report to $(PACKAGE_BUGREPORT)"; \ - test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$report"; \ - fi; \ - dashes=`echo "$$dashes" | sed s/./=/g`; \ - if test "$$failed" -eq 0; then \ - col="$$grn"; \ - else \ - col="$$red"; \ - fi; \ - echo "$${col}$$dashes$${std}"; \ - echo "$${col}$$banner$${std}"; \ - test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ - test -z "$$report" || echo "$${col}$$report$${std}"; \ - echo "$${col}$$dashes$${std}"; \ - test "$$failed" -eq 0; \ - else :; fi + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +warntestrunner.log: warntestrunner + @p='warntestrunner'; \ + b='warntestrunner'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -528,6 +798,9 @@ install-strip: "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: @@ -607,15 +880,16 @@ uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ - clean-libtool distclean distclean-generic distclean-libtool \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + clean-libtool cscopelist-am ctags-am distclean \ + distclean-generic distclean-libtool distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am recheck tags-am \ uninstall uninstall-am diff --git a/tests/warn/warntestrunner b/tests/warn/warntestrunner new file mode 100755 index 0000000..3deb381 --- /dev/null +++ b/tests/warn/warntestrunner @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +set -e + +for testname in ${alltests}; do + echo "Running warning test:" $testname + $PYTHON $srcdir/warningtester.py "$testname" +done -- 2.7.4