mirror of
https://github.com/postgres/postgres.git
synced 2026-02-13 15:53:13 -05:00
Currently, when the argument of copyObject() is const-qualified, the return type is also, because the use of typeof carries over all the qualifiers. This is incorrect, since the point of copyObject() is to make a copy to mutate. But apparently no code ran into it. The new implementation uses typeof_unqual, which drops the qualifiers, making this work correctly. typeof_unqual is standardized in C23, but all recent versions of all the usual compilers support it even in non-C23 mode, at least as __typeof_unqual__. We add a configure/meson test for typeof_unqual and __typeof_unqual__ and use it if it's available, else we use the existing fallback of just returning void *. Reviewed-by: David Geier <geidav.pg@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/92f9750f-c7f6-42d8-9a4a-85a3cbe808f3%40eisentraut.org |
||
|---|---|---|
| .. | ||
| ax_pthread.m4 | ||
| c-compiler.m4 | ||
| c-library.m4 | ||
| check_decls.m4 | ||
| check_modules.pl | ||
| config.guess | ||
| config.sub | ||
| general.m4 | ||
| install-sh | ||
| llvm.m4 | ||
| Makefile | ||
| meson.build | ||
| missing | ||
| perl.m4 | ||
| pkg.m4 | ||
| prep_buildtree | ||
| programs.m4 | ||
| python.m4 | ||
| tcl.m4 | ||