add buffer_fromarray, buffer_frombuf
This commit is contained in:
9
buffer/buffer_fromarray.c
Normal file
9
buffer/buffer_fromarray.c
Normal file
@@ -0,0 +1,9 @@
|
||||
#include "array.h"
|
||||
#include "buffer.h"
|
||||
|
||||
void buffer_fromarray(buffer* b,array* a) {
|
||||
if (array_failed(a))
|
||||
buffer_frombuf(b,NULL,0);
|
||||
else
|
||||
buffer_frombuf(b,array_start(a),a->initialized);
|
||||
}
|
||||
Reference in New Issue
Block a user