diff --git a/ChangeLog b/ChangeLog index 06d72523..676cded3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2010-12-14 Daniele Varrazzo + * 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 21e5e8e2..7bfdd347 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);