Commit Graph

7 Commits

Author SHA1 Message Date
Andrew M. Kuchling e723863ba1 Remove xreadlines reference 2004-08-31 13:21:07 +00:00
Gustavo Niemeyer a33d0aa693 Unparenting BZ2File, as discussed in SF patch #661796.
* Modules/bz2module.c
  (BZ2FileObject): Now the structure includes a pointer to a file object,
   instead of "inheriting" one. Also, some members were copied from the
   PyFileObject structure to avoid dealing with the internals of that
   structure from outside fileobject.c.

  (Util_GetLine,Util_DropReadAhead,Util_ReadAhead,Util_ReadAheadGetLineSkip,
   BZ2File_write,BZ2File_writelines,BZ2File_init,BZ2File_dealloc,
   BZ2Comp_dealloc,BZ2Decomp_dealloc):
   	These functions were adapted to the change above.

  (BZ2File_seek,BZ2File_close): Use PyObject_CallMethod instead of
   getting the function attribute locally.

  (BZ2File_notsup): Removed, since it's not necessary anymore to overload
   truncate(), and readinto() with dummy functions.

  (BZ2File_methods): Added xreadlines() as an alias to BZ2File_getiter,
   and removed truncate() and readinto().

  (BZ2File_get_newlines,BZ2File_get_closed,BZ2File_get_mode,BZ2File_get_name,
   BZ2File_getset):
   	Implemented getters for "newlines", "mode", and "name".

  (BZ2File_members): Implemented "softspace" member.

  (BZ2File_init): Reworked to create a file instance instead of initializing
   itself as a file subclass. Also, pass "name" object untouched to the
   file constructor, and use PyObject_CallFunction instead of building the
   argument tuple locally.

  (BZ2File_Type): Set tp_new to PyType_GenericNew, tp_members to
   BZ2File_members, and tp_getset to BZ2File_getset.

  (initbz2): Do not set BZ2File_Type.tp_base nor BZ2File_Type.tp_new.


* Doc/lib/libbz2.tex
  Do not mention that BZ2File inherits from the file type.
2003-02-11 18:46:20 +00:00
Gustavo Niemeyer 057ab14e7d * libbz2.tex
Fixed minor typo, suggested by Drew Perttula <drewp@bigasterisk.com>.
2002-11-25 18:51:43 +00:00
Fred Drake 3a2cda876b Minor revisions to clarify the status of xreadlines(), change the way
iteration support was documented; the docs for __iter__() were just
confusing.
2002-11-15 16:38:06 +00:00
Neal Norwitz 110aa50cc2 Fix minor wording and 2 typos 2002-11-05 23:55:27 +00:00
Fred Drake 18c7d98bd1 Fix a few minor nits. Still need to actually proofread this. 2002-11-05 17:54:02 +00:00
Gustavo Niemeyer f8ca8364c9 Patch implementing bz2 module.
* setup.py
  (PyBuildExt.detect_modules): Included bz2 module detection.

* Modules/bz2module.c
* Lib/test/test_bz2.py
* Doc/lib/libbz2.tex
  Included files implementing, testing, and documenting bz2 module.

* Doc/Makefile.deps
* Doc/lib/lib.tex
  Include references to libbz2.tex.

* Misc/NEWS
  (Library): Mention distutils' c++ linkage patch, and new bz2 module.
2002-11-05 16:50:05 +00:00