Skip to content

Commit

Permalink
Merge pull request #1953 from yebblies/locale_decpoint
Browse files Browse the repository at this point in the history
[DDMD] Make __locale_decpoint const char *
  • Loading branch information
MartinNowak committed May 4, 2013
2 parents 50b0a19 + 30c7dd3 commit 9592fc3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/expression.c
Expand Up @@ -19,7 +19,7 @@
#endif

#if _WIN32 && __DMC__
extern "C" char * __cdecl __locale_decpoint;
extern "C" const char * __cdecl __locale_decpoint;
#endif

#include "rmem.h"
Expand Down Expand Up @@ -2640,7 +2640,7 @@ void floatToBuffer(OutBuffer *buf, Type *type, real_t value)
ld_sprint(buffer, 'g', value);
assert(strlen(buffer) < sizeof(buffer) / sizeof(buffer[0]));
#if _WIN32 && __DMC__
char *save = __locale_decpoint;
const char *save = __locale_decpoint;
__locale_decpoint = ".";
real_t r = strtold(buffer, NULL);
__locale_decpoint = save;
Expand Down
4 changes: 2 additions & 2 deletions src/lexer.c
Expand Up @@ -32,7 +32,7 @@

#if _WIN32 && __DMC__
// from \dm\src\include\setlocal.h
extern "C" char * __cdecl __locale_decpoint;
extern "C" const char * __cdecl __locale_decpoint;
#endif

extern int HtmlNamedEntity(unsigned char *p, size_t length);
Expand Down Expand Up @@ -2355,7 +2355,7 @@ __body
stringbuffer.writeByte(0);

#if _WIN32 && __DMC__
char *save = __locale_decpoint;
const char *save = __locale_decpoint;
__locale_decpoint = ".";
#endif
#ifdef IN_GCC
Expand Down

0 comments on commit 9592fc3

Please sign in to comment.