Re: PyObject_CallObject code dump after calling 4 times

2008-01-04 Thread Fredrik Lundh
grbgooglefan wrote: > char* plevel = NULL; > if(NULL != (plevel = PyString_AsString(pResult))){ > ret = 0; > strncpy(szEvalResult,plevel,strlen(plevel)); strncpy doesn't check the size of the target buffer, so that's no different from just doing strcpy(szEvalR

Re: PyObject_CallObject code dump after calling 4 times

2008-01-03 Thread grbgooglefan
On Jan 3, 8:49 pm, grbgooglefan <[EMAIL PROTECTED]> wrote: > On Jan 3, 8:02 pm, Phil Thompson <[EMAIL PROTECTED]> > wrote: > > > > > > > On Thursday 03 January 2008, grbgooglefan wrote: > > > > I have a following C++ code which uses PyObject_CallObject to evaluate > > > expressions dynamically. Thi

Re: PyObject_CallObject code dump after calling 4 times

2008-01-03 Thread grbgooglefan
On Jan 3, 8:02 pm, Phil Thompson <[EMAIL PROTECTED]> wrote: > On Thursday 03 January 2008, grbgooglefan wrote: > > > I have a following C++ code which uses PyObject_CallObject to evaluate > > expressions dynamically. This code sets the input parameters for the > > function also dynamically. After c

Re: PyObject_CallObject code dump after calling 4 times

2008-01-03 Thread Phil Thompson
On Thursday 03 January 2008, grbgooglefan wrote: > I have a following C++ code which uses PyObject_CallObject to evaluate > expressions dynamically. This code sets the input parameters for the > function also dynamically. After calling this function 4 times (with > these shown values), PyObject_Cal

Re: PyObject_CallObject code dump after calling 4 times

2008-01-03 Thread Fredrik Lundh
grbgooglefan wrote: > I have a following C++ code which uses PyObject_CallObject to evaluate > expressions dynamically. This code sets the input parameters for the > function also dynamically. After calling this function 4 times (with > these shown values), PyObject_CallObject causes application