mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Fix SF #1412837, compile failed with Watcom compiler
This commit is contained in:
parent
68f2d000e9
commit
bab05c9604
1 changed files with 5 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue