fix ownership annotations. clang's aren't as good as I hoped
This commit is contained in:
3
buffer.h
3
buffer.h
@@ -35,7 +35,6 @@ typedef struct buffer {
|
||||
/* Initialize a buffer with an existing memory area, which the buffer
|
||||
* will NOT take ownership of (i.e. won't free the memory when it's done) */
|
||||
__bufout(4,5)
|
||||
att_holds(malloc,4)
|
||||
void buffer_init(buffer* b, ssize_t (*op)(), int fd, char* y, size_t ylen);
|
||||
|
||||
/* Initialize a buffer with an existing memory area, which the buffer
|
||||
@@ -47,13 +46,11 @@ void buffer_init_free(buffer* b,ssize_t (*op)(),int fd,char* y,size_t ylen);
|
||||
/* Call buffer_init with op=read(), return 0.
|
||||
* If fd==-1, return -1 instead, leaving b untouched. */
|
||||
__bufout(3,4)
|
||||
att_holds(malloc,3)
|
||||
int buffer_init_read(buffer* b, int fd, char* y, size_t ylen);
|
||||
|
||||
/* Call buffer_init with op=write(), return 0.
|
||||
* If fd==-1, return -1 instead, leaving b untouched. */
|
||||
__bufout(3,4)
|
||||
att_holds(malloc,3)
|
||||
int buffer_init_write(buffer* b, int fd, char* y, size_t ylen);
|
||||
|
||||
/* Will allocate a buffer of size ylen and then call
|
||||
|
||||
2
iob.h
2
iob.h
@@ -69,7 +69,6 @@ io_batch* iob_new_autofree(size_t hint_entries);
|
||||
|
||||
/* queue buffer in io_batch */
|
||||
att_readn(2,3)
|
||||
att_holds(malloc,2)
|
||||
int iob_addbuf(io_batch* b,const void* buf,uint64 n);
|
||||
|
||||
/* queue buffer in io_batch, and give ownership to batch. */
|
||||
@@ -85,7 +84,6 @@ int iob_addbuf_munmap(io_batch* b,const void* buf,uint64 n);
|
||||
|
||||
/* queue asciiz string in io_batch. */
|
||||
att_read(2)
|
||||
att_holds(malloc,2)
|
||||
int iob_adds(io_batch* b,const char* s);
|
||||
|
||||
/* queue asciiz string in io_batch, and give ownership to batch. */
|
||||
|
||||
Reference in New Issue
Block a user