aboutsummaryrefslogtreecommitdiff
path: root/objectivec/GPBCodedOutputStream.m
diff options
context:
space:
mode:
authorThomas Van Lenten <thomasvl@google.com>2016-03-07 12:07:03 -0500
committerThomas Van Lenten <thomasvl@google.com>2016-03-07 12:07:03 -0500
commit36650a07cf98ee4e734e07f2403fe5d20e300fc8 (patch)
treeb731c6deb1d3503ba069397b6cda6fd387dce9af /objectivec/GPBCodedOutputStream.m
parentf2d34086766ae33d3c945408f8dd3044921b1435 (diff)
downloadprotobuf-36650a07cf98ee4e734e07f2403fe5d20e300fc8.tar.gz
protobuf-36650a07cf98ee4e734e07f2403fe5d20e300fc8.tar.bz2
protobuf-36650a07cf98ee4e734e07f2403fe5d20e300fc8.zip
HeaderDoc support in the library and generated sources
- Convert most of the core library headers over to HeaderDoc format. - Switch the generated comments over to HeaderDoc. - Create GPBCodedOutputStream_PackagePrivate and move some things into there that should be more internal.
Diffstat (limited to 'objectivec/GPBCodedOutputStream.m')
-rw-r--r--objectivec/GPBCodedOutputStream.m17
1 files changed, 3 insertions, 14 deletions
diff --git a/objectivec/GPBCodedOutputStream.m b/objectivec/GPBCodedOutputStream.m
index 70142e6f..fd9ed66c 100644
--- a/objectivec/GPBCodedOutputStream.m
+++ b/objectivec/GPBCodedOutputStream.m
@@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#import "GPBCodedOutputStream.h"
+#import "GPBCodedOutputStream_PackagePrivate.h"
#import <mach/vm_param.h>
@@ -178,12 +178,6 @@ static void GPBWriteRawLittleEndian64(GPBOutputBufferState *state,
return [self initWithOutputStream:nil data:data];
}
-- (instancetype)initWithOutputStream:(NSOutputStream *)output
- bufferSize:(size_t)bufferSize {
- NSMutableData *data = [NSMutableData dataWithLength:bufferSize];
- return [self initWithOutputStream:output data:data];
-}
-
// This initializer isn't exposed, but it is the designated initializer.
// Setting OutputStream and NSData is to control the buffering behavior/size
// of the work, but that is more obvious via the bufferSize: version.
@@ -199,15 +193,10 @@ static void GPBWriteRawLittleEndian64(GPBOutputBufferState *state,
return self;
}
-+ (instancetype)streamWithOutputStream:(NSOutputStream *)output
- bufferSize:(size_t)bufferSize {
- return [[[self alloc] initWithOutputStream:output
- bufferSize:bufferSize] autorelease];
-}
-
+ (instancetype)streamWithOutputStream:(NSOutputStream *)output {
+ NSMutableData *data = [NSMutableData dataWithLength:PAGE_SIZE];
return [[[self alloc] initWithOutputStream:output
- bufferSize:PAGE_SIZE] autorelease];
+ data:data] autorelease];
}
+ (instancetype)streamWithData:(NSMutableData *)data {