mirror of https://github.com/python/cpython
Small change by Jack Jansen.
Test for self.returntype behaving like OSErr rather than being it.
This commit is contained in:
parent
db75afe6e5
commit
d2cd6f8c93
|
@ -150,9 +150,9 @@ initstuff = """
|
||||||
# This requires that the OSErr type (defined above) has a non-trivial
|
# This requires that the OSErr type (defined above) has a non-trivial
|
||||||
# errorCheck method.
|
# errorCheck method.
|
||||||
class OSErrMixIn:
|
class OSErrMixIn:
|
||||||
"Mix-in class to treat OSErr return values special"
|
"Mix-in class to treat OSErr/OSStatus return values special"
|
||||||
def makereturnvar(self):
|
def makereturnvar(self):
|
||||||
if self.returntype is OSErr:
|
if self.returntype.__class__ == OSErrType:
|
||||||
return Variable(self.returntype, "_err", ErrorMode)
|
return Variable(self.returntype, "_err", ErrorMode)
|
||||||
else:
|
else:
|
||||||
return Variable(self.returntype, "_rv", OutMode)
|
return Variable(self.returntype, "_rv", OutMode)
|
||||||
|
|
Loading…
Reference in New Issue