summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--psycopg/connection_type.c9
2 files changed, 3 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 06d7252..676cded 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2010-12-14 Daniele Varrazzo <daniele.varrazzo@gmail.com>
+ * psycopg/connection_type.c: No need to put connection fields to zero.
+
* lib/extensions.py: Improved mapping from PG to Py encodings.
* psycopg/psycopgmodule.c: Added a few missing encodings: EUC_CN,
diff --git a/psycopg/connection_type.c b/psycopg/connection_type.c
index 21e5e8e..7bfdd34 100644
--- a/psycopg/connection_type.c
+++ b/psycopg/connection_type.c
@@ -849,19 +849,12 @@ connection_setup(connectionObject *self, const char *dsn, long int async)
self->dsn = strdup(dsn);
self->notice_list = PyList_New(0);
self->notifies = PyList_New(0);
- self->closed = 0;
self->async = async;
self->status = CONN_STATUS_SETUP;
- self->critical = NULL;
- self->async_cursor = NULL;
self->async_status = ASYNC_DONE;
- self->pgconn = NULL;
- self->cancel = NULL;
- self->mark = 0;
self->string_types = PyDict_New();
self->binary_types = PyDict_New();
- self->notice_pending = NULL;
- self->encoding = NULL;
+ /* other fields have been zeroed by tp_alloc */
pthread_mutex_init(&(self->lock), NULL);