mirror of
https://github.com/python/cpython.git
synced 2025-07-30 22:54:16 +00:00
#1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT. Macros for b/w compatibility are available.
This commit is contained in:
parent
d586559c31
commit
e93237dfcc
108 changed files with 916 additions and 908 deletions
|
@ -51,7 +51,7 @@ void pysqlite_node_dealloc(pysqlite_Node* self)
|
|||
Py_DECREF(self->key);
|
||||
Py_DECREF(self->data);
|
||||
|
||||
Py_Type(self)->tp_free((PyObject*)self);
|
||||
Py_TYPE(self)->tp_free((PyObject*)self);
|
||||
}
|
||||
|
||||
int pysqlite_cache_init(pysqlite_Cache* self, PyObject* args, PyObject* kwargs)
|
||||
|
@ -109,7 +109,7 @@ void pysqlite_cache_dealloc(pysqlite_Cache* self)
|
|||
}
|
||||
Py_DECREF(self->mapping);
|
||||
|
||||
Py_Type(self)->tp_free((PyObject*)self);
|
||||
Py_TYPE(self)->tp_free((PyObject*)self);
|
||||
}
|
||||
|
||||
PyObject* pysqlite_cache_get(pysqlite_Cache* self, PyObject* args)
|
||||
|
|
|
@ -205,7 +205,7 @@ void pysqlite_connection_dealloc(pysqlite_Connection* self)
|
|||
Py_XDECREF(self->collations);
|
||||
Py_XDECREF(self->statements);
|
||||
|
||||
Py_Type(self)->tp_free((PyObject*)self);
|
||||
Py_TYPE(self)->tp_free((PyObject*)self);
|
||||
}
|
||||
|
||||
PyObject* pysqlite_connection_cursor(pysqlite_Connection* self, PyObject* args, PyObject* kwargs)
|
||||
|
|
|
@ -134,7 +134,7 @@ void pysqlite_cursor_dealloc(pysqlite_Cursor* self)
|
|||
Py_XDECREF(self->row_factory);
|
||||
Py_XDECREF(self->next_row);
|
||||
|
||||
Py_Type(self)->tp_free((PyObject*)self);
|
||||
Py_TYPE(self)->tp_free((PyObject*)self);
|
||||
}
|
||||
|
||||
PyObject* _pysqlite_get_converter(PyObject* key)
|
||||
|
|
|
@ -30,7 +30,7 @@ int pysqlite_prepare_protocol_init(pysqlite_PrepareProtocol* self, PyObject* arg
|
|||
|
||||
void pysqlite_prepare_protocol_dealloc(pysqlite_PrepareProtocol* self)
|
||||
{
|
||||
Py_Type(self)->tp_free((PyObject*)self);
|
||||
Py_TYPE(self)->tp_free((PyObject*)self);
|
||||
}
|
||||
|
||||
PyTypeObject pysqlite_PrepareProtocolType= {
|
||||
|
@ -78,6 +78,6 @@ PyTypeObject pysqlite_PrepareProtocolType= {
|
|||
extern int pysqlite_prepare_protocol_setup_types(void)
|
||||
{
|
||||
pysqlite_PrepareProtocolType.tp_new = PyType_GenericNew;
|
||||
Py_Type(&pysqlite_PrepareProtocolType)= &PyType_Type;
|
||||
Py_TYPE(&pysqlite_PrepareProtocolType)= &PyType_Type;
|
||||
return PyType_Ready(&pysqlite_PrepareProtocolType);
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ void pysqlite_row_dealloc(pysqlite_Row* self)
|
|||
Py_XDECREF(self->data);
|
||||
Py_XDECREF(self->description);
|
||||
|
||||
Py_Type(self)->tp_free((PyObject*)self);
|
||||
Py_TYPE(self)->tp_free((PyObject*)self);
|
||||
}
|
||||
|
||||
int pysqlite_row_init(pysqlite_Row* self, PyObject* args, PyObject* kwargs)
|
||||
|
|
|
@ -313,7 +313,7 @@ void pysqlite_statement_dealloc(pysqlite_Statement* self)
|
|||
PyObject_ClearWeakRefs((PyObject*)self);
|
||||
}
|
||||
|
||||
Py_Type(self)->tp_free((PyObject*)self);
|
||||
Py_TYPE(self)->tp_free((PyObject*)self);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue