mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-03-11 03:15:48 +03:00
Merge remote branch 'jason/devel' into devel
Conflicts: psycopg/notify_type.c
This commit is contained in:
commit
4bc4f85229
|
@ -189,10 +189,10 @@ exit:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static long
|
static Py_hash_t
|
||||||
notify_hash(NotifyObject *self)
|
notify_hash(NotifyObject *self)
|
||||||
{
|
{
|
||||||
long rv = -1L;
|
Py_hash_t rv = -1L;
|
||||||
PyObject *tself = NULL;
|
PyObject *tself = NULL;
|
||||||
|
|
||||||
/* if self == a tuple, then their hashes are the same. */
|
/* if self == a tuple, then their hashes are the same. */
|
||||||
|
|
|
@ -54,6 +54,15 @@
|
||||||
#define CONV_CODE_PY_SSIZE_T "n"
|
#define CONV_CODE_PY_SSIZE_T "n"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* hash() return size changed around version 3.2a4 on 64bit platforms. Before
|
||||||
|
* this, the return size was always a long, regardless of arch. ~3.2
|
||||||
|
* introduced the Py_hash_t & Py_uhash_t typedefs with the resulting sizes
|
||||||
|
* based upon arch. */
|
||||||
|
#if PY_VERSION_HEX < 0x030200A4
|
||||||
|
typedef long Py_hash_t;
|
||||||
|
typedef unsigned long Py_uhash_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Macros defined in Python 2.6 */
|
/* Macros defined in Python 2.6 */
|
||||||
#ifndef Py_REFCNT
|
#ifndef Py_REFCNT
|
||||||
#define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
|
#define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
|
||||||
|
|
|
@ -119,7 +119,7 @@ class ConnectionTests(unittest.TestCase):
|
||||||
def slave():
|
def slave():
|
||||||
cnn = psycopg2.connect(dsn)
|
cnn = psycopg2.connect(dsn)
|
||||||
cur = cnn.cursor()
|
cur = cnn.cursor()
|
||||||
cur.execute("select pg_sleep(3)")
|
cur.execute("select pg_sleep(4)")
|
||||||
cur.close()
|
cur.close()
|
||||||
cnn.close()
|
cnn.close()
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ class ConnectionTests(unittest.TestCase):
|
||||||
t2.start()
|
t2.start()
|
||||||
t1.join()
|
t1.join()
|
||||||
t2.join()
|
t2.join()
|
||||||
self.assert_(time.time() - t0 < 5,
|
self.assert_(time.time() - t0 < 7,
|
||||||
"something broken in concurrency")
|
"something broken in concurrency")
|
||||||
|
|
||||||
def test_encoding_name(self):
|
def test_encoding_name(self):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user