summaryrefslogtreecommitdiff
path: root/psycopg/connection.h
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2016-12-26 17:40:08 +0100
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2016-12-27 00:29:01 +0100
commita255e4e1c6bbe32b0865da410fecd7be067902a7 (patch)
treef3ec7c8d7581c0563a35348f2a17f8377d8d5ab9 /psycopg/connection.h
parent17a74cc77126a15d289d2b568fcf1251b05bcbb3 (diff)
downloadpsycopg2-a255e4e1c6bbe32b0865da410fecd7be067902a7.tar.gz
Store python encoding and decoding functions in the connection
Unused for now: will be used instead of 'pyenc', which is to be dropped.
Diffstat (limited to 'psycopg/connection.h')
-rw-r--r--psycopg/connection.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/psycopg/connection.h b/psycopg/connection.h
index d108b71..32b34fa 100644
--- a/psycopg/connection.h
+++ b/psycopg/connection.h
@@ -83,6 +83,7 @@ struct connectionObject {
char *dsn; /* data source name */
char *critical; /* critical error on this connection */
char *encoding; /* current backend encoding */
+ /* TODO: drop */
char *pyenc; /* connection encoding python name */
long int closed; /* 1 means connection has been closed;
@@ -125,6 +126,9 @@ struct connectionObject {
/* Pointer to a decoding function, e.g. PyUnicode_DecodeUTF8 */
PyObject *(*cdecoder)(const char *, Py_ssize_t, const char *);
+
+ PyObject *pyencoder; /* python codec encoding function */
+ PyObject *pydecoder; /* python codec decoding function */
};
/* map isolation level values into a numeric const */