search for: ser_new_field

Displaying 1 result from an estimated 1 matches for "ser_new_field".

2013 Dec 10
1
about C program of CPP macro problems
...#define / #undef, and want to put them in a single macro, some thing like: #define DECALRE_TYPE(type) \ { #undef __curr_type; #define _curr_type type; } as we know, this can not passed with CPP, but I need this logical here. Generally, the problem comes from #define ser_field(type, var) \ ser_new_field(tra, #type, #var, offsetof(struct_type, var)) I do not want another additional parameter in this macro like #define ser_field(type,var,struct_type), and I want a sentence declare "current struct type" and all later work of ser_field will defaultly use this type. I am not sure whether I...