From: Tom Lane <tgl@sss.pgh.pa.us>
To: Albe Laurenz <laurenz.albe@wien.gv.at>
Cc: pgsql-hackers@postgreSQL.org
Subject: Re: Add PGDLLEXPORT to PG_FUNCTION_INFO_V1
Date: Wed, 12 Oct 2016 08:45:29 -0400
Message-ID: <5586.1476276329@sss.pgh.pa.us> (raw)
In-Reply-To: <A737B7A37273E048B164557ADEF4A58B539300BD@ntex2010a.host.magwien.gv.at>
References: <A737B7A37273E048B164557ADEF4A58B539300BD@ntex2010a.host.magwien.gv.at>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Albe Laurenz <laurenz.albe@wien.gv.at> writes:
> Currently, PG_FUNCTION_INFO_V1 is defined as
> /*
> * Macro to build an info function associated with the given function name.
> * Win32 loadable functions usually link with 'dlltool --export-all', but it
> * doesn't hurt to add PGDLLIMPORT in case they don't.
> */
> #define PG_FUNCTION_INFO_V1(funcname) \
> Datum funcname(PG_FUNCTION_ARGS); \
> extern PGDLLEXPORT const Pg_finfo_record * CppConcat(pg_finfo_,funcname)(void); \
> const Pg_finfo_record * \
> CppConcat(pg_finfo_,funcname) (void) \
> { \
> static const Pg_finfo_record my_finfo = { 1 }; \
> return &my_finfo; \
> } \
> extern int no_such_variable
> Is there a good reason why the "funcname" declaration is not decorated
> with PGDLLEXPORT?
The lack of complaints about this suggest that it's not actually necessary
to do so. So what this makes me wonder is whether we can't drop the
DLLEXPORT on the finfo function too. I'd rather reduce the number of
Microsoft-isms in the code, not increase it.
> BTW, I admit I don't understand the comment.
It seems like an obvious typo. Or, possibly, sloppy thinking that
contributed to failure to recognize that the keyword isn't needed.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, laurenz.albe@wien.gv.at
Subject: Re: Add PGDLLEXPORT to PG_FUNCTION_INFO_V1
In-Reply-To: <5586.1476276329@sss.pgh.pa.us>
References: <A737B7A37273E048B164557ADEF4A58B539300BD@ntex2010a.host.magwien.gv.at> <5586.1476276329@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox