Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
feat(PxBuffer): add pxBufferArrayNoalloc
Browse files Browse the repository at this point in the history
  • Loading branch information
lmichaelis committed Nov 2, 2023
1 parent 3eb00a4 commit 3174710
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/phoenix/cffi/Buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ PXC_API PxBuffer* pxBufferMmap(char const* file);
PXC_API void pxBufferDestroy(PxBuffer* buffer);
PXC_API uint64_t pxBufferSize(PxBuffer* buffer);
PXC_API uint8_t* pxBufferArray(PxBuffer* buffer);
PXC_API uint8_t* pxBufferArrayNoalloc(PxBuffer* buffer);
5 changes: 5 additions & 0 deletions src/Buffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,8 @@ uint8_t* pxBufferArray(PxBuffer* buffer) {
buffer->get(data, buffer->limit());
return data;
}

uint8_t* pxBufferArrayNoalloc(PxBuffer* buffer) {
return (uint8_t*) buffer->array();
}

0 comments on commit 3174710

Please sign in to comment.