|
From: | jemarch |
Subject: | Re: [pdf-devel] http filesystem create/destroy functions needed |
Date: | Sun, 14 Feb 2010 17:17:27 +0100 |
User-agent: | Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/23.1.91 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
> And then call those callbacks in the existing pdf_fsys_create and > pdf_fsys_destroy. Stateless filesystems (such as the disk filesystem) > would not define those callbacks. > > Would this fit your needs? This is exactly what I had in mind. I pushed a patch providing support for both init_fn and cleanup_fn. Note that the filesystem state created at init_fn time is only available at cleanup_fn time. If you need to access the state in some of the other filesystem implementation functions we will need to add a new parameter to the appropriate callback and to change the pdf_fsys_* function to include fsys->data when calling that callback. Another caveat of this solution is that init_fn/cleanup_fn are never called for the default filesystem (I added pdf_fsys_disk_init and pdf_fsys_disk_cleanup for completeness). But since the disk filesystem is stateless that should not be a problem. -- Jose E. Marchesi <address@hidden> http://www.jemarch.net GNU Project http://www.gnu.org
[Prev in Thread] | Current Thread | [Next in Thread] |