Closed royneary closed 3 years ago
Some C libraries have the terrible practice of putting defines in their enum definitions, e.g. (from gnutls/x509.h):
typedef enum gnutls_trust_list_flags_t { GNUTLS_TL_VERIFY_CRL = 1, #define GNUTLS_TL_VERIFY_CRL 1 GNUTLS_TL_USE_IN_TLS = (1<<1), #define GNUTLS_TL_USE_IN_TLS (1<<1) GNUTLS_TL_NO_DUPLICATES = (1<<2), #define GNUTLS_TL_NO_DUPLICATES (1<<2) GNUTLS_TL_NO_DUPLICATE_KEY = (1<<3), #define GNUTLS_TL_NO_DUPLICATE_KEY (1<<3) GNUTLS_TL_GET_COPY = (1<<4), #define GNUTLS_TL_GET_COPY (1<<4) GNUTLS_TL_FAIL_ON_INVALID_CRL = (1<<5) #define GNUTLS_TL_FAIL_ON_INVALID_CRL (1<<5) } gnutls_trust_list_flags_t;
This PR makes c2nim ignore those defines (currently the error Error: identifier expected, but got: # is produced).
Error: identifier expected, but got: #
Some C libraries have the terrible practice of putting defines in their enum definitions, e.g. (from gnutls/x509.h):
This PR makes c2nim ignore those defines (currently the error
Error: identifier expected, but got: #
is produced).