Browse Source

Fix cl_F output of more than 2^32 decimal digits:

* src/base/string/cl_sstring.cc (cl_sstring): make len uintC.
        * src/base/string/cl_sstring.h: Likewise.
master
Richard Kreckel 17 years ago
parent
commit
5a43f044db
  1. 6
      ChangeLog
  2. 4
      src/base/string/cl_sstring.cc
  3. 2
      src/base/string/cl_sstring.h

6
ChangeLog

@ -1,3 +1,9 @@
2007-02-04 Richard B. Kreckel <kreckel@ginac.de>
Fix cl_F output of more than 2^32 decimal digits:
* src/base/string/cl_sstring.cc (cl_sstring): make len uintC.
* src/base/string/cl_sstring.h: Likewise.
2007-01-23 Bruno Haible <bruno@clisp.org>
Allow 64-bit builds on MacOS X 10.5.

4
src/base/string/cl_sstring.cc

@ -13,13 +13,13 @@
namespace cln {
char * cl_sstring (const char * ptr, uintL len)
char * cl_sstring (const char * ptr, uintC len)
{
var char * string = (char *) malloc_hook(len+1);
{
var const char* ptr1 = ptr;
var char* ptr2 = string;
var uintL count;
var uintC count;
for (count = len; count > 0; count--)
*ptr2++ = *ptr1++;
*ptr2++ = '\0';

2
src/base/string/cl_sstring.h

@ -7,7 +7,7 @@ namespace cln {
// Liefert einen String.
// Mit malloc_hook() alloziert, mit free_hook() freizugeben.
extern char * cl_sstring (const char * ptr, uintL len);
extern char * cl_sstring (const char * ptr, uintC len);
} // namespace cln

Loading…
Cancel
Save