From: David Howells <dhowells@redhat.com>
Date: Tue, 13 May 2014 20:20:08 +0000 (+0100)
Subject: rxgen: Integer INOUT args should take an int in PyArg_ParseTuple()
X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ab101fb7ae11e4fb1a2fef15a0791805fbcccba0;p=users%2Fdhowells%2Fkafs-utils.git

rxgen: Integer INOUT args should take an int in PyArg_ParseTuple()

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>
---

diff --git a/rxgen/emit_py_sync_funcs.pm b/rxgen/emit_py_sync_funcs.pm
index 6779124..0588b44 100644
--- a/rxgen/emit_py_sync_funcs.pm
+++ b/rxgen/emit_py_sync_funcs.pm
@@ -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";