From: Pierre Habouzit Date: Sun, 18 Mar 2007 16:41:15 +0000 (+0100) Subject: allow the [cd]tor to take $L as an arcument as well X-Git-Url: http://git.madism.org/?a=commitdiff_plain;h=0dc3054df348d3c9788ecf6aba028668c684a7bc;p=apps%2Fmadmutt.git allow the [cd]tor to take $L as an arcument as well Signed-off-by: Pierre Habouzit --- diff --git a/lib-lua/luapkg2c.pl b/lib-lua/luapkg2c.pl index 9ab8789..ac46db6 100755 --- a/lib-lua/luapkg2c.pl +++ b/lib-lua/luapkg2c.pl @@ -293,6 +293,7 @@ EOF put_line($p, 0); if ($t{type}->{dtor}) { my $dtor = $t{type}->{dtor}; + $dtor =~ s/\$L/L/; $dtor =~ s/\$\$/\&$var/; print " $dtor;\n"; } @@ -408,11 +409,13 @@ EOF print " case LTK_$tok: \n"; if ($t{type}->{dtor}) { my $dtor = $t{type}->{dtor}; + $dtor =~ s/\$L/L/; $dtor =~ s/\$\$/\&$var/; print " $dtor;\n"; } if ($t{type}->{ctor}) { my $ctor = $t{type}->{ctor}; + $ctor =~ s/\$L/L/; $ctor =~ s/\$\$/$check/; $check = $ctor; }