mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Fix SF #1412837, compile failed with Watcom compiler
This commit is contained in:
@@ -100,16 +100,16 @@ PyCObject_Import(char *module_name, char *name)
|
||||
}
|
||||
|
||||
int
|
||||
PyCObject_SetVoidPtr(PyObject *_self, void *cobj)
|
||||
PyCObject_SetVoidPtr(PyObject *self, void *cobj)
|
||||
{
|
||||
PyCObject* self = (PyCObject*)_self;
|
||||
if (self == NULL || !PyCObject_Check(self) ||
|
||||
self->destructor != NULL) {
|
||||
PyCObject* cself = (PyCObject*)self;
|
||||
if (cself == NULL || !PyCObject_Check(cself) ||
|
||||
cself->destructor != NULL) {
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"Invalid call to PyCObject_SetVoidPtr");
|
||||
return 0;
|
||||
}
|
||||
self->cobject = cobj;
|
||||
cself->cobject = cobj;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user