summaryrefslogtreecommitdiff
path: root/malloc.c
diff options
context:
space:
mode:
authorMarcus Holland-Moritz <mhx-perl@gmx.net>2008-10-25 06:38:00 +0000
committerMarcus Holland-Moritz <mhx-perl@gmx.net>2008-10-25 06:38:00 +0000
commit9dbded1fc02e37d3e56aec23d33b4db32ae1190b (patch)
tree533b56c520a81f8ead30f5a276f90bf7df7fa932 /malloc.c
parentd1401ee92e9e5e7c3e719cc5c210862a444379d1 (diff)
downloadperl-9dbded1fc02e37d3e56aec23d33b4db32ae1190b.tar.gz
Make C++ compilers happy #5: jump to 'do_write' crossed
initialization in dTHX. Plus some consting, which also makes C++ happier. p4raw-id: //depot/perl@34579
Diffstat (limited to 'malloc.c')
-rw-r--r--malloc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/malloc.c b/malloc.c
index bfa4cec4a6..5d53f8c46b 100644
--- a/malloc.c
+++ b/malloc.c
@@ -970,7 +970,7 @@ static const char bucket_of[] =
static void morecore (register int bucket);
# if defined(DEBUGGING)
-static void botch (char *diag, char *s, char *file, int line);
+static void botch (const char *diag, const char *s, const char *file, int line);
# endif
static void add_to_chain (void *p, MEM_SIZE size, MEM_SIZE chip);
static void* get_from_chain (MEM_SIZE size);
@@ -1281,7 +1281,7 @@ emergency_sbrk(MEM_SIZE size)
#endif /* defined PERL_EMERGENCY_SBRK */
static void
-write2(char *mess)
+write2(const char *mess)
{
write(2, mess, strlen(mess));
}
@@ -1291,13 +1291,13 @@ write2(char *mess)
#define ASSERT(p,diag) if (!(p)) botch(diag,STRINGIFY(p),__FILE__,__LINE__);
static void
-botch(char *diag, char *s, char *file, int line)
+botch(const char *diag, const char *s, const char *file, int line)
{
dVAR;
+ dTHX;
if (!(PERL_MAYBE_ALIVE && PERL_GET_THX))
goto do_write;
else {
- dTHX;
if (PerlIO_printf(PerlIO_stderr(),
"assertion botched (%s?): %s %s:%d\n",
diag, s, file, line) != 0) {