Re: cvs: php4 /ext/rtfm rtfm.c
| From: | Zeev Suraski | Date: | Fri, 27 Apr 2001 10:21:57 +0000 |
| Subject: | Re: cvs: php4 /ext/rtfm rtfm.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-5308@lists.php.net to get a copy of this message | ||
Guys,
Aren't we getting just a tad bit carried away with this module? A couple of points:
- It implements something that doesn't make too much sense to put in a language (running PHP to get help about a PHP function is, well, not quite the logical way to do it).
- If for some odd reason you do feel it should be implemented in a function, it can be implemented in a couple of lines of PHP code, and gains nothing from being written in C
- If for some odd reason we do end up thinking it should be written in C, this tiny function surely doesn't belong in its own module, but in basic_functions.c
Zeev
At 12:10 27/4/2001, Hartmut Holzgraefe wrote:
-- Zeev Suraski <zeev@zend.com> CTO & co-founder, Zend Technologies Ltd. http://www.zend.com/hholzgra Fri Apr 27 02:10:40 2001 EDTModified files:/php4/ext/rtfm rtfm.cLog: parameter renaming Index: php4/ext/rtfm/rtfm.c diff -u php4/ext/rtfm/rtfm.c:1.3 php4/ext/rtfm/rtfm.c:1.4--- php4/ext/rtfm/rtfm.c:1.3 Thu Apr 26 11:28:21 2001 +++ php4/ext/rtfm/rtfm.c Fri Apr 27 02:10:40 2001@@ -71,27 +71,27 @@DISPLAY_INI_ENTRIES();} -/* {{{ proto void rtfm([string functionname]) +/* {{{ proto void rtfm([string topic])*/PHP_FUNCTION(rtfm) {- zval **name; + zval **topic; int argc; RTFMLS_FETCH();argc = ZEND_NUM_ARGS(); - if (argc > 1 || (argc && zend_get_parameters_ex(argc, &name) == FAILURE)){ + if (argc > 1 || (argc && zend_get_parameters_ex(argc, &topic) == FAILURE)){ WRONG_PARAM_COUNT; }switch (argc) { case 1: - convert_to_string_ex(name); + convert_to_string_ex(topic); php_printf("Check the <a href='%s'>Manual</a> for more Information on",RTFMG(manual_url)); php_printf("<a href='%s",RTFMG(manref_url)); - php_write((*name)->value.str.val,(*name)->value.str.len); + php_write((*topic)->value.str.val,(*topic)->value.str.len); php_printf("'>"); - php_write((*name)->value.str.val,(*name)->value.str.len); + php_write((*topic)->value.str.val,(*topic)->value.str.len); php_printf("</a>!\n"); break; case 0:-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-cvs-unsubscribe@lists.php.net For additional commands, e-mail: php-cvs-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net