I didn't do a diff, as I wasn't sure where in fileobject.c it should go (I just
threw it in somewhere).
This is the extra line for the methodlist struct:
{"nobuf", (method)file_nobuf},
And here is the extra function - it seems to work without any problems but I am
a python NEWBIE so use with care :-)
static object *
file_nobuf(f, args)
fileobject *f;
object *args;
{
if (!getnoarg(args))
return NULL;
if (f->f_fp != NULL) {
if (f->f_close != NULL) {
BGN_SAVE
errno = 0;
setbuf(f->f_fp, NULL);
END_SAVE
}
}
INCREF(None);
return None;
}
Any chance of getting this into the OFFICIAL version (assuming it works
properly).
Thanks
Adrian
-- --------------------- ======================================================================== = = = Adrian Phillips at The Norwegian Meteorological Institute = = = = BUT any thoughts in this are purely my own and have nothing to do with = = this establishment, thankfully. = = = = Internet: daap@typhoon.oslo.dnmi.no = = Phone: 47 22 96 32 09 = = Fax: 47 22 96 30 50 = = = ========================================================================