wrapping code uses "new" when gcc compiler is invoked.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PyBindGen |
New
|
Undecided
|
Unassigned |
Bug Description
I *think* this is a bug. I'm new to PyBindGen. I was following the example for wrapping a struct. Here is my .h file.
-------
typedef struct FooStruct
{
int a;
double b;
} Foo;
--------
Here is my binding file, ex-binding.py
----------
import sys
sys.path.
import pybindgen
mod = pybindgen.
mod.add_
struct = mod.add_
struct.
struct.
mod.generate(
----------
Here are my compile lines:
python ex-binding.py > ex-binding.c
gcc -c -fPIC -I/usr/
ex-binding.c: In function '_wrap_
ex-binding.
So, the problem is that PyBindGen is using 'new' rather than malloc, even when the compiler is gcc and there is no C++ anywhere in sight. Which is fine with me, but the docs and examples regarding wrapping structs that I read (https:/