21.6. Checking the size of a datatype

Check the size of a datatype by using the CheckTypeSize method:

env = Environment()
conf = Configure(env)
int_size = conf.CheckTypeSize('unsigned int')
print('sizeof unsigned int is', int_size)
env = conf.Finish()
    
% scons -Q
sizeof unsigned int is 4
scons: `.' is up to date.