[HACKERS] Candidate for local inline function?

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема [HACKERS] Candidate for local inline function?
Дата
Msg-id CACjxUsNuiXku4=tiN3J-srRNVdS6VPb_-etK0OF3JMhHCbZ-vw@mail.gmail.com
обсуждение исходный текст
Ответы Re: [HACKERS] Candidate for local inline function?
Re: [HACKERS] Candidate for local inline function?
Список pgsql-hackers
Why do we warn of a hazard here instead of eliminating said hazard
with a static inline function declaration in executor.h?

/*
 * ExecEvalExpr was formerly a function containing a switch statement;
 * now it's just a macro invoking the function pointed to by an ExprState
 * node.  Beware of double evaluation of the ExprState argument!
 */
#define ExecEvalExpr(expr, econtext, isNull) \
    ((*(expr)->evalfunc) (expr, econtext, isNull))

Should I change that to a static inline function doing exactly what
the macro does?  In the absence of multiple evaluations of a
parameter with side effects, modern versions of gcc have generated
the same code for a macro versus a static inline function, at least
in the cases I checked.

--
Kevin Grittner

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] pageinspect and hash indexes
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] increasing the default WAL segment size