On Fri, 2010-03-19 at 14:45 +0800, hitesh dhiman wrote: > > Hi all, > > I'm trying to gain access to functions that use pointers as > > arguments. I have written the wrapper file that converts the > arguments > > into pointers. The compilation works successfully, but when > i try to > > run the code from python, it gives an assertion error: > > Debug Assertion Failed! > > Expression: Vector subscript out of range > On Mon, 2010-03-22 at 09:44 +0800, hitesh dhiman wrote: > Hi Jim, > Well, the code's rather official, so i won't be able to give the exact > details, but here's the code simplified: > > > CFunctionRequest( pData, (DWORD*)&ucmmReq.len) > where pData is BYTE pData[512]; > and > typedef struct > { > int len; > char* data; > } Data; > with Data ucmmReq > > > The definition for the CFunctionRequest is CFunctionRequest(BYTE* > pRequest, DWORD* pLength) > This is where the problem occurs. Above this, it works fine. > Do let me know if some more info is needed. > Thanks. >
Do you think this "debug assertion" is happening in Boost.Python code somewhere? I assume it's somewhere in the code you are wrapping. I also can't help but notice that your C functions seem to take arrays, not pointers to scalar values, and that leaves me rather confused as to what type of Python object you could be taking as input and converting into an array. Jim _______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig