[PHP-DEV] Re: ccvs extension source From: Brendan W. McAdams (brendan <email protected>)
Date: 08/10/00

On this note, is zval the proper construct for ext/ modules or is it pval ?
-----
Brendan W. McAdams | ph. (305)377-2880
email: brendan <email protected> | cell: (305)218-6466
Programmer/Systems Administrator | pager: (305)277-4879
Plexus M/2, Inc. | fax: (305)377-2870
http://www.plexmedia.com

"Always listen to the experts; they'll tell you what can't be done and why.
Then do it."
        - Robert A. Heinlein
----- Original Message -----
From: "Hartmut Holzgraefe" <hartmut <email protected>>
To: "Brendan W. McAdams" <brendan <email protected>>
Cc: <bmcadams <email protected>>; <php-dev <email protected>>
Sent: Thursday, August 10, 2000 4:00 PM
Subject: Re: ccvs extension source

"Brendan W. McAdams" wrote:
>
> For the most part, what I know of the Zend API is from the Chapter 9
> reference in "Web Application Development With PHP 4.0".
>
> The reccomended macros were the ZEND_* ones.
>
> I guess the questions at hand would be:
>
> 1) is the proper convention for code in the CVS to use the PHP_* macros?

right now all function deklarations under ext/ use the PHP_* macros
while those under Zend/ use the ZEND_* ones with the exception of
your module

even the ext_skel script generates template files with PHP_* macros, and
as it it the official tool for the creation of new extensions it seems
to be the RIGHT THING (tm)

> 2) What difference if any is there between these macro sets? (For my own
> personal edification).

from a quick look at main/php.h and Zend/zend_API.h the only difference
i see is that they prepend different prefixes to the function names you
provide

the c implementaton of a PHP_FUNCTION(name) becomes php_if_name() while
a ZEND_FUNCTION(name) becomes zend_if_name()

and, bye the way, the macros contianing _NAMED_ do not change the name
you provided, so a php function name() would be implemented in a
C function name(), that might be the problem you reported in ccvs.c

 
> I would be more than happy to change them if they should be PHP_* calls.

--
Hartmut Holzgraefe         
  hartmut <email protected>     http://www.six.de    +49-711-99091-77 fax:-99

-- 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>