Only declare the function name of the %loadFunc directive to be declared in the file where the %loadFunc directive is located.

Don't declare the return type and parameter list to originate from the "original" source file.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5452 4a71c877-e1ca-e34f-864e-861f7616d084
master
Giel van Schijndel 2008-07-09 17:55:18 +00:00
parent be7aef1a17
commit 44f3bf5f69
2 changed files with 7 additions and 4 deletions

View File

@ -70,12 +70,14 @@ sub printFuncHeader
. " * \@return true if we succesfully loaded all available rows from the table,\n"
. " * false otherwise.\n"
. " */\n"
. "bool\n"
. "#line ${${${$struct}{\"qualifiers\"}}{\"loadFunc\"}}{\"line\"} \"$filename\"\n"
. "bool ${${${$struct}{\"qualifiers\"}}{\"loadFunc\"}}{\"name\"}(sqlite3* db)\n";
. "${${${$struct}{\"qualifiers\"}}{\"loadFunc\"}}{\"name\"}\n";
my $line = $$output =~ s/\n/\n/sg;
$line += 2;
$$output .= "#line $line \"$outfile\"\n";
$$output .= "#line $line \"$outfile\"\n"
. "\t(sqlite3* db)\n";
}
sub printFuncFooter

View File

@ -210,13 +210,14 @@ sub printStruct()
. " * \@return true if we succesfully loaded all available rows from the table,\n"
. " * false otherwise.\n"
. " */\n"
. "extern bool\n"
. "#line ${${${$struct}{\"qualifiers\"}}{\"loadFunc\"}}{\"line\"} \"$filename\"\n"
. "extern bool ${${${$struct}{\"qualifiers\"}}{\"loadFunc\"}}{\"name\"}(struct sqlite3* db);\n";
. "${${${$struct}{\"qualifiers\"}}{\"loadFunc\"}}{\"name\"}\n";
my $count = $$output =~ s/\n/\n/sg;
$count += 2;
$$output .= "#line $count \"$outfile\"\n"
. "\n";
. "\t(struct sqlite3* db);\n\n";
}
sub printHdrGuard