summaryrefslogtreecommitdiffstats
path: root/PC/_msi.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-04-07 22:38:15 (GMT)
committerGitHub <noreply@github.com>2020-04-07 22:38:15 (GMT)
commit9205520d8c43488696d66cbdd9aefbb21871c508 (patch)
tree6c6d03828fddd763f261d89a9afef18b109c0d3d /PC/_msi.c
parentf9dd51e7db27d04e0b716d41a2804d5acbf145d1 (diff)
downloadcpython-9205520d8c43488696d66cbdd9aefbb21871c508.zip
cpython-9205520d8c43488696d66cbdd9aefbb21871c508.tar.gz
cpython-9205520d8c43488696d66cbdd9aefbb21871c508.tar.bz2
bpo-40170: PyObject_NEW() becomes an alias to PyObject_New() (GH-19379)
The PyObject_NEW() macro becomes an alias to the PyObject_New() macro, and the PyObject_NEW_VAR() macro becomes an alias to the PyObject_NewVar() macro, to hide implementation details. They no longer access directly the PyTypeObject.tp_basicsize member. Exclude _PyObject_SIZE() and _PyObject_VAR_SIZE() macros from the limited C API. Replace PyObject_NEW() with PyObject_New() and replace PyObject_NEW_VAR() with PyObject_NewVar().
Diffstat (limited to 'PC/_msi.c')
-rw-r--r--PC/_msi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/PC/_msi.c b/PC/_msi.c
index accbe7a..6ed8724 100644
--- a/PC/_msi.c
+++ b/PC/_msi.c
@@ -531,7 +531,7 @@ static PyTypeObject record_Type = {
static PyObject*
record_new(MSIHANDLE h)
{
- msiobj *result = PyObject_NEW(struct msiobj, &record_Type);
+ msiobj *result = PyObject_New(struct msiobj, &record_Type);
if (!result) {
MsiCloseHandle(h);
@@ -882,7 +882,7 @@ msidb_openview(msiobj *msidb, PyObject *args)
if ((status = MsiDatabaseOpenView(msidb->h, sql, &hView)) != ERROR_SUCCESS)
return msierror(status);
- result = PyObject_NEW(struct msiobj, &msiview_Type);
+ result = PyObject_New(struct msiobj, &msiview_Type);
if (!result) {
MsiCloseHandle(hView);
return NULL;
@@ -918,7 +918,7 @@ msidb_getsummaryinformation(msiobj *db, PyObject *args)
if (status != ERROR_SUCCESS)
return msierror(status);
- oresult = PyObject_NEW(struct msiobj, &summary_Type);
+ oresult = PyObject_New(struct msiobj, &summary_Type);
if (!oresult) {
MsiCloseHandle(result);
return NULL;
@@ -1013,7 +1013,7 @@ static PyObject* msiopendb(PyObject *obj, PyObject *args)
if (status != ERROR_SUCCESS)
return msierror(status);
- result = PyObject_NEW(struct msiobj, &msidb_Type);
+ result = PyObject_New(struct msiobj, &msidb_Type);
if (!result) {
MsiCloseHandle(h);
return NULL;