[Pyobjc-dev] PyObjCRT_AlignOfType: Unhandled type '3f' ?
Brought to you by:
ronaldoussoren
|
From: Nicolas R. <Nic...@lr...> - 2008-09-04 10:15:58
|
Hi,
Playing with CFRunLoops in python, I came across the following problem:
from CoreFoundation import *
s = CFSocketCreateWithNative(kCFAllocatorDefault, 0, 0, 0, 0)
Traceback (most recent call last):
File "/Users/roussel/Desktop/a.py", line 5, in <module>
s = CFSocketCreateWithNative(kCFAllocatorDefault, 0, 0, 0, 0)
internal_error: PyObjCRT_AlignOfType: Unhandled type '3f' ?
Note that this problem also happens when passing a callback as 4th
argument and/or a CFSocketContext as 5th argument.
All the arguments in the example above seem valid from a PyObjC point
of view, as far as I can tell from
CFSocketCreateWithNative.__metadata__(). I don't understand, however,
why there's a reference to CFXMLParserContext:
{
'retval': {'null_accepted': True, 'already_retained': True, 'type':
'^{__CFSocket=}', 'already_cfretained': False},
'arguments': (
{'null_accepted': True, 'already_retained': False, 'type':
'^{__CFAllocator=}', 'already_cfretained': False},
{'already_retained': False, 'type': 'i', 'already_cfretained':
False},
{'already_retained': False, 'type': 'L', 'already_cfretained':
False},
{'null_accepted': True, 'already_cfretained': False,
'callable': {'retval': {'already_retained': False, 'type': 'v',
'already_cfretained': False}, 'arguments': ({'null_accepted': True,
'already_retained': False, 'type': '^{__CFSocket=}',
'already_cfretained': False}, {'already_retained': False, 'type': 'L',
'already_cfretained': False}, {'null_accepted': True,
'already_retained': False, 'type': '^{__CFData=}',
'already_cfretained': False}, {'null_accepted': True,
'already_retained': False, 'type': '^v', 'already_cfretained': False},
{'null_accepted': True, 'already_retained': False, 'type': '^v',
'already_cfretained': False}), 'variadic': False}, 'already_retained':
False, 'type': 'n^?', 'callable_retained': True},
{'null_accepted': True, 'already_retained': False, 'type':
'n^{_CFXMLParserContext=i^v^?^?^?}', 'already_cfretained': False}
),
'variadic': False
}
The code in objc_support.m didn't help me understand all this...
Can someone explain how I can fix this and use CFSocketCreateWithNative?
Nicolas
---
Nicolas Roussel http://insitu.lri.fr/~roussel/
In Situ, Univ. Paris-Sud (LRI) & INRIA Saclay - Île-de-France
|