From: DongHun Kwak Date: Thu, 10 Jan 2019 04:16:51 +0000 (+0900) Subject: Imported Upstream version 1.59.3 X-Git-Tag: upstream/1.59.3^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=60d117930eefdad0cc9d1cc0a5849bde6a159f44;p=platform%2Fupstream%2Fgobject-introspection.git Imported Upstream version 1.59.3 --- diff --git a/MSVC.README.rst b/MSVC.README.rst index 06cdf75..42d3b1d 100644 --- a/MSVC.README.rst +++ b/MSVC.README.rst @@ -54,7 +54,7 @@ builds is not (and will likely never be) supported. Open a Visual Studio command prompt and create an empty build directory (which needs to be on the same drive as the G-I sources). In that directory, run the following:: - python $(PythonInstallationPath)\scripts\meson.py $(G-I_srcdir) --buildtype= --prefix=$(PREFIX) -Dcairo-libname= -Dpython= + python $(PythonInstallationPath)\scripts\meson.py $(G-I_srcdir) --buildtype= --prefix=$(PREFIX) -Dcairo_libname= -Dpython= The -Dcairo-libname is likely necessary as the default DLL file name for Cairo-GObject may likely not match the default "libcairo-gobject-2.dll", which is the default diff --git a/NEWS b/NEWS index 9e40088..0f8cc55 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,22 @@ +1.59.3 - 2019-01-08 +------------------- + +* meson: use underscore as a separator in build options (gtk-doc -> gtk_doc etc) + :mr:`129` +* website: add cppgir C++ binding + :mr:`124` (:user:`Mark Nauwelaerts `) +* scanner: Merge specifiers and qualifiers when merging basic types. + Fixes "unsigned char" being wrongly parsed as "unsigned" etc. + :mr:`125` (:user:`Tomasz Miąsko `) +* meson: warn that not all tests will be run if building without cairo/doctool +* scanner: rework source root directory guessing code to not depend on the + build directory +* scanner: Remove incorrect c:type generated for array of synthesized unions + :mr:`127` (:user:`Tomasz Miąsko `) +* scanner: Flatten multi-dimensional arrays fields + :mr:`128` (:user:`Tomasz Miąsko `) + + 1.59.2 - 2019-01-04 ------------------- diff --git a/aclocal.m4 b/aclocal.m4 index 1e66914..db7a76c 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -556,13 +556,14 @@ AC_DEFUN([AX_COMPILER_FLAGS],[ # LICENSE # # Copyright (c) 2014, 2015 Philip Withnall +# Copyright (c) 2017, 2018 Reini Urban # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 14 +#serial 16 AC_DEFUN([AX_COMPILER_FLAGS_CFLAGS],[ AC_REQUIRE([AC_PROG_SED]) @@ -576,6 +577,13 @@ AC_DEFUN([AX_COMPILER_FLAGS_CFLAGS],[ AC_LANG_PUSH([C]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ + [#ifndef __cplusplus + #error "no C++" + #endif]])], + [ax_compiler_cxx=yes;], + [ax_compiler_cxx=no;]) + # Always pass -Werror=unknown-warning-option to get Clang to fail on bad # flags, otherwise they are always appended to the warn_cflags variable, and # Clang warns on them for every compilation unit. @@ -606,18 +614,13 @@ AC_DEFUN([AX_COMPILER_FLAGS_CFLAGS],[ -Wall dnl -Wextra dnl -Wundef dnl - -Wnested-externs dnl -Wwrite-strings dnl -Wpointer-arith dnl -Wmissing-declarations dnl - -Wmissing-prototypes dnl - -Wstrict-prototypes dnl -Wredundant-decls dnl -Wno-unused-parameter dnl -Wno-missing-field-initializers dnl - -Wdeclaration-after-statement dnl -Wformat=2 dnl - -Wold-style-definition dnl -Wcast-align dnl -Wformat-nonliteral dnl -Wformat-security dnl @@ -633,15 +636,32 @@ AC_DEFUN([AX_COMPILER_FLAGS_CFLAGS],[ -Wmissing-include-dirs dnl -Wunused-but-set-variable dnl -Warray-bounds dnl - -Wimplicit-function-declaration dnl -Wreturn-type dnl -Wswitch-enum dnl -Wswitch-default dnl + -Wduplicated-cond dnl + -Wduplicated-branches dnl + -Wlogical-op dnl + -Wrestrict dnl + -Wnull-dereference dnl + -Wdouble-promotion dnl $4 dnl $5 dnl $6 dnl $7 dnl ],ax_warn_cflags_variable,[$ax_compiler_flags_test]) + if test "$ax_compiler_cxx" = "no" ; then + # C-only flags. Warn in C++ + AX_APPEND_COMPILE_FLAGS([ dnl + -Wnested-externs dnl + -Wmissing-prototypes dnl + -Wstrict-prototypes dnl + -Wdeclaration-after-statement dnl + -Wimplicit-function-declaration dnl + -Wold-style-definition dnl + -Wjump-misses-init dnl + ],ax_warn_cflags_variable,[$ax_compiler_flags_test]) + fi ]) AS_IF([test "$ax_enable_compile_warnings" = "error"],[ # "error" flags; -Werror has to be appended unconditionally because @@ -758,13 +778,14 @@ AC_DEFUN([AX_COMPILER_FLAGS_GIR],[ # LICENSE # # Copyright (c) 2014, 2015 Philip Withnall +# Copyright (c) 2017, 2018 Reini Urban # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 8 +#serial 9 AC_DEFUN([AX_COMPILER_FLAGS_LDFLAGS],[ AX_REQUIRE_DEFINED([AX_APPEND_LINK_FLAGS]) @@ -787,7 +808,25 @@ AC_DEFUN([AX_COMPILER_FLAGS_LDFLAGS],[ ax_compiler_flags_test="" ]) - # macOS linker does not have --as-needed + AX_CHECK_LINK_FLAG([-Wl,--as-needed], [ + AX_APPEND_LINK_FLAGS([-Wl,--as-needed], + [AM_LDFLAGS],[$ax_compiler_flags_test]) + ]) + AX_CHECK_LINK_FLAG([-Wl,-z,relro], [ + AX_APPEND_LINK_FLAGS([-Wl,-z,relro], + [AM_LDFLAGS],[$ax_compiler_flags_test]) + ]) + AX_CHECK_LINK_FLAG([-Wl,-z,now], [ + AX_APPEND_LINK_FLAGS([-Wl,-z,now], + [AM_LDFLAGS],[$ax_compiler_flags_test]) + ]) + AX_CHECK_LINK_FLAG([-Wl,-z,noexecstack], [ + AX_APPEND_LINK_FLAGS([-Wl,-z,noexecstack], + [AM_LDFLAGS],[$ax_compiler_flags_test]) + ]) + # textonly, retpolineplt not yet + + # macOS and cygwin linker do not have --as-needed AX_CHECK_LINK_FLAG([-Wl,--no-as-needed], [ ax_compiler_flags_as_needed_option="-Wl,--no-as-needed" ], [ diff --git a/configure b/configure index ca58fcd..68712e1 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.59.2. +# Generated by GNU Autoconf 2.69 for gobject-introspection 1.59.3. # # Report bugs to . # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='gobject-introspection' PACKAGE_TARNAME='gobject-introspection' -PACKAGE_VERSION='1.59.2' -PACKAGE_STRING='gobject-introspection 1.59.2' +PACKAGE_VERSION='1.59.3' +PACKAGE_STRING='gobject-introspection 1.59.3' PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=gobject-introspection' PACKAGE_URL='' @@ -1462,7 +1462,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.59.2 to adapt to many kinds of systems. +\`configure' configures gobject-introspection 1.59.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1534,7 +1534,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of gobject-introspection 1.59.2:";; + short | recursive ) echo "Configuration of gobject-introspection 1.59.3:";; esac cat <<\_ACEOF @@ -1701,7 +1701,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -gobject-introspection configure 1.59.2 +gobject-introspection configure 1.59.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2253,7 +2253,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.59.2, which was +It was created by gobject-introspection $as_me 1.59.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3121,7 +3121,7 @@ fi # Define the identity of the package. PACKAGE='gobject-introspection' - VERSION='1.59.2' + VERSION='1.59.3' cat >>confdefs.h <<_ACEOF @@ -3395,12 +3395,12 @@ AM_BACKSLASH='\' # Used in docs/reference/version.xml -GI_VERSION=1.59.2 +GI_VERSION=1.59.3 GI_MAJOR_VERSION=1 GI_MINOR_VERSION=59 -GI_MICRO_VERSION=2 +GI_MICRO_VERSION=3 @@ -12947,6 +12947,27 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #ifndef __cplusplus + #error "no C++" + #endif +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ax_compiler_cxx=yes; +else + ax_compiler_cxx=no; +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + # Always pass -Werror=unknown-warning-option to get Clang to fail on bad # flags, otherwise they are always appended to the warn_cflags variable, and # Clang warns on them for every compilation unit. @@ -13117,7 +13138,84 @@ done -for flag in -Wall -Wextra -Wundef -Wnested-externs -Wwrite-strings -Wpointer-arith -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wno-unused-parameter -Wno-missing-field-initializers -Wdeclaration-after-statement -Wformat=2 -Wold-style-definition -Wcast-align -Wformat-nonliteral -Wformat-security -Wsign-compare -Wstrict-aliasing -Wshadow -Winline -Wpacked -Wmissing-format-attribute -Wmissing-noreturn -Winit-self -Wredundant-decls -Wmissing-include-dirs -Wunused-but-set-variable -Warray-bounds -Wimplicit-function-declaration -Wreturn-type -Wswitch-enum -Wswitch-default ; do +for flag in -Wall -Wextra -Wundef -Wwrite-strings -Wpointer-arith -Wmissing-declarations -Wredundant-decls -Wno-unused-parameter -Wno-missing-field-initializers -Wformat=2 -Wcast-align -Wformat-nonliteral -Wformat-security -Wsign-compare -Wstrict-aliasing -Wshadow -Winline -Wpacked -Wmissing-format-attribute -Wmissing-noreturn -Winit-self -Wredundant-decls -Wmissing-include-dirs -Wunused-but-set-variable -Warray-bounds -Wreturn-type -Wswitch-enum -Wswitch-default -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wrestrict -Wnull-dereference -Wdouble-promotion ; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_compiler_flags_test_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_compiler_flags_test $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then : + +if ${WARN_CFLAGS+:} false; then : + + case " $WARN_CFLAGS " in #( + *" $flag "*) : + { { $as_echo "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS already contains \$flag"; } >&5 + (: WARN_CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } ;; #( + *) : + + as_fn_append WARN_CFLAGS " $flag" + { { $as_echo "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5 + (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; +esac + +else + + WARN_CFLAGS=$flag + { { $as_echo "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5 + (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + +fi + +else + : +fi + +done + + if test "$ax_compiler_cxx" = "no" ; then + # C-only flags. Warn in C++ + + + + +for flag in -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -Wdeclaration-after-statement -Wimplicit-function-declaration -Wold-style-definition -Wjump-misses-init ; do as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_compiler_flags_test_$flag" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 $as_echo_n "checking whether C compiler accepts $flag... " >&6; } @@ -13188,6 +13286,7 @@ fi done + fi fi if test "$ax_enable_compile_warnings" = "error"; then : @@ -13468,7 +13567,461 @@ else fi - # macOS linker does not have --as-needed + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,--as-needed" >&5 +$as_echo_n "checking whether the linker accepts -Wl,--as-needed... " >&6; } +if ${ax_cv_check_ldflags___Wl___as_needed+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,--as-needed" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_cv_check_ldflags___Wl___as_needed=yes +else + ax_cv_check_ldflags___Wl___as_needed=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___Wl___as_needed" >&5 +$as_echo "$ax_cv_check_ldflags___Wl___as_needed" >&6; } +if test "x$ax_cv_check_ldflags___Wl___as_needed" = xyes; then : + + + + + +for flag in -Wl,--as-needed; do + as_CACHEVAR=`$as_echo "ax_cv_check_ldflags_$ax_compiler_flags_test_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts $flag" >&5 +$as_echo_n "checking whether the linker accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS $ax_compiler_flags_test $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then : + +if ${AM_LDFLAGS+:} false; then : + + case " $AM_LDFLAGS " in #( + *" $flag "*) : + { { $as_echo "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS already contains \$flag"; } >&5 + (: AM_LDFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } ;; #( + *) : + + as_fn_append AM_LDFLAGS " $flag" + { { $as_echo "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS=\"\$AM_LDFLAGS\""; } >&5 + (: AM_LDFLAGS="$AM_LDFLAGS") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; +esac + +else + + AM_LDFLAGS=$flag + { { $as_echo "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS=\"\$AM_LDFLAGS\""; } >&5 + (: AM_LDFLAGS="$AM_LDFLAGS") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + +fi + +else + : +fi + +done + + +else + : +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,-z,relro" >&5 +$as_echo_n "checking whether the linker accepts -Wl,-z,relro... " >&6; } +if ${ax_cv_check_ldflags___Wl__z_relro+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,-z,relro" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_cv_check_ldflags___Wl__z_relro=yes +else + ax_cv_check_ldflags___Wl__z_relro=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___Wl__z_relro" >&5 +$as_echo "$ax_cv_check_ldflags___Wl__z_relro" >&6; } +if test "x$ax_cv_check_ldflags___Wl__z_relro" = xyes; then : + + + + + +for flag in -Wl,-z,relro; do + as_CACHEVAR=`$as_echo "ax_cv_check_ldflags_$ax_compiler_flags_test_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts $flag" >&5 +$as_echo_n "checking whether the linker accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS $ax_compiler_flags_test $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then : + +if ${AM_LDFLAGS+:} false; then : + + case " $AM_LDFLAGS " in #( + *" $flag "*) : + { { $as_echo "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS already contains \$flag"; } >&5 + (: AM_LDFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } ;; #( + *) : + + as_fn_append AM_LDFLAGS " $flag" + { { $as_echo "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS=\"\$AM_LDFLAGS\""; } >&5 + (: AM_LDFLAGS="$AM_LDFLAGS") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; +esac + +else + + AM_LDFLAGS=$flag + { { $as_echo "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS=\"\$AM_LDFLAGS\""; } >&5 + (: AM_LDFLAGS="$AM_LDFLAGS") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + +fi + +else + : +fi + +done + + +else + : +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,-z,now" >&5 +$as_echo_n "checking whether the linker accepts -Wl,-z,now... " >&6; } +if ${ax_cv_check_ldflags___Wl__z_now+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,-z,now" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_cv_check_ldflags___Wl__z_now=yes +else + ax_cv_check_ldflags___Wl__z_now=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___Wl__z_now" >&5 +$as_echo "$ax_cv_check_ldflags___Wl__z_now" >&6; } +if test "x$ax_cv_check_ldflags___Wl__z_now" = xyes; then : + + + + + +for flag in -Wl,-z,now; do + as_CACHEVAR=`$as_echo "ax_cv_check_ldflags_$ax_compiler_flags_test_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts $flag" >&5 +$as_echo_n "checking whether the linker accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS $ax_compiler_flags_test $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then : + +if ${AM_LDFLAGS+:} false; then : + + case " $AM_LDFLAGS " in #( + *" $flag "*) : + { { $as_echo "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS already contains \$flag"; } >&5 + (: AM_LDFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } ;; #( + *) : + + as_fn_append AM_LDFLAGS " $flag" + { { $as_echo "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS=\"\$AM_LDFLAGS\""; } >&5 + (: AM_LDFLAGS="$AM_LDFLAGS") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; +esac + +else + + AM_LDFLAGS=$flag + { { $as_echo "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS=\"\$AM_LDFLAGS\""; } >&5 + (: AM_LDFLAGS="$AM_LDFLAGS") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + +fi + +else + : +fi + +done + + +else + : +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,-z,noexecstack" >&5 +$as_echo_n "checking whether the linker accepts -Wl,-z,noexecstack... " >&6; } +if ${ax_cv_check_ldflags___Wl__z_noexecstack+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,-z,noexecstack" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_cv_check_ldflags___Wl__z_noexecstack=yes +else + ax_cv_check_ldflags___Wl__z_noexecstack=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___Wl__z_noexecstack" >&5 +$as_echo "$ax_cv_check_ldflags___Wl__z_noexecstack" >&6; } +if test "x$ax_cv_check_ldflags___Wl__z_noexecstack" = xyes; then : + + + + + +for flag in -Wl,-z,noexecstack; do + as_CACHEVAR=`$as_echo "ax_cv_check_ldflags_$ax_compiler_flags_test_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts $flag" >&5 +$as_echo_n "checking whether the linker accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS $ax_compiler_flags_test $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then : + +if ${AM_LDFLAGS+:} false; then : + + case " $AM_LDFLAGS " in #( + *" $flag "*) : + { { $as_echo "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS already contains \$flag"; } >&5 + (: AM_LDFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } ;; #( + *) : + + as_fn_append AM_LDFLAGS " $flag" + { { $as_echo "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS=\"\$AM_LDFLAGS\""; } >&5 + (: AM_LDFLAGS="$AM_LDFLAGS") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; +esac + +else + + AM_LDFLAGS=$flag + { { $as_echo "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS=\"\$AM_LDFLAGS\""; } >&5 + (: AM_LDFLAGS="$AM_LDFLAGS") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + +fi + +else + : +fi + +done + + +else + : +fi + + # textonly, retpolineplt not yet + + # macOS and cygwin linker do not have --as-needed { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,--no-as-needed" >&5 $as_echo_n "checking whether the linker accepts -Wl,--no-as-needed... " >&6; } if ${ax_cv_check_ldflags___Wl___no_as_needed+:} false; then : @@ -17442,7 +17995,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.59.2, which was +This file was extended by gobject-introspection $as_me 1.59.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17508,7 +18061,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.59.2 +gobject-introspection config.status 1.59.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 1a35f1f..bc3567f 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, 59) -m4_define(gi_micro_version, 2) +m4_define(gi_micro_version, 3) m4_define(gi_version, gi_major_version.gi_minor_version.gi_micro_version) AC_PREREQ([2.63]) diff --git a/docs/meson.build b/docs/meson.build index cebaad8..6c33587 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -1,6 +1,6 @@ install_man('g-ir-compiler.1', 'g-ir-generate.1', 'g-ir-scanner.1') install_data('gir-1.2.rnc', install_dir: join_paths(get_option('datadir'), 'gir-1.0')) -if get_option('gtk-doc') +if get_option('gtk_doc') subdir('reference') endif diff --git a/docs/reference/html/gi-Version-Information.html b/docs/reference/html/gi-Version-Information.html index e029607..a9a66e8 100644 --- a/docs/reference/html/gi-Version-Information.html +++ b/docs/reference/html/gi-Version-Information.html @@ -199,7 +199,7 @@ gi_get_micro_version (void

GI_MICRO_VERSION

-
#define GI_MICRO_VERSION 2
+
#define GI_MICRO_VERSION 3
 

The micro version number of the girepository library.

Since: 1.60

diff --git a/docs/reference/html/index.html b/docs/reference/html/index.html index ea63ee4..af0d806 100644 --- a/docs/reference/html/index.html +++ b/docs/reference/html/index.html @@ -16,7 +16,7 @@

- This document is for libgirepository version 1.59.2 + This document is for libgirepository version 1.59.3 . The latest version of this documentation can be found on-line at https://developer.gnome.org/gi/unstable/. diff --git a/docs/reference/version.xml b/docs/reference/version.xml index 7b39b39..c1c39d3 100644 --- a/docs/reference/version.xml +++ b/docs/reference/version.xml @@ -1 +1 @@ -1.59.2 +1.59.3 diff --git a/gir/glib-2.0.c b/gir/glib-2.0.c index aa46726..89857cc 100644 --- a/gir/glib-2.0.c +++ b/gir/glib-2.0.c @@ -2740,11 +2740,16 @@ * G_ALIGNOF: * @a: a type-name * - * Return the minimum alignment required by the platform ABI for values of the given + * Return the minimal alignment required by the platform ABI for values of the given * type. The address of a variable or struct member of the given type must always be * a multiple of this alignment. For example, most platforms require int variables * to be aligned at a 4-byte boundary, so `G_ALIGNOF (int)` is 4 on most platforms. * + * Note this is not necessarily the same as the value returned by GCC’s + * `__alignof__` operator, which returns the preferred alignment for a type. + * The preferred alignment may be a stricter alignment than the minimal + * alignment. + * * Since: 2.60 */ @@ -24068,7 +24073,7 @@ /** * g_option_context_parse_strv: * @context: a #GOptionContext - * @arguments: (inout) (array null-terminated=1): a pointer to the + * @arguments: (inout) (array zero-terminated=1): a pointer to the * command line arguments (which must be in UTF-8 on Windows) * @error: a return location for errors * @@ -39373,6 +39378,15 @@ * A standard boolean type. * Variables of this type should only contain the value * %TRUE or %FALSE. + * + * Never directly compare the contents of a #gboolean variable with the values + * %TRUE or %FALSE. Use `if (condition)` to check a #gboolean is "true", instead + * of `if (condition == TRUE)`. Likewise use `if (!condition)` to check a + * #gboolean is "false". + * + * There is no validation when assigning to a #gboolean variable and so it could + * contain any value represented by a #gint. This is why the use of `if + * (condition)` is recommended. All non-zero values in C evaluate to "true". */ diff --git a/gir/meson.build b/gir/meson.build index 227af4f..6b372b7 100644 --- a/gir/meson.build +++ b/gir/meson.build @@ -1,6 +1,6 @@ cairo_conf = configuration_data() -if get_option('cairo-libname') != '' - cairo_library_name = get_option('cairo-libname') +if get_option('cairo_libname') != '' + cairo_library_name = get_option('cairo_libname') elif host_machine.system() == 'win32' cairo_library_name = 'libcairo-gobject-2.dll' elif host_machine.system() == 'darwin' @@ -98,7 +98,7 @@ if dep_type == 'pkgconfig' endif glib_headers = ret.stdout().strip().split('\n') # Get a list of all source files - glib_srcdir = get_option('glib-src-dir') + glib_srcdir = get_option('glib_src_dir') if glib_srcdir != '' ret = run_command(python, '-c', globber.format(join_paths(glib_srcdir, 'glib', '*.c'))) if ret.returncode() != 0 diff --git a/girepository/giversion.h b/girepository/giversion.h index 08aded1..1291eee 100644 --- a/girepository/giversion.h +++ b/girepository/giversion.h @@ -27,7 +27,7 @@ G_BEGIN_DECLS #define GI_MAJOR_VERSION 1 #define GI_MINOR_VERSION 59 -#define GI_MICRO_VERSION 2 +#define GI_MICRO_VERSION 3 #define GI_CHECK_VERSION(major,minor,micro) \ (GI_MAJOR_VERSION > (major) || \ diff --git a/giscanner/_version.py b/giscanner/_version.py index 735e36d..991fed2 100644 --- a/giscanner/_version.py +++ b/giscanner/_version.py @@ -1 +1 @@ -__version__ = '1.59.2' +__version__ = '1.59.3' diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py index a2d7ea5..df72121 100644 --- a/giscanner/scannermain.py +++ b/giscanner/scannermain.py @@ -428,6 +428,7 @@ def create_source_scanner(options, args): filenames = extract_filelist(options) else: filenames = extract_filenames(args) + filenames = [os.path.realpath(f) for f in filenames] if platform.system() == 'Darwin': options.cpp_undefines.append('__BLOCKS__') @@ -490,6 +491,29 @@ def write_output(data, options): _error("while writing output: %s" % (e.strerror, )) +def get_source_root_dirs(options, filenames): + if options.sources_top_dirs: + return [os.path.realpath(p) for p in options.sources_top_dirs] + + # None passed, we need to guess + filenames = [os.path.realpath(p) for p in filenames] + dirs = sorted(set([os.path.dirname(f) for f in filenames])) + + # We need commonpath (3.5+), otherwise give up + if not hasattr(os.path, "commonpath"): + return dirs + + if not dirs: + return [] + + common = os.path.commonpath(dirs) + # If the only common path is the root directory give up + if os.path.dirname(common) == common: + return dirs + + return [common] + + def scanner_main(args): parser = _get_option_parser() (options, args) = parser.parse_args(args) @@ -579,9 +603,9 @@ def scanner_main(args): transformer.namespace.c_includes = options.c_includes transformer.namespace.exported_packages = exported_packages - if not options.sources_top_dirs: - options.sources_top_dirs = [os.path.commonprefix(filenames).rpartition(os.path.sep)[0]] - writer = Writer(transformer.namespace, options.sources_top_dirs) + + sources_top_dirs = get_source_root_dirs(options, filenames) + writer = Writer(transformer.namespace, sources_top_dirs) data = writer.get_encoded_xml() write_output(data, options) diff --git a/giscanner/scannerparser.c b/giscanner/scannerparser.c index 0dda9ba..aa46714 100644 --- a/giscanner/scannerparser.c +++ b/giscanner/scannerparser.c @@ -251,7 +251,21 @@ static void set_or_merge_base_type (GISourceType *type, GISourceType *base) { - if (base->type == CTYPE_INVALID) + /* combine basic types like unsigned int and long long */ + if (base->type == CTYPE_BASIC_TYPE && type->type == CTYPE_BASIC_TYPE) + { + char *name = g_strdup_printf ("%s %s", type->name, base->name); + g_free (type->name); + type->name = name; + + type->storage_class_specifier |= base->storage_class_specifier; + type->type_qualifier |= base->type_qualifier; + type->function_specifier |= base->function_specifier; + type->is_bitfield |= base->is_bitfield; + + ctype_free (base); + } + else if (base->type == CTYPE_INVALID) { g_assert (base->base_type == NULL); @@ -271,7 +285,7 @@ set_or_merge_base_type (GISourceType *type, } -#line 275 "giscanner/scannerparser.c" /* yacc.c:338 */ +#line 289 "giscanner/scannerparser.c" /* yacc.c:338 */ # ifndef YY_NULLPTR # if defined __cplusplus # if 201103L <= __cplusplus @@ -464,7 +478,7 @@ extern int yydebug; union YYSTYPE { -#line 236 "giscanner/scannerparser.y" /* yacc.c:353 */ +#line 250 "giscanner/scannerparser.y" /* yacc.c:353 */ char *str; GList *list; @@ -475,7 +489,7 @@ union YYSTYPE FunctionSpecifier function_specifier; UnaryOperator unary_operator; -#line 479 "giscanner/scannerparser.c" /* yacc.c:353 */ +#line 493 "giscanner/scannerparser.c" /* yacc.c:353 */ }; typedef union YYSTYPE YYSTYPE; @@ -786,32 +800,32 @@ static const yytype_uint8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 330, 330, 339, 355, 361, 367, 374, 375, 379, - 387, 402, 416, 423, 424, 428, 429, 433, 437, 441, - 445, 449, 453, 460, 461, 465, 466, 470, 474, 497, - 504, 511, 515, 523, 527, 531, 535, 539, 543, 550, - 551, 563, 564, 570, 578, 589, 590, 596, 605, 606, - 618, 627, 628, 634, 640, 646, 655, 656, 662, 671, - 672, 681, 682, 691, 692, 701, 702, 713, 714, 725, - 726, 733, 734, 741, 742, 743, 744, 745, 746, 747, - 748, 749, 750, 751, 755, 756, 757, 764, 770, 788, - 795, 798, 803, 808, 821, 822, 827, 832, 837, 845, - 849, 856, 857, 861, 865, 869, 873, 877, 881, 888, - 895, 899, 903, 907, 912, 913, 914, 922, 942, 947, - 955, 960, 968, 969, 976, 996, 1001, 1002, 1007, 1015, - 1019, 1027, 1030, 1031, 1035, 1046, 1053, 1060, 1067, 1074, - 1081, 1090, 1090, 1099, 1107, 1115, 1127, 1131, 1135, 1139, - 1146, 1153, 1158, 1162, 1167, 1171, 1176, 1181, 1191, 1198, - 1207, 1212, 1216, 1227, 1240, 1241, 1248, 1252, 1259, 1264, - 1269, 1274, 1281, 1287, 1296, 1297, 1301, 1306, 1307, 1315, - 1319, 1324, 1329, 1334, 1339, 1345, 1355, 1361, 1374, 1381, - 1382, 1383, 1387, 1388, 1394, 1395, 1396, 1397, 1398, 1399, - 1403, 1404, 1405, 1409, 1410, 1414, 1415, 1419, 1420, 1424, - 1425, 1429, 1430, 1431, 1435, 1436, 1437, 1438, 1439, 1440, - 1441, 1442, 1443, 1444, 1448, 1449, 1450, 1451, 1452, 1458, - 1459, 1463, 1464, 1465, 1466, 1470, 1471, 1475, 1476, 1482, - 1489, 1496, 1500, 1517, 1522, 1527, 1532, 1537, 1542, 1549, - 1554, 1562, 1563, 1564, 1565 + 0, 344, 344, 353, 369, 375, 381, 388, 389, 393, + 401, 416, 430, 437, 438, 442, 443, 447, 451, 455, + 459, 463, 467, 474, 475, 479, 480, 484, 488, 511, + 518, 525, 529, 537, 541, 545, 549, 553, 557, 564, + 565, 577, 578, 584, 592, 603, 604, 610, 619, 620, + 632, 641, 642, 648, 654, 660, 669, 670, 676, 685, + 686, 695, 696, 705, 706, 715, 716, 727, 728, 739, + 740, 747, 748, 755, 756, 757, 758, 759, 760, 761, + 762, 763, 764, 765, 769, 770, 771, 778, 784, 802, + 809, 812, 817, 822, 827, 828, 833, 838, 843, 851, + 855, 862, 863, 867, 871, 875, 879, 883, 887, 894, + 901, 905, 909, 913, 918, 919, 920, 928, 948, 953, + 961, 966, 974, 975, 982, 1002, 1007, 1008, 1013, 1021, + 1025, 1033, 1036, 1037, 1041, 1052, 1059, 1066, 1073, 1080, + 1087, 1096, 1096, 1105, 1113, 1121, 1133, 1137, 1141, 1145, + 1152, 1159, 1164, 1168, 1173, 1177, 1182, 1187, 1197, 1204, + 1213, 1218, 1222, 1233, 1246, 1247, 1254, 1258, 1265, 1270, + 1275, 1280, 1287, 1293, 1302, 1303, 1307, 1312, 1313, 1321, + 1325, 1330, 1335, 1340, 1345, 1351, 1361, 1367, 1380, 1387, + 1388, 1389, 1393, 1394, 1400, 1401, 1402, 1403, 1404, 1405, + 1409, 1410, 1411, 1415, 1416, 1420, 1421, 1425, 1426, 1430, + 1431, 1435, 1436, 1437, 1441, 1442, 1443, 1444, 1445, 1446, + 1447, 1448, 1449, 1450, 1454, 1455, 1456, 1457, 1458, 1464, + 1465, 1469, 1470, 1471, 1472, 1476, 1477, 1481, 1482, 1488, + 1495, 1502, 1506, 1523, 1528, 1533, 1538, 1543, 1548, 1555, + 1560, 1568, 1569, 1570, 1571 }; #endif @@ -2302,7 +2316,7 @@ yyreduce: switch (yyn) { case 2: -#line 331 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 345 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = g_hash_table_lookup (scanner->const_table, (yyvsp[0].str)); if ((yyval.symbol) == NULL) { @@ -2311,11 +2325,11 @@ yyreduce: (yyval.symbol) = gi_source_symbol_ref ((yyval.symbol)); } } -#line 2315 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2329 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 3: -#line 340 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 354 "giscanner/scannerparser.y" /* yacc.c:1645 */ { char *rest; guint64 value; @@ -2331,58 +2345,58 @@ yyreduce: (yyval.symbol)->const_int = value; (yyval.symbol)->const_int_is_unsigned = (rest && (rest[0] == 'U')); } -#line 2335 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2349 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 4: -#line 356 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 370 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_file, lineno); (yyval.symbol)->const_boolean_set = TRUE; (yyval.symbol)->const_boolean = g_ascii_strcasecmp (yytext, "true") == 0 ? TRUE : FALSE; } -#line 2345 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2359 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 5: -#line 362 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 376 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_file, lineno); (yyval.symbol)->const_int_set = TRUE; (yyval.symbol)->const_int = g_utf8_get_char(yytext + 1); } -#line 2355 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2369 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 6: -#line 368 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 382 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_file, lineno); (yyval.symbol)->const_double_set = TRUE; (yyval.symbol)->const_double = 0.0; sscanf (yytext, "%lf", &((yyval.symbol)->const_double)); } -#line 2366 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2380 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 8: -#line 376 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 390 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = (yyvsp[-1].symbol); } -#line 2374 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2388 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 9: -#line 380 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 394 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_file, lineno); } -#line 2382 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2396 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 10: -#line 388 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 402 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_file, lineno); yytext[strlen (yytext) - 1] = '\0'; @@ -2397,11 +2411,11 @@ yyreduce: } } -#line 2401 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2415 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 11: -#line 403 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 417 "giscanner/scannerparser.y" /* yacc.c:1645 */ { char *strings, *string2; (yyval.symbol) = (yyvsp[-1].symbol); @@ -2412,91 +2426,91 @@ yyreduce: g_free (string2); (yyval.symbol)->const_string = strings; } -#line 2416 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2430 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 12: -#line 417 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 431 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.str) = g_strdup (yytext); } -#line 2424 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2438 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 16: -#line 430 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 444 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_file, lineno); } -#line 2432 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2446 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 17: -#line 434 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 448 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_file, lineno); } -#line 2440 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2454 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 18: -#line 438 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 452 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_file, lineno); } -#line 2448 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2462 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 19: -#line 442 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 456 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_file, lineno); } -#line 2456 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2470 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 20: -#line 446 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 460 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_file, lineno); } -#line 2464 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2478 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 21: -#line 450 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 464 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_file, lineno); } -#line 2472 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2486 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 22: -#line 454 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 468 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_file, lineno); } -#line 2480 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2494 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 26: -#line 467 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 481 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_file, lineno); } -#line 2488 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2502 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 27: -#line 471 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 485 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_file, lineno); } -#line 2496 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2510 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 28: -#line 475 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 489 "giscanner/scannerparser.y" /* yacc.c:1645 */ { switch ((yyvsp[-1].unary_operator)) { case UNARY_PLUS: @@ -2519,98 +2533,98 @@ yyreduce: break; } } -#line 2523 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2537 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 29: -#line 498 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 512 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = (yyvsp[-1].symbol); if ((yyval.symbol)->const_int_set) { (yyval.symbol)->base_type = gi_source_basic_type_new ((yyval.symbol)->const_int_is_unsigned ? "guint64" : "gint64"); } } -#line 2534 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2548 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 30: -#line 505 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 519 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = (yyvsp[-1].symbol); if ((yyval.symbol)->const_int_set) { (yyval.symbol)->base_type = gi_source_basic_type_new ("guint64"); } } -#line 2545 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2559 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 31: -#line 512 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 526 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_file, lineno); } -#line 2553 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2567 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 32: -#line 516 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 530 "giscanner/scannerparser.y" /* yacc.c:1645 */ { ctype_free ((yyvsp[-1].ctype)); (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_file, lineno); } -#line 2562 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2576 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 33: -#line 524 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 538 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.unary_operator) = UNARY_ADDRESS_OF; } -#line 2570 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2584 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 34: -#line 528 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 542 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.unary_operator) = UNARY_POINTER_INDIRECTION; } -#line 2578 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2592 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 35: -#line 532 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 546 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.unary_operator) = UNARY_PLUS; } -#line 2586 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2600 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 36: -#line 536 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 550 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.unary_operator) = UNARY_MINUS; } -#line 2594 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2608 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 37: -#line 540 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 554 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.unary_operator) = UNARY_BITWISE_COMPLEMENT; } -#line 2602 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2616 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 38: -#line 544 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 558 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.unary_operator) = UNARY_LOGICAL_NEGATION; } -#line 2610 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2624 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 40: -#line 552 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 566 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = (yyvsp[0].symbol); if ((yyval.symbol)->const_int_set || (yyval.symbol)->const_double_set || (yyval.symbol)->const_string != NULL) { @@ -2619,21 +2633,21 @@ yyreduce: ctype_free ((yyvsp[-2].ctype)); } } -#line 2623 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2637 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 42: -#line 565 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 579 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_file, lineno); (yyval.symbol)->const_int_set = TRUE; (yyval.symbol)->const_int = (yyvsp[-2].symbol)->const_int * (yyvsp[0].symbol)->const_int; } -#line 2633 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2647 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 43: -#line 571 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 585 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_file, lineno); (yyval.symbol)->const_int_set = TRUE; @@ -2641,11 +2655,11 @@ yyreduce: (yyval.symbol)->const_int = (yyvsp[-2].symbol)->const_int / (yyvsp[0].symbol)->const_int; } } -#line 2645 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2659 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 44: -#line 579 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 593 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_file, lineno); (yyval.symbol)->const_int_set = TRUE; @@ -2653,31 +2667,31 @@ yyreduce: (yyval.symbol)->const_int = (yyvsp[-2].symbol)->const_int % (yyvsp[0].symbol)->const_int; } } -#line 2657 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2671 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 46: -#line 591 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 605 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_file, lineno); (yyval.symbol)->const_int_set = TRUE; (yyval.symbol)->const_int = (yyvsp[-2].symbol)->const_int + (yyvsp[0].symbol)->const_int; } -#line 2667 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2681 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 47: -#line 597 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 611 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_file, lineno); (yyval.symbol)->const_int_set = TRUE; (yyval.symbol)->const_int = (yyvsp[-2].symbol)->const_int - (yyvsp[0].symbol)->const_int; } -#line 2677 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2691 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 49: -#line 607 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 621 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_file, lineno); (yyval.symbol)->const_int_set = TRUE; @@ -2689,111 +2703,111 @@ yyreduce: */ is_bitfield = TRUE; } -#line 2693 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2707 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 50: -#line 619 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 633 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_file, lineno); (yyval.symbol)->const_int_set = TRUE; (yyval.symbol)->const_int = (yyvsp[-2].symbol)->const_int >> (yyvsp[0].symbol)->const_int; } -#line 2703 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2717 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 52: -#line 629 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 643 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_file, lineno); (yyval.symbol)->const_int_set = TRUE; (yyval.symbol)->const_int = (yyvsp[-2].symbol)->const_int < (yyvsp[0].symbol)->const_int; } -#line 2713 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2727 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 53: -#line 635 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 649 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_file, lineno); (yyval.symbol)->const_int_set = TRUE; (yyval.symbol)->const_int = (yyvsp[-2].symbol)->const_int > (yyvsp[0].symbol)->const_int; } -#line 2723 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2737 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 54: -#line 641 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 655 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_file, lineno); (yyval.symbol)->const_int_set = TRUE; (yyval.symbol)->const_int = (yyvsp[-2].symbol)->const_int <= (yyvsp[0].symbol)->const_int; } -#line 2733 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2747 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 55: -#line 647 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 661 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_file, lineno); (yyval.symbol)->const_int_set = TRUE; (yyval.symbol)->const_int = (yyvsp[-2].symbol)->const_int >= (yyvsp[0].symbol)->const_int; } -#line 2743 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2757 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 57: -#line 657 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 671 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_file, lineno); (yyval.symbol)->const_int_set = TRUE; (yyval.symbol)->const_int = (yyvsp[-2].symbol)->const_int == (yyvsp[0].symbol)->const_int; } -#line 2753 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2767 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 58: -#line 663 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 677 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_file, lineno); (yyval.symbol)->const_int_set = TRUE; (yyval.symbol)->const_int = (yyvsp[-2].symbol)->const_int != (yyvsp[0].symbol)->const_int; } -#line 2763 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2777 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 60: -#line 673 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 687 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_file, lineno); (yyval.symbol)->const_int_set = TRUE; (yyval.symbol)->const_int = (yyvsp[-2].symbol)->const_int & (yyvsp[0].symbol)->const_int; } -#line 2773 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2787 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 62: -#line 683 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 697 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_file, lineno); (yyval.symbol)->const_int_set = TRUE; (yyval.symbol)->const_int = (yyvsp[-2].symbol)->const_int ^ (yyvsp[0].symbol)->const_int; } -#line 2783 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2797 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 64: -#line 693 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 707 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_file, lineno); (yyval.symbol)->const_int_set = TRUE; (yyval.symbol)->const_int = (yyvsp[-2].symbol)->const_int | (yyvsp[0].symbol)->const_int; } -#line 2793 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2807 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 66: -#line 703 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 717 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_file, lineno); (yyval.symbol)->const_int_set = TRUE; @@ -2801,11 +2815,11 @@ yyreduce: gi_source_symbol_get_const_boolean ((yyvsp[-2].symbol)) && gi_source_symbol_get_const_boolean ((yyvsp[0].symbol)); } -#line 2805 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2819 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 68: -#line 715 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 729 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_file, lineno); (yyval.symbol)->const_int_set = TRUE; @@ -2813,35 +2827,35 @@ yyreduce: gi_source_symbol_get_const_boolean ((yyvsp[-2].symbol)) || gi_source_symbol_get_const_boolean ((yyvsp[0].symbol)); } -#line 2817 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2831 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 70: -#line 727 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 741 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_get_const_boolean ((yyvsp[-4].symbol)) ? (yyvsp[-2].symbol) : (yyvsp[0].symbol); } -#line 2825 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2839 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 72: -#line 735 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 749 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_file, lineno); } -#line 2833 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2847 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 86: -#line 758 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 772 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_file, lineno); } -#line 2841 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2855 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 88: -#line 771 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 785 "giscanner/scannerparser.y" /* yacc.c:1645 */ { GList *l; for (l = (yyvsp[-1].list); l != NULL; l = l->next) { @@ -2859,204 +2873,196 @@ yyreduce: } ctype_free ((yyvsp[-2].ctype)); } -#line 2863 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2877 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 89: -#line 789 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 803 "giscanner/scannerparser.y" /* yacc.c:1645 */ { ctype_free ((yyvsp[-1].ctype)); } -#line 2871 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2885 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 91: -#line 799 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 813 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.ctype) = (yyvsp[0].ctype); (yyval.ctype)->storage_class_specifier |= (yyvsp[-1].storage_class_specifier); } -#line 2880 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2894 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 92: -#line 804 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 818 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.ctype) = gi_source_type_new (CTYPE_INVALID); (yyval.ctype)->storage_class_specifier |= (yyvsp[0].storage_class_specifier); } -#line 2889 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2903 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 93: -#line 809 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 823 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.ctype) = (yyvsp[-1].ctype); - /* combine basic types like unsigned int and long long */ - if ((yyval.ctype)->type == CTYPE_BASIC_TYPE && (yyvsp[0].ctype)->type == CTYPE_BASIC_TYPE) { - char *name = g_strdup_printf ("%s %s", (yyval.ctype)->name, (yyvsp[0].ctype)->name); - g_free ((yyval.ctype)->name); - (yyval.ctype)->name = name; - ctype_free ((yyvsp[0].ctype)); - } else { - set_or_merge_base_type ((yyvsp[-1].ctype), (yyvsp[0].ctype)); - } + set_or_merge_base_type ((yyvsp[-1].ctype), (yyvsp[0].ctype)); } -#line 2906 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2912 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 95: -#line 823 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 829 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.ctype) = (yyvsp[0].ctype); (yyval.ctype)->type_qualifier |= (yyvsp[-1].type_qualifier); } -#line 2915 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2921 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 96: -#line 828 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 834 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.ctype) = gi_source_type_new (CTYPE_INVALID); (yyval.ctype)->type_qualifier |= (yyvsp[0].type_qualifier); } -#line 2924 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2930 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 97: -#line 833 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 839 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.ctype) = (yyvsp[0].ctype); (yyval.ctype)->function_specifier |= (yyvsp[-1].function_specifier); } -#line 2933 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2939 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 98: -#line 838 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 844 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.ctype) = gi_source_type_new (CTYPE_INVALID); (yyval.ctype)->function_specifier |= (yyvsp[0].function_specifier); } -#line 2942 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2948 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 99: -#line 846 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 852 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.list) = g_list_append (NULL, (yyvsp[0].symbol)); } -#line 2950 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2956 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 100: -#line 850 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 856 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.list) = g_list_append ((yyvsp[-2].list), (yyvsp[0].symbol)); } -#line 2958 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2964 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 103: -#line 862 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 868 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.storage_class_specifier) = STORAGE_CLASS_TYPEDEF; } -#line 2966 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2972 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 104: -#line 866 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 872 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.storage_class_specifier) = STORAGE_CLASS_EXTERN; } -#line 2974 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2980 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 105: -#line 870 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 876 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.storage_class_specifier) = STORAGE_CLASS_STATIC; } -#line 2982 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2988 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 106: -#line 874 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 880 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.storage_class_specifier) = STORAGE_CLASS_AUTO; } -#line 2990 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 2996 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 107: -#line 878 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 884 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.storage_class_specifier) = STORAGE_CLASS_REGISTER; } -#line 2998 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3004 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 108: -#line 882 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 888 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.storage_class_specifier) = STORAGE_CLASS_THREAD_LOCAL; } -#line 3006 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3012 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 109: -#line 889 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 895 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.str) = g_strdup (yytext); } -#line 3014 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3020 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 110: -#line 896 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 902 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.ctype) = gi_source_type_new (CTYPE_VOID); } -#line 3022 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3028 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 111: -#line 900 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 906 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.ctype) = gi_source_basic_type_new ("signed"); } -#line 3030 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3036 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 112: -#line 904 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 910 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.ctype) = gi_source_basic_type_new ("unsigned"); } -#line 3038 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3044 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 113: -#line 908 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 914 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.ctype) = gi_source_type_new (CTYPE_BASIC_TYPE); (yyval.ctype)->name = (yyvsp[0].str); } -#line 3047 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3053 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 116: -#line 915 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 921 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.ctype) = gi_source_typedef_new ((yyvsp[0].str)); g_free ((yyvsp[0].str)); } -#line 3056 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3062 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 117: -#line 923 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 929 "giscanner/scannerparser.y" /* yacc.c:1645 */ { GISourceSymbol *sym; (yyval.ctype) = (yyvsp[-4].ctype); @@ -3076,55 +3082,55 @@ yyreduce: gi_source_scanner_add_symbol (scanner, sym); gi_source_symbol_unref (sym); } -#line 3080 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3086 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 118: -#line 943 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 949 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.ctype) = (yyvsp[-3].ctype); (yyval.ctype)->child_list = (yyvsp[-1].list); } -#line 3089 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3095 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 119: -#line 948 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 954 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.ctype) = (yyvsp[-1].ctype); (yyval.ctype)->name = (yyvsp[0].str); } -#line 3098 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3104 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 120: -#line 956 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 962 "giscanner/scannerparser.y" /* yacc.c:1645 */ { scanner->private = FALSE; (yyval.ctype) = gi_source_struct_new (NULL); } -#line 3107 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3113 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 121: -#line 961 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 967 "giscanner/scannerparser.y" /* yacc.c:1645 */ { scanner->private = FALSE; (yyval.ctype) = gi_source_union_new (NULL); } -#line 3116 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3122 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 123: -#line 970 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 976 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.list) = g_list_concat ((yyvsp[-1].list), (yyvsp[0].list)); } -#line 3124 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3130 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 124: -#line 977 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 983 "giscanner/scannerparser.y" /* yacc.c:1645 */ { GList *l; (yyval.list) = NULL; @@ -3141,70 +3147,70 @@ yyreduce: } ctype_free ((yyvsp[-2].ctype)); } -#line 3145 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3151 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 125: -#line 997 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1003 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.ctype) = (yyvsp[-1].ctype); set_or_merge_base_type ((yyvsp[-1].ctype), (yyvsp[0].ctype)); } -#line 3154 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3160 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 127: -#line 1003 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1009 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.ctype) = (yyvsp[0].ctype); (yyval.ctype)->type_qualifier |= (yyvsp[-1].type_qualifier); } -#line 3163 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3169 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 128: -#line 1008 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1014 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.ctype) = gi_source_type_new (CTYPE_INVALID); (yyval.ctype)->type_qualifier |= (yyvsp[0].type_qualifier); } -#line 3172 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3178 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 129: -#line 1016 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1022 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.list) = g_list_append (NULL, (yyvsp[0].symbol)); } -#line 3180 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3186 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 130: -#line 1020 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1026 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.list) = g_list_append ((yyvsp[-2].list), (yyvsp[0].symbol)); } -#line 3188 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3194 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 131: -#line 1027 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1033 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_file, lineno); } -#line 3196 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3202 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 133: -#line 1032 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1038 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_file, lineno); } -#line 3204 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3210 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 134: -#line 1036 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1042 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = (yyvsp[-2].symbol); if ((yyvsp[0].symbol)->const_int_set) { @@ -3212,99 +3218,99 @@ yyreduce: (yyval.symbol)->const_int = (yyvsp[0].symbol)->const_int; } } -#line 3216 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3222 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 135: -#line 1047 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1053 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.ctype) = gi_source_enum_new ((yyvsp[-3].str)); (yyval.ctype)->child_list = (yyvsp[-1].list); (yyval.ctype)->is_bitfield = is_bitfield || scanner->flags; last_enum_value = -1; } -#line 3227 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3233 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 136: -#line 1054 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1060 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.ctype) = gi_source_enum_new (NULL); (yyval.ctype)->child_list = (yyvsp[-1].list); (yyval.ctype)->is_bitfield = is_bitfield || scanner->flags; last_enum_value = -1; } -#line 3238 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3244 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 137: -#line 1061 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1067 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.ctype) = gi_source_enum_new ((yyvsp[-4].str)); (yyval.ctype)->child_list = (yyvsp[-2].list); (yyval.ctype)->is_bitfield = is_bitfield || scanner->flags; last_enum_value = -1; } -#line 3249 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3255 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 138: -#line 1068 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1074 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.ctype) = gi_source_enum_new (NULL); (yyval.ctype)->child_list = (yyvsp[-2].list); (yyval.ctype)->is_bitfield = is_bitfield || scanner->flags; last_enum_value = -1; } -#line 3260 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3266 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 139: -#line 1075 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1081 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.ctype) = gi_source_enum_new ((yyvsp[0].str)); } -#line 3268 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3274 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 140: -#line 1082 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1088 "giscanner/scannerparser.y" /* yacc.c:1645 */ { scanner->flags = FALSE; scanner->private = FALSE; } -#line 3277 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3283 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 141: -#line 1090 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1096 "giscanner/scannerparser.y" /* yacc.c:1645 */ { /* reset flag before the first enum value */ is_bitfield = FALSE; } -#line 3286 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3292 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 142: -#line 1095 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1101 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyvsp[0].symbol)->private = scanner->private; (yyval.list) = g_list_append (NULL, (yyvsp[0].symbol)); } -#line 3295 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3301 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 143: -#line 1100 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1106 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyvsp[0].symbol)->private = scanner->private; (yyval.list) = g_list_append ((yyvsp[-2].list), (yyvsp[0].symbol)); } -#line 3304 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3310 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 144: -#line 1108 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1114 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_OBJECT, scanner->current_file, lineno); (yyval.symbol)->ident = (yyvsp[0].str); @@ -3312,11 +3318,11 @@ yyreduce: (yyval.symbol)->const_int = ++last_enum_value; g_hash_table_insert (scanner->const_table, g_strdup ((yyval.symbol)->ident), gi_source_symbol_ref ((yyval.symbol))); } -#line 3316 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3322 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 145: -#line 1116 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1122 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_OBJECT, scanner->current_file, lineno); (yyval.symbol)->ident = (yyvsp[-2].str); @@ -3325,95 +3331,95 @@ yyreduce: last_enum_value = (yyval.symbol)->const_int; g_hash_table_insert (scanner->const_table, g_strdup ((yyval.symbol)->ident), gi_source_symbol_ref ((yyval.symbol))); } -#line 3329 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3335 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 146: -#line 1128 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1134 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.type_qualifier) = TYPE_QUALIFIER_CONST; } -#line 3337 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3343 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 147: -#line 1132 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1138 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.type_qualifier) = TYPE_QUALIFIER_RESTRICT; } -#line 3345 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3351 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 148: -#line 1136 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1142 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.type_qualifier) = TYPE_QUALIFIER_EXTENSION; } -#line 3353 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3359 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 149: -#line 1140 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1146 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.type_qualifier) = TYPE_QUALIFIER_VOLATILE; } -#line 3361 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3367 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 150: -#line 1147 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1153 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.function_specifier) = FUNCTION_INLINE; } -#line 3369 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3375 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 151: -#line 1154 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1160 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = (yyvsp[0].symbol); gi_source_symbol_merge_type ((yyval.symbol), (yyvsp[-1].ctype)); } -#line 3378 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3384 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 153: -#line 1163 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1169 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_file, lineno); (yyval.symbol)->ident = (yyvsp[0].str); } -#line 3387 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3393 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 154: -#line 1168 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1174 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = (yyvsp[-1].symbol); } -#line 3395 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3401 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 155: -#line 1172 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1178 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = (yyvsp[-3].symbol); gi_source_symbol_merge_type ((yyval.symbol), gi_source_array_new ((yyvsp[-1].symbol))); } -#line 3404 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3410 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 156: -#line 1177 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1183 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = (yyvsp[-2].symbol); gi_source_symbol_merge_type ((yyval.symbol), gi_source_array_new (NULL)); } -#line 3413 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3419 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 157: -#line 1182 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1188 "giscanner/scannerparser.y" /* yacc.c:1645 */ { GISourceType *func = gi_source_function_new (); // ignore (void) parameter list @@ -3423,49 +3429,49 @@ yyreduce: (yyval.symbol) = (yyvsp[-3].symbol); gi_source_symbol_merge_type ((yyval.symbol), func); } -#line 3427 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3433 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 158: -#line 1192 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1198 "giscanner/scannerparser.y" /* yacc.c:1645 */ { GISourceType *func = gi_source_function_new (); func->child_list = (yyvsp[-1].list); (yyval.symbol) = (yyvsp[-3].symbol); gi_source_symbol_merge_type ((yyval.symbol), func); } -#line 3438 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3444 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 159: -#line 1199 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1205 "giscanner/scannerparser.y" /* yacc.c:1645 */ { GISourceType *func = gi_source_function_new (); (yyval.symbol) = (yyvsp[-2].symbol); gi_source_symbol_merge_type ((yyval.symbol), func); } -#line 3448 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3454 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 160: -#line 1208 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1214 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.ctype) = gi_source_pointer_new (NULL); (yyval.ctype)->type_qualifier = (yyvsp[0].type_qualifier); } -#line 3457 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3463 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 161: -#line 1213 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1219 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.ctype) = gi_source_pointer_new (NULL); } -#line 3465 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3471 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 162: -#line 1217 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1223 "giscanner/scannerparser.y" /* yacc.c:1645 */ { GISourceType **base = &((yyvsp[0].ctype)->base_type); @@ -3476,11 +3482,11 @@ yyreduce: (*base)->type_qualifier = (yyvsp[-1].type_qualifier); (yyval.ctype) = (yyvsp[0].ctype); } -#line 3480 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3486 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 163: -#line 1228 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1234 "giscanner/scannerparser.y" /* yacc.c:1645 */ { GISourceType **base = &((yyvsp[0].ctype)->base_type); @@ -3490,162 +3496,162 @@ yyreduce: *base = gi_source_pointer_new (NULL); (yyval.ctype) = (yyvsp[0].ctype); } -#line 3494 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3500 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 165: -#line 1242 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1248 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.type_qualifier) = (yyvsp[-1].type_qualifier) | (yyvsp[0].type_qualifier); } -#line 3502 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3508 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 166: -#line 1249 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1255 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.list) = g_list_append (NULL, (yyvsp[0].symbol)); } -#line 3510 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3516 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 167: -#line 1253 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1259 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.list) = g_list_append ((yyvsp[-2].list), (yyvsp[0].symbol)); } -#line 3518 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3524 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 168: -#line 1260 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1266 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = (yyvsp[0].symbol); gi_source_symbol_merge_type ((yyval.symbol), (yyvsp[-1].ctype)); } -#line 3527 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3533 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 169: -#line 1265 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1271 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = (yyvsp[0].symbol); gi_source_symbol_merge_type ((yyval.symbol), (yyvsp[-1].ctype)); } -#line 3536 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3542 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 170: -#line 1270 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1276 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_file, lineno); (yyval.symbol)->base_type = (yyvsp[0].ctype); } -#line 3545 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3551 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 171: -#line 1275 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1281 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_ELLIPSIS, scanner->current_file, lineno); } -#line 3553 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3559 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 172: -#line 1282 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1288 "giscanner/scannerparser.y" /* yacc.c:1645 */ { GISourceSymbol *sym = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_file, lineno); sym->ident = (yyvsp[0].str); (yyval.list) = g_list_append (NULL, sym); } -#line 3563 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3569 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 173: -#line 1288 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1294 "giscanner/scannerparser.y" /* yacc.c:1645 */ { GISourceSymbol *sym = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_file, lineno); sym->ident = (yyvsp[0].str); (yyval.list) = g_list_append ((yyvsp[-2].list), sym); } -#line 3573 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3579 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 176: -#line 1302 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1308 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_file, lineno); gi_source_symbol_merge_type ((yyval.symbol), (yyvsp[0].ctype)); } -#line 3582 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3588 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 178: -#line 1308 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1314 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = (yyvsp[0].symbol); gi_source_symbol_merge_type ((yyval.symbol), (yyvsp[-1].ctype)); } -#line 3591 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3597 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 179: -#line 1316 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1322 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = (yyvsp[-1].symbol); } -#line 3599 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3605 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 180: -#line 1320 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1326 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_file, lineno); gi_source_symbol_merge_type ((yyval.symbol), gi_source_array_new (NULL)); } -#line 3608 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3614 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 181: -#line 1325 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1331 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_file, lineno); gi_source_symbol_merge_type ((yyval.symbol), gi_source_array_new ((yyvsp[-1].symbol))); } -#line 3617 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3623 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 182: -#line 1330 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1336 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = (yyvsp[-2].symbol); gi_source_symbol_merge_type ((yyval.symbol), gi_source_array_new (NULL)); } -#line 3626 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3632 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 183: -#line 1335 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1341 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.symbol) = (yyvsp[-3].symbol); gi_source_symbol_merge_type ((yyval.symbol), gi_source_array_new ((yyvsp[-1].symbol))); } -#line 3635 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3641 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 184: -#line 1340 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1346 "giscanner/scannerparser.y" /* yacc.c:1645 */ { GISourceType *func = gi_source_function_new (); (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_file, lineno); gi_source_symbol_merge_type ((yyval.symbol), func); } -#line 3645 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3651 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 185: -#line 1346 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1352 "giscanner/scannerparser.y" /* yacc.c:1645 */ { GISourceType *func = gi_source_function_new (); // ignore (void) parameter list @@ -3655,21 +3661,21 @@ yyreduce: (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_file, lineno); gi_source_symbol_merge_type ((yyval.symbol), func); } -#line 3659 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3665 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 186: -#line 1356 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1362 "giscanner/scannerparser.y" /* yacc.c:1645 */ { GISourceType *func = gi_source_function_new (); (yyval.symbol) = (yyvsp[-2].symbol); gi_source_symbol_merge_type ((yyval.symbol), func); } -#line 3669 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3675 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 187: -#line 1362 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1368 "giscanner/scannerparser.y" /* yacc.c:1645 */ { GISourceType *func = gi_source_function_new (); // ignore (void) parameter list @@ -3679,35 +3685,35 @@ yyreduce: (yyval.symbol) = (yyvsp[-3].symbol); gi_source_symbol_merge_type ((yyval.symbol), func); } -#line 3683 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3689 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 188: -#line 1375 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1381 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.str) = g_strdup (yytext); } -#line 3691 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3697 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 239: -#line 1483 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1489 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.str) = g_strdup (yytext + strlen ("#define ")); } -#line 3699 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3705 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 240: -#line 1490 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1496 "giscanner/scannerparser.y" /* yacc.c:1645 */ { (yyval.str) = g_strdup (yytext + strlen ("#define ")); } -#line 3707 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3713 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 242: -#line 1501 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1507 "giscanner/scannerparser.y" /* yacc.c:1645 */ { if ((yyvsp[0].symbol)->const_int_set || (yyvsp[0].symbol)->const_boolean_set || (yyvsp[0].symbol)->const_double_set || (yyvsp[0].symbol)->const_string != NULL) { GISourceSymbol *macro = gi_source_symbol_copy ((yyvsp[0].symbol)); @@ -3721,85 +3727,85 @@ yyreduce: gi_source_symbol_unref ((yyvsp[0].symbol)); } } -#line 3725 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3731 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 243: -#line 1518 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1524 "giscanner/scannerparser.y" /* yacc.c:1645 */ { push_conditional (scanner, FOR_GI_SCANNER); update_skipping (scanner); } -#line 3734 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3740 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 244: -#line 1523 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1529 "giscanner/scannerparser.y" /* yacc.c:1645 */ { push_conditional (scanner, NOT_GI_SCANNER); update_skipping (scanner); } -#line 3743 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3749 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 245: -#line 1528 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1534 "giscanner/scannerparser.y" /* yacc.c:1645 */ { warn_if_cond_has_gi_scanner (scanner, yytext); push_conditional (scanner, IRRELEVANT); } -#line 3752 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3758 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 246: -#line 1533 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1539 "giscanner/scannerparser.y" /* yacc.c:1645 */ { warn_if_cond_has_gi_scanner (scanner, yytext); push_conditional (scanner, IRRELEVANT); } -#line 3761 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3767 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 247: -#line 1538 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1544 "giscanner/scannerparser.y" /* yacc.c:1645 */ { warn_if_cond_has_gi_scanner (scanner, yytext); push_conditional (scanner, IRRELEVANT); } -#line 3770 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3776 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 248: -#line 1543 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1549 "giscanner/scannerparser.y" /* yacc.c:1645 */ { warn_if_cond_has_gi_scanner (scanner, yytext); pop_conditional (scanner); push_conditional (scanner, IRRELEVANT); update_skipping (scanner); } -#line 3781 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3787 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 249: -#line 1550 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1556 "giscanner/scannerparser.y" /* yacc.c:1645 */ { toggle_conditional (scanner); update_skipping (scanner); } -#line 3790 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3796 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; case 250: -#line 1555 "giscanner/scannerparser.y" /* yacc.c:1645 */ +#line 1561 "giscanner/scannerparser.y" /* yacc.c:1645 */ { pop_conditional (scanner); update_skipping (scanner); } -#line 3799 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3805 "giscanner/scannerparser.c" /* yacc.c:1645 */ break; -#line 3803 "giscanner/scannerparser.c" /* yacc.c:1645 */ +#line 3809 "giscanner/scannerparser.c" /* yacc.c:1645 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -4026,7 +4032,7 @@ yyreturn: #endif return yyresult; } -#line 1568 "giscanner/scannerparser.y" /* yacc.c:1903 */ +#line 1574 "giscanner/scannerparser.y" /* yacc.c:1903 */ static void yyerror (GISourceScanner *scanner, const char *s) diff --git a/giscanner/scannerparser.h b/giscanner/scannerparser.h index bf99944..b93dc21 100644 --- a/giscanner/scannerparser.h +++ b/giscanner/scannerparser.h @@ -203,7 +203,7 @@ extern int yydebug; union YYSTYPE { -#line 236 "giscanner/scannerparser.y" /* yacc.c:1906 */ +#line 250 "giscanner/scannerparser.y" /* yacc.c:1906 */ char *str; GList *list; diff --git a/giscanner/scannerparser.y b/giscanner/scannerparser.y index 7ce0236..29d98b4 100644 --- a/giscanner/scannerparser.y +++ b/giscanner/scannerparser.y @@ -211,7 +211,21 @@ static void set_or_merge_base_type (GISourceType *type, GISourceType *base) { - if (base->type == CTYPE_INVALID) + /* combine basic types like unsigned int and long long */ + if (base->type == CTYPE_BASIC_TYPE && type->type == CTYPE_BASIC_TYPE) + { + char *name = g_strdup_printf ("%s %s", type->name, base->name); + g_free (type->name); + type->name = name; + + type->storage_class_specifier |= base->storage_class_specifier; + type->type_qualifier |= base->type_qualifier; + type->function_specifier |= base->function_specifier; + type->is_bitfield |= base->is_bitfield; + + ctype_free (base); + } + else if (base->type == CTYPE_INVALID) { g_assert (base->base_type == NULL); @@ -808,15 +822,7 @@ declaration_specifiers | type_specifier declaration_specifiers { $$ = $1; - /* combine basic types like unsigned int and long long */ - if ($$->type == CTYPE_BASIC_TYPE && $2->type == CTYPE_BASIC_TYPE) { - char *name = g_strdup_printf ("%s %s", $$->name, $2->name); - g_free ($$->name); - $$->name = name; - ctype_free ($2); - } else { - set_or_merge_base_type ($1, $2); - } + set_or_merge_base_type ($1, $2); } | type_specifier | type_qualifier declaration_specifiers diff --git a/giscanner/transformer.py b/giscanner/transformer.py index a74cb6b..9911de7 100644 --- a/giscanner/transformer.py +++ b/giscanner/transformer.py @@ -484,8 +484,6 @@ raise ValueError.""" CTYPE_UNION, CTYPE_ENUM]: value = source_type.name - if not value: - value = 'gpointer' if const: value = 'const ' + value if volatile: @@ -553,36 +551,32 @@ raise ValueError.""" # Special handling for fields; we don't have annotations on them # to apply later, yet. if source_type.type == CTYPE_ARRAY: - complete_ctype = self._create_complete_source_type(source_type) + # Determine flattened array size and its element type. + flattened_size = 1 + while source_type.type == CTYPE_ARRAY: + for child in source_type.child_list: + if flattened_size is not None: + flattened_size *= child.const_int + break + else: + flattened_size = None + source_type = source_type.base_type + # If the array contains anonymous unions, like in the GValue # struct, we need to handle this specially. This is necessary # to be able to properly calculate the size of the compound # type (e.g. GValue) that contains this array, see # . - if (source_type.base_type.type == CTYPE_UNION - and source_type.base_type.name is None): - synthesized_type = self._synthesize_union_type(symbol, parent_symbol) - ftype = ast.Array(None, synthesized_type, complete_ctype=complete_ctype) + if source_type.type == CTYPE_UNION and source_type.name is None: + element_type = self._synthesize_union_type(symbol, parent_symbol) else: ctype = self._create_source_type(source_type) - canonical_ctype = self._canonicalize_ctype(ctype) - if canonical_ctype[-1] == '*': - derefed_name = canonical_ctype[:-1] - else: - derefed_name = canonical_ctype - if complete_ctype[-1] == '*': - derefed_complete_ctype = complete_ctype[:-1] - else: - derefed_complete_ctype = complete_ctype - from_ctype = self.create_type_from_ctype_string(ctype, - complete_ctype=complete_ctype) - ftype = ast.Array(None, from_ctype, - ctype=derefed_name, - complete_ctype=derefed_complete_ctype) - child_list = list(symbol.base_type.child_list) + complete_ctype = self._create_complete_source_type(source_type) + element_type = self.create_type_from_ctype_string(ctype, + complete_ctype=complete_ctype) + ftype = ast.Array(None, element_type) ftype.zeroterminated = False - if child_list: - ftype.size = child_list[0].const_int + ftype.size = flattened_size else: ftype = self._create_type_from_base(symbol.base_type) # ast.Fields are assumed to be read-write diff --git a/gobject-introspection-1.0.pc b/gobject-introspection-1.0.pc index 7970227..b20ed51 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.59.2 +Version: 1.59.3 diff --git a/gobject-introspection-no-export-1.0.pc b/gobject-introspection-no-export-1.0.pc index c93e9bc..6d9b704 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.59.2 +Version: 1.59.3 diff --git a/meson.build b/meson.build index 025f518..6b96778 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('gobject-introspection', 'c', - version: '1.59.2', + version: '1.59.3', meson_version: '>= 0.47.0', default_options: [ 'warning_level=1', @@ -75,7 +75,7 @@ config.set('GI_MINOR_VERSION', gi_versions[1]) config.set('GI_MICRO_VERSION', gi_versions[2]) config.set_quoted('GIR_SUFFIX', 'gir-1.0') -gir_dir_prefix = get_option('gir-dir-prefix') +gir_dir_prefix = get_option('gir_dir_prefix') if gir_dir_prefix == '' gir_dir_prefix = join_paths(get_option('prefix'), get_option('datadir')) gir_dir_pc_prefix = '${datadir}' @@ -151,6 +151,13 @@ if with_cairo cairo_gobject_dep = cc.find_library ('cairo-gobject') endif endif +else + warning('Not building with cairo support, not all tests will be run') +endif + +with_doctool = get_option('doctool') +if not with_doctool + warning('Not building with doctool support, not all tests will be run') endif subdir('girepository') @@ -168,8 +175,8 @@ prefix = get_option('prefix') pkgconfig_conf = configuration_data() pkgconfig_conf.set('prefix', prefix) pkgconfig_conf.set('exec_prefix', '${prefix}') -pkgconfig_conf.set('bindir', join_paths('${prefix}', get_option('bindir'))) -pkgconfig_conf.set('libdir', join_paths('${prefix}', get_option('libdir'))) +pkgconfig_conf.set('bindir', join_paths('${exec_prefix}', get_option('bindir'))) +pkgconfig_conf.set('libdir', join_paths('${exec_prefix}', get_option('libdir'))) pkgconfig_conf.set('datarootdir', join_paths('${prefix}', get_option('datadir'))) pkgconfig_conf.set('datadir', '${datarootdir}') pkgconfig_conf.set('includedir', join_paths('${prefix}', get_option('includedir'))) diff --git a/meson_options.txt b/meson_options.txt index f268607..445a68a 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -3,18 +3,18 @@ option('cairo', type: 'boolean', value : false, ) option('doctool', type: 'boolean', value : false, - description: 'Install g-ir-doc-tool' + description: 'Install g-ir-doc-tool and run related tests' ) -option('glib-src-dir', type: 'string', +option('glib_src_dir', type: 'string', description: 'Source directory for glib - needed to add docs to gir' ) -option('gtk-doc', type: 'boolean', value: false, +option('gtk_doc', type: 'boolean', value: false, description: 'Build and install documentation' ) -option('cairo-libname', type: 'string', +option('cairo_libname', type: 'string', description: 'Custom name for the cairo-gobject library name' ) @@ -22,6 +22,6 @@ option('python', type: 'string', value: 'python3', description: 'Path or name of the Python interpreter to build for' ) -option('gir-dir-prefix', type: 'string', +option('gir_dir_prefix', type: 'string', description: 'Intermediate prefix for gir installation under ${prefix}' ) diff --git a/tests/offsets/gitestoffsets.c b/tests/offsets/gitestoffsets.c index 538f321..a84e8e8 100644 --- a/tests/offsets/gitestoffsets.c +++ b/tests/offsets/gitestoffsets.c @@ -92,6 +92,16 @@ compiled (FILE *outfile) PRINT_MEMBER (OffsetsArray, some_ptrs); g_fprintf (outfile, "\n"); + PRINT_TYPE (OffsetsMultiDimArray); + PRINT_MEMBER (OffsetsMultiDimArray, ints); + PRINT_MEMBER (OffsetsMultiDimArray, chars); + PRINT_MEMBER (OffsetsMultiDimArray, floats); + PRINT_MEMBER (OffsetsMultiDimArray, pointers1); + PRINT_MEMBER (OffsetsMultiDimArray, pointers2); + PRINT_MEMBER (OffsetsMultiDimArray, pointers3); + PRINT_MEMBER (OffsetsMultiDimArray, dummy); + fprintf (outfile, "\n"); + PRINT_TYPE (OffsetsBasic); PRINT_MEMBER (OffsetsBasic, dummy1); PRINT_MEMBER (OffsetsBasic, field_int8); @@ -109,6 +119,11 @@ compiled (FILE *outfile) PRINT_MEMBER (OffsetsBasic, field_double); PRINT_MEMBER (OffsetsBasic, dummy8); PRINT_MEMBER (OffsetsBasic, field_size); + PRINT_MEMBER (OffsetsBasic, dummy9); + PRINT_MEMBER (OffsetsBasic, field_uchar1); + PRINT_MEMBER (OffsetsBasic, dummy10); + PRINT_MEMBER (OffsetsBasic, field_uchar2); + PRINT_MEMBER (OffsetsBasic, dummy11); g_fprintf (outfile, "\n"); PRINT_TYPE (OffsetsEnum); @@ -178,6 +193,7 @@ int main(int argc, char **argv) g_error ("Cannot open '%s': %s'", argv[1], g_strerror(errno)); introspected_struct (outfile, "Array"); + introspected_struct (outfile, "MultiDimArray"); introspected_struct (outfile, "Basic"); introspected_struct (outfile, "Enum"); introspected_struct (outfile, "Nested"); diff --git a/tests/offsets/offsets.h b/tests/offsets/offsets.h index 1048532..7d89fe8 100644 --- a/tests/offsets/offsets.h +++ b/tests/offsets/offsets.h @@ -30,6 +30,11 @@ struct _OffsetsBasic { gdouble field_double; char dummy8; gsize field_size; + char dummy9; + guchar field_uchar1; + char dummy10; + unsigned char field_uchar2; + char dummy11; }; typedef enum { @@ -119,6 +124,21 @@ struct _OffsetsArray gpointer some_ptrs[5]; }; +/* Test multi-dimensional arrays */ + +typedef struct _OffsetsMultiDimArray OffsetsMultiDimArray; + +struct _OffsetsMultiDimArray +{ + gint ints[10][2]; + gchar chars[255][10]; + float floats[11][13][17]; + gchar* pointers1[3][5]; + gpointer pointers2[7][9]; + double** pointers3[2][3][4]; + gchar dummy; +}; + /* Test object offsets */ typedef struct _OffsetsObj OffsetsObj; diff --git a/tests/scanner/Makefile.am b/tests/scanner/Makefile.am index 9e424d7..734f30e 100644 --- a/tests/scanner/Makefile.am +++ b/tests/scanner/Makefile.am @@ -235,7 +235,8 @@ PYTESTS = \ test_sourcescanner.py \ test_transformer.py \ test_xmlwriter.py \ - test_docwriter.py + test_docwriter.py \ + test_scanner.py TESTS = $(CHECKGIRS) $(CHECKDOCS) $(TYPELIBS) $(PYTESTS) TESTS_ENVIRONMENT = env srcdir=$(srcdir) top_srcdir=$(top_srcdir) builddir=$(builddir) top_builddir=$(top_builddir) \ diff --git a/tests/scanner/Makefile.in b/tests/scanner/Makefile.in index 2b60920..e1181cb 100644 --- a/tests/scanner/Makefile.in +++ b/tests/scanner/Makefile.in @@ -940,7 +940,8 @@ PYTESTS = \ test_sourcescanner.py \ test_transformer.py \ test_xmlwriter.py \ - test_docwriter.py + test_docwriter.py \ + test_scanner.py TESTS_ENVIRONMENT = env srcdir=$(srcdir) top_srcdir=$(top_srcdir) builddir=$(builddir) top_builddir=$(top_builddir) \ CC="$(CC)" \ @@ -1574,6 +1575,13 @@ test_docwriter.py.log: test_docwriter.py --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_scanner.py.log: test_scanner.py + @p='test_scanner.py'; \ + b='test_scanner.py'; \ + $(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); \ diff --git a/tests/scanner/Regress-1.0-C-expected/Regress.TestStructF-data7.page b/tests/scanner/Regress-1.0-C-expected/Regress.TestStructF-data7.page new file mode 100644 index 0000000..644c4c6 --- /dev/null +++ b/tests/scanner/Regress-1.0-C-expected/Regress.TestStructF-data7.page @@ -0,0 +1,14 @@ + + + + + + Regress.TestStructF->data7 + + + diff --git a/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestStructF-data7.page b/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestStructF-data7.page new file mode 100644 index 0000000..4b6c0da --- /dev/null +++ b/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestStructF-data7.page @@ -0,0 +1,18 @@ + + + + + data7 + + Regress.TestStructF.data7 + +TestStructF.data7: Number(guint8) (Read / Write) + + + + diff --git a/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestStructF.page b/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestStructF.page index feae9a2..41a8230 100644 --- a/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestStructF.page +++ b/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestStructF.page @@ -20,6 +20,7 @@ let testStructF = new Regress.TestStructF({ data4: value data5: value data6: value + data7: value }); diff --git a/tests/scanner/Regress-1.0-Python-expected/Regress.TestStructF-data7.page b/tests/scanner/Regress-1.0-Python-expected/Regress.TestStructF-data7.page new file mode 100644 index 0000000..644c4c6 --- /dev/null +++ b/tests/scanner/Regress-1.0-Python-expected/Regress.TestStructF-data7.page @@ -0,0 +1,14 @@ + + + + + + Regress.TestStructF->data7 + + + diff --git a/tests/scanner/Regress-1.0-expected.gir b/tests/scanner/Regress-1.0-expected.gir index 9236f9a..c10d50e 100644 --- a/tests/scanner/Regress-1.0-expected.gir +++ b/tests/scanner/Regress-1.0-expected.gir @@ -18,8 +18,8 @@ and/or use gtk-doc annotations. --> Typedef TestBoxed to test caller-allocates correctness - + line="1375">Typedef TestBoxed to test caller-allocates correctness + @@ -33,15 +33,15 @@ and/or use gtk-doc annotations. --> Compatibility typedef, like telepathy-glib's TpIntSet - + line="1345">Compatibility typedef, like telepathy-glib's TpIntSet + Typedef'd GPtrArray for some reason - + line="1353">Typedef'd GPtrArray for some reason + @@ -51,8 +51,8 @@ and/or use gtk-doc annotations. --> Typedef'd va_list for additional reasons - + line="1364">Typedef'd va_list for additional reasons + - + - + - + - + @@ -1209,23 +1207,21 @@ it says it's pointer but it's actually a string. line="236">This is a test of an array of object in an field of a struct. - + - + - + - + @@ -1235,7 +1231,7 @@ it says it's pointer but it's actually a string. - + @@ -2084,7 +2080,7 @@ uses a C sugar return type. - + @@ -2421,7 +2417,7 @@ exposed to language bindings. - + @@ -2460,13 +2456,13 @@ exposed to language bindings. - + - + Like telepathy-glib's TpIntset. - + line="1337">Like telepathy-glib's TpIntset. + - + - + - + @@ -2519,15 +2515,15 @@ exposed to language bindings. - + - + - + @@ -2544,13 +2540,13 @@ exposed to language bindings. - + - + introspectable="0"> This should be skipped, and moreover, all function which + line="1319">This should be skipped, and moreover, all function which use it should be. - + @@ -2617,7 +2613,7 @@ use it should be. glib:type-name="RegressTestBoxed" glib:get-type="regress_test_boxed_get_type" c:symbol-prefix="test_boxed"> - + @@ -2628,14 +2624,14 @@ use it should be. - + - + @@ -2647,7 +2643,7 @@ use it should be. - + @@ -2662,7 +2658,7 @@ use it should be. - + @@ -2675,7 +2671,7 @@ use it should be. - + @@ -2686,7 +2682,7 @@ use it should be. - + @@ -2697,7 +2693,7 @@ use it should be. - + @@ -2716,7 +2712,7 @@ use it should be. glib:type-name="RegressTestBoxedB" glib:get-type="regress_test_boxed_b_get_type" c:symbol-prefix="test_boxed_b"> - + @@ -2724,7 +2720,7 @@ use it should be. - + @@ -2738,7 +2734,7 @@ use it should be. - + @@ -2754,7 +2750,7 @@ use it should be. glib:type-name="RegressTestBoxedC" glib:get-type="regress_test_boxed_c_get_type" c:symbol-prefix="test_boxed_c"> - + @@ -2762,7 +2758,7 @@ use it should be. - + @@ -2773,9 +2769,9 @@ use it should be. glib:type-name="RegressTestBoxedD" glib:get-type="regress_test_boxed_d_get_type" c:symbol-prefix="test_boxed_d"> - + - + @@ -2789,7 +2785,7 @@ use it should be. - + @@ -2800,7 +2796,7 @@ use it should be. - + @@ -2811,7 +2807,7 @@ use it should be. - + @@ -2825,16 +2821,16 @@ use it should be. - + - + - + @@ -2859,7 +2855,7 @@ use it should be. - + @@ -2881,7 +2877,7 @@ use it should be. - + @@ -2889,25 +2885,25 @@ use it should be. the investment rate + line="1090">the investment rate how much money + line="1091">how much money Path to file + line="1092">Path to file - + @@ -2919,7 +2915,7 @@ use it should be. - + @@ -2927,7 +2923,7 @@ use it should be. a hash table; will be modified + line="1079">a hash table; will be modified @@ -2937,7 +2933,7 @@ use it should be. - + @@ -2945,20 +2941,20 @@ use it should be. GError instance; must be freed by the callback + line="1085">GError instance; must be freed by the callback - + - + @@ -3087,7 +3083,7 @@ use it should be. - + @@ -3127,9 +3123,9 @@ use it should be. glib:type-name="RegressTestFloating" glib:get-type="regress_test_floating_get_type" glib:type-struct="TestFloatingClass"> - + - + - + @@ -3162,9 +3158,9 @@ use it should be. glib:unref-func="regress_test_fundamental_object_unref" glib:set-value-func="regress_test_value_set_fundamental_object" glib:get-value-func="regress_test_value_get_fundamental_object"> - + - + @@ -3177,7 +3173,7 @@ use it should be. - + @@ -3189,7 +3185,7 @@ use it should be. - + - + @@ -3232,7 +3228,7 @@ use it should be. - + @@ -3247,7 +3243,7 @@ use it should be. - + @@ -3261,7 +3257,7 @@ use it should be. - + @@ -3280,10 +3276,10 @@ use it should be. glib:get-type="regress_test_fundamental_sub_object_get_type" glib:type-struct="TestFundamentalSubObjectClass" glib:fundamental="1"> - + - + @@ -3305,7 +3301,7 @@ use it should be. - + @@ -3429,10 +3425,10 @@ use it should be. glib:type-name="RegressTestInterface" glib:get-type="regress_test_interface_get_type" glib:type-struct="TestInterfaceIface"> - + - + @@ -3469,13 +3465,13 @@ use it should be. - + - + @@ -3487,15 +3483,15 @@ use it should be. glib:type-name="RegressTestObj" glib:get-type="regress_test_obj_get_type" glib:type-struct="TestObjClass"> - + - + - + @@ -3510,7 +3506,7 @@ use it should be. - + @@ -3537,7 +3533,7 @@ use it should be. - + @@ -3548,7 +3544,7 @@ use it should be. - + @@ -3568,7 +3564,7 @@ use it should be. - + @@ -3580,7 +3576,7 @@ use it should be. - + @@ -3595,7 +3591,7 @@ use it should be. - + @@ -3609,13 +3605,13 @@ use it should be. allow-none="1"> Another object + line="801">Another object - + @@ -3634,7 +3630,7 @@ use it should be. line="3130">This method is virtual. Notably its name differs from the virtual slot name, which makes it useful for testing bindings handle this case. - + @@ -3659,7 +3655,7 @@ case. line="3130">This method is virtual. Notably its name differs from the virtual slot name, which makes it useful for testing bindings handle this case. - + @@ -3680,7 +3676,7 @@ case. - + @@ -3692,7 +3688,7 @@ case. - + @@ -3707,7 +3703,7 @@ case. The signal handler must increment the inout parameter by 1. - + @@ -3722,7 +3718,7 @@ case. - + @@ -3734,7 +3730,7 @@ case. - + @@ -3746,7 +3742,7 @@ case. - + @@ -3757,7 +3753,7 @@ case. - + @@ -3772,7 +3768,7 @@ case. - + @@ -3784,7 +3780,7 @@ case. - + @@ -3803,7 +3799,7 @@ case. - + @@ -3815,7 +3811,7 @@ case. - + @@ -3830,7 +3826,7 @@ case. - + @@ -3859,7 +3855,7 @@ case. - + @@ -3879,7 +3875,7 @@ case. - + @@ -3901,7 +3897,7 @@ case. Check that the out value is skipped - + Check that the out value is skipped - + Check that a parameter is skipped - + Check that the return value is skipped - + filename="regress.c" line="2998">Check that the return value is skipped. Succeed if a is nonzero, otherwise raise an error. - + - + @@ -4266,7 +4262,7 @@ raise an error. This function throws an error if m is odd. - + @@ -4421,7 +4417,7 @@ raise an error. - + @@ -4652,13 +4648,13 @@ the introspection client langage. - + - + @@ -4680,7 +4676,7 @@ the introspection client langage. - + @@ -4694,7 +4690,7 @@ the introspection client langage. allow-none="1"> Another object + line="801">Another object @@ -4712,7 +4708,7 @@ the introspection client langage. - + @@ -4720,7 +4716,7 @@ the introspection client langage. - + @@ -4755,7 +4751,7 @@ the introspection client langage. - + @@ -4766,7 +4762,7 @@ the introspection client langage. - + @@ -4778,7 +4774,7 @@ the introspection client langage. - + @@ -4806,7 +4802,7 @@ the introspection client langage. glib:type-name="RegressTestSimpleBoxedA" glib:get-type="regress_test_simple_boxed_a_get_gtype" c:symbol-prefix="test_simple_boxed_a"> - + @@ -4820,7 +4816,7 @@ the introspection client langage. - + @@ -4831,7 +4827,7 @@ the introspection client langage. - + @@ -4846,7 +4842,7 @@ the introspection client langage. - + @@ -4858,7 +4854,7 @@ the introspection client langage. glib:type-name="RegressTestSimpleBoxedB" glib:get-type="regress_test_simple_boxed_b_get_type" c:symbol-prefix="test_simple_boxed_b"> - + @@ -4866,7 +4862,7 @@ the introspection client langage. - + @@ -4878,7 +4874,7 @@ the introspection client langage. - + @@ -5023,7 +5019,7 @@ the introspection client langage. - + @@ -5058,7 +5054,7 @@ the introspection client langage. - + @@ -5080,19 +5076,22 @@ the introspection client langage. + + + - + - + - + @@ -5111,17 +5110,17 @@ the introspection client langage. glib:type-name="RegressTestSubObj" glib:get-type="regress_test_sub_obj_get_type" glib:type-struct="TestSubObjClass"> - + - + - + @@ -5132,7 +5131,7 @@ the introspection client langage. - + @@ -5161,7 +5160,7 @@ the introspection client langage. - + @@ -5173,16 +5172,16 @@ the introspection client langage. glib:type-name="RegressTestWi8021x" glib:get-type="regress_test_wi_802_1x_get_type" glib:type-struct="TestWi8021xClass"> - + - + - + @@ -5194,7 +5193,7 @@ the introspection client langage. - + @@ -5206,7 +5205,7 @@ the introspection client langage. - + @@ -5232,7 +5231,7 @@ the introspection client langage. - + @@ -5240,12 +5239,12 @@ the introspection client langage. - + - + @@ -5902,7 +5901,7 @@ exposed to language bindings. - + @@ -5920,7 +5919,7 @@ exposed to language bindings. - + @@ -5937,7 +5936,7 @@ exposed to language bindings. - + filename="regress.c" line="4447">This test case mirrors GnomeKeyringPasswordSchema from libgnome-keyring. - + @@ -5992,7 +5991,7 @@ libgnome-keyring. - + @@ -6005,7 +6004,7 @@ libgnome-keyring. - + @@ -6018,7 +6017,7 @@ libgnome-keyring. - + @@ -6055,7 +6054,7 @@ libgnome-keyring. - + @@ -6067,7 +6066,7 @@ libgnome-keyring. - + @@ -6242,7 +6241,7 @@ libgnome-keyring. - + @@ -6456,7 +6455,7 @@ libgnome-keyring. - + @@ -6507,7 +6506,7 @@ libgnome-keyring. - + @@ -6519,7 +6518,7 @@ libgnome-keyring. - + @@ -6585,7 +6584,7 @@ libgnome-keyring. - + @@ -6601,7 +6600,7 @@ libgnome-keyring. - + @@ -6627,7 +6626,7 @@ libgnome-keyring. filename="regress.c" line="3802">Notified - callback persists until a DestroyNotify delegate is invoked. - + @@ -6657,7 +6656,7 @@ is invoked. filename="regress.c" line="3829">Adds a scope notified callback with no user data. This can invoke an error condition in bindings which needs to be tested. - + @@ -6676,7 +6675,7 @@ condition in bindings which needs to be tested. - + @@ -6689,7 +6688,7 @@ condition in bindings which needs to be tested. - + @@ -6701,7 +6700,7 @@ condition in bindings which needs to be tested. line="3843">Invokes all callbacks installed by #test_callback_destroy_notify(), adding up their return values, and removes them, invoking the corresponding destroy notfications. - + filename="regress.c" line="3771">Call - callback parameter persists for the duration of the method call and can be released on return. - + @@ -6787,7 +6786,7 @@ call and can be released on return. - + @@ -6795,7 +6794,7 @@ call and can be released on return. - + @@ -6880,7 +6879,7 @@ call and can be released on return. - + @@ -7343,7 +7342,7 @@ element-type annotation. - + @@ -7461,7 +7460,7 @@ element-type annotation. - + @@ -7510,7 +7509,7 @@ It has multiple lines in the documentation. The sky is blue. You will give me your credit card number. - + @@ -7547,7 +7546,7 @@ rgb(20%, 30%, 0%)</literallayout></entry> </informaltable> What we're testing here is that the scanner ignores the @a nested inside XML. - + @@ -7562,7 +7561,7 @@ What we're testing here is that the scanner ignores the @a nested inside XML. - + @@ -7578,7 +7577,7 @@ What we're testing here is that the scanner ignores the @a nested inside XML. - + @@ -7590,14 +7589,14 @@ What we're testing here is that the scanner ignores the @a nested inside XML. - + - + @@ -7636,14 +7635,14 @@ What we're testing here is that the scanner ignores the @a nested inside XML. - + - + @@ -7675,7 +7674,7 @@ What we're testing here is that the scanner ignores the @a nested inside XML.Should not emit a warning: https://bugzilla.gnome.org/show_bug.cgi?id=685399 - + @@ -7739,7 +7738,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=685399 - + @@ -7798,7 +7797,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=685399 - + @@ -7838,7 +7837,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=685399 This function throws an error if m is odd. - + @@ -7874,7 +7873,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=685399 - + @@ -8175,7 +8174,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=685399 - + @@ -8207,7 +8206,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=685399 - + diff --git a/tests/scanner/Utility-1.0-expected.gir b/tests/scanner/Utility-1.0-expected.gir index 2521efb..010bd45 100644 --- a/tests/scanner/Utility-1.0-expected.gir +++ b/tests/scanner/Utility-1.0-expected.gir @@ -141,7 +141,7 @@ and/or use gtk-doc annotations. --> - + diff --git a/tests/scanner/meson.build b/tests/scanner/meson.build index 28430a2..95a9dac 100644 --- a/tests/scanner/meson.build +++ b/tests/scanner/meson.build @@ -12,6 +12,7 @@ scanner_test_files = [ 'test_xmlwriter.py', 'test_pkgconfig.py', 'test_docwriter.py', + 'test_scanner.py', ] foreach f : scanner_test_files @@ -503,7 +504,7 @@ foreach gir : test_girs ) endforeach -if get_option('doctool') and glib_dep.type_name() == 'pkgconfig' +if with_doctool and glib_dep.type_name() == 'pkgconfig' foreach language : ['C', 'Python', 'Gjs'] regress_docs = custom_target( 'generate-docs-' + language, diff --git a/tests/scanner/regress.h b/tests/scanner/regress.h index 66467d0..44d36e1 100644 --- a/tests/scanner/regress.h +++ b/tests/scanner/regress.h @@ -616,6 +616,7 @@ struct _RegressTestStructF const gint **const* data4; volatile gint *const data5; const gint *volatile data6; + volatile unsigned const char data7; }; /* plain-old-data boxed types */ diff --git a/tests/scanner/test_scanner.py b/tests/scanner/test_scanner.py new file mode 100644 index 0000000..2513c0d --- /dev/null +++ b/tests/scanner/test_scanner.py @@ -0,0 +1,30 @@ +import unittest +import optparse +import os + +from giscanner.scannermain import get_source_root_dirs + + +class TestScanner(unittest.TestCase): + + def test_get_source_root_dirs_options(self): + options = optparse.Values({"sources_top_dirs": ["foo"]}) + paths = get_source_root_dirs(options, ["nope"]) + self.assertEqual(len(paths), 1) + self.assertTrue(os.path.isabs(paths[0])) + self.assertEqual(paths[0], os.path.join(os.getcwd(), "foo")) + + def test_get_source_root_dirs_guess(self): + options = optparse.Values({"sources_top_dirs": []}) + cwd = os.getcwd() + paths = get_source_root_dirs( + options, [os.path.join(cwd, "foo"), os.path.join(cwd, "bar")]) + self.assertEqual(len(paths), 1) + self.assertEqual(paths[0], cwd) + + paths = get_source_root_dirs(options, []) + self.assertEqual(paths, []) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/scanner/test_transformer.py b/tests/scanner/test_transformer.py index 4731b5c..92f21c6 100644 --- a/tests/scanner/test_transformer.py +++ b/tests/scanner/test_transformer.py @@ -483,5 +483,47 @@ class TestCallbacks(unittest.TestCase): self.assertTrue(isinstance(node, ast.Callback)) +class TestArrays(unittest.TestCase): + def setUp(self): + # Hack to set logging singleton + self.namespace = ast.Namespace('Test', '1.0') + logger = MessageLogger.get(namespace=self.namespace) + logger.enable_warnings((WARNING, ERROR, FATAL)) + + def test_multidimensional_arrays(self): + """Multidimensional arrays are flattend into a single dimension.""" + + load_namespace_from_source_string(self.namespace, """ + typedef struct { + int data[2][3][5][7][11]; + } TestMultiDimArray; + """) + + node = self.namespace.get('MultiDimArray') + self.assertIsNotNone(node) + + field = node.fields[0] + self.assertIsInstance(field, ast.Field) + self.assertIsInstance(field.type, ast.Array) + self.assertEqual(field.type.element_type, ast.TYPE_INT) + self.assertEqual(field.type.size, 2 * 3 * 5 * 7 * 11) + + def test_flexible_array_member(self): + """Flexible array members don't break transformer. + + They are generally unsupported, so nothing else is validated. + """ + + load_namespace_from_source_string(self.namespace, """ + typedef struct { + int length; + unsigned char data[]; + } TestFlexibleArray; + """) + + node = self.namespace.get('FlexibleArray') + self.assertIsNotNone(node) + + if __name__ == '__main__': unittest.main() diff --git a/tools/meson.build b/tools/meson.build index 6d38361..48f981b 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -5,7 +5,7 @@ tools = [ ['g-ir-scanner', 'scannermain', 'scanner_main'], ['g-ir-annotation-tool', 'annotationmain', 'annotation_main'], ] -if get_option('doctool') +if with_doctool tools += [['g-ir-doc-tool', 'docmain', 'doc_main']] endif @@ -39,7 +39,7 @@ foreach tool : tools endforeach girscanner = tool_output[0] -if get_option('doctool') +if with_doctool girdoctool = tool_output[-1] endif