Re: Adding a 'struct' into new python type

2015-03-08 Thread Lakshmipathi.G
Hi Jason, Thanks for the response. Okay, Will try to convert 'struct test' into new python object (say 'PyStructTest') and include it inside CountDictType as pyobject instead of 'struct'. Will post details here, If i encounter any issues. Cheers, Lakshmipathi.G FOSS Programmer.

Re: Adding a 'struct' into new python type

2015-03-07 Thread Jason Swails
On Sat, Mar 7, 2015 at 4:15 AM, Lakshmipathi.G lakshmipath...@gmail.com wrote: Hi, I'm following this example : http://nedbatchelder.com/text/whirlext.html#h_making_a_type and trying to add new data into 'CountDict' type Adding a simple 'char' works well. typedef struct {

Adding a 'struct' into new python type

2015-03-07 Thread Lakshmipathi.G
Hi, I'm following this example : http://nedbatchelder.com/text/whirlext.html#h_making_a_type and trying to add new data into 'CountDict' type Adding a simple 'char' works well. typedef struct { PyObject_HEAD PyObject * dict; int count; char c; //add this and placed an entry into