cournape/cython-codegen — Issue #3: Exception with the Gnokii library
Author: s0undt3ch
Created: 2011-11-13 10:34:54+00:00
State: open

Generate the xml file

```
$ h2xml gnokii.h -I ~/projects/Gnokyy/extra/gnokii/include/ -I ~/projects/Gnokyy/extra/gnokii/include/gnokii/ -o ../../../gnokii/gnokii.xml
creating xml output file ...
running: gccxml /tmp/tmpvUnUGQ.cpp -fxml=../../../gnokii/gnokii.xml -I /home/vampas/projects/Gnokyy/extra/gnokii/include/ -I /home/vampas/projects/Gnokyy/extra/gnokii/include/gnokii/
```

So far so good, but:

```
$ xml2cython.py gnokii.h ../../../gnokii/gnokii.xml
Ignoring _IO_FILE
Item not handled for cy_generate
Item not handled for cy_generate
Item not handled for cy_generate
Item not handled for cy_generate
Item not handled for cy_generate
Item not handled for cy_generate
Item not handled for cy_generate
Item not handled for cy_generate
Item not handled for cy_generate
Not handled:
Traceback (most recent call last):
File "/home/vampas/projects/DotSOS/.working-dir/installed/1.0b1-dev/bin/xml2cython.py", line 165, in
sys.exit(main())
File "/home/vampas/projects/DotSOS/.working-dir/installed/1.0b1-dev/bin/xml2cython.py", line 148, in main
ffilter=ffilter, funcs_list=funcs)
File "/home/vampas/projects/DotSOS/.working-dir/installed/1.0b1-dev/bin/xml2cython.py", line 71, in generate_main
generate_cython(output, gen, anoenumvals)
File "/home/vampas/projects/DotSOS/.working-dir/installed/1.0b1-dev/lib/python2.7/site-packages/cycodegenlib/cycodegen.py", line 12, in generate_cython
cython_code = [cy_generate(i) for i in genitems]
File "/home/vampas/projects/DotSOS/.working-dir/installed/1.0b1-dev/lib/python2.7/site-packages/cycodegenlib/cycodegen.py", line 76, in cy_generate
return cy_generate_structure(item)
File "/home/vampas/projects/DotSOS/.working-dir/installed/1.0b1-dev/lib/python2.7/site-packages/cycodegenlib/cycodegen.py", line 41, in cy_generate_structure
output.append("\t" + (generic_named_decl(m.typ) % m.name))
File "/home/vampas/projects/DotSOS/.working-dir/installed/1.0b1-dev/lib/python2.7/site-packages/cycodegenlib/cytypes.py", line 66, in generic_named_decl
return pointer_named_decl(tp)
File "/home/vampas/projects/DotSOS/.working-dir/installed/1.0b1-dev/lib/python2.7/site-packages/cycodegenlib/cytypes.py", line 55, in pointer_named_decl
return generic_decl(tp.typ.returns) + '(*%s)' + '(%s)' % ", ".join(args)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
```

What can I do now?