This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jaraco
Recipients jaraco, theller
Date 2009-01-25.02:52:24
SpamBayes Score 0.0012905723
Marked as misclassified No
Message-id <1232851948.05.0.0363189700044.issue5049@psf.upfronthosting.co.za>
In-reply-to
Content
Using Python 2.6.1, I'm unable to pickle a simple object with an array
of wide characters.

import ctypes, pickle

class MyStruct(ctypes.Structure):
  _fields_ = [('name', ctypes.c_wchar*2)]

s = MyStruct('DC')

pickle.dumps(s) # raises ValueError.

Replace ctypes.c_wchar with ctypes.c_char and the pickling works fine.
History
Date User Action Args
2009-01-25 02:52:28jaracosetrecipients: + jaraco, theller
2009-01-25 02:52:28jaracosetmessageid: <1232851948.05.0.0363189700044.issue5049@psf.upfronthosting.co.za>
2009-01-25 02:52:25jaracolinkissue5049 messages
2009-01-25 02:52:24jaracocreate