I'm having a bit of a problem creating a ctypes structure with a string in it and initializing it with a meaningful value.
Here's my structure:
class MyStruct( Structure ):
_fields_ = [ ("someString", c_char_p) ]
and here's me trying to initialize it
obj = MyStruct( "something" )
Both attempts fail of course. Here's the error message:
obj_1= MyStruct( "something" ) TypeError: string or integer address expected instead of str instance
Same thing happens if I use *c_char_p* operator obj = MyStruct( c_char_p( "something" ) )
I must mention that this code is executed in Blender 2.63a environment.
Can anyone help me solve this problem?