From: Bruno Haible Date: Sun, 24 Mar 2019 21:14:21 +0000 (+0100) Subject: moopp: Allow forward references to the _representation type. X-Git-Tag: v0.20~113 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=761728566cb4a62b429aa5d5c29326605c9759f3;p=thirdparty%2Fgettext.git moopp: Allow forward references to the _representation type. * gnulib-local/build-aux/moopp (func_version): Bump copyright year. (func_emit_source_c): Move the _representation type alias to the top of the file. --- diff --git a/gnulib-local/build-aux/moopp b/gnulib-local/build-aux/moopp index 8e6e5902c..3b2f8801c 100755 --- a/gnulib-local/build-aux/moopp +++ b/gnulib-local/build-aux/moopp @@ -1,7 +1,7 @@ #!/bin/sh # Minimal Object-Oriented style PreProcessor. -# Copyright (C) 2006-2008, 2016, 2018 Free Software Foundation, Inc. +# Copyright (C) 2006-2008, 2016, 2018-2019 Free Software Foundation, Inc. # Written by Bruno Haible , 2006. # # This program is free software: you can redistribute it and/or modify @@ -70,7 +70,7 @@ Report bugs to ." func_version () { echo "$progname (GNU $package) $version" - echo "Copyright (C) 2006-2007 Free Software Foundation, Inc. + echo "Copyright (C) 2006-2019 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law." @@ -605,9 +605,6 @@ func_emit_source_c () { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' echo - echo "#line 1 \"${source_impl_file_base}\"" - cat "$source_impl_file" | sed -e "${impl_decl_lineno}"',$d' - echo "#line "`expr 3 + ${impl_decl_lineno} + 1`" \"$newfile_base\"" # In C mode, where subclass_t is identical to rootclass_t, we define the # any_rootclass_representation type to the right one for subclass. if test -n "$all_superclasses"; then @@ -621,6 +618,9 @@ func_emit_source_c () echo "#if !IS_CPLUSPLUS" echo "#define ${main_classname}_representation any_${rootclassname}_representation" echo "#endif" + echo "#line 1 \"${source_impl_file_base}\"" + cat "$source_impl_file" | sed -e "${impl_decl_lineno}"',$d' + echo "#line "`expr 6 + ${impl_decl_lineno} + 1`" \"$newfile_base\"" echo "#include \"${main_classname}.priv.h\"" echo echo "const typeinfo_t ${main_classname}_typeinfo = { \"${main_classname}\" };"