@omz I will look into this further but in Pythonista3 Parse Exceptions are raised with certain classes and functions on their generated encodings.
An example is listed as follows:
NSObject -> CA_copyRenderValue: b'^{Object=^^?{Atomic={?=i}}}16@0:8'
In the format CLASS -> FUNCTION: encoding
The except is as follows
ParseException: expected '}' (at char 8) (line: 1, col: 9)
I will post the relevant code in a GitHub repository once I am somewhere with decent internet.
Forum Archive
ObjC parse_type error
Cethric
Apr 05, 2016 - 05:14
JonB
Apr 05, 2016 - 08:12
The type encoding parser has difficulty on complicated structures (or, I think pointers to structures are not handled well). You can use restype and argtypes kwargs to override the encoding parser (don't include the implicit self and selector args).
In the above example, the key is that it is a pointer to a structure. You could create a ctypes structure, though this is a fairly complicated struct... you could just use an opaque pointer... argtypes=[], restype=[c_void_p]
Cethric
Apr 06, 2016 - 23:56
@JonB thank you for the reply, I will look into implimenting a fix soon.
I have been trying to extend the Header Parser that I used for OpenGLES to include most of the iOS headers.
So far it seems to work well...