pdf-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pdf-devel] Is pdf_fsys_file_get_filesystem really necessary?


From: jemarch
Subject: Re: [pdf-devel] Is pdf_fsys_file_get_filesystem really necessary?
Date: Mon, 04 Aug 2008 21:38:10 +0200
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/23.0.60 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

Hello Hans.

   I'm back to work after I was ill during the last few days.

I hope you to be well again :)

   I hope to finish the FS module unit test design in the next few
   days, it was more work than I expected :)

Thanks.

   While going through the FS module I stumbled upon this one

   pdf_fsys_t
   pdf_fsys_file_get_filesystem (pdf_fsys_file_t file)
   {
     /* May be NULL if it is the default filesystem */
       return file->fs;
   }

   due to its enormous triviality two questions came up:

   1. Is this one really needed? It's not used within the FS module, the fs
   attribute of a file is always accessed directly.


That function is present in the filesystem api as an "accessor" for
external purposes. We indeed need it if we want to present pdf_fsys_t
as an opaque type to the user: she may have a collection of "open
files" from several filesystems and may want to call some operation of
the filesystem containing each file.

   2. If it stays, it doesn't need a unit test, does it?

An interesting test would be to get the filesystem of an open file and
then check for some known property of the filesystem (in the unit test
we will have a reference to the pdf_fsys_t from where we opened the
file). 

The implementation of pdf_fsys_file_get_filesystem is certainly
trivial as it is now, but that may change in the future.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]