Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f1d3aa commit 7589b71Copy full SHA for 7589b71
1 file changed
Modules/cStringIO.c
@@ -389,9 +389,12 @@ O_dealloc(Oobject *self) {
389
390
static PyObject *
391
O_getattr(Oobject *self, char *name) {
392
- if (strcmp(name, "softspace") == 0) {
+ if (name[0] == 's' && strcmp(name, "softspace") == 0) {
393
return PyInt_FromLong(self->softspace);
394
}
395
+ else if (name[0] == 'c' && strcmp(name, "closed") == 0) {
396
+ return PyInt_FromLong(self->closed);
397
+ }
398
return Py_FindMethod(O_methods, (PyObject *)self, name);
399
400
@@ -496,6 +499,9 @@ I_dealloc(Iobject *self) {
496
499
497
500
498
501
I_getattr(Iobject *self, char *name) {
502
+ if (name[0] == 'c' && strcmp(name,"closed") == 0) {
503
504
505
return Py_FindMethod(I_methods, (PyObject *)self, name);
506
507
0 commit comments