Re: Interesting C header translation problem

2014-08-08 Thread Petteri Aimonen via Digitalmars-d-learn
Hi, Honestly, I don't know. I would go stab the original API designers in the face and tell them to clean up their mess. I'm sorry to reply to a 2-year-old topic, but as the original API designer, I simply couldn't resist :) Please do not stab me in the face. The nanopb API was never

Interesting C header translation problem

2012-10-30 Thread Nick Sabalausky
Came across this: #ifdef __GNUC__ #define PACKED __attribute__((packed)) #else #define PACKED #endif typedef enum { // Lots o' stuff } PACKED my_enum_t; typedef struct { // Lots o' stuff const void *ptr; } PACKED my_struct_t;

Re: Interesting C header translation problem

2012-10-30 Thread Alex Rønne Petersen
On 30-10-2012 10:41, Nick Sabalausky wrote: Came across this: #ifdef __GNUC__ #define PACKED __attribute__((packed)) #else #define PACKED #endif typedef enum { // Lots o' stuff } PACKED my_enum_t; typedef struct { // Lots o'

Re: Interesting C header translation problem

2012-10-30 Thread Nick Sabalausky
On Tue, 30 Oct 2012 11:05:28 +0100 Alex Rønne Petersen a...@lycus.org wrote: On 30-10-2012 10:41, Nick Sabalausky wrote: Came across this: #ifdef __GNUC__ #define PACKED __attribute__((packed)) #else #define PACKED #endif typedef enum {