0001-Rename-PQsslAttributes-to-PQsslAttributeNames.patch
text/x-patch
Filename: 0001-Rename-PQsslAttributes-to-PQsslAttributeNames.patch
Type: text/x-patch
Part: 1
Patch
Format: format-patch
Series: patch 0001
Subject: Rename PQsslAttributes() to PQsslAttributeNames().
| File | + | − |
|---|---|---|
| doc/src/sgml/libpq.sgml | 3 | 3 |
| src/interfaces/libpq/exports.txt | 1 | 1 |
| src/interfaces/libpq/fe-secure.c | 1 | 1 |
| src/interfaces/libpq/fe-secure-openssl.c | 1 | 1 |
| src/interfaces/libpq/libpq-fe.h | 1 | 1 |
From 2d86b4d785bb5b53c779b79a8010e7d7f6cbb9b5 Mon Sep 17 00:00:00 2001
From: Lars Kanis <lars@greiz-reinsdorf.de>
Date: Sat, 7 Nov 2015 20:42:43 +0100
Subject: [PATCH] Rename PQsslAttributes() to PQsslAttributeNames().
The name PQsslAttributes suggested, the function would return
attribute values or key/value pairs, but it returns keys only.
PQsslAttributeNames makes more clear, what the function is about.
---
doc/src/sgml/libpq.sgml | 6 +++---
src/interfaces/libpq/exports.txt | 2 +-
src/interfaces/libpq/fe-secure-openssl.c | 2 +-
src/interfaces/libpq/fe-secure.c | 2 +-
src/interfaces/libpq/libpq-fe.h | 2 +-
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
index 0ee018e..7c31f42 100644
--- a/doc/src/sgml/libpq.sgml
+++ b/doc/src/sgml/libpq.sgml
@@ -1947,13 +1947,13 @@ const char *PQsslAttribute(const PGconn *conn, const char *attribute_name);
</listitem>
</varlistentry>
- <varlistentry id="libpq-pqsslattributes">
- <term><function>PQsslAttributes</function><indexterm><primary>PQsslAttributes</></></term>
+ <varlistentry id="libpq-pqsslattributenames">
+ <term><function>PQsslAttributeNames</function><indexterm><primary>PQsslAttributeNames</></></term>
<listitem>
<para>
Return an array of SSL attribute names available. The array is terminated by a NULL pointer.
<synopsis>
-const char **PQsslAttributes(const PGconn *conn);
+const char **PQsslAttributeNames(const PGconn *conn);
</synopsis>
</para>
</listitem>
diff --git a/src/interfaces/libpq/exports.txt b/src/interfaces/libpq/exports.txt
index 0bbcae5..c69a4d5 100644
--- a/src/interfaces/libpq/exports.txt
+++ b/src/interfaces/libpq/exports.txt
@@ -167,6 +167,6 @@ lo_truncate64 164
PQconninfo 165
PQsslInUse 166
PQsslStruct 167
-PQsslAttributes 168
+PQsslAttributeNames 168
PQsslAttribute 169
PQsetErrorContextVisibility 170
diff --git a/src/interfaces/libpq/fe-secure-openssl.c b/src/interfaces/libpq/fe-secure-openssl.c
index 4b2a324..e88a7ee 100644
--- a/src/interfaces/libpq/fe-secure-openssl.c
+++ b/src/interfaces/libpq/fe-secure-openssl.c
@@ -1533,7 +1533,7 @@ PQsslStruct(PGconn *conn, const char *struct_name)
}
const char **
-PQsslAttributes(PGconn *conn)
+PQsslAttributeNames(PGconn *conn)
{
static const char *result[] = {
"library",
diff --git a/src/interfaces/libpq/fe-secure.c b/src/interfaces/libpq/fe-secure.c
index db91e52..ed1342e 100644
--- a/src/interfaces/libpq/fe-secure.c
+++ b/src/interfaces/libpq/fe-secure.c
@@ -409,7 +409,7 @@ PQsslAttribute(PGconn *conn, const char *attribute_name)
}
const char **
-PQsslAttributes(PGconn *conn)
+PQsslAttributeNames(PGconn *conn)
{
static const char *result[] = {NULL};
diff --git a/src/interfaces/libpq/libpq-fe.h b/src/interfaces/libpq/libpq-fe.h
index 828c533..eddb817 100644
--- a/src/interfaces/libpq/libpq-fe.h
+++ b/src/interfaces/libpq/libpq-fe.h
@@ -329,7 +329,7 @@ extern int PQsetClientEncoding(PGconn *conn, const char *encoding);
extern int PQsslInUse(PGconn *conn);
extern void *PQsslStruct(PGconn *conn, const char *struct_name);
extern const char *PQsslAttribute(PGconn *conn, const char *attribute_name);
-extern const char **PQsslAttributes(PGconn *conn);
+extern const char **PQsslAttributeNames(PGconn *conn);
/* Get the OpenSSL structure associated with a connection. Returns NULL for
* unencrypted connections or if any other TLS library is in use. */
--
2.1.4