www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - htod converts C long to int?

reply David Nadlinger <see klickverbot.at> writes:
While having a look at etc.curl which has a »converted by htod« comment 
in its header, I noticed that values having type »long« in the original 
C headers are declared as »int« there – shouldn't this rather be c_long 
from core.stdc.config to avoid problems on non-LLP64 (i.e. non-Windows) 
64 bit systems? Does htod generally behave like this?

David
Jun 12 2011
next sibling parent Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
htod doesn't know anything about c_long afaik. And since it runs on
Windows only, I guess it was hardcoded to think that long would always
be an int.
Jun 12 2011
prev sibling parent jdrewsen <jdrewsen nospam.com> writes:
Den 12-06-2011 20:05, David Nadlinger skrev:
 While having a look at etc.curl which has a »converted by htod« comment
 in its header, I noticed that values having type »long« in the original
 C headers are declared as »int« there – shouldn't this rather be c_long
 from core.stdc.config to avoid problems on non-LLP64 (i.e. non-Windows)
 64 bit systems? Does htod generally behave like this?
I just ran htod without any special tricks so I guess this is the default behavior. I will fix this asap. thx. /Jonas
Jun 12 2011