They are just macros so during compile time it will be replaced by actual defined value, which is 2 for NUM_ITEM_TYPES, etc. I am not sure too if that's the correct explanation but it seems to work just fine.