Re: Python C/API simple debugging

2008-11-26 Thread Aaron Brady
On Nov 26, 5:27 am, k3xji <[EMAIL PROTECTED]> wrote: > Hi all, > > I am new to Python C API and finding it difficult to debug C > extensions. So, basically I want to see the value of an integer value > during the C API. Here is the code: > > #define LAST_MIX_VAL 0xDEADBEEF > > static PyObject * > c

Re: Python C/API simple debugging

2008-11-26 Thread Philip Semanchuk
On Nov 26, 2008, at 6:47 AM, k3xji wrote: By the way for simple print-debugging, below works right now, I forgot to try that fprintf(stderr,"%d", key); As a new extension developer myself, I'll pass along the following handy macro that I swiped from another extension (psycopg I think):

Re: Python C/API simple debugging

2008-11-26 Thread k3xji
On Nov 26, 1:43 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > k3xji wrote: > > On Nov 26, 1:34 pm, Stefan Behnel <[EMAIL PROTECTED]> wrote: > >> k3xji wrote: > >> > I am new to Python C API and finding it difficult to debug C > >> > extensions. So, basically I want to see the value of an inte

Re: Python C/API simple debugging

2008-11-26 Thread Diez B. Roggisch
k3xji wrote: > On Nov 26, 1:34 pm, Stefan Behnel <[EMAIL PROTECTED]> wrote: >> k3xji wrote: >> > I am new to Python C API and finding it difficult to debug C >> > extensions. So, basically I want to see the value of an integer value >> > during the C API. Here is the code: >> >> > #define LAST_MIX

Re: Python C/API simple debugging

2008-11-26 Thread k3xji
On Nov 26, 1:34 pm, Stefan Behnel <[EMAIL PROTECTED]> wrote: > k3xji wrote: > > I am new to Python C API and finding it difficult to debug C > > extensions. So, basically I want to see the value of an integer value > > during the C API. Here is the code: > > > #define LAST_MIX_VAL 0xDEADBEEF > > >

Re: Python C/API simple debugging

2008-11-26 Thread Stefan Behnel
k3xji wrote: > I am new to Python C API and finding it difficult to debug C > extensions. So, basically I want to see the value of an integer value > during the C API. Here is the code: > > #define LAST_MIX_VAL 0xDEADBEEF > > static PyObject * > chash(PyObject *self, PyObject *args) > { > uns

Python C/API simple debugging

2008-11-26 Thread k3xji
Hi all, I am new to Python C API and finding it difficult to debug C extensions. So, basically I want to see the value of an integer value during the C API. Here is the code: #define LAST_MIX_VAL 0xDEADBEEF static PyObject * chash(PyObject *self, PyObject *args) { unsigned int key,result; //