Daniele Varrazzo
281427f450
Fixed escape for negative numbers prefixed by minus operator
...
Closes ticket #57 .
2011-05-30 22:00:20 +01:00
Daniele Varrazzo
3214c23f51
Fixed adaptation in several adapters.
...
The getquoted methods always return bytes. The str() convert this
representation to string on the fly.
2010-12-31 03:18:27 +01:00
Daniele Varrazzo
cb6b52945b
The library can be compiled with Python 3.
...
Just compiled! No test run yet and many points to review, marked in the
code.
The patch is largely Martin von Löwis work, simplified after refactoring
in the previous commits and adapted to the new code (as the patch was
originally for Psycopg 2.0.9)
2010-12-21 04:24:36 +00:00
Daniele Varrazzo
4635c2aa4f
Import structmember/stringobject headers from python.h.
...
stringobject is not to be imported with Python 3.
2010-12-21 04:02:13 +00:00
Daniele Varrazzo
9b30147341
Using PyVarObject_HEAD_INIT macro.
2010-12-21 04:02:13 +00:00
Daniele Varrazzo
8dfa9915eb
Using Py_TYPE and Py_REFCNT macros.
2010-12-21 04:02:13 +00:00
Daniele Varrazzo
89f70bdb3c
Changed Python const RO -> READONLY.
2010-12-12 13:39:32 +00:00
Daniele Varrazzo
6d7916cfe1
Internal imports simplified.
...
.c files only need to import psycopg.h: it will in turn import
dependencies from Python and libpq and configure.h. psycopg.h should be
the first to be imported, so the basic imports are not required in
the .h's
As a guideline I'm trying to import from the most specific to the most
generic to detect missing imports in the .h's.
2010-12-12 13:39:32 +00:00
Daniele Varrazzo
ed6a4c8b1a
Dropped PyArg_ParseTuple() calls in functions taking no arguments.
2010-11-09 03:18:54 +00:00
Daniele Varrazzo
422fede38e
Replaced PyObject_CallFunction() with *ObjArgs() where more efficient.
2010-11-09 01:49:22 +00:00
Daniele Varrazzo
d601ab8239
fixed crash in pdecimal_str with a few Python 2.5.x releases.
...
is_finite() is not available in 2.5.1, it is in 2.5.5 but is officially
supported only since 2.6.
2010-11-09 00:14:22 +00:00
Daniele Varrazzo
af3681cc1c
Fixed repr for Decimal wrapper.
2010-11-09 00:09:19 +00:00
Federico Di Gregorio
855674faf1
Fixed Python 2.4 segfault related to decimal implementation
2010-02-28 20:52:03 +01:00
Federico Di Gregorio
192034dc38
Fixed problem with decimal.Decimal conversions
2010-02-21 01:04:00 +01:00