]> www.infradead.org Git - users/dhowells/kafs-utils.git/commitdiff
rxgen: Integer INOUT args should take an int in PyArg_ParseTuple()
authorDavid Howells <dhowells@redhat.com>
Tue, 13 May 2014 20:20:08 +0000 (21:20 +0100)
committerDavid Howells <dhowells@redhat.com>
Tue, 13 May 2014 20:20:08 +0000 (21:20 +0100)
Integer INOUT args should take an int in PyArg_ParseTuple() rather than an
arbitrary object as the code now doesn't pass results back through the argument
list.

Signed-off-by: David Howells <dhowells@redhat.com>
rxgen/emit_py_sync_funcs.pm

index 6779124b09e32b76a12c273f853129adc8d9b619..0588b4436640957e96b5b9b37a169ecc1dfb0390 100644 (file)
@@ -279,8 +279,7 @@ sub emit_py_func_simple_sync_call($)
     print PYOUT "\tif (!PyArg_ParseTuple(args, \"O!";
 
     foreach my $p (@{$func->{request}}) {
-       if ($p->{dir} ne "IN") {                print PYOUT "O!";
-       } elsif ($p->{class} eq "bulk") {       print PYOUT "O!";
+       if ($p->{class} eq "bulk") {            print PYOUT "O!";
        } elsif ($p->{type} eq "int8_t") {      print PYOUT "B";
        } elsif ($p->{type} eq "int16_t") {     print PYOUT "h";
        } elsif ($p->{type} eq "int32_t") {     print PYOUT "i";