mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-29 12:23:42 +03:00
Dropped "customized" pg_free functions
The defaut is already to call PyObject_GC_Del.
This commit is contained in:
parent
0830deb790
commit
5dfba462da
|
@ -156,12 +156,6 @@ asis_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
return type->tp_alloc(type, 0);
|
return type->tp_alloc(type, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
asis_del(PyObject* self)
|
|
||||||
{
|
|
||||||
PyObject_GC_Del(self);
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
asis_repr(asisObject *self)
|
asis_repr(asisObject *self)
|
||||||
{
|
{
|
||||||
|
@ -177,63 +171,41 @@ asis_repr(asisObject *self)
|
||||||
PyTypeObject asisType = {
|
PyTypeObject asisType = {
|
||||||
PyVarObject_HEAD_INIT(NULL, 0)
|
PyVarObject_HEAD_INIT(NULL, 0)
|
||||||
"psycopg2._psycopg.AsIs",
|
"psycopg2._psycopg.AsIs",
|
||||||
sizeof(asisObject),
|
sizeof(asisObject), 0,
|
||||||
0,
|
|
||||||
asis_dealloc, /*tp_dealloc*/
|
asis_dealloc, /*tp_dealloc*/
|
||||||
0, /*tp_print*/
|
0, /*tp_print*/
|
||||||
|
|
||||||
0, /*tp_getattr*/
|
0, /*tp_getattr*/
|
||||||
0, /*tp_setattr*/
|
0, /*tp_setattr*/
|
||||||
|
|
||||||
0, /*tp_compare*/
|
0, /*tp_compare*/
|
||||||
|
|
||||||
(reprfunc)asis_repr, /*tp_repr*/
|
(reprfunc)asis_repr, /*tp_repr*/
|
||||||
0, /*tp_as_number*/
|
0, /*tp_as_number*/
|
||||||
0, /*tp_as_sequence*/
|
0, /*tp_as_sequence*/
|
||||||
0, /*tp_as_mapping*/
|
0, /*tp_as_mapping*/
|
||||||
0, /*tp_hash */
|
0, /*tp_hash */
|
||||||
|
|
||||||
0, /*tp_call*/
|
0, /*tp_call*/
|
||||||
(reprfunc)asis_str, /*tp_str*/
|
(reprfunc)asis_str, /*tp_str*/
|
||||||
|
|
||||||
0, /*tp_getattro*/
|
0, /*tp_getattro*/
|
||||||
0, /*tp_setattro*/
|
0, /*tp_setattro*/
|
||||||
0, /*tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
|
|
||||||
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
||||||
asisType_doc, /*tp_doc*/
|
asisType_doc, /*tp_doc*/
|
||||||
|
|
||||||
(traverseproc)asis_traverse, /*tp_traverse*/
|
(traverseproc)asis_traverse, /*tp_traverse*/
|
||||||
0, /*tp_clear*/
|
0, /*tp_clear*/
|
||||||
|
|
||||||
0, /*tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
|
|
||||||
0, /*tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
|
|
||||||
/* Attribute descriptor and subclassing stuff */
|
|
||||||
|
|
||||||
asisObject_methods, /*tp_methods*/
|
asisObject_methods, /*tp_methods*/
|
||||||
asisObject_members, /*tp_members*/
|
asisObject_members, /*tp_members*/
|
||||||
0, /*tp_getset*/
|
0, /*tp_getset*/
|
||||||
0, /*tp_base*/
|
0, /*tp_base*/
|
||||||
0, /*tp_dict*/
|
0, /*tp_dict*/
|
||||||
|
|
||||||
0, /*tp_descr_get*/
|
0, /*tp_descr_get*/
|
||||||
0, /*tp_descr_set*/
|
0, /*tp_descr_set*/
|
||||||
0, /*tp_dictoffset*/
|
0, /*tp_dictoffset*/
|
||||||
|
|
||||||
asis_init, /*tp_init*/
|
asis_init, /*tp_init*/
|
||||||
0, /*tp_alloc will be set to PyType_GenericAlloc in module init*/
|
0, /*tp_alloc will be set to PyType_GenericAlloc in module init*/
|
||||||
asis_new, /*tp_new*/
|
asis_new, /*tp_new*/
|
||||||
(freefunc)asis_del, /*tp_free Low-level free-memory routine */
|
|
||||||
0, /*tp_is_gc For PyObject_IS_GC */
|
|
||||||
0, /*tp_bases*/
|
|
||||||
0, /*tp_mro method resolution order */
|
|
||||||
0, /*tp_cache*/
|
|
||||||
0, /*tp_subclasses*/
|
|
||||||
0 /*tp_weaklist*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -266,12 +266,6 @@ binary_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
return type->tp_alloc(type, 0);
|
return type->tp_alloc(type, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
binary_del(PyObject* self)
|
|
||||||
{
|
|
||||||
PyObject_GC_Del(self);
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
binary_repr(binaryObject *self)
|
binary_repr(binaryObject *self)
|
||||||
{
|
{
|
||||||
|
@ -286,61 +280,41 @@ binary_repr(binaryObject *self)
|
||||||
PyTypeObject binaryType = {
|
PyTypeObject binaryType = {
|
||||||
PyVarObject_HEAD_INIT(NULL, 0)
|
PyVarObject_HEAD_INIT(NULL, 0)
|
||||||
"psycopg2._psycopg.Binary",
|
"psycopg2._psycopg.Binary",
|
||||||
sizeof(binaryObject),
|
sizeof(binaryObject), 0,
|
||||||
0,
|
|
||||||
binary_dealloc, /*tp_dealloc*/
|
binary_dealloc, /*tp_dealloc*/
|
||||||
0, /*tp_print*/
|
0, /*tp_print*/
|
||||||
0, /*tp_getattr*/
|
0, /*tp_getattr*/
|
||||||
0, /*tp_setattr*/
|
0, /*tp_setattr*/
|
||||||
|
|
||||||
0, /*tp_compare*/
|
0, /*tp_compare*/
|
||||||
(reprfunc)binary_repr, /*tp_repr*/
|
(reprfunc)binary_repr, /*tp_repr*/
|
||||||
0, /*tp_as_number*/
|
0, /*tp_as_number*/
|
||||||
0, /*tp_as_sequence*/
|
0, /*tp_as_sequence*/
|
||||||
0, /*tp_as_mapping*/
|
0, /*tp_as_mapping*/
|
||||||
0, /*tp_hash */
|
0, /*tp_hash */
|
||||||
|
|
||||||
0, /*tp_call*/
|
0, /*tp_call*/
|
||||||
(reprfunc)binary_str, /*tp_str*/
|
(reprfunc)binary_str, /*tp_str*/
|
||||||
0, /*tp_getattro*/
|
0, /*tp_getattro*/
|
||||||
0, /*tp_setattro*/
|
0, /*tp_setattro*/
|
||||||
0, /*tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
|
|
||||||
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
||||||
|
|
||||||
binaryType_doc, /*tp_doc*/
|
binaryType_doc, /*tp_doc*/
|
||||||
|
|
||||||
binary_traverse, /*tp_traverse*/
|
binary_traverse, /*tp_traverse*/
|
||||||
0, /*tp_clear*/
|
0, /*tp_clear*/
|
||||||
|
|
||||||
0, /*tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
|
|
||||||
0, /*tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
|
|
||||||
/* Attribute descriptor and subclassing stuff */
|
|
||||||
|
|
||||||
binaryObject_methods, /*tp_methods*/
|
binaryObject_methods, /*tp_methods*/
|
||||||
binaryObject_members, /*tp_members*/
|
binaryObject_members, /*tp_members*/
|
||||||
0, /*tp_getset*/
|
0, /*tp_getset*/
|
||||||
0, /*tp_base*/
|
0, /*tp_base*/
|
||||||
0, /*tp_dict*/
|
0, /*tp_dict*/
|
||||||
|
|
||||||
0, /*tp_descr_get*/
|
0, /*tp_descr_get*/
|
||||||
0, /*tp_descr_set*/
|
0, /*tp_descr_set*/
|
||||||
0, /*tp_dictoffset*/
|
0, /*tp_dictoffset*/
|
||||||
|
|
||||||
binary_init, /*tp_init*/
|
binary_init, /*tp_init*/
|
||||||
0, /*tp_alloc will be set to PyType_GenericAlloc in module init*/
|
0, /*tp_alloc will be set to PyType_GenericAlloc in module init*/
|
||||||
binary_new, /*tp_new*/
|
binary_new, /*tp_new*/
|
||||||
(freefunc)binary_del, /*tp_free Low-level free-memory routine */
|
|
||||||
0, /*tp_is_gc For PyObject_IS_GC */
|
|
||||||
0, /*tp_bases*/
|
|
||||||
0, /*tp_mro method resolution order */
|
|
||||||
0, /*tp_cache*/
|
|
||||||
0, /*tp_subclasses*/
|
|
||||||
0 /*tp_weaklist*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -223,12 +223,6 @@ pydatetime_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
return type->tp_alloc(type, 0);
|
return type->tp_alloc(type, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
pydatetime_del(PyObject* self)
|
|
||||||
{
|
|
||||||
PyObject_GC_Del(self);
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
pydatetime_repr(pydatetimeObject *self)
|
pydatetime_repr(pydatetimeObject *self)
|
||||||
{
|
{
|
||||||
|
@ -244,61 +238,41 @@ pydatetime_repr(pydatetimeObject *self)
|
||||||
PyTypeObject pydatetimeType = {
|
PyTypeObject pydatetimeType = {
|
||||||
PyVarObject_HEAD_INIT(NULL, 0)
|
PyVarObject_HEAD_INIT(NULL, 0)
|
||||||
"psycopg2._psycopg.datetime",
|
"psycopg2._psycopg.datetime",
|
||||||
sizeof(pydatetimeObject),
|
sizeof(pydatetimeObject), 0,
|
||||||
0,
|
|
||||||
pydatetime_dealloc, /*tp_dealloc*/
|
pydatetime_dealloc, /*tp_dealloc*/
|
||||||
0, /*tp_print*/
|
0, /*tp_print*/
|
||||||
0, /*tp_getattr*/
|
0, /*tp_getattr*/
|
||||||
0, /*tp_setattr*/
|
0, /*tp_setattr*/
|
||||||
|
|
||||||
0, /*tp_compare*/
|
0, /*tp_compare*/
|
||||||
(reprfunc)pydatetime_repr, /*tp_repr*/
|
(reprfunc)pydatetime_repr, /*tp_repr*/
|
||||||
0, /*tp_as_number*/
|
0, /*tp_as_number*/
|
||||||
0, /*tp_as_sequence*/
|
0, /*tp_as_sequence*/
|
||||||
0, /*tp_as_mapping*/
|
0, /*tp_as_mapping*/
|
||||||
0, /*tp_hash */
|
0, /*tp_hash */
|
||||||
|
|
||||||
0, /*tp_call*/
|
0, /*tp_call*/
|
||||||
(reprfunc)pydatetime_str, /*tp_str*/
|
(reprfunc)pydatetime_str, /*tp_str*/
|
||||||
0, /*tp_getattro*/
|
0, /*tp_getattro*/
|
||||||
0, /*tp_setattro*/
|
0, /*tp_setattro*/
|
||||||
0, /*tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
|
|
||||||
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
||||||
|
|
||||||
pydatetimeType_doc, /*tp_doc*/
|
pydatetimeType_doc, /*tp_doc*/
|
||||||
|
|
||||||
pydatetime_traverse, /*tp_traverse*/
|
pydatetime_traverse, /*tp_traverse*/
|
||||||
0, /*tp_clear*/
|
0, /*tp_clear*/
|
||||||
|
|
||||||
0, /*tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
|
|
||||||
0, /*tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
|
|
||||||
/* Attribute descriptor and subclassing stuff */
|
|
||||||
|
|
||||||
pydatetimeObject_methods, /*tp_methods*/
|
pydatetimeObject_methods, /*tp_methods*/
|
||||||
pydatetimeObject_members, /*tp_members*/
|
pydatetimeObject_members, /*tp_members*/
|
||||||
0, /*tp_getset*/
|
0, /*tp_getset*/
|
||||||
0, /*tp_base*/
|
0, /*tp_base*/
|
||||||
0, /*tp_dict*/
|
0, /*tp_dict*/
|
||||||
|
|
||||||
0, /*tp_descr_get*/
|
0, /*tp_descr_get*/
|
||||||
0, /*tp_descr_set*/
|
0, /*tp_descr_set*/
|
||||||
0, /*tp_dictoffset*/
|
0, /*tp_dictoffset*/
|
||||||
|
|
||||||
pydatetime_init, /*tp_init*/
|
pydatetime_init, /*tp_init*/
|
||||||
0, /*tp_alloc will be set to PyType_GenericAlloc in module init*/
|
0, /*tp_alloc will be set to PyType_GenericAlloc in module init*/
|
||||||
pydatetime_new, /*tp_new*/
|
pydatetime_new, /*tp_new*/
|
||||||
(freefunc)pydatetime_del, /*tp_free Low-level free-memory routine */
|
|
||||||
0, /*tp_is_gc For PyObject_IS_GC */
|
|
||||||
0, /*tp_bases*/
|
|
||||||
0, /*tp_mro method resolution order */
|
|
||||||
0, /*tp_cache*/
|
|
||||||
0, /*tp_subclasses*/
|
|
||||||
0 /*tp_weaklist*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -221,12 +221,6 @@ list_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
return type->tp_alloc(type, 0);
|
return type->tp_alloc(type, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
list_del(PyObject* self)
|
|
||||||
{
|
|
||||||
PyObject_GC_Del(self);
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
list_repr(listObject *self)
|
list_repr(listObject *self)
|
||||||
{
|
{
|
||||||
|
@ -241,61 +235,41 @@ list_repr(listObject *self)
|
||||||
PyTypeObject listType = {
|
PyTypeObject listType = {
|
||||||
PyVarObject_HEAD_INIT(NULL, 0)
|
PyVarObject_HEAD_INIT(NULL, 0)
|
||||||
"psycopg2._psycopg.List",
|
"psycopg2._psycopg.List",
|
||||||
sizeof(listObject),
|
sizeof(listObject), 0,
|
||||||
0,
|
|
||||||
list_dealloc, /*tp_dealloc*/
|
list_dealloc, /*tp_dealloc*/
|
||||||
0, /*tp_print*/
|
0, /*tp_print*/
|
||||||
0, /*tp_getattr*/
|
0, /*tp_getattr*/
|
||||||
0, /*tp_setattr*/
|
0, /*tp_setattr*/
|
||||||
|
|
||||||
0, /*tp_compare*/
|
0, /*tp_compare*/
|
||||||
(reprfunc)list_repr, /*tp_repr*/
|
(reprfunc)list_repr, /*tp_repr*/
|
||||||
0, /*tp_as_number*/
|
0, /*tp_as_number*/
|
||||||
0, /*tp_as_sequence*/
|
0, /*tp_as_sequence*/
|
||||||
0, /*tp_as_mapping*/
|
0, /*tp_as_mapping*/
|
||||||
0, /*tp_hash */
|
0, /*tp_hash */
|
||||||
|
|
||||||
0, /*tp_call*/
|
0, /*tp_call*/
|
||||||
(reprfunc)list_str, /*tp_str*/
|
(reprfunc)list_str, /*tp_str*/
|
||||||
0, /*tp_getattro*/
|
0, /*tp_getattro*/
|
||||||
0, /*tp_setattro*/
|
0, /*tp_setattro*/
|
||||||
0, /*tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
|
|
||||||
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
||||||
|
|
||||||
listType_doc, /*tp_doc*/
|
listType_doc, /*tp_doc*/
|
||||||
|
|
||||||
list_traverse, /*tp_traverse*/
|
list_traverse, /*tp_traverse*/
|
||||||
0, /*tp_clear*/
|
0, /*tp_clear*/
|
||||||
|
|
||||||
0, /*tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
|
|
||||||
0, /*tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
|
|
||||||
/* Attribute descriptor and subclassing stuff */
|
|
||||||
|
|
||||||
listObject_methods, /*tp_methods*/
|
listObject_methods, /*tp_methods*/
|
||||||
listObject_members, /*tp_members*/
|
listObject_members, /*tp_members*/
|
||||||
0, /*tp_getset*/
|
0, /*tp_getset*/
|
||||||
0, /*tp_base*/
|
0, /*tp_base*/
|
||||||
0, /*tp_dict*/
|
0, /*tp_dict*/
|
||||||
|
|
||||||
0, /*tp_descr_get*/
|
0, /*tp_descr_get*/
|
||||||
0, /*tp_descr_set*/
|
0, /*tp_descr_set*/
|
||||||
0, /*tp_dictoffset*/
|
0, /*tp_dictoffset*/
|
||||||
|
|
||||||
list_init, /*tp_init*/
|
list_init, /*tp_init*/
|
||||||
0, /*tp_alloc will be set to PyType_GenericAlloc in module init*/
|
0, /*tp_alloc will be set to PyType_GenericAlloc in module init*/
|
||||||
list_new, /*tp_new*/
|
list_new, /*tp_new*/
|
||||||
(freefunc)list_del, /*tp_free Low-level free-memory routine */
|
|
||||||
0, /*tp_is_gc For PyObject_IS_GC */
|
|
||||||
0, /*tp_bases*/
|
|
||||||
0, /*tp_mro method resolution order */
|
|
||||||
0, /*tp_cache*/
|
|
||||||
0, /*tp_subclasses*/
|
|
||||||
0 /*tp_weaklist*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -214,12 +214,6 @@ mxdatetime_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
return type->tp_alloc(type, 0);
|
return type->tp_alloc(type, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
mxdatetime_del(PyObject* self)
|
|
||||||
{
|
|
||||||
PyObject_GC_Del(self);
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
mxdatetime_repr(mxdatetimeObject *self)
|
mxdatetime_repr(mxdatetimeObject *self)
|
||||||
{
|
{
|
||||||
|
@ -235,61 +229,41 @@ mxdatetime_repr(mxdatetimeObject *self)
|
||||||
PyTypeObject mxdatetimeType = {
|
PyTypeObject mxdatetimeType = {
|
||||||
PyVarObject_HEAD_INIT(NULL, 0)
|
PyVarObject_HEAD_INIT(NULL, 0)
|
||||||
"psycopg2._psycopg.MxDateTime",
|
"psycopg2._psycopg.MxDateTime",
|
||||||
sizeof(mxdatetimeObject),
|
sizeof(mxdatetimeObject), 0,
|
||||||
0,
|
|
||||||
mxdatetime_dealloc, /*tp_dealloc*/
|
mxdatetime_dealloc, /*tp_dealloc*/
|
||||||
0, /*tp_print*/
|
0, /*tp_print*/
|
||||||
0, /*tp_getattr*/
|
0, /*tp_getattr*/
|
||||||
0, /*tp_setattr*/
|
0, /*tp_setattr*/
|
||||||
|
|
||||||
0, /*tp_compare*/
|
0, /*tp_compare*/
|
||||||
(reprfunc)mxdatetime_repr, /*tp_repr*/
|
(reprfunc)mxdatetime_repr, /*tp_repr*/
|
||||||
0, /*tp_as_number*/
|
0, /*tp_as_number*/
|
||||||
0, /*tp_as_sequence*/
|
0, /*tp_as_sequence*/
|
||||||
0, /*tp_as_mapping*/
|
0, /*tp_as_mapping*/
|
||||||
0, /*tp_hash */
|
0, /*tp_hash */
|
||||||
|
|
||||||
0, /*tp_call*/
|
0, /*tp_call*/
|
||||||
(reprfunc)mxdatetime_str, /*tp_str*/
|
(reprfunc)mxdatetime_str, /*tp_str*/
|
||||||
0, /*tp_getattro*/
|
0, /*tp_getattro*/
|
||||||
0, /*tp_setattro*/
|
0, /*tp_setattro*/
|
||||||
0, /*tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
|
|
||||||
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
||||||
|
|
||||||
mxdatetimeType_doc, /*tp_doc*/
|
mxdatetimeType_doc, /*tp_doc*/
|
||||||
|
|
||||||
mxdatetime_traverse, /*tp_traverse*/
|
mxdatetime_traverse, /*tp_traverse*/
|
||||||
0, /*tp_clear*/
|
0, /*tp_clear*/
|
||||||
|
|
||||||
0, /*tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
|
|
||||||
0, /*tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
|
|
||||||
/* Attribute descriptor and subclassing stuff */
|
|
||||||
|
|
||||||
mxdatetimeObject_methods, /*tp_methods*/
|
mxdatetimeObject_methods, /*tp_methods*/
|
||||||
mxdatetimeObject_members, /*tp_members*/
|
mxdatetimeObject_members, /*tp_members*/
|
||||||
0, /*tp_getset*/
|
0, /*tp_getset*/
|
||||||
0, /*tp_base*/
|
0, /*tp_base*/
|
||||||
0, /*tp_dict*/
|
0, /*tp_dict*/
|
||||||
|
|
||||||
0, /*tp_descr_get*/
|
0, /*tp_descr_get*/
|
||||||
0, /*tp_descr_set*/
|
0, /*tp_descr_set*/
|
||||||
0, /*tp_dictoffset*/
|
0, /*tp_dictoffset*/
|
||||||
|
|
||||||
mxdatetime_init, /*tp_init*/
|
mxdatetime_init, /*tp_init*/
|
||||||
0, /*tp_alloc*/
|
0, /*tp_alloc*/
|
||||||
mxdatetime_new, /*tp_new*/
|
mxdatetime_new, /*tp_new*/
|
||||||
(freefunc)mxdatetime_del, /*tp_free Low-level free-memory routine */
|
|
||||||
0, /*tp_is_gc For PyObject_IS_GC */
|
|
||||||
0, /*tp_bases*/
|
|
||||||
0, /*tp_mro method resolution order */
|
|
||||||
0, /*tp_cache*/
|
|
||||||
0, /*tp_subclasses*/
|
|
||||||
0 /*tp_weaklist*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -155,12 +155,6 @@ pboolean_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
return type->tp_alloc(type, 0);
|
return type->tp_alloc(type, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
pboolean_del(PyObject* self)
|
|
||||||
{
|
|
||||||
PyObject_GC_Del(self);
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
pboolean_repr(pbooleanObject *self)
|
pboolean_repr(pbooleanObject *self)
|
||||||
{
|
{
|
||||||
|
@ -177,63 +171,41 @@ pboolean_repr(pbooleanObject *self)
|
||||||
PyTypeObject pbooleanType = {
|
PyTypeObject pbooleanType = {
|
||||||
PyVarObject_HEAD_INIT(NULL, 0)
|
PyVarObject_HEAD_INIT(NULL, 0)
|
||||||
"psycopg2._psycopg.Boolean",
|
"psycopg2._psycopg.Boolean",
|
||||||
sizeof(pbooleanObject),
|
sizeof(pbooleanObject), 0,
|
||||||
0,
|
|
||||||
pboolean_dealloc, /*tp_dealloc*/
|
pboolean_dealloc, /*tp_dealloc*/
|
||||||
0, /*tp_print*/
|
0, /*tp_print*/
|
||||||
|
|
||||||
0, /*tp_getattr*/
|
0, /*tp_getattr*/
|
||||||
0, /*tp_setattr*/
|
0, /*tp_setattr*/
|
||||||
|
|
||||||
0, /*tp_compare*/
|
0, /*tp_compare*/
|
||||||
|
|
||||||
(reprfunc)pboolean_repr, /*tp_repr*/
|
(reprfunc)pboolean_repr, /*tp_repr*/
|
||||||
0, /*tp_as_number*/
|
0, /*tp_as_number*/
|
||||||
0, /*tp_as_sequence*/
|
0, /*tp_as_sequence*/
|
||||||
0, /*tp_as_mapping*/
|
0, /*tp_as_mapping*/
|
||||||
0, /*tp_hash */
|
0, /*tp_hash */
|
||||||
|
|
||||||
0, /*tp_call*/
|
0, /*tp_call*/
|
||||||
(reprfunc)pboolean_str, /*tp_str*/
|
(reprfunc)pboolean_str, /*tp_str*/
|
||||||
|
|
||||||
0, /*tp_getattro*/
|
0, /*tp_getattro*/
|
||||||
0, /*tp_setattro*/
|
0, /*tp_setattro*/
|
||||||
0, /*tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
|
|
||||||
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
||||||
pbooleanType_doc, /*tp_doc*/
|
pbooleanType_doc, /*tp_doc*/
|
||||||
|
|
||||||
pboolean_traverse, /*tp_traverse*/
|
pboolean_traverse, /*tp_traverse*/
|
||||||
0, /*tp_clear*/
|
0, /*tp_clear*/
|
||||||
|
|
||||||
0, /*tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
|
|
||||||
0, /*tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
|
|
||||||
/* Attribute descriptor and subclassing stuff */
|
|
||||||
|
|
||||||
pbooleanObject_methods, /*tp_methods*/
|
pbooleanObject_methods, /*tp_methods*/
|
||||||
pbooleanObject_members, /*tp_members*/
|
pbooleanObject_members, /*tp_members*/
|
||||||
0, /*tp_getset*/
|
0, /*tp_getset*/
|
||||||
0, /*tp_base*/
|
0, /*tp_base*/
|
||||||
0, /*tp_dict*/
|
0, /*tp_dict*/
|
||||||
|
|
||||||
0, /*tp_descr_get*/
|
0, /*tp_descr_get*/
|
||||||
0, /*tp_descr_set*/
|
0, /*tp_descr_set*/
|
||||||
0, /*tp_dictoffset*/
|
0, /*tp_dictoffset*/
|
||||||
|
|
||||||
pboolean_init, /*tp_init*/
|
pboolean_init, /*tp_init*/
|
||||||
0, /*tp_alloc will be set to PyType_GenericAlloc in module init*/
|
0, /*tp_alloc will be set to PyType_GenericAlloc in module init*/
|
||||||
pboolean_new, /*tp_new*/
|
pboolean_new, /*tp_new*/
|
||||||
(freefunc)pboolean_del, /*tp_free Low-level free-memory routine */
|
|
||||||
0, /*tp_is_gc For PyObject_IS_GC */
|
|
||||||
0, /*tp_bases*/
|
|
||||||
0, /*tp_mro method resolution order */
|
|
||||||
0, /*tp_cache*/
|
|
||||||
0, /*tp_subclasses*/
|
|
||||||
0 /*tp_weaklist*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -211,12 +211,6 @@ pdecimal_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
return type->tp_alloc(type, 0);
|
return type->tp_alloc(type, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
pdecimal_del(PyObject* self)
|
|
||||||
{
|
|
||||||
PyObject_GC_Del(self);
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
pdecimal_repr(pdecimalObject *self)
|
pdecimal_repr(pdecimalObject *self)
|
||||||
{
|
{
|
||||||
|
@ -233,63 +227,41 @@ pdecimal_repr(pdecimalObject *self)
|
||||||
PyTypeObject pdecimalType = {
|
PyTypeObject pdecimalType = {
|
||||||
PyVarObject_HEAD_INIT(NULL, 0)
|
PyVarObject_HEAD_INIT(NULL, 0)
|
||||||
"psycopg2._psycopg.Decimal",
|
"psycopg2._psycopg.Decimal",
|
||||||
sizeof(pdecimalObject),
|
sizeof(pdecimalObject), 0,
|
||||||
0,
|
|
||||||
pdecimal_dealloc, /*tp_dealloc*/
|
pdecimal_dealloc, /*tp_dealloc*/
|
||||||
0, /*tp_print*/
|
0, /*tp_print*/
|
||||||
|
|
||||||
0, /*tp_getattr*/
|
0, /*tp_getattr*/
|
||||||
0, /*tp_setattr*/
|
0, /*tp_setattr*/
|
||||||
|
|
||||||
0, /*tp_compare*/
|
0, /*tp_compare*/
|
||||||
|
|
||||||
(reprfunc)pdecimal_repr, /*tp_repr*/
|
(reprfunc)pdecimal_repr, /*tp_repr*/
|
||||||
0, /*tp_as_number*/
|
0, /*tp_as_number*/
|
||||||
0, /*tp_as_sequence*/
|
0, /*tp_as_sequence*/
|
||||||
0, /*tp_as_mapping*/
|
0, /*tp_as_mapping*/
|
||||||
0, /*tp_hash */
|
0, /*tp_hash */
|
||||||
|
|
||||||
0, /*tp_call*/
|
0, /*tp_call*/
|
||||||
(reprfunc)pdecimal_str, /*tp_str*/
|
(reprfunc)pdecimal_str, /*tp_str*/
|
||||||
|
|
||||||
0, /*tp_getattro*/
|
0, /*tp_getattro*/
|
||||||
0, /*tp_setattro*/
|
0, /*tp_setattro*/
|
||||||
0, /*tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
|
|
||||||
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
||||||
pdecimalType_doc, /*tp_doc*/
|
pdecimalType_doc, /*tp_doc*/
|
||||||
|
|
||||||
pdecimal_traverse, /*tp_traverse*/
|
pdecimal_traverse, /*tp_traverse*/
|
||||||
0, /*tp_clear*/
|
0, /*tp_clear*/
|
||||||
|
|
||||||
0, /*tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
|
|
||||||
0, /*tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
|
|
||||||
/* Attribute descriptor and subclassing stuff */
|
|
||||||
|
|
||||||
pdecimalObject_methods, /*tp_methods*/
|
pdecimalObject_methods, /*tp_methods*/
|
||||||
pdecimalObject_members, /*tp_members*/
|
pdecimalObject_members, /*tp_members*/
|
||||||
0, /*tp_getset*/
|
0, /*tp_getset*/
|
||||||
0, /*tp_base*/
|
0, /*tp_base*/
|
||||||
0, /*tp_dict*/
|
0, /*tp_dict*/
|
||||||
|
|
||||||
0, /*tp_descr_get*/
|
0, /*tp_descr_get*/
|
||||||
0, /*tp_descr_set*/
|
0, /*tp_descr_set*/
|
||||||
0, /*tp_dictoffset*/
|
0, /*tp_dictoffset*/
|
||||||
|
|
||||||
pdecimal_init, /*tp_init*/
|
pdecimal_init, /*tp_init*/
|
||||||
0, /*tp_alloc will be set to PyType_GenericAlloc in module init*/
|
0, /*tp_alloc will be set to PyType_GenericAlloc in module init*/
|
||||||
pdecimal_new, /*tp_new*/
|
pdecimal_new, /*tp_new*/
|
||||||
(freefunc)pdecimal_del, /*tp_free Low-level free-memory routine */
|
|
||||||
0, /*tp_is_gc For PyObject_IS_GC */
|
|
||||||
0, /*tp_bases*/
|
|
||||||
0, /*tp_mro method resolution order */
|
|
||||||
0, /*tp_cache*/
|
|
||||||
0, /*tp_subclasses*/
|
|
||||||
0 /*tp_weaklist*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -184,12 +184,6 @@ pfloat_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
return type->tp_alloc(type, 0);
|
return type->tp_alloc(type, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
pfloat_del(PyObject* self)
|
|
||||||
{
|
|
||||||
PyObject_GC_Del(self);
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
pfloat_repr(pfloatObject *self)
|
pfloat_repr(pfloatObject *self)
|
||||||
{
|
{
|
||||||
|
@ -206,63 +200,41 @@ pfloat_repr(pfloatObject *self)
|
||||||
PyTypeObject pfloatType = {
|
PyTypeObject pfloatType = {
|
||||||
PyVarObject_HEAD_INIT(NULL, 0)
|
PyVarObject_HEAD_INIT(NULL, 0)
|
||||||
"psycopg2._psycopg.Float",
|
"psycopg2._psycopg.Float",
|
||||||
sizeof(pfloatObject),
|
sizeof(pfloatObject), 0,
|
||||||
0,
|
|
||||||
pfloat_dealloc, /*tp_dealloc*/
|
pfloat_dealloc, /*tp_dealloc*/
|
||||||
0, /*tp_print*/
|
0, /*tp_print*/
|
||||||
|
|
||||||
0, /*tp_getattr*/
|
0, /*tp_getattr*/
|
||||||
0, /*tp_setattr*/
|
0, /*tp_setattr*/
|
||||||
|
|
||||||
0, /*tp_compare*/
|
0, /*tp_compare*/
|
||||||
|
|
||||||
(reprfunc)pfloat_repr, /*tp_repr*/
|
(reprfunc)pfloat_repr, /*tp_repr*/
|
||||||
0, /*tp_as_number*/
|
0, /*tp_as_number*/
|
||||||
0, /*tp_as_sequence*/
|
0, /*tp_as_sequence*/
|
||||||
0, /*tp_as_mapping*/
|
0, /*tp_as_mapping*/
|
||||||
0, /*tp_hash */
|
0, /*tp_hash */
|
||||||
|
|
||||||
0, /*tp_call*/
|
0, /*tp_call*/
|
||||||
(reprfunc)pfloat_str, /*tp_str*/
|
(reprfunc)pfloat_str, /*tp_str*/
|
||||||
|
|
||||||
0, /*tp_getattro*/
|
0, /*tp_getattro*/
|
||||||
0, /*tp_setattro*/
|
0, /*tp_setattro*/
|
||||||
0, /*tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
|
|
||||||
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
||||||
pfloatType_doc, /*tp_doc*/
|
pfloatType_doc, /*tp_doc*/
|
||||||
|
|
||||||
pfloat_traverse, /*tp_traverse*/
|
pfloat_traverse, /*tp_traverse*/
|
||||||
0, /*tp_clear*/
|
0, /*tp_clear*/
|
||||||
|
|
||||||
0, /*tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
|
|
||||||
0, /*tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
|
|
||||||
/* Attribute descriptor and subclassing stuff */
|
|
||||||
|
|
||||||
pfloatObject_methods, /*tp_methods*/
|
pfloatObject_methods, /*tp_methods*/
|
||||||
pfloatObject_members, /*tp_members*/
|
pfloatObject_members, /*tp_members*/
|
||||||
0, /*tp_getset*/
|
0, /*tp_getset*/
|
||||||
0, /*tp_base*/
|
0, /*tp_base*/
|
||||||
0, /*tp_dict*/
|
0, /*tp_dict*/
|
||||||
|
|
||||||
0, /*tp_descr_get*/
|
0, /*tp_descr_get*/
|
||||||
0, /*tp_descr_set*/
|
0, /*tp_descr_set*/
|
||||||
0, /*tp_dictoffset*/
|
0, /*tp_dictoffset*/
|
||||||
|
|
||||||
pfloat_init, /*tp_init*/
|
pfloat_init, /*tp_init*/
|
||||||
0, /*tp_alloc will be set to PyType_GenericAlloc in module init*/
|
0, /*tp_alloc will be set to PyType_GenericAlloc in module init*/
|
||||||
pfloat_new, /*tp_new*/
|
pfloat_new, /*tp_new*/
|
||||||
(freefunc)pfloat_del, /*tp_free Low-level free-memory routine */
|
|
||||||
0, /*tp_is_gc For PyObject_IS_GC */
|
|
||||||
0, /*tp_bases*/
|
|
||||||
0, /*tp_mro method resolution order */
|
|
||||||
0, /*tp_cache*/
|
|
||||||
0, /*tp_subclasses*/
|
|
||||||
0 /*tp_weaklist*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -170,12 +170,6 @@ pint_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
return type->tp_alloc(type, 0);
|
return type->tp_alloc(type, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
pint_del(PyObject* self)
|
|
||||||
{
|
|
||||||
PyObject_GC_Del(self);
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
pint_repr(pintObject *self)
|
pint_repr(pintObject *self)
|
||||||
{
|
{
|
||||||
|
@ -192,63 +186,41 @@ pint_repr(pintObject *self)
|
||||||
PyTypeObject pintType = {
|
PyTypeObject pintType = {
|
||||||
PyVarObject_HEAD_INIT(NULL, 0)
|
PyVarObject_HEAD_INIT(NULL, 0)
|
||||||
"psycopg2._psycopg.Int",
|
"psycopg2._psycopg.Int",
|
||||||
sizeof(pintObject),
|
sizeof(pintObject), 0,
|
||||||
0,
|
|
||||||
pint_dealloc, /*tp_dealloc*/
|
pint_dealloc, /*tp_dealloc*/
|
||||||
0, /*tp_print*/
|
0, /*tp_print*/
|
||||||
|
|
||||||
0, /*tp_getattr*/
|
0, /*tp_getattr*/
|
||||||
0, /*tp_setattr*/
|
0, /*tp_setattr*/
|
||||||
|
|
||||||
0, /*tp_compare*/
|
0, /*tp_compare*/
|
||||||
|
|
||||||
(reprfunc)pint_repr, /*tp_repr*/
|
(reprfunc)pint_repr, /*tp_repr*/
|
||||||
0, /*tp_as_number*/
|
0, /*tp_as_number*/
|
||||||
0, /*tp_as_sequence*/
|
0, /*tp_as_sequence*/
|
||||||
0, /*tp_as_mapping*/
|
0, /*tp_as_mapping*/
|
||||||
0, /*tp_hash */
|
0, /*tp_hash */
|
||||||
|
|
||||||
0, /*tp_call*/
|
0, /*tp_call*/
|
||||||
(reprfunc)pint_str, /*tp_str*/
|
(reprfunc)pint_str, /*tp_str*/
|
||||||
|
|
||||||
0, /*tp_getattro*/
|
0, /*tp_getattro*/
|
||||||
0, /*tp_setattro*/
|
0, /*tp_setattro*/
|
||||||
0, /*tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
|
|
||||||
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
||||||
pintType_doc, /*tp_doc*/
|
pintType_doc, /*tp_doc*/
|
||||||
|
|
||||||
pint_traverse, /*tp_traverse*/
|
pint_traverse, /*tp_traverse*/
|
||||||
0, /*tp_clear*/
|
0, /*tp_clear*/
|
||||||
|
|
||||||
0, /*tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
|
|
||||||
0, /*tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
|
|
||||||
/* Attribute descriptor and subclassing stuff */
|
|
||||||
|
|
||||||
pintObject_methods, /*tp_methods*/
|
pintObject_methods, /*tp_methods*/
|
||||||
pintObject_members, /*tp_members*/
|
pintObject_members, /*tp_members*/
|
||||||
0, /*tp_getset*/
|
0, /*tp_getset*/
|
||||||
0, /*tp_base*/
|
0, /*tp_base*/
|
||||||
0, /*tp_dict*/
|
0, /*tp_dict*/
|
||||||
|
|
||||||
0, /*tp_descr_get*/
|
0, /*tp_descr_get*/
|
||||||
0, /*tp_descr_set*/
|
0, /*tp_descr_set*/
|
||||||
0, /*tp_dictoffset*/
|
0, /*tp_dictoffset*/
|
||||||
|
|
||||||
pint_init, /*tp_init*/
|
pint_init, /*tp_init*/
|
||||||
0, /*tp_alloc will be set to PyType_GenericAlloc in module init*/
|
0, /*tp_alloc will be set to PyType_GenericAlloc in module init*/
|
||||||
pint_new, /*tp_new*/
|
pint_new, /*tp_new*/
|
||||||
(freefunc)pint_del, /*tp_free Low-level free-memory routine */
|
|
||||||
0, /*tp_is_gc For PyObject_IS_GC */
|
|
||||||
0, /*tp_bases*/
|
|
||||||
0, /*tp_mro method resolution order */
|
|
||||||
0, /*tp_cache*/
|
|
||||||
0, /*tp_subclasses*/
|
|
||||||
0 /*tp_weaklist*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -248,12 +248,6 @@ qstring_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
return type->tp_alloc(type, 0);
|
return type->tp_alloc(type, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
qstring_del(PyObject* self)
|
|
||||||
{
|
|
||||||
PyObject_GC_Del(self);
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
qstring_repr(qstringObject *self)
|
qstring_repr(qstringObject *self)
|
||||||
{
|
{
|
||||||
|
@ -269,61 +263,41 @@ qstring_repr(qstringObject *self)
|
||||||
PyTypeObject qstringType = {
|
PyTypeObject qstringType = {
|
||||||
PyVarObject_HEAD_INIT(NULL, 0)
|
PyVarObject_HEAD_INIT(NULL, 0)
|
||||||
"psycopg2._psycopg.QuotedString",
|
"psycopg2._psycopg.QuotedString",
|
||||||
sizeof(qstringObject),
|
sizeof(qstringObject), 0,
|
||||||
0,
|
|
||||||
qstring_dealloc, /*tp_dealloc*/
|
qstring_dealloc, /*tp_dealloc*/
|
||||||
0, /*tp_print*/
|
0, /*tp_print*/
|
||||||
0, /*tp_getattr*/
|
0, /*tp_getattr*/
|
||||||
0, /*tp_setattr*/
|
0, /*tp_setattr*/
|
||||||
|
|
||||||
0, /*tp_compare*/
|
0, /*tp_compare*/
|
||||||
(reprfunc)qstring_repr, /*tp_repr*/
|
(reprfunc)qstring_repr, /*tp_repr*/
|
||||||
0, /*tp_as_number*/
|
0, /*tp_as_number*/
|
||||||
0, /*tp_as_sequence*/
|
0, /*tp_as_sequence*/
|
||||||
0, /*tp_as_mapping*/
|
0, /*tp_as_mapping*/
|
||||||
0, /*tp_hash */
|
0, /*tp_hash */
|
||||||
|
|
||||||
0, /*tp_call*/
|
0, /*tp_call*/
|
||||||
(reprfunc)qstring_str, /*tp_str*/
|
(reprfunc)qstring_str, /*tp_str*/
|
||||||
0, /*tp_getattro*/
|
0, /*tp_getattro*/
|
||||||
0, /*tp_setattro*/
|
0, /*tp_setattro*/
|
||||||
0, /*tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
|
|
||||||
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
||||||
|
|
||||||
qstringType_doc, /*tp_doc*/
|
qstringType_doc, /*tp_doc*/
|
||||||
|
|
||||||
qstring_traverse, /*tp_traverse*/
|
qstring_traverse, /*tp_traverse*/
|
||||||
0, /*tp_clear*/
|
0, /*tp_clear*/
|
||||||
|
|
||||||
0, /*tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
|
|
||||||
0, /*tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
|
|
||||||
/* Attribute descriptor and subclassing stuff */
|
|
||||||
|
|
||||||
qstringObject_methods, /*tp_methods*/
|
qstringObject_methods, /*tp_methods*/
|
||||||
qstringObject_members, /*tp_members*/
|
qstringObject_members, /*tp_members*/
|
||||||
0, /*tp_getset*/
|
0, /*tp_getset*/
|
||||||
0, /*tp_base*/
|
0, /*tp_base*/
|
||||||
0, /*tp_dict*/
|
0, /*tp_dict*/
|
||||||
|
|
||||||
0, /*tp_descr_get*/
|
0, /*tp_descr_get*/
|
||||||
0, /*tp_descr_set*/
|
0, /*tp_descr_set*/
|
||||||
0, /*tp_dictoffset*/
|
0, /*tp_dictoffset*/
|
||||||
|
|
||||||
qstring_init, /*tp_init*/
|
qstring_init, /*tp_init*/
|
||||||
0, /*tp_alloc will be set to PyType_GenericAlloc in module init*/
|
0, /*tp_alloc will be set to PyType_GenericAlloc in module init*/
|
||||||
qstring_new, /*tp_new*/
|
qstring_new, /*tp_new*/
|
||||||
(freefunc)qstring_del, /*tp_free Low-level free-memory routine */
|
|
||||||
0, /*tp_is_gc For PyObject_IS_GC */
|
|
||||||
0, /*tp_bases*/
|
|
||||||
0, /*tp_mro method resolution order */
|
|
||||||
0, /*tp_cache*/
|
|
||||||
0, /*tp_subclasses*/
|
|
||||||
0 /*tp_weaklist*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1173,12 +1173,6 @@ connection_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
return type->tp_alloc(type, 0);
|
return type->tp_alloc(type, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
connection_del(PyObject* self)
|
|
||||||
{
|
|
||||||
PyObject_GC_Del(self);
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
connection_repr(connectionObject *self)
|
connection_repr(connectionObject *self)
|
||||||
{
|
{
|
||||||
|
@ -1213,8 +1207,7 @@ connection_traverse(connectionObject *self, visitproc visit, void *arg)
|
||||||
PyTypeObject connectionType = {
|
PyTypeObject connectionType = {
|
||||||
PyVarObject_HEAD_INIT(NULL, 0)
|
PyVarObject_HEAD_INIT(NULL, 0)
|
||||||
"psycopg2._psycopg.connection",
|
"psycopg2._psycopg.connection",
|
||||||
sizeof(connectionObject),
|
sizeof(connectionObject), 0,
|
||||||
0,
|
|
||||||
connection_dealloc, /*tp_dealloc*/
|
connection_dealloc, /*tp_dealloc*/
|
||||||
0, /*tp_print*/
|
0, /*tp_print*/
|
||||||
0, /*tp_getattr*/
|
0, /*tp_getattr*/
|
||||||
|
@ -1225,47 +1218,30 @@ PyTypeObject connectionType = {
|
||||||
0, /*tp_as_sequence*/
|
0, /*tp_as_sequence*/
|
||||||
0, /*tp_as_mapping*/
|
0, /*tp_as_mapping*/
|
||||||
0, /*tp_hash */
|
0, /*tp_hash */
|
||||||
|
|
||||||
0, /*tp_call*/
|
0, /*tp_call*/
|
||||||
(reprfunc)connection_repr, /*tp_str*/
|
(reprfunc)connection_repr, /*tp_str*/
|
||||||
0, /*tp_getattro*/
|
0, /*tp_getattro*/
|
||||||
0, /*tp_setattro*/
|
0, /*tp_setattro*/
|
||||||
0, /*tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
|
|
||||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC |
|
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC |
|
||||||
Py_TPFLAGS_HAVE_WEAKREFS,
|
Py_TPFLAGS_HAVE_WEAKREFS,
|
||||||
/*tp_flags*/
|
/*tp_flags*/
|
||||||
connectionType_doc, /*tp_doc*/
|
connectionType_doc, /*tp_doc*/
|
||||||
|
|
||||||
(traverseproc)connection_traverse, /*tp_traverse*/
|
(traverseproc)connection_traverse, /*tp_traverse*/
|
||||||
0, /*tp_clear*/
|
0, /*tp_clear*/
|
||||||
|
|
||||||
0, /*tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
offsetof(connectionObject, weakreflist), /* tp_weaklistoffset */
|
offsetof(connectionObject, weakreflist), /* tp_weaklistoffset */
|
||||||
|
|
||||||
0, /*tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
|
|
||||||
/* Attribute descriptor and subclassing stuff */
|
|
||||||
|
|
||||||
connectionObject_methods, /*tp_methods*/
|
connectionObject_methods, /*tp_methods*/
|
||||||
connectionObject_members, /*tp_members*/
|
connectionObject_members, /*tp_members*/
|
||||||
connectionObject_getsets, /*tp_getset*/
|
connectionObject_getsets, /*tp_getset*/
|
||||||
0, /*tp_base*/
|
0, /*tp_base*/
|
||||||
0, /*tp_dict*/
|
0, /*tp_dict*/
|
||||||
|
|
||||||
0, /*tp_descr_get*/
|
0, /*tp_descr_get*/
|
||||||
0, /*tp_descr_set*/
|
0, /*tp_descr_set*/
|
||||||
0, /*tp_dictoffset*/
|
0, /*tp_dictoffset*/
|
||||||
|
|
||||||
connection_init, /*tp_init*/
|
connection_init, /*tp_init*/
|
||||||
0, /*tp_alloc will be set to PyType_GenericAlloc in module init*/
|
0, /*tp_alloc will be set to PyType_GenericAlloc in module init*/
|
||||||
connection_new, /*tp_new*/
|
connection_new, /*tp_new*/
|
||||||
(freefunc)connection_del, /*tp_free Low-level free-memory routine */
|
|
||||||
0, /*tp_is_gc For PyObject_IS_GC */
|
|
||||||
0, /*tp_bases*/
|
|
||||||
0, /*tp_mro method resolution order */
|
|
||||||
0, /*tp_cache*/
|
|
||||||
0, /*tp_subclasses*/
|
|
||||||
0 /*tp_weaklist*/
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -1951,12 +1951,6 @@ cursor_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
return type->tp_alloc(type, 0);
|
return type->tp_alloc(type, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
cursor_del(PyObject* self)
|
|
||||||
{
|
|
||||||
PyObject_GC_Del(self);
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
cursor_repr(cursorObject *self)
|
cursor_repr(cursorObject *self)
|
||||||
{
|
{
|
||||||
|
@ -1990,8 +1984,7 @@ cursor_traverse(cursorObject *self, visitproc visit, void *arg)
|
||||||
PyTypeObject cursorType = {
|
PyTypeObject cursorType = {
|
||||||
PyVarObject_HEAD_INIT(NULL, 0)
|
PyVarObject_HEAD_INIT(NULL, 0)
|
||||||
"psycopg2._psycopg.cursor",
|
"psycopg2._psycopg.cursor",
|
||||||
sizeof(cursorObject),
|
sizeof(cursorObject), 0,
|
||||||
0,
|
|
||||||
cursor_dealloc, /*tp_dealloc*/
|
cursor_dealloc, /*tp_dealloc*/
|
||||||
0, /*tp_print*/
|
0, /*tp_print*/
|
||||||
0, /*tp_getattr*/
|
0, /*tp_getattr*/
|
||||||
|
@ -2002,47 +1995,30 @@ PyTypeObject cursorType = {
|
||||||
0, /*tp_as_sequence*/
|
0, /*tp_as_sequence*/
|
||||||
0, /*tp_as_mapping*/
|
0, /*tp_as_mapping*/
|
||||||
0, /*tp_hash */
|
0, /*tp_hash */
|
||||||
|
|
||||||
0, /*tp_call*/
|
0, /*tp_call*/
|
||||||
(reprfunc)cursor_repr, /*tp_str*/
|
(reprfunc)cursor_repr, /*tp_str*/
|
||||||
0, /*tp_getattro*/
|
0, /*tp_getattro*/
|
||||||
0, /*tp_setattro*/
|
0, /*tp_setattro*/
|
||||||
0, /*tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
|
|
||||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_ITER |
|
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_ITER |
|
||||||
Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_WEAKREFS ,
|
Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_WEAKREFS ,
|
||||||
/*tp_flags*/
|
/*tp_flags*/
|
||||||
cursorType_doc, /*tp_doc*/
|
cursorType_doc, /*tp_doc*/
|
||||||
|
|
||||||
(traverseproc)cursor_traverse, /*tp_traverse*/
|
(traverseproc)cursor_traverse, /*tp_traverse*/
|
||||||
0, /*tp_clear*/
|
0, /*tp_clear*/
|
||||||
|
|
||||||
0, /*tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
offsetof(cursorObject, weakreflist), /*tp_weaklistoffset*/
|
offsetof(cursorObject, weakreflist), /*tp_weaklistoffset*/
|
||||||
|
|
||||||
cursor_iter, /*tp_iter*/
|
cursor_iter, /*tp_iter*/
|
||||||
cursor_next, /*tp_iternext*/
|
cursor_next, /*tp_iternext*/
|
||||||
|
|
||||||
/* Attribute descriptor and subclassing stuff */
|
|
||||||
|
|
||||||
cursorObject_methods, /*tp_methods*/
|
cursorObject_methods, /*tp_methods*/
|
||||||
cursorObject_members, /*tp_members*/
|
cursorObject_members, /*tp_members*/
|
||||||
cursorObject_getsets, /*tp_getset*/
|
cursorObject_getsets, /*tp_getset*/
|
||||||
0, /*tp_base*/
|
0, /*tp_base*/
|
||||||
0, /*tp_dict*/
|
0, /*tp_dict*/
|
||||||
|
|
||||||
0, /*tp_descr_get*/
|
0, /*tp_descr_get*/
|
||||||
0, /*tp_descr_set*/
|
0, /*tp_descr_set*/
|
||||||
0, /*tp_dictoffset*/
|
0, /*tp_dictoffset*/
|
||||||
|
|
||||||
cursor_init, /*tp_init*/
|
cursor_init, /*tp_init*/
|
||||||
0, /*tp_alloc Will be set to PyType_GenericAlloc in module init*/
|
0, /*tp_alloc Will be set to PyType_GenericAlloc in module init*/
|
||||||
cursor_new, /*tp_new*/
|
cursor_new, /*tp_new*/
|
||||||
(freefunc)cursor_del, /*tp_free Low-level free-memory routine */
|
|
||||||
0, /*tp_is_gc For PyObject_IS_GC */
|
|
||||||
0, /*tp_bases*/
|
|
||||||
0, /*tp_mro method resolution order */
|
|
||||||
0, /*tp_cache*/
|
|
||||||
0, /*tp_subclasses*/
|
|
||||||
0 /*tp_weaklist*/
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -147,12 +147,6 @@ diagnostics_dealloc(diagnosticsObject* self)
|
||||||
Py_TYPE(self)->tp_free((PyObject *)self);
|
Py_TYPE(self)->tp_free((PyObject *)self);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
diagnostics_del(PyObject* self)
|
|
||||||
{
|
|
||||||
PyObject_GC_Del(self);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* object type */
|
/* object type */
|
||||||
|
|
||||||
|
@ -173,8 +167,7 @@ static const char diagnosticsType_doc[] =
|
||||||
PyTypeObject diagnosticsType = {
|
PyTypeObject diagnosticsType = {
|
||||||
PyVarObject_HEAD_INIT(NULL, 0)
|
PyVarObject_HEAD_INIT(NULL, 0)
|
||||||
"psycopg2._psycopg.Diagnostics",
|
"psycopg2._psycopg.Diagnostics",
|
||||||
sizeof(diagnosticsObject),
|
sizeof(diagnosticsObject), 0,
|
||||||
0,
|
|
||||||
(destructor)diagnostics_dealloc, /*tp_dealloc*/
|
(destructor)diagnostics_dealloc, /*tp_dealloc*/
|
||||||
0, /*tp_print*/
|
0, /*tp_print*/
|
||||||
0, /*tp_getattr*/
|
0, /*tp_getattr*/
|
||||||
|
@ -185,45 +178,28 @@ PyTypeObject diagnosticsType = {
|
||||||
0, /*tp_as_sequence*/
|
0, /*tp_as_sequence*/
|
||||||
0, /*tp_as_mapping*/
|
0, /*tp_as_mapping*/
|
||||||
0, /*tp_hash */
|
0, /*tp_hash */
|
||||||
|
|
||||||
0, /*tp_call*/
|
0, /*tp_call*/
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
0, /*tp_getattro*/
|
0, /*tp_getattro*/
|
||||||
0, /*tp_setattro*/
|
0, /*tp_setattro*/
|
||||||
0, /*tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
|
|
||||||
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
||||||
diagnosticsType_doc, /*tp_doc*/
|
diagnosticsType_doc, /*tp_doc*/
|
||||||
|
|
||||||
(traverseproc)diagnostics_traverse, /*tp_traverse*/
|
(traverseproc)diagnostics_traverse, /*tp_traverse*/
|
||||||
0, /*tp_clear*/
|
0, /*tp_clear*/
|
||||||
|
|
||||||
0, /*tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
|
|
||||||
0, /*tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
|
|
||||||
/* Attribute descriptor and subclassing stuff */
|
|
||||||
|
|
||||||
0, /*tp_methods*/
|
0, /*tp_methods*/
|
||||||
0, /*tp_members*/
|
0, /*tp_members*/
|
||||||
diagnosticsObject_getsets, /*tp_getset*/
|
diagnosticsObject_getsets, /*tp_getset*/
|
||||||
0, /*tp_base*/
|
0, /*tp_base*/
|
||||||
0, /*tp_dict*/
|
0, /*tp_dict*/
|
||||||
|
|
||||||
0, /*tp_descr_get*/
|
0, /*tp_descr_get*/
|
||||||
0, /*tp_descr_set*/
|
0, /*tp_descr_set*/
|
||||||
0, /*tp_dictoffset*/
|
0, /*tp_dictoffset*/
|
||||||
|
|
||||||
(initproc)diagnostics_init, /*tp_init*/
|
(initproc)diagnostics_init, /*tp_init*/
|
||||||
0, /*tp_alloc will be set to PyType_GenericAlloc in module init*/
|
0, /*tp_alloc will be set to PyType_GenericAlloc in module init*/
|
||||||
diagnostics_new, /*tp_new*/
|
diagnostics_new, /*tp_new*/
|
||||||
(freefunc)diagnostics_del, /*tp_free Low-level free-memory routine */
|
|
||||||
0, /*tp_is_gc For PyObject_IS_GC */
|
|
||||||
0, /*tp_bases*/
|
|
||||||
0, /*tp_mro method resolution order */
|
|
||||||
0, /*tp_cache*/
|
|
||||||
0, /*tp_subclasses*/
|
|
||||||
0 /*tp_weaklist*/
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -245,8 +245,7 @@ static PyMethodDef error_methods[] = {
|
||||||
PyTypeObject errorType = {
|
PyTypeObject errorType = {
|
||||||
PyVarObject_HEAD_INIT(NULL, 0)
|
PyVarObject_HEAD_INIT(NULL, 0)
|
||||||
"psycopg2.Error",
|
"psycopg2.Error",
|
||||||
sizeof(errorObject),
|
sizeof(errorObject), 0,
|
||||||
0,
|
|
||||||
(destructor)error_dealloc, /* tp_dealloc */
|
(destructor)error_dealloc, /* tp_dealloc */
|
||||||
0, /*tp_print*/
|
0, /*tp_print*/
|
||||||
0, /*tp_getattr*/
|
0, /*tp_getattr*/
|
||||||
|
@ -281,11 +280,4 @@ PyTypeObject errorType = {
|
||||||
(initproc)error_init, /*tp_init*/
|
(initproc)error_init, /*tp_init*/
|
||||||
0, /*tp_alloc will be set to PyType_GenericAlloc in module init*/
|
0, /*tp_alloc will be set to PyType_GenericAlloc in module init*/
|
||||||
error_new, /*tp_new*/
|
error_new, /*tp_new*/
|
||||||
0, /*tp_free Low-level free-memory routine */
|
|
||||||
0, /*tp_is_gc For PyObject_IS_GC */
|
|
||||||
0, /*tp_bases*/
|
|
||||||
0, /*tp_mro method resolution order */
|
|
||||||
0, /*tp_cache*/
|
|
||||||
0, /*tp_subclasses*/
|
|
||||||
0 /*tp_weaklist*/
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -392,12 +392,6 @@ lobject_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
return type->tp_alloc(type, 0);
|
return type->tp_alloc(type, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
lobject_del(PyObject* self)
|
|
||||||
{
|
|
||||||
PyObject_Del(self);
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
lobject_repr(lobjectObject *self)
|
lobject_repr(lobjectObject *self)
|
||||||
{
|
{
|
||||||
|
@ -414,8 +408,7 @@ lobject_repr(lobjectObject *self)
|
||||||
PyTypeObject lobjectType = {
|
PyTypeObject lobjectType = {
|
||||||
PyVarObject_HEAD_INIT(NULL, 0)
|
PyVarObject_HEAD_INIT(NULL, 0)
|
||||||
"psycopg2._psycopg.lobject",
|
"psycopg2._psycopg.lobject",
|
||||||
sizeof(lobjectObject),
|
sizeof(lobjectObject), 0,
|
||||||
0,
|
|
||||||
lobject_dealloc, /*tp_dealloc*/
|
lobject_dealloc, /*tp_dealloc*/
|
||||||
0, /*tp_print*/
|
0, /*tp_print*/
|
||||||
0, /*tp_getattr*/
|
0, /*tp_getattr*/
|
||||||
|
@ -426,47 +419,30 @@ PyTypeObject lobjectType = {
|
||||||
0, /*tp_as_sequence*/
|
0, /*tp_as_sequence*/
|
||||||
0, /*tp_as_mapping*/
|
0, /*tp_as_mapping*/
|
||||||
0, /*tp_hash */
|
0, /*tp_hash */
|
||||||
|
|
||||||
0, /*tp_call*/
|
0, /*tp_call*/
|
||||||
(reprfunc)lobject_repr, /*tp_str*/
|
(reprfunc)lobject_repr, /*tp_str*/
|
||||||
0, /*tp_getattro*/
|
0, /*tp_getattro*/
|
||||||
0, /*tp_setattro*/
|
0, /*tp_setattro*/
|
||||||
0, /*tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
|
|
||||||
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_ITER, /*tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_ITER, /*tp_flags*/
|
||||||
lobjectType_doc, /*tp_doc*/
|
lobjectType_doc, /*tp_doc*/
|
||||||
|
|
||||||
0, /*tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*tp_clear*/
|
0, /*tp_clear*/
|
||||||
|
|
||||||
0, /*tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
|
|
||||||
0, /*tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
|
|
||||||
/* Attribute descriptor and subclassing stuff */
|
|
||||||
|
|
||||||
lobjectObject_methods, /*tp_methods*/
|
lobjectObject_methods, /*tp_methods*/
|
||||||
lobjectObject_members, /*tp_members*/
|
lobjectObject_members, /*tp_members*/
|
||||||
lobjectObject_getsets, /*tp_getset*/
|
lobjectObject_getsets, /*tp_getset*/
|
||||||
0, /*tp_base*/
|
0, /*tp_base*/
|
||||||
0, /*tp_dict*/
|
0, /*tp_dict*/
|
||||||
|
|
||||||
0, /*tp_descr_get*/
|
0, /*tp_descr_get*/
|
||||||
0, /*tp_descr_set*/
|
0, /*tp_descr_set*/
|
||||||
0, /*tp_dictoffset*/
|
0, /*tp_dictoffset*/
|
||||||
|
|
||||||
lobject_init, /*tp_init*/
|
lobject_init, /*tp_init*/
|
||||||
0, /*tp_alloc Will be set to PyType_GenericAlloc in module init*/
|
0, /*tp_alloc Will be set to PyType_GenericAlloc in module init*/
|
||||||
lobject_new, /*tp_new*/
|
lobject_new, /*tp_new*/
|
||||||
(freefunc)lobject_del, /*tp_free Low-level free-memory routine */
|
|
||||||
0, /*tp_is_gc For PyObject_IS_GC */
|
|
||||||
0, /*tp_bases*/
|
|
||||||
0, /*tp_mro method resolution order */
|
|
||||||
0, /*tp_cache*/
|
|
||||||
0, /*tp_subclasses*/
|
|
||||||
0 /*tp_weaklist*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -135,12 +135,6 @@ isqlquote_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
return type->tp_alloc(type, 0);
|
return type->tp_alloc(type, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
isqlquote_del(PyObject* self)
|
|
||||||
{
|
|
||||||
PyObject_Del(self);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* object type */
|
/* object type */
|
||||||
|
|
||||||
|
@ -152,8 +146,7 @@ isqlquote_del(PyObject* self)
|
||||||
PyTypeObject isqlquoteType = {
|
PyTypeObject isqlquoteType = {
|
||||||
PyVarObject_HEAD_INIT(NULL, 0)
|
PyVarObject_HEAD_INIT(NULL, 0)
|
||||||
"psycopg2._psycopg.ISQLQuote",
|
"psycopg2._psycopg.ISQLQuote",
|
||||||
sizeof(isqlquoteObject),
|
sizeof(isqlquoteObject), 0,
|
||||||
0,
|
|
||||||
isqlquote_dealloc, /*tp_dealloc*/
|
isqlquote_dealloc, /*tp_dealloc*/
|
||||||
0, /*tp_print*/
|
0, /*tp_print*/
|
||||||
0, /*tp_getattr*/
|
0, /*tp_getattr*/
|
||||||
|
@ -164,45 +157,28 @@ PyTypeObject isqlquoteType = {
|
||||||
0, /*tp_as_sequence*/
|
0, /*tp_as_sequence*/
|
||||||
0, /*tp_as_mapping*/
|
0, /*tp_as_mapping*/
|
||||||
0, /*tp_hash */
|
0, /*tp_hash */
|
||||||
|
|
||||||
0, /*tp_call*/
|
0, /*tp_call*/
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
0, /*tp_getattro*/
|
0, /*tp_getattro*/
|
||||||
0, /*tp_setattro*/
|
0, /*tp_setattro*/
|
||||||
0, /*tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
|
|
||||||
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /*tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /*tp_flags*/
|
||||||
isqlquoteType_doc, /*tp_doc*/
|
isqlquoteType_doc, /*tp_doc*/
|
||||||
|
|
||||||
0, /*tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*tp_clear*/
|
0, /*tp_clear*/
|
||||||
|
|
||||||
0, /*tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
|
|
||||||
0, /*tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
|
|
||||||
/* Attribute descriptor and subclassing stuff */
|
|
||||||
|
|
||||||
isqlquoteObject_methods, /*tp_methods*/
|
isqlquoteObject_methods, /*tp_methods*/
|
||||||
isqlquoteObject_members, /*tp_members*/
|
isqlquoteObject_members, /*tp_members*/
|
||||||
0, /*tp_getset*/
|
0, /*tp_getset*/
|
||||||
0, /*tp_base*/
|
0, /*tp_base*/
|
||||||
0, /*tp_dict*/
|
0, /*tp_dict*/
|
||||||
|
|
||||||
0, /*tp_descr_get*/
|
0, /*tp_descr_get*/
|
||||||
0, /*tp_descr_set*/
|
0, /*tp_descr_set*/
|
||||||
0, /*tp_dictoffset*/
|
0, /*tp_dictoffset*/
|
||||||
|
|
||||||
isqlquote_init, /*tp_init*/
|
isqlquote_init, /*tp_init*/
|
||||||
0, /*tp_alloc will be set to PyType_GenericAlloc in module init*/
|
0, /*tp_alloc will be set to PyType_GenericAlloc in module init*/
|
||||||
isqlquote_new, /*tp_new*/
|
isqlquote_new, /*tp_new*/
|
||||||
(freefunc)isqlquote_del, /*tp_free Low-level free-memory routine */
|
|
||||||
0, /*tp_is_gc For PyObject_IS_GC */
|
|
||||||
0, /*tp_bases*/
|
|
||||||
0, /*tp_mro method resolution order */
|
|
||||||
0, /*tp_cache*/
|
|
||||||
0, /*tp_subclasses*/
|
|
||||||
0 /*tp_weaklist*/
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -115,12 +115,6 @@ notify_dealloc(notifyObject *self)
|
||||||
Py_TYPE(self)->tp_free((PyObject *)self);
|
Py_TYPE(self)->tp_free((PyObject *)self);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
notify_del(PyObject *self)
|
|
||||||
{
|
|
||||||
PyObject_GC_Del(self);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Convert a notify into a 2 or 3 items tuple. */
|
/* Convert a notify into a 2 or 3 items tuple. */
|
||||||
static PyObject *
|
static PyObject *
|
||||||
|
@ -278,63 +272,41 @@ static PySequenceMethods notify_sequence = {
|
||||||
PyTypeObject notifyType = {
|
PyTypeObject notifyType = {
|
||||||
PyVarObject_HEAD_INIT(NULL, 0)
|
PyVarObject_HEAD_INIT(NULL, 0)
|
||||||
"psycopg2.extensions.Notify",
|
"psycopg2.extensions.Notify",
|
||||||
sizeof(notifyObject),
|
sizeof(notifyObject), 0,
|
||||||
0,
|
|
||||||
(destructor)notify_dealloc, /* tp_dealloc */
|
(destructor)notify_dealloc, /* tp_dealloc */
|
||||||
0, /*tp_print*/
|
0, /*tp_print*/
|
||||||
|
|
||||||
0, /*tp_getattr*/
|
0, /*tp_getattr*/
|
||||||
0, /*tp_setattr*/
|
0, /*tp_setattr*/
|
||||||
|
|
||||||
0, /*tp_compare*/
|
0, /*tp_compare*/
|
||||||
|
|
||||||
(reprfunc)notify_repr, /*tp_repr*/
|
(reprfunc)notify_repr, /*tp_repr*/
|
||||||
0, /*tp_as_number*/
|
0, /*tp_as_number*/
|
||||||
¬ify_sequence, /*tp_as_sequence*/
|
¬ify_sequence, /*tp_as_sequence*/
|
||||||
0, /*tp_as_mapping*/
|
0, /*tp_as_mapping*/
|
||||||
(hashfunc)notify_hash, /*tp_hash */
|
(hashfunc)notify_hash, /*tp_hash */
|
||||||
|
|
||||||
0, /*tp_call*/
|
0, /*tp_call*/
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
|
|
||||||
0, /*tp_getattro*/
|
0, /*tp_getattro*/
|
||||||
0, /*tp_setattro*/
|
0, /*tp_setattro*/
|
||||||
0, /*tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
|
|
||||||
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
||||||
notify_doc, /*tp_doc*/
|
notify_doc, /*tp_doc*/
|
||||||
|
|
||||||
(traverseproc)notify_traverse, /*tp_traverse*/
|
(traverseproc)notify_traverse, /*tp_traverse*/
|
||||||
0, /*tp_clear*/
|
0, /*tp_clear*/
|
||||||
|
|
||||||
(richcmpfunc)notify_richcompare, /*tp_richcompare*/
|
(richcmpfunc)notify_richcompare, /*tp_richcompare*/
|
||||||
0, /*tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
|
|
||||||
0, /*tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
|
|
||||||
/* Attribute descriptor and subclassing stuff */
|
|
||||||
|
|
||||||
0, /*tp_methods*/
|
0, /*tp_methods*/
|
||||||
notify_members, /*tp_members*/
|
notify_members, /*tp_members*/
|
||||||
0, /*tp_getset*/
|
0, /*tp_getset*/
|
||||||
0, /*tp_base*/
|
0, /*tp_base*/
|
||||||
0, /*tp_dict*/
|
0, /*tp_dict*/
|
||||||
|
|
||||||
0, /*tp_descr_get*/
|
0, /*tp_descr_get*/
|
||||||
0, /*tp_descr_set*/
|
0, /*tp_descr_set*/
|
||||||
0, /*tp_dictoffset*/
|
0, /*tp_dictoffset*/
|
||||||
|
|
||||||
(initproc)notify_init, /*tp_init*/
|
(initproc)notify_init, /*tp_init*/
|
||||||
0, /*tp_alloc will be set to PyType_GenericAlloc in module init*/
|
0, /*tp_alloc will be set to PyType_GenericAlloc in module init*/
|
||||||
notify_new, /*tp_new*/
|
notify_new, /*tp_new*/
|
||||||
(freefunc)notify_del, /*tp_free Low-level free-memory routine */
|
|
||||||
0, /*tp_is_gc For PyObject_IS_GC */
|
|
||||||
0, /*tp_bases*/
|
|
||||||
0, /*tp_mro method resolution order */
|
|
||||||
0, /*tp_cache*/
|
|
||||||
0, /*tp_subclasses*/
|
|
||||||
0 /*tp_weaklist*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -441,12 +441,6 @@ typecast_traverse(PyObject *obj, visitproc visit, void *arg)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
typecast_del(void *self)
|
|
||||||
{
|
|
||||||
PyObject_GC_Del(self);
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
typecast_repr(PyObject *self)
|
typecast_repr(PyObject *self)
|
||||||
{
|
{
|
||||||
|
@ -489,9 +483,7 @@ typecast_call(PyObject *obj, PyObject *args, PyObject *kwargs)
|
||||||
PyTypeObject typecastType = {
|
PyTypeObject typecastType = {
|
||||||
PyVarObject_HEAD_INIT(NULL, 0)
|
PyVarObject_HEAD_INIT(NULL, 0)
|
||||||
"psycopg2._psycopg.type",
|
"psycopg2._psycopg.type",
|
||||||
sizeof(typecastObject),
|
sizeof(typecastObject), 0,
|
||||||
0,
|
|
||||||
|
|
||||||
typecast_dealloc, /*tp_dealloc*/
|
typecast_dealloc, /*tp_dealloc*/
|
||||||
0, /*tp_print*/
|
0, /*tp_print*/
|
||||||
0, /*tp_getattr*/
|
0, /*tp_getattr*/
|
||||||
|
@ -502,48 +494,31 @@ PyTypeObject typecastType = {
|
||||||
0, /*tp_as_sequence*/
|
0, /*tp_as_sequence*/
|
||||||
0, /*tp_as_mapping*/
|
0, /*tp_as_mapping*/
|
||||||
0, /*tp_hash */
|
0, /*tp_hash */
|
||||||
|
|
||||||
typecast_call, /*tp_call*/
|
typecast_call, /*tp_call*/
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
0, /*tp_getattro*/
|
0, /*tp_getattro*/
|
||||||
0, /*tp_setattro*/
|
0, /*tp_setattro*/
|
||||||
0, /*tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
|
|
||||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_RICHCOMPARE |
|
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_RICHCOMPARE |
|
||||||
Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
||||||
"psycopg type-casting object", /*tp_doc*/
|
"psycopg type-casting object", /*tp_doc*/
|
||||||
|
|
||||||
typecast_traverse, /*tp_traverse*/
|
typecast_traverse, /*tp_traverse*/
|
||||||
0, /*tp_clear*/
|
0, /*tp_clear*/
|
||||||
|
|
||||||
typecast_richcompare, /*tp_richcompare*/
|
typecast_richcompare, /*tp_richcompare*/
|
||||||
0, /*tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
|
|
||||||
0, /*tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
|
|
||||||
/* Attribute descriptor and subclassing stuff */
|
|
||||||
|
|
||||||
0, /*tp_methods*/
|
0, /*tp_methods*/
|
||||||
typecastObject_members, /*tp_members*/
|
typecastObject_members, /*tp_members*/
|
||||||
0, /*tp_getset*/
|
0, /*tp_getset*/
|
||||||
0, /*tp_base*/
|
0, /*tp_base*/
|
||||||
0, /*tp_dict*/
|
0, /*tp_dict*/
|
||||||
|
|
||||||
0, /*tp_descr_get*/
|
0, /*tp_descr_get*/
|
||||||
0, /*tp_descr_set*/
|
0, /*tp_descr_set*/
|
||||||
0, /*tp_dictoffset*/
|
0, /*tp_dictoffset*/
|
||||||
|
|
||||||
0, /*tp_init*/
|
0, /*tp_init*/
|
||||||
0, /*tp_alloc will be set to PyType_GenericAlloc in module init*/
|
0, /*tp_alloc will be set to PyType_GenericAlloc in module init*/
|
||||||
0, /*tp_new*/
|
0, /*tp_new*/
|
||||||
typecast_del, /*tp_free Low-level free-memory routine */
|
|
||||||
0, /*tp_is_gc For PyObject_IS_GC */
|
|
||||||
0, /*tp_bases*/
|
|
||||||
0, /*tp_mro method resolution order */
|
|
||||||
0, /*tp_cache*/
|
|
||||||
0, /*tp_subclasses*/
|
|
||||||
0 /*tp_weaklist*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
|
|
|
@ -110,9 +110,8 @@ static PyBufferProcs chunk_as_buffer =
|
||||||
|
|
||||||
PyTypeObject chunkType = {
|
PyTypeObject chunkType = {
|
||||||
PyVarObject_HEAD_INIT(NULL, 0)
|
PyVarObject_HEAD_INIT(NULL, 0)
|
||||||
"psycopg2._psycopg.chunk", /* tp_name */
|
"psycopg2._psycopg.chunk",
|
||||||
sizeof(chunkObject), /* tp_basicsize */
|
sizeof(chunkObject), 0,
|
||||||
0, /* tp_itemsize */
|
|
||||||
(destructor) chunk_dealloc, /* tp_dealloc*/
|
(destructor) chunk_dealloc, /* tp_dealloc*/
|
||||||
0, /* tp_print */
|
0, /* tp_print */
|
||||||
0, /* tp_getattr */
|
0, /* tp_getattr */
|
||||||
|
|
|
@ -189,12 +189,6 @@ xid_dealloc(xidObject *self)
|
||||||
Py_TYPE(self)->tp_free((PyObject *)self);
|
Py_TYPE(self)->tp_free((PyObject *)self);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
xid_del(PyObject *self)
|
|
||||||
{
|
|
||||||
PyObject_GC_Del(self);
|
|
||||||
}
|
|
||||||
|
|
||||||
static Py_ssize_t
|
static Py_ssize_t
|
||||||
xid_len(xidObject *self)
|
xid_len(xidObject *self)
|
||||||
{
|
{
|
||||||
|
@ -308,63 +302,41 @@ static struct PyMethodDef xid_methods[] = {
|
||||||
PyTypeObject xidType = {
|
PyTypeObject xidType = {
|
||||||
PyVarObject_HEAD_INIT(NULL, 0)
|
PyVarObject_HEAD_INIT(NULL, 0)
|
||||||
"psycopg2.extensions.Xid",
|
"psycopg2.extensions.Xid",
|
||||||
sizeof(xidObject),
|
sizeof(xidObject), 0,
|
||||||
0,
|
|
||||||
(destructor)xid_dealloc, /* tp_dealloc */
|
(destructor)xid_dealloc, /* tp_dealloc */
|
||||||
0, /*tp_print*/
|
0, /*tp_print*/
|
||||||
|
|
||||||
0, /*tp_getattr*/
|
0, /*tp_getattr*/
|
||||||
0, /*tp_setattr*/
|
0, /*tp_setattr*/
|
||||||
|
|
||||||
0, /*tp_compare*/
|
0, /*tp_compare*/
|
||||||
|
|
||||||
(reprfunc)xid_repr, /*tp_repr*/
|
(reprfunc)xid_repr, /*tp_repr*/
|
||||||
0, /*tp_as_number*/
|
0, /*tp_as_number*/
|
||||||
&xid_sequence, /*tp_as_sequence*/
|
&xid_sequence, /*tp_as_sequence*/
|
||||||
0, /*tp_as_mapping*/
|
0, /*tp_as_mapping*/
|
||||||
0, /*tp_hash */
|
0, /*tp_hash */
|
||||||
|
|
||||||
0, /*tp_call*/
|
0, /*tp_call*/
|
||||||
(reprfunc)xid_str, /*tp_str*/
|
(reprfunc)xid_str, /*tp_str*/
|
||||||
|
|
||||||
0, /*tp_getattro*/
|
0, /*tp_getattro*/
|
||||||
0, /*tp_setattro*/
|
0, /*tp_setattro*/
|
||||||
0, /*tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
|
|
||||||
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
||||||
xid_doc, /*tp_doc*/
|
xid_doc, /*tp_doc*/
|
||||||
|
|
||||||
(traverseproc)xid_traverse, /*tp_traverse*/
|
(traverseproc)xid_traverse, /*tp_traverse*/
|
||||||
0, /*tp_clear*/
|
0, /*tp_clear*/
|
||||||
|
|
||||||
0, /*tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
|
|
||||||
0, /*tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
|
|
||||||
/* Attribute descriptor and subclassing stuff */
|
|
||||||
|
|
||||||
xid_methods, /*tp_methods*/
|
xid_methods, /*tp_methods*/
|
||||||
xid_members, /*tp_members*/
|
xid_members, /*tp_members*/
|
||||||
0, /*tp_getset*/
|
0, /*tp_getset*/
|
||||||
0, /*tp_base*/
|
0, /*tp_base*/
|
||||||
0, /*tp_dict*/
|
0, /*tp_dict*/
|
||||||
|
|
||||||
0, /*tp_descr_get*/
|
0, /*tp_descr_get*/
|
||||||
0, /*tp_descr_set*/
|
0, /*tp_descr_set*/
|
||||||
0, /*tp_dictoffset*/
|
0, /*tp_dictoffset*/
|
||||||
|
|
||||||
(initproc)xid_init, /*tp_init*/
|
(initproc)xid_init, /*tp_init*/
|
||||||
0, /*tp_alloc will be set to PyType_GenericAlloc in module init*/
|
0, /*tp_alloc will be set to PyType_GenericAlloc in module init*/
|
||||||
xid_new, /*tp_new*/
|
xid_new, /*tp_new*/
|
||||||
(freefunc)xid_del, /*tp_free Low-level free-memory routine */
|
|
||||||
0, /*tp_is_gc For PyObject_IS_GC */
|
|
||||||
0, /*tp_bases*/
|
|
||||||
0, /*tp_mro method resolution order */
|
|
||||||
0, /*tp_cache*/
|
|
||||||
0, /*tp_subclasses*/
|
|
||||||
0 /*tp_weaklist*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user