src/buffer.c

changeset 985
68754c7de906
parent 970
c9b02747cfc5
equal deleted inserted replaced
984:e8f354a25ac8 985:68754c7de906
84 return NULL; 84 return NULL;
85 } 85 }
86 } 86 }
87 87
88 void cxBufferFree(CxBuffer *buffer) { 88 void cxBufferFree(CxBuffer *buffer) {
89 if (buffer == NULL) return;
89 if ((buffer->flags & CX_BUFFER_FREE_CONTENTS) == CX_BUFFER_FREE_CONTENTS) { 90 if ((buffer->flags & CX_BUFFER_FREE_CONTENTS) == CX_BUFFER_FREE_CONTENTS) {
90 cxFree(buffer->allocator, buffer->bytes); 91 cxFree(buffer->allocator, buffer->bytes);
91 } 92 }
92 cxFree(buffer->allocator, buffer); 93 cxFree(buffer->allocator, buffer);
93 } 94 }

mercurial