[Python-Dev] snprintf breaks build

Greg Ewing greg@cosc.canterbury.ac.nz
Fri, 04 Aug 2000 16:38:16 +1200 (NZST)


Moshe Zadka:

> (Tidbit: since sizeof(long) measures in bytes, and %d prints in decimals,
> then a buffer of length sizeof(long) is enough to hold a decimal
> represntation of a long).

Pardon? I think you're a bit out in your calculation there!

3*sizeof(long) should be enough, though (unless some weird C
implementation measures sizes in units of more than 8 bits).

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg@cosc.canterbury.ac.nz	   +--------------------------------------+