Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(338)

Side by Side Diff: third_party/lzma_sdk/Archive/7z/7zBuffer.c

Issue 10152012: Second attempt to update lzma_sdk to 9.20 (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/lzma_sdk/Archive/7z/7zBuffer.h ('k') | third_party/lzma_sdk/Archive/7z/7zDecode.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /* 7zBuffer.c */
2
3 #include "7zBuffer.h"
4 #include "7zAlloc.h"
5
6 void SzByteBufferInit(CSzByteBuffer *buffer)
7 {
8 buffer->Capacity = 0;
9 buffer->Items = 0;
10 }
11
12 int SzByteBufferCreate(CSzByteBuffer *buffer, size_t newCapacity, void * (*alloc Func)(size_t size))
13 {
14 buffer->Capacity = newCapacity;
15 if (newCapacity == 0)
16 {
17 buffer->Items = 0;
18 return 1;
19 }
20 buffer->Items = (Byte *)allocFunc(newCapacity);
21 return (buffer->Items != 0);
22 }
23
24 void SzByteBufferFree(CSzByteBuffer *buffer, void (*freeFunc)(void *))
25 {
26 freeFunc(buffer->Items);
27 buffer->Items = 0;
28 buffer->Capacity = 0;
29 }
OLDNEW
« no previous file with comments | « third_party/lzma_sdk/Archive/7z/7zBuffer.h ('k') | third_party/lzma_sdk/Archive/7z/7zDecode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698