Re: [pygccxml-development] Scanning pure C header files
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2008-02-17 18:39:39
|
On Feb 16, 2008 9:02 PM, Roman Yakovenko <rom...@gm...> wrote: > > On Feb 16, 2008 8:25 PM, Gustavo Carneiro <gjc...@gm...> wrote: > > Hi. I am looking at scanning with pygccxml a pure C header file, that looks > > like this: > > > > #ifndef __HELLO_H__ > > #define __HELLO_H__ > > > > #ifdef __cplusplus > > extern "C" > > { > > #endif > > > > > > void hello_print(const char *message); > > double hello_sum(double x, double y); > > > > > > #ifdef __cplusplus > > } > > #endif > > > > #endif /* __HELLO_H__ */ > > > > My current code, that woks for C++ headers perfectly, fails with this pure C > > header file: > > > > File "../pybindgen/gccxmlparser.py", line 416, in parse_init > > self.module_namespace = > > declarations.get_global_namespace(self.declarations) > > File > > "/usr/local//lib/python2.5/site-packages/pygccxml/declarations/algorithm.py", > > line 170, in get_global_namespace > > raise RuntimeError( "Unable to find global namespace." ) > > RuntimeError: Unable to find global namespace. > > > > Any tips on what I should be using instead of get_global_namespace() to get > > the definitions? > > > > Let me check this. Well I created tester and it is working fine. Can you take a look on "plain_c_tester.py" and modify it, so I can see the problem too. Thanks -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |