Re: [PHP-DEV] Re: Announcement: Next generation ext_skel
l0t3k wrote: Hartmut, will this also generate zend_parse_parameters calls based on prototype ? Sure, see the two samples below. It even adds return statements for the return type specified in the proto where possible. But unlike the current ext_skel it also supports code generation for php.ini values, module globals, constants and resourcetypes ... :) --- function role='public' name='dummy_int' summarydummy integer conversion/summary protoint dummy_int(int bar)/proto /function /* {{{ func int dummy_int(int bar) dummy integer conversion */ PHP_FUNCTION(dummy_int) { int argc = ZEND_NUM_ARGS(); long bar = 0; if (zend_parse_parameters(argc TSRMLS_CC, l, bar) == FAILURE) return; php_error(E_WARNING, dummy_int: not yet implemented); RETURN_LONG(0); } /* }}} */ --- function role='public' name='dummy_resource' summarydummy resource test/summary protoresource dummy_resource(resource bar)/proto /function /* {{{ proto resource dummy_resource(resource bar) dummy resource test */ PHP_FUNCTION(dummy_resource) { zval * bar = NULL; int * bar_id = -1; int argc = ZEND_NUM_ARGS(); if (zend_parse_parameters(argc TSRMLS_CC, r, bar, bar_id) == FAILURE) return; if (bar) { ZEND_FETCH_RESOURCE(???, ???, bar, bar_id, ???, ???_rsrc_id); } php_error(E_WARNING, dummy_resource: not yet implemented); } /* }}} */ -- Six Offene Systeme GmbH http://www.six.de/ i.A. Hartmut Holzgraefe Email: [EMAIL PROTECTED] Tel.: +49-711-99091-77 Sie finden uns auf der CeBIT in Halle 6/H44 http://www.six.de/cebit2003/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: Announcement: Next generation ext_skel
Krhm...you should make it to produce code that meets our coding standards.. :) Use tabs, if (foo) { ... } etc. --Jani On Wed, 26 Feb 2003, Hartmut Holzgraefe wrote: l0t3k wrote: Hartmut, will this also generate zend_parse_parameters calls based on prototype ? Sure, see the two samples below. It even adds return statements for the return type specified in the proto where possible. But unlike the current ext_skel it also supports code generation for php.ini values, module globals, constants and resourcetypes ... :) --- function role='public' name='dummy_int' summarydummy integer conversion/summary protoint dummy_int(int bar)/proto /function /* {{{ func int dummy_int(int bar) dummy integer conversion */ PHP_FUNCTION(dummy_int) { int argc = ZEND_NUM_ARGS(); long bar = 0; if (zend_parse_parameters(argc TSRMLS_CC, l, bar) == FAILURE) return; php_error(E_WARNING, dummy_int: not yet implemented); RETURN_LONG(0); } /* }}} */ --- function role='public' name='dummy_resource' summarydummy resource test/summary protoresource dummy_resource(resource bar)/proto /function /* {{{ proto resource dummy_resource(resource bar) dummy resource test */ PHP_FUNCTION(dummy_resource) { zval * bar = NULL; int * bar_id = -1; int argc = ZEND_NUM_ARGS(); if (zend_parse_parameters(argc TSRMLS_CC, r, bar, bar_id) == FAILURE) return; if (bar) { ZEND_FETCH_RESOURCE(???, ???, bar, bar_id, ???, ???_rsrc_id); } php_error(E_WARNING, dummy_resource: not yet implemented); } /* }}} */ -- - For Sale! - -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: Announcement: Next generation ext_skel
Jani Taskinen wrote: Krhm...you should make it to produce code that meets our coding standards.. :) Use tabs, ... sure, but especially tabs have a very low priority on my list, as having them as '\t' in the generating PHP code hurt readability a lot (and emacs is not clever enough to enforce c-mode indentation settings on code embedded into PHP strings) -- Six Offene Systeme GmbH http://www.six.de/ i.A. Hartmut Holzgraefe Email: [EMAIL PROTECTED] Tel.: +49-711-99091-77 Sie finden uns auf der CeBIT in Halle 6/H44 http://www.six.de/cebit2003/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: Announcement: Next generation ext_skel
Hartmut, will this also generate zend_parse_parameters calls based on prototype ? l0t3k Hartmut Holzgraefe [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] i've just added the first working results of a replacement for the good old ext_skel script in php/scripts/ext_skel_ng -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: Announcement: Next generation ext_skel
The current one does, so it better... On Wed, 19 Feb 2003, l0t3k wrote: Hartmut, will this also generate zend_parse_parameters calls based on prototype ? l0t3k Hartmut Holzgraefe [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] i've just added the first working results of a replacement for the good old ext_skel script in php/scripts/ext_skel_ng -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php