In 64bit linux, sizeof(long)
, and sizeof(const char*)
are same, I hope implement following code without specific additional argument(I mean don't specific type argument)
#define squeeze(smth) ({\
if (sizeof(smth) == sizeof(long)) {\
// do smth\
} else if (sizeof(smth) == sizeof(const char *)) {\
// do other\
}\
})