I started working on an inotify module. I have to parse an inotify event struct which contains an int (aside from some uint32). for that int I need to know the size in bytes. thats why I was asking. It would maybe be helpful if the pike sscanf/printf had a modifier for the systems native int (32/64 bit).
Anyhow, I decided to do it inside the cmod now, its just much simpler in this case to use a cast.
best
arne
Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum schrieb:
Ints in pike have arbitrary size. If you put in a larger number, they will grow. So using e.g. sscanf("%8c") will work fine even on a 32 bit machine.