Re: Why does load_external_function() return PGFunction?

Поиск
Список
Период
Сортировка
Andres Freund <andres@anarazel.de> writes:
> We've several callers to load_external_function() that do not use the
> returned value as a PGFunction. I'd vote for changing the return type to
> void * and have fmgr.c cast it to PGFunction after verifying the
> function's magic.

void* isn't necessarily compatible with function pointers --- there are
platforms where they're physically different widths, though possibly
you'd never get PG to run on such hardware anyway.

I'd be OK with declaring it as a more generic function pointer type,
perhaps "void (*funcptr) ()".

However, given that a cast is going to be necessary anyway, it seems
like this is mostly useless churn...

            regards, tom lane


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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: Add PGDLLIMPORT to enable_hashagg
Следующее
От: Stefan Kaltenbrunner
Дата:
Сообщение: Re: git instructions