Re: [Python-Dev] Possible C API problem?

2005-07-06 Thread Michael Hudson
Martin v. Löwis [EMAIL PROTECTED] writes: Gary Robinson wrote: Are the docs wrong or am I misreading them? Or are you wrong? It turns out that I am wrong. This is a long standing confusion. At one point, the documentation said what you said, and it was just as wrong. There were even

Re: [Python-Dev] Possible C API problem?

2005-07-05 Thread Martin v. Löwis
Gary Robinson wrote: #include Python.h static double gfSumChiSquare = 123.0; static PyObject * getSumChiSquare(PyObject *self, PyObject *args){ return Py_BuildValue(d, gfSumChiSquare); } static PyMethodDef SimMethods[] = { {getSumChiSquare,

[Python-Dev] Possible C API problem?

2005-06-27 Thread Gary Robinson
Hello, I was asking about a problem I was having over on the C++-python list, and they suggested I report it here as a possible Python problem. I was getting bus errors with a C module I was linking to, so factored it down too a very small example that reproduced the problem. Here it is:

Re: [Python-Dev] Possible C API problem?

2005-06-27 Thread Michael Hudson
Gary Robinson [EMAIL PROTECTED] writes: That caused a bus error 100% of the time when I simply imported the module into Python and called getSumChiSquare(), i.e.: import testfloat testfloat.getSumChiSquare() It doesn't for me (CVS HEAD, OS X Panther). Could it be that this is a python

Re: [Python-Dev] Possible C API problem?

2005-06-27 Thread Scott David Daniels
Michael Hudson wrote: Gary Robinson [EMAIL PROTECTED] writes: ... bus error 100% of the time ...: We've boiled it down pretty far, and I've sent him off to the mac-python folks (looks gcc-compilerish to me, or maybe fallout from slight changes in C function call semantics). --Scott David

Re: [Python-Dev] Possible C API problem?

2005-06-27 Thread Gary Robinson
It doesn't for me (CVS HEAD, OS X Panther). Note sure what you mean CVS HEAD, you mean the latest python from cvs? 2.4? I'm still using the Apple python, which is straight 2.3. Have you, you know, tried to debug the situation yourself? If you have gcc installed, you probably have gdb

Re: [Python-Dev] Possible C API problem?

2005-06-27 Thread Delaney, Timothy (Tim)
Gary Robinson wrote: It's been around 7 years since I've used C, I've forgotten virtually everything I may have known about gdb, I've never worked with the C-python API before... meanwhile there is intense time pressure to get the next release of our product (http://www.goombah.com) ready. So

Re: [Python-Dev] Possible C API problem?

2005-06-27 Thread Bob Ippolito
On Jun 27, 2005, at 6:48 PM, Delaney, Timothy (Tim) wrote: Gary Robinson wrote: It's been around 7 years since I've used C, I've forgotten virtually everything I may have known about gdb, I've never worked with the C-python API before... meanwhile there is intense time pressure to get