Re: [HACKERS] cast result of copyNode()
От | Mark Dilger |
---|---|
Тема | Re: [HACKERS] cast result of copyNode() |
Дата | |
Msg-id | 20170307232712.10866.40453.pgcf@coridan.postgresql.org обсуждение исходный текст |
Ответ на | Re: [HACKERS] cast result of copyObject() (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>) |
Ответы |
Re: [HACKERS] cast result of copyNode()
Re: [HACKERS] cast result of copyNode() |
Список | pgsql-hackers |
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: not tested Spec compliant: not tested Documentation: not tested Hi Peter, I like the patch so far, and it passes all the regression tests for me on both mac and linux. I am very much in favor of having more compiler type checking, so +1 from me. You appear to be using a #define macro to wrap a function of the same name with the code: #define copyObject(obj) ((typeof(obj)) copyObject(obj)) I don't necessarily have a problem with that, but it struck me as a bit odd, and grep'ing through the sources, I don't see anywhere else in the project where that is done for a function of the same number of arguments, and only one other place where it is done at all: $ find src/ -type f -name "*.h" -or -name "*.c" | xargs cat | perl -e 'while(<>) { print if (/^#define (\w+)\b.*\b\1\s*\(\b/);}' #define copyObject(obj) ((typeof(obj)) copyObject(obj)) #define mkdir(a,b) mkdir(a) I'm just flagging that for discussion if anybody thinks it is too magical.
В списке pgsql-hackers по дате отправления: