From d4d09c40aa5d89a15d6f06b6c58d7386dcebbfa4 Mon Sep 17 00:00:00 2001 From: CaS Date: Fri, 8 Jun 2001 11:09:32 +0000 Subject: [PATCH] Corrected spec for primitive methods git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@10116 72102866-910b-0410-8b05-ffd578937521 --- Documentation/gsdoc/NSMutableData.gsdoc | 55 ++++++++++++++++--------- 1 file changed, 35 insertions(+), 20 deletions(-) diff --git a/Documentation/gsdoc/NSMutableData.gsdoc b/Documentation/gsdoc/NSMutableData.gsdoc index c65b9e63a..e4feb5725 100644 --- a/Documentation/gsdoc/NSMutableData.gsdoc +++ b/Documentation/gsdoc/NSMutableData.gsdoc @@ -71,16 +71,22 @@ mutableBytes - Returns a pointer to the data storage of the receiver.
- Modifications to the memory pointed to by this pointer will - change the contents of the object. It is important that - your code should not try to modify the memory beyond the - number of bytes given by the -length method.
- NB. if the object is released, or any method that changes its - size or content is called, then the pointer previously returned - by this method may cease to be valid.
- This is a 'primitive' method ... you need to implement it - if you write a subclass of NSMutableData. +

+ Returns a pointer to the data storage of the receiver.
+ Modifications to the memory pointed to by this pointer will + change the contents of the object. It is important that + your code should not try to modify the memory beyond the + number of bytes given by the -length method. +

+

+ NB. if the object is released, or any method that changes its + size or content is called, then the pointer previously returned + by this method may cease to be valid. +

+

+ This is a 'primitive' method ... you need to implement it + if you write a subclass of NSMutableData. +

@@ -89,16 +95,16 @@ withBytes: bytes - Replaces the bytes of data in the specified range with a - copy of the new bytes supplied.
- If the location of the range specified lies beyond the end - of the data ([self length] < range.location) - then a range exception is raised.
- Otherwise, if the range specified extends beyond the end - of the data, then the size of the data is increased to - accomodate the new bytes.
- This is a 'primitive' method ... you need to implement it - if you write a subclass of NSMutableData. +

+ Replaces the bytes of data in the specified range with a + copy of the new bytes supplied.
+ If the location of the range specified lies beyond the end + of the data ([self length] < range.location) + then a range exception is raised.
+ Otherwise, if the range specified extends beyond the end + of the data, then the size of the data is increased to + accomodate the new bytes.
+

@@ -163,6 +169,15 @@ setLength: length +

+ Sets the length of the NSMutableData object. + If the length is increased, the newly allocated data area + is filled with zero bytes. +

+

+ This is a 'primitive' method ... you need to implement it + if you write a subclass of NSMutableData. +