Re: New PECL package request: fuse
| From: | Arnaud Le Blanc | Date: | Tue, 18 Nov 2008 18:09:51 +0000 |
| Subject: | Re: New PECL package request: fuse | ||
| References: | 1 2 3 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-5899@lists.php.net to get a copy of this message | ||
Hi,
On Tuesday 18 November 2008 18:03:11 Bob Carroll wrote:
>
> > This doesn't seem right:
> > ...
> > /* Every user-visible function in PHP should document itself in the source
*/
> > /* {{{ proto string confirm_fuse_compiled(string arg)
> > Return a string to confirm that the module is compiled in */
> > PHP_FUNCTION(fuse_main)
> > ...
> >
> >
> Fixed -- thank you!
> > Also there is no need to use WRONG_PARAM_COUNT; after
zend_parse_parameters(),
> > as the latter already spits out an error when something wrong is passed,
> > so just 'return;' is enough.
> >
> >
> Does that also mean that I don't need to check the parameter count with
> ZEND_NUM_ARGS()? I thought I read somewhere that zend_parse_parameters()
> would barf if it was called without the correct parameter count.
Yes, you do not need to check the number of arguments passed by the user,
zend_parse_parameters() will do that for you.
> > Do you have any test-cases and/or examples?
> >
> >
> I have an example: http://pastebin.ca/1260512. This was for my
> testing
> purposes, but it's basically taken from the hello world example at
>
> http://apps.sourceforge.net/mediawiki/fuse/index.php?title=Hello_World.
>
> Ideally, I would reproduce that example since most people just starting
> out with FUSE will probably be looking at it.
This extension is a great idea :)
What about using FuseOperations as an interface ? So that one just needs to
implement it and pass an instance of it to the fuse functions:
class MyFuseOperations (implements|extends) FuseOperations {
function getattr() {
/* my getattr() impl */
}
function ...
}
$ops = new MyFuseOperations;
fuse_main($argv, $ops);
>
> I also have a config.m4 file (http://pastebin.ca/1260513) and it does
> build with the full source tree. Some of it was auto-generated, but I
> added a few defines and a check for Darwin. I'd send you all the files
> at once, but I don't have a place to put them at the moment.
>
> --
> PECL development discussion Mailing List (http://pecl.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Regards,
Arnaud