mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-26 10:53:44 +03:00
No need to put connection fields to zero: tp_alloc already did.
This commit is contained in:
parent
7b5d80d36d
commit
a50a91fc7b
|
@ -1,5 +1,7 @@
|
||||||
2010-12-14 Daniele Varrazzo <daniele.varrazzo@gmail.com>
|
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.
|
* lib/extensions.py: Improved mapping from PG to Py encodings.
|
||||||
|
|
||||||
* psycopg/psycopgmodule.c: Added a few missing encodings: EUC_CN,
|
* psycopg/psycopgmodule.c: Added a few missing encodings: EUC_CN,
|
||||||
|
|
|
@ -849,19 +849,12 @@ connection_setup(connectionObject *self, const char *dsn, long int async)
|
||||||
self->dsn = strdup(dsn);
|
self->dsn = strdup(dsn);
|
||||||
self->notice_list = PyList_New(0);
|
self->notice_list = PyList_New(0);
|
||||||
self->notifies = PyList_New(0);
|
self->notifies = PyList_New(0);
|
||||||
self->closed = 0;
|
|
||||||
self->async = async;
|
self->async = async;
|
||||||
self->status = CONN_STATUS_SETUP;
|
self->status = CONN_STATUS_SETUP;
|
||||||
self->critical = NULL;
|
|
||||||
self->async_cursor = NULL;
|
|
||||||
self->async_status = ASYNC_DONE;
|
self->async_status = ASYNC_DONE;
|
||||||
self->pgconn = NULL;
|
|
||||||
self->cancel = NULL;
|
|
||||||
self->mark = 0;
|
|
||||||
self->string_types = PyDict_New();
|
self->string_types = PyDict_New();
|
||||||
self->binary_types = PyDict_New();
|
self->binary_types = PyDict_New();
|
||||||
self->notice_pending = NULL;
|
/* other fields have been zeroed by tp_alloc */
|
||||||
self->encoding = NULL;
|
|
||||||
|
|
||||||
pthread_mutex_init(&(self->lock), NULL);
|
pthread_mutex_init(&(self->lock), NULL);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user