Use `array(<type>)' as return value for functions returning an array of

1999-12-05  Martin Baulig  <martin@home-of-linux.org>

	* features.def: Use `array(<type>)' as return value for functions
	returning an array of structures.
This commit is contained in:
Martin Baulig
1999-12-05 14:07:20 +00:00
committed by Martin Baulig
parent 5ddf25c66a
commit 4a2fb0a871
4 changed files with 21 additions and 4 deletions

View File

@@ -203,8 +203,16 @@ sub make_output {
$func_decl_code = sprintf
(qq[static SCM\nglibtop_guile_get_%s (SCM server_smob%s)], $feature, $param_decl);
if ($retval =~ /^array\((.*)\)$/) {
$retval_type = "$1 *";
$retval_name = $1;
} else {
$retval_type = $retval;
$retval_name = $retval;
}
if ($retval ne 'void') {
$local_var_decl_code .= sprintf (qq[\t%s retval;\n], $retval);
$local_var_decl_code .= sprintf (qq[\t%s retval;\n], $retval_type);
}
if ($retval ne 'void') {