[PHP4BETA] CVS update: php4

From: Date: Thu, 27 May 1999 03:14:58 +0000
Subject: [PHP4BETA] CVS update: php4
Groups: php.version4 
Request: Send a blank email to php-version4+get-1115@lists.php.net to get a copy of this message
Date: Wednesday May 26, 1999 @ 23:14 Author: zeev Update of /repository/php4 In directory php:/tmp/cvs-serv2911 Modified Files: main.c Log Message: Generate Visual Studio compatible error messages when compiling under Win32 Index: php4/main.c diff -u php4/main.c:1.63 php4/main.c:1.64 --- php4/main.c:1.63 Sat May 22 08:19:56 1999 +++ php4/main.c Wed May 26 23:14:57 1999 @@ -29,7 +29,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: main.c,v 1.63 1999/05/22 12:19:56 zeev Exp $ */ +/* $Id: main.c,v 1.64 1999/05/27 03:14:57 zeev Exp $ */ #include <stdio.h> @@ -581,12 +581,21 @@ if (message==ZMSG_MEMORY_LEAK_DETECTED) { mem_header *t = (mem_header *) data; + void *ptr = (void *)((char *)t+sizeof(mem_header)+PLATFORM_PADDING); - snprintf(memory_leak_buf, 512, "%s: Freeing 0x%0.8X (%d bytes), allocated in %s on line %d<br>\n", SG(request_info).path_translated, (void *)((char *)t+sizeof(mem_header)+PLATFORM_PADDING),t->size,t->filename,t->lineno); +#if WIN32||WINNT + snprintf(memory_leak_buf, 512, "%s(%d) : Freeing 0x%0.8X (%d bytes), script=%s\n", t->filename, t->lineno, ptr, t->size, SG(request_info).path_translated); +#else + snprintf(memory_leak_buf, 512, "%s: Freeing 0x%0.8X (%d bytes), allocated in %s on line %d<br>\n", SG(request_info).path_translated, ptr, t->size,t->filename,t->lineno); +#endif } else { uint leak_count = (uint) data; +#if WIN32||WINNT + snprintf(memory_leak_buf, 512, "Last leak repeated %d time%s\n", leak_count, (leak_count>1?"s":"")); +#else snprintf(memory_leak_buf, 512, "%s: Last leak repeated %d time%s\n", SG(request_info).path_translated, leak_count, (leak_count>1?"s":"")); +#endif } # if WIN32||WINNT OutputDebugString(memory_leak_buf); -- PHP 4 Beta

« previous php.version4 (#1115) next »