c2nim icon indicating copy to clipboard operation
c2nim copied to clipboard

c2nim fails on some typedefs

Open Peter2121 opened this issue 9 years ago • 3 comments

For example:

typedef LBER_INT_T ber_int_t; is correctly parsed

typedef signed LBER_INT_T ber_sint_t; Error: ';' expected

It seems that 'signed' is the cause.

Idem for: typedef int* (*BER_ERRNO_FN) LDAP_P(( void ));

Peter2121 avatar Jul 21 '15 10:07 Peter2121

Similiar problem but not typedef:

extern const uint16_t PROGMEM port_to_mode_PGM[];

Error: ';' expected

extern const uint16_t port_to_mode_PGM[];

Succeed

ghost avatar Oct 22 '15 10:10 ghost

@t3476 PROGMEM is not C, it's vendor specific. Use #def PROGMEM to make c2nim ignore it.

Araq avatar Oct 22 '15 15:10 Araq

I'm having issue with processing next typedefs:

typedef struct NV_IFROGL_SESSION_HANDLE_REC
{
} *NV_IFROGL_SESSION_HANDLE;
typedef void (NVIFROGLAPI *NV_IFROGL_DEBUG_CALLBACK_PROC)(NV_IFROGL_DEBUG_SEVERITY severity, const char *message, void *userParam);
NVIFROGLSTATUS NVIFROGLAPI NvIFROGLCreateSession(NV_IFROGL_SESSION_HANDLE *pSessionHandle, const NV_IFROGL_SESSION_PARAMS *params);

bdandy avatar Jul 03 '18 13:07 bdandy