Re: empty object from C

2012-12-07 Thread Stefan Behnel
Eric Frederich, 07.12.2012 16:42: > From C, I'd like to call a Python function that takes an object and sets > some attributes on it. > Lets say this is the function... > > def foo(msg): > msg.bar = 123 > msg.spam = 'eggs' > > How do I create an empty object in C? > In Python I would do s

empty object from C

2012-12-07 Thread Eric Frederich
Hello, >From C, I'd like to call a Python function that takes an object and sets some attributes on it. Lets say this is the function... def foo(msg): msg.bar = 123 msg.spam = 'eggs' How do I create an empty object in C? In Python I would do something like this... class Msg(object):