summaryrefslogtreecommitdiff
path: root/Include/fileobject.h
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-09-13 05:38:56 +0000
committerTim Peters <tim.peters@gmail.com>2001-09-13 05:38:56 +0000
commit94b8f84e2d9e9ebc9115a6544fb562e2c68296b7 (patch)
tree24d80635212ddb6a58c5c9f5e1a3832a54da34b7 /Include/fileobject.h
parent65949dce5bdaed2cc323c26010d0e247bdbf99e2 (diff)
downloadcpython-94b8f84e2d9e9ebc9115a6544fb562e2c68296b7.tar.gz
SF bug [#460467] file objects should be subclassable.
Preliminary support. What's here works, but needs fine-tuning.
Diffstat (limited to 'Include/fileobject.h')
-rw-r--r--Include/fileobject.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Include/fileobject.h b/Include/fileobject.h
index a3670c2f6a..94d35918c5 100644
--- a/Include/fileobject.h
+++ b/Include/fileobject.h
@@ -9,7 +9,8 @@ extern "C" {
extern DL_IMPORT(PyTypeObject) PyFile_Type;
-#define PyFile_Check(op) ((op)->ob_type == &PyFile_Type)
+#define PyFile_Check(op) PyObject_TypeCheck(op, &PyFile_Type)
+#define PyFile_CheckExact(op) ((op)->ob_type == &PyFile_Type)
extern DL_IMPORT(PyObject *) PyFile_FromString(char *, char *);
extern DL_IMPORT(void) PyFile_SetBufSize(PyObject *, int);