[gs-cvs] An improvement for log message of revision 7837
Leonardo
leonardo at artifex.com
Mon Apr 9 13:46:05 PDT 2007
The rev 7837 log message reads :
"We would like to define the procs as virtual methods
of *clist_file_ptr ...".
We tried this way and discontinued it
because it doesn't simplify the code.
It happens because there are 2 static methods :
fopen and unlink, so an access to them must not go through clist_file_ptr.
Particularly gdev_prn_render_pages can access 'unlink' through
gx_device_clist_reader only.
Thus in this way we still need to keep the 3 pointers
to io_procs from container structures
pclist_dev->common.page_info.io_procs,
pclist_dev->reader.page_info.io_procs,
pclist_dev->writer.page_info.io_procs,
and need to add more 2 pointers :
cfile->procs, bfile->procs.
So the pointer duplication just increases.
Besides that, need a wrapper structure
{clist_io_procs_t *procs, FILE *file; } in gxclfile.c .
At last it needs to insert the [procs into MEMFILE structure,
which likely was designed with no dependence on clist.
Leo.
More information about the gs-cvs
mailing list