2011/9/28 Alex Pyattaev
> Py_XINCREF(resultobj);
>
What is this call doing? It should not be necessary, since you called
PyTuple_New.
This may explain why it does not crash with CPython: the tuple object always
leaks but happens to keep the necessary reference to the global object.
(PyPy do
Well,
the point is that first I make an owned copy of the object:
%typemap(in) void* {
Py_XINCREF($input);
$1 = $input;
}
Here is the storage struct:
struct event{
int code;
void* node_tx;
void* node_rx;
void* packet;
double signal_power;
double noise_power;
doub
2011/9/28 Alex Pyattaev
> Hi!
> I have a quite sophisticated program that can be summarized as follows:
> 1. Save a pypy object pointer inside C program. Here I call Py_XINCREF so
> that
> it does not get deleted.
> 2. Do some logic, move this reference around C code.
> 3. Return a python tuple v
Hi!
I have a quite sophisticated program that can be summarized as follows:
1. Save a pypy object pointer inside C program. Here I call Py_XINCREF so that
it does not get deleted.
2. Do some logic, move this reference around C code.
3. Return a python tuple via typemap, here I am probably supposed