On 01/28/2015 08:05 PM, Tom Lane wrote:
Heikki Linnakangas <hlinnakan...@vmware.com> writes:
Right, that was the idea. I wanted it to include the word "OpenSSL", to
make it clear in the callers that it's specific to OpenSSL. And SSL,
because that's the name of the struct. I agree it looks silly, though.
One idea is to have two separate arguments: the implementation name, and
the struct name. PQgetSSLstruct(&ssl, "OpenSSL", "SSL") would look less
silly.
That's probably overkill. Why not establish a convention that the "main"
API struct for the library doesn't have to be named? So it's just
PQgetSSLstruct(&ssl, "OpenSSL"), and you only need strange naming if
you're dealing with a library that actually has more than one API object
that needs to be fetched this way. (That set is likely empty...)
Works for me. Committed that way.
- Heikki
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers