Re: Re: Help creating a new extension

From: Date: Mon, 12 May 2003 17:26:19 +0000
Subject: Re: Re: Help creating a new extension
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-5334@lists.php.net to get a copy of this message
El Dom 11 May 2003 18:42, Wendy escribió: > Thanks to Johannes' hint, I was able to compile my extension into PHP: > > Functions available in the test extension:<br> > confirm_my_module_compiled<br> > double_it<br> > <br> > Congratulations! You have successfully modified ext/my_module/config.m4. > Module my_module is now compiled into PHP. > > Other than the 'confirm_my_module_compiled' function, I also put in a > 'double_it' function, which has the code shown in the manual: > http://www.php.net/manual/en/zend.creating.php > > ZEND_FUNCTION(double_it) > { > long parameter; > if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "1", &parameter) > == FAILURE) { That "1" should be an "l" (as in long). All letters in that string represent a certain type: l = long, s = string, r = resource, a = array, b = bool, o = object.

« previous php.pear.general (#5334) next »