cvs: php4(PHP_4_0_7) /ext/skeleton skeleton.c skeleton.php

From: Date: Thu, 16 Aug 2001 20:35:34 +0000
Subject: cvs: php4(PHP_4_0_7) /ext/skeleton skeleton.c skeleton.php
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-6895@lists.php.net to get a copy of this message
rasmus Thu Aug 16 16:35:34 2001 EDT Modified files: (Branch: PHP_4_0_7) /php4/ext/skeleton skeleton.c skeleton.php Log: MFH Index: php4/ext/skeleton/skeleton.c diff -u php4/ext/skeleton/skeleton.c:1.23 php4/ext/skeleton/skeleton.c:1.23.2.1 --- php4/ext/skeleton/skeleton.c:1.23 Thu Aug 9 00:47:47 2001 +++ php4/ext/skeleton/skeleton.c Thu Aug 16 16:35:33 2001 @@ -131,17 +131,14 @@ Return a string to confirm that the module is compiled in */ PHP_FUNCTION(confirm_extname_compiled) { - zval **arg; - int len; + char *arg = NULL; + int arg_len, len; char string[256]; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) { - ZEND_WRONG_PARAM_COUNT(); - } + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &arg, &arg_len) == FAILURE) + return; - convert_to_string_ex(arg); - - len = sprintf(string, "Congratulations! You have successfully modified ext/%.78s/config.m4. Module %.78s is now compiled into PHP.", "extname", Z_STRVAL_PP(arg)); + len = sprintf(string, "Congratulations! You have successfully modified ext/%.78s/config.m4. Module %.78s is now compiled into PHP.", "extname", arg); RETURN_STRINGL(string, len, 1); } /* }}} */ Index: php4/ext/skeleton/skeleton.php diff -u php4/ext/skeleton/skeleton.php:1.3 php4/ext/skeleton/skeleton.php:1.3.8.1 --- php4/ext/skeleton/skeleton.php:1.3 Sun Jul 16 14:51:00 2000 +++ php4/ext/skeleton/skeleton.php Thu Aug 16 16:35:33 2001 @@ -1,5 +1,14 @@ <? +if(!extension_loaded('extname')) { + dl('extname.so'); +} $module = 'extname'; +$functions = get_extension_funcs($module); +echo "Functions available in the test extension:<br>\n"; +foreach($functions as $func) { + echo $func."<br>\n"; +} +echo "<br>\n"; $function = 'confirm_' . $module . '_compiled'; if (extension_loaded($module)) { $str = $function($module);

« previous php.cvs (#6895) next »