Using PyVarObject_HEAD_INIT macro.

This commit is contained in:
Daniele Varrazzo 2010-12-12 21:47:36 +00:00
parent 8dfa9915eb
commit 9b30147341
17 changed files with 17 additions and 34 deletions

View File

@ -165,8 +165,7 @@ asis_repr(asisObject *self)
"AsIs(str) -> new AsIs adapter object"
PyTypeObject asisType = {
PyObject_HEAD_INIT(NULL)
0,
PyVarObject_HEAD_INIT(NULL, 0)
"psycopg2._psycopg.AsIs",
sizeof(asisObject),
0,

View File

@ -249,8 +249,7 @@ binary_repr(binaryObject *self)
"Binary(buffer) -> new binary object"
PyTypeObject binaryType = {
PyObject_HEAD_INIT(NULL)
0,
PyVarObject_HEAD_INIT(NULL, 0)
"psycopg2._psycopg.Binary",
sizeof(binaryObject),
0,

View File

@ -225,8 +225,7 @@ pydatetime_repr(pydatetimeObject *self)
"datetime(datetime, type) -> new datetime wrapper object"
PyTypeObject pydatetimeType = {
PyObject_HEAD_INIT(NULL)
0,
PyVarObject_HEAD_INIT(NULL, 0)
"psycopg2._psycopg.datetime",
sizeof(pydatetimeObject),
0,

View File

@ -239,8 +239,7 @@ list_repr(listObject *self)
"List(list) -> new list wrapper object"
PyTypeObject listType = {
PyObject_HEAD_INIT(NULL)
0,
PyVarObject_HEAD_INIT(NULL, 0)
"psycopg2._psycopg.List",
sizeof(listObject),
0,

View File

@ -233,8 +233,7 @@ mxdatetime_repr(mxdatetimeObject *self)
"MxDateTime(mx, type) -> new mx.DateTime wrapper object"
PyTypeObject mxdatetimeType = {
PyObject_HEAD_INIT(NULL)
0,
PyVarObject_HEAD_INIT(NULL, 0)
"psycopg2._psycopg.MxDateTime",
sizeof(mxdatetimeObject),
0,

View File

@ -177,8 +177,7 @@ pboolean_repr(pbooleanObject *self)
"Boolean(str) -> new Boolean adapter object"
PyTypeObject pbooleanType = {
PyObject_HEAD_INIT(NULL)
0,
PyVarObject_HEAD_INIT(NULL, 0)
"psycopg2._psycopg.Boolean",
sizeof(pbooleanObject),
0,

View File

@ -199,8 +199,7 @@ pdecimal_repr(pdecimalObject *self)
"Decimal(str) -> new Decimal adapter object"
PyTypeObject pdecimalType = {
PyObject_HEAD_INIT(NULL)
0,
PyVarObject_HEAD_INIT(NULL, 0)
"psycopg2._psycopg.Decimal",
sizeof(pdecimalObject),
0,

View File

@ -169,8 +169,7 @@ pfloat_repr(pfloatObject *self)
"Float(str) -> new Float adapter object"
PyTypeObject pfloatType = {
PyObject_HEAD_INIT(NULL)
0,
PyVarObject_HEAD_INIT(NULL, 0)
"psycopg2._psycopg.Float",
sizeof(pfloatObject),
0,

View File

@ -291,8 +291,7 @@ qstring_repr(qstringObject *self)
"QuotedString(str, enc) -> new quoted object with 'enc' encoding"
PyTypeObject qstringType = {
PyObject_HEAD_INIT(NULL)
0,
PyVarObject_HEAD_INIT(NULL, 0)
"psycopg2._psycopg.QuotedString",
sizeof(qstringObject),
0,

View File

@ -978,8 +978,7 @@ connection_traverse(connectionObject *self, visitproc visit, void *arg)
" ProgrammingError, IntegrityError, DataError, NotSupportedError"
PyTypeObject connectionType = {
PyObject_HEAD_INIT(NULL)
0,
PyVarObject_HEAD_INIT(NULL, 0)
"psycopg2._psycopg.connection",
sizeof(connectionObject),
0,

View File

@ -1719,8 +1719,7 @@ cursor_traverse(cursorObject *self, visitproc visit, void *arg)
"A database cursor."
PyTypeObject cursorType = {
PyObject_HEAD_INIT(NULL)
0,
PyVarObject_HEAD_INIT(NULL, 0)
"psycopg2._psycopg.cursor",
sizeof(cursorObject),
0,

View File

@ -377,8 +377,7 @@ lobject_repr(lobjectObject *self)
"A database large object."
PyTypeObject lobjectType = {
PyObject_HEAD_INIT(NULL)
0,
PyVarObject_HEAD_INIT(NULL, 0)
"psycopg2._psycopg.lobject",
sizeof(lobjectObject),
0,

View File

@ -153,8 +153,7 @@ isqlquote_del(PyObject* self)
"returning the SQL representation of the object.\n\n"
PyTypeObject isqlquoteType = {
PyObject_HEAD_INIT(NULL)
0,
PyVarObject_HEAD_INIT(NULL, 0)
"psycopg2._psycopg.ISQLQuote",
sizeof(isqlquoteObject),
0,

View File

@ -278,8 +278,7 @@ static PySequenceMethods notify_sequence = {
PyTypeObject NotifyType = {
PyObject_HEAD_INIT(NULL)
0,
PyVarObject_HEAD_INIT(NULL, 0)
"psycopg2.extensions.Notify",
sizeof(NotifyObject),
0,

View File

@ -452,8 +452,7 @@ typecast_call(PyObject *obj, PyObject *args, PyObject *kwargs)
}
PyTypeObject typecastType = {
PyObject_HEAD_INIT(NULL)
0,
PyVarObject_HEAD_INIT(NULL, 0)
"psycopg2._psycopg.type",
sizeof(typecastObject),
0,

View File

@ -85,8 +85,7 @@ static PyBufferProcs chunk_as_buffer =
#define chunk_doc "memory chunk"
PyTypeObject chunkType = {
PyObject_HEAD_INIT(NULL)
0, /* ob_size */
PyVarObject_HEAD_INIT(NULL, 0)
"psycopg2._psycopg.chunk", /* tp_name */
sizeof(chunkObject), /* tp_basicsize */
0, /* tp_itemsize */

View File

@ -304,8 +304,7 @@ static struct PyMethodDef xid_methods[] = {
};
PyTypeObject XidType = {
PyObject_HEAD_INIT(NULL)
0,
PyVarObject_HEAD_INIT(NULL, 0)
"psycopg2.extensions.Xid",
sizeof(XidObject),
0,