mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
([NSGData -writeToFile:atomically:]): Use cStringNoCopy.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@829 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2190ba7619
commit
351cdaeb10
1 changed files with 3 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
/* Concrete NSData for GNUStep based on GNU MemoryStream class
|
||||
Copyright (C) 1995 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
|
||||
Written by: R. Andrew McCallum <mccallum@gnu.ai.mit.edu>
|
||||
Date: April 1995
|
||||
|
@ -26,7 +26,7 @@
|
|||
#include <objects/NSCoder.h>
|
||||
#include <objects/behavior.h>
|
||||
#include <objects/MemoryStream.h>
|
||||
#include <Foundation/NSString.h>
|
||||
#include <objects/NSString.h>
|
||||
|
||||
/* This from objects/MemoryStream.h */
|
||||
@interface NSGData (MemoryStream)
|
||||
|
@ -85,7 +85,7 @@
|
|||
{
|
||||
/* xxx This currently ignores useAuxiliaryFile. */
|
||||
int written;
|
||||
FILE* fp = fopen([path cString], "w");
|
||||
FILE* fp = fopen([path cStringNoCopy], "w");
|
||||
assert (fp); /* This should raise NSException instead. */
|
||||
written = fwrite(buffer+prefix, 1, eofPosition, fp);
|
||||
assert (eofPosition == written);
|
||||
|
|
Loading…
Reference in a new issue