]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: fix bug in mksyscall_windows.pl
authorAlex Brainman <alex.brainman@gmail.com>
Sun, 8 May 2011 06:32:00 +0000 (16:32 +1000)
committerAlex Brainman <alex.brainman@gmail.com>
Sun, 8 May 2011 06:32:00 +0000 (16:32 +1000)
This change fixes generation of "shadow" variables for bool parameters.
Before the change, it was naming all bool variables with the same name of _p0.
Now it calls them _p0, _p1, ... So the code could compile.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4479047

src/pkg/syscall/mksyscall_windows.pl

index d92ac3d283f74b35298c014d990144da0ad02b14..fb5a1272b2643dc746eed55e189c3ba4c92ece47 100755 (executable)
@@ -156,6 +156,7 @@ while(<>) {
                        $text .= "\tvar _p$n uint32\n";
                        $text .= "\tif $name {\n\t\t_p$n = 1\n\t} else {\n\t\t_p$n = 0\n\t}\n";
                        push @args, "uintptr(_p$n)";
+                       $n++;
                } else {
                        push @args, "uintptr($name)";
                }