Re: [PHP-DEV] Big Function Lists From: Hartmut Holzgraefe (hartmut <email protected>)
Date: 11/23/00

Rasmus Lerdorf wrote:
>
> I wrote scripts to do this ages ago.
>
> Make sure you have the php3, php4 and phpdoc trees checked out of cvs.
> Then do:
>
> cd phpdoc
> ./genfunclist ../php3
> ./genfunclist ../php4
>
> You can also try genfuncsummary for a more verbose listing.
>

thats what i started with when creating the function tables :)

but right now it seems to have problems with some files from
the satellite extension producing lots of empty lines and
entires containg ' NULL}'

and both genfunclist and the function table generation code
have problems with functions returning objects

see for example the dir() function in ext/standard/dir.c

it returns a object with methods read(), rewind() and close()
defined by

static zend_function_entry php_dir_class_functions[] = {
        PHP_FALIAS(close, closedir, NULL)
        PHP_FALIAS(rewind, rewinddir, NULL)
        PHP_FALIAS(read, readdir, NULL)
        {NULL, NULL, NULL}
};

right now there is no way for genfunclist to recognice that
theese PHP_FALIAS entries are *not* meant for global use

what about defining two additional macros like PHP_ME()
and PHP_MALIAS() with the same functionality as PHP_FE() and
PHP_FALIAS() that tell by their name that they are meat for
object method entries and write

static zend_function_entry php_dir_class_functions[] = {
        PHP_MALIAS(close, closedir, NULL)
        PHP_MALIAS(rewind, rewinddir, NULL)
        PHP_MALIAS(read, readdir, NULL)
        {NULL, NULL, NULL}
};

instead?

this way object methods could be distinguished from real
functions easyle leading to a correct funclist.txt and
improving the function tables

-- 
Harmut Holzgraefe        hartmut <email protected>

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>