]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
moopp: Allow forward references to the <class>_representation type.
authorBruno Haible <bruno@clisp.org>
Sun, 24 Mar 2019 21:14:21 +0000 (22:14 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 24 Mar 2019 21:14:21 +0000 (22:14 +0100)
* gnulib-local/build-aux/moopp (func_version): Bump copyright year.
(func_emit_source_c): Move the <class>_representation type alias to the top
of the file.

gnulib-local/build-aux/moopp

index 8e6e5902c6aa672d4d3b318f222b49cae3a97efa..3b2f8801cfee0bc8a0e4aa1882fe14bbd5ae0a4e 100755 (executable)
@@ -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 <bruno@clisp.org>, 2006.
 #
 # This program is free software: you can redistribute it and/or modify
@@ -70,7 +70,7 @@ Report bugs to <bruno@clisp.org>."
 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 <https://gnu.org/licenses/gpl.html>
 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}\" };"