Change 34579 by [EMAIL PROTECTED] on 2008/10/25 06:38:00
Make C++ compilers happy #5: jump to 'do_write' crossed
initialization in dTHX.
Plus some consting, which also makes C++ happier.
Affected files ...
... //depot/perl/malloc.c#133 edit
Differences ...
==== //depot/perl/malloc.c#133 (text) ====
Index: perl/malloc.c
--- perl/malloc.c#132~34078~ 2008-06-23 07:10:16.000000000 -0700
+++ perl/malloc.c 2008-10-24 23:38:00.000000000 -0700
@@ -970,7 +970,7 @@
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 @@
#endif /* defined PERL_EMERGENCY_SBRK */
static void
-write2(char *mess)
+write2(const char *mess)
{
write(2, mess, strlen(mess));
}
@@ -1291,13 +1291,13 @@
#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) {
End of Patch.