9 Mar 2010 17:38
Re: expected identifier before numeric constant
Dag Sverre Seljebotn <dagss <at> student.matnat.uio.no>
2010-03-09 16:38:51 GMT
2010-03-09 16:38:51 GMT
Lisandro Dalcin wrote:
> On 9 March 2010 13:23, Dag Sverre Seljebotn <dagss <at> student.matnat.uio.no> wrote:
>
>> Lisandro Dalcin wrote:
>>
>>> On 9 March 2010 11:21, Wkerzendorf <wkerzendorf <at> googlemail.com> wrote:
>>>
>>>
>>>> The line that seems to upset the code fitscat.h:70:
>>>>
>>>> typedef enum {T_BYTE, T_SHORT, T_LONG, T_FLOAT, T_DOUBLE,
>>>> T_STRING}
>>>> t_type; /* Type of data */
>>>>
>>>>
>>>>
>>> Do this enumeration comes from your own code? In such case, these
>>> names conflict with Python's structmember.h stuff ... You know,
>>> namespaces are one honking great idea, but not for Python's C-API
>>> Unfortunately, you will have to change the names of the enumeration
>>> items to avoid the conflict.
>>>
>>>
>> Or perhaps, if this is a library, create a wrapper firstcat_cython.h like
>> this:
>>
>> #undef T_BYTE
>> #define T_BYTE CYTHON_T_BYTE
>> /* repeat for other types */
>> #include "fitscat.h"
(Continue reading)
RSS Feed