mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Minor tweak
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@17335 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c6fef8de9d
commit
a4d2e5438a
2 changed files with 12 additions and 4 deletions
|
@ -3,6 +3,7 @@
|
|||
* Source/NSDistributedNotificationCenter.m: Partially reverted last
|
||||
change ... seemed to cause problems on some systems.
|
||||
* Tools/gdnc.m: ditto.
|
||||
* Source/NSDebug.m: Small thread safely fix.
|
||||
|
||||
2003-07-23 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include "Foundation/NSData.h"
|
||||
#include "Foundation/NSDebug.h"
|
||||
#include "Foundation/NSString.h"
|
||||
#include "Foundation/NSLock.h"
|
||||
|
@ -423,7 +424,9 @@ GSDebugAllocationClassList()
|
|||
const char*
|
||||
GSDebugAllocationList(BOOL changeFlag)
|
||||
{
|
||||
const char *ans;
|
||||
const char *ans;
|
||||
NSData *d;
|
||||
|
||||
if (debug_allocation == NO)
|
||||
{
|
||||
return "Debug allocation system is not active!\n";
|
||||
|
@ -431,9 +434,10 @@ GSDebugAllocationList(BOOL changeFlag)
|
|||
if (uniqueLock != nil)
|
||||
[uniqueLock lock];
|
||||
ans = _GSDebugAllocationList(changeFlag);
|
||||
d = [NSData dataWithBytes: ans length: strlen(ans) + 1];
|
||||
if (uniqueLock != nil)
|
||||
[uniqueLock unlock];
|
||||
return ans;
|
||||
return (const char*)[d bytes];
|
||||
}
|
||||
|
||||
static const char*
|
||||
|
@ -520,7 +524,9 @@ _GSDebugAllocationList(BOOL difference)
|
|||
const char*
|
||||
GSDebugAllocationListAll()
|
||||
{
|
||||
const char *ans;
|
||||
const char *ans;
|
||||
NSData *d;
|
||||
|
||||
if (debug_allocation == NO)
|
||||
{
|
||||
return "Debug allocation system is not active!\n";
|
||||
|
@ -528,9 +534,10 @@ GSDebugAllocationListAll()
|
|||
if (uniqueLock != nil)
|
||||
[uniqueLock lock];
|
||||
ans = _GSDebugAllocationListAll();
|
||||
d = [NSData dataWithBytes: ans length: strlen(ans)+1];
|
||||
if (uniqueLock != nil)
|
||||
[uniqueLock unlock];
|
||||
return ans;
|
||||
return (const char*)[d bytes];
|
||||
}
|
||||
|
||||
static const char*
|
||||
|
|
Loading…
Reference in a new issue