Thomas Paviot wrote:

> Sean Lynch a écrit :
>
>> Sean Lynch wrote:
>>
>>  
>>
>>> Turns out Windows can't resolve pointers from DLLs at compile time, and
>>> there are a bunch of functions and constants in OpenAL that aren't
>>> defined under Windows, so I commented them out in the spirit of
>>> portability. Here's a patch. I also made a Windows installer of the
>>> package if anyone's interested.
>>>
>>>
>>>   
>>
>> Err, don't bother with this patch yet. It crashes on import, presumably
>> because I replaced the PyObject_HEAD_INIT(&PyType_Type) with
>> PyObject_HEAD_INIT(NULL) which is probably not right. I'll be back with
>> another patch.
>>
>>  
>>
> I had the same problem a few months ago, although i use
> PyObject_HEAD_INIT(NULL) _wich is, i think, the right solution _. I
> managed to get a compiled version of PyOpenAL for Windows, but the
> problem occurs when you create a _Buffer, _Listener or _Source (crash
> on import). I don't understand why it fails. I think a better wrapper
> should be written in Pyrex to be totally platform independant.
>
> Anyway i definitely cancelled my work about PyOpenAL until someone
> else fiind a solution.
>
The solution turned out to be to call PyType_Ready with the addresses of
each of the types. This is in section 2.1 of the extending and embedding
documentation: <http://docs.python.org/ext/dnt-basics.html>.

It'd probably be a good idea to convert PyOpenAL to Pyrex at some point.


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to