print PYOUT "\t\tif (PyUnicode_CompareWithASCIIString(name, \"", $m->{name}, "\") == 0)\n";
if ($m->{class} eq "struct") {
print PYOUT "\t\t\treturn py_rxgen_set_struct(&self->c.", $m->{name}, ",\n";
- print PYOUT "\t\t\t\t\t\t &py_", $struct->{type}, "Type, val);\n";
+ print PYOUT "\t\t\t\t\t\t &py_", $m->{type}, "Type, val);\n";
} elsif ($m->{class} ne "array") {
die $m->{where}, ": Unsupported type class \"", $m->{class}, "\"";
} elsif ($m->{elem}->{type} eq "char") {