diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2016-02-08 22:53:14 +0100 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2016-02-08 22:53:14 +0100 |
commit | cd41a0b549fa81d88ed804e1cdf59bb492fa9171 (patch) | |
tree | b0cd54f998ae485096f1e71cbb0c82a588a3fa60 /include/grpc/impl/codegen/slice.h | |
parent | 81b780b84b77a093ac2273865cd1af8a0f6f69bf (diff) |
Removing undescores in {GPR,GRPC,CENSUS}_API.
Diffstat (limited to 'include/grpc/impl/codegen/slice.h')
-rw-r--r-- | include/grpc/impl/codegen/slice.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/include/grpc/impl/codegen/slice.h b/include/grpc/impl/codegen/slice.h index d60a40ca35..a62fdd087b 100644 --- a/include/grpc/impl/codegen/slice.h +++ b/include/grpc/impl/codegen/slice.h @@ -105,7 +105,7 @@ typedef struct gpr_slice { /* Increment the refcount of s. Requires slice is initialized. Returns s. */ -GPR_API gpr_slice gpr_slice_ref(gpr_slice s); +GPRAPI gpr_slice gpr_slice_ref(gpr_slice s); /* Decrement the ref count of s. If the ref count of s reaches zero, all slices sharing the ref count are destroyed, and considered no longer @@ -113,22 +113,22 @@ GPR_API gpr_slice gpr_slice_ref(gpr_slice s); len, dest) where dest!=NULL , then (*dest)(start) is called, else if s is ultimately derived from a call to gpr_slice_new_with_len(start, len, dest) where dest!=NULL , then (*dest)(start, len). Requires s initialized. */ -GPR_API void gpr_slice_unref(gpr_slice s); +GPRAPI void gpr_slice_unref(gpr_slice s); /* Create a slice pointing at some data. Calls malloc to allocate a refcount for the object, and arranges that destroy will be called with the pointer passed in at destruction. */ -GPR_API gpr_slice gpr_slice_new(void *p, size_t len, void (*destroy)(void *)); +GPRAPI gpr_slice gpr_slice_new(void *p, size_t len, void (*destroy)(void *)); /* Equivalent to gpr_slice_new, but with a two argument destroy function that also takes the slice length. */ -GPR_API gpr_slice +GPRAPI gpr_slice gpr_slice_new_with_len(void *p, size_t len, void (*destroy)(void *, size_t)); /* Equivalent to gpr_slice_new(malloc(len), len, free), but saves one malloc() call. Aborts if malloc() fails. */ -GPR_API gpr_slice gpr_slice_malloc(size_t length); +GPRAPI gpr_slice gpr_slice_malloc(size_t length); /* Create a slice by copying a string. Does not preserve null terminators. @@ -136,44 +136,44 @@ GPR_API gpr_slice gpr_slice_malloc(size_t length); size_t len = strlen(source); gpr_slice slice = gpr_slice_malloc(len); memcpy(slice->data, source, len); */ -GPR_API gpr_slice gpr_slice_from_copied_string(const char *source); +GPRAPI gpr_slice gpr_slice_from_copied_string(const char *source); /* Create a slice by copying a buffer. Equivalent to: gpr_slice slice = gpr_slice_malloc(len); memcpy(slice->data, source, len); */ -GPR_API gpr_slice gpr_slice_from_copied_buffer(const char *source, size_t len); +GPRAPI gpr_slice gpr_slice_from_copied_buffer(const char *source, size_t len); /* Create a slice pointing to constant memory */ -GPR_API gpr_slice gpr_slice_from_static_string(const char *source); +GPRAPI gpr_slice gpr_slice_from_static_string(const char *source); /* Return a result slice derived from s, which shares a ref count with s, where result.data==s.data+begin, and result.length==end-begin. The ref count of s is increased by one. Requires s initialized, begin <= end, begin <= s.length, and end <= source->length. */ -GPR_API gpr_slice gpr_slice_sub(gpr_slice s, size_t begin, size_t end); +GPRAPI gpr_slice gpr_slice_sub(gpr_slice s, size_t begin, size_t end); /* The same as gpr_slice_sub, but without altering the ref count */ -GPR_API gpr_slice gpr_slice_sub_no_ref(gpr_slice s, size_t begin, size_t end); +GPRAPI gpr_slice gpr_slice_sub_no_ref(gpr_slice s, size_t begin, size_t end); /* Splits s into two: modifies s to be s[0:split], and returns a new slice, sharing a refcount with s, that contains s[split:s.length]. Requires s intialized, split <= s.length */ -GPR_API gpr_slice gpr_slice_split_tail(gpr_slice *s, size_t split); +GPRAPI gpr_slice gpr_slice_split_tail(gpr_slice *s, size_t split); /* Splits s into two: modifies s to be s[split:s.length], and returns a new slice, sharing a refcount with s, that contains s[0:split]. Requires s intialized, split <= s.length */ -GPR_API gpr_slice gpr_slice_split_head(gpr_slice *s, size_t split); +GPRAPI gpr_slice gpr_slice_split_head(gpr_slice *s, size_t split); -GPR_API gpr_slice gpr_empty_slice(void); +GPRAPI gpr_slice gpr_empty_slice(void); /* Returns <0 if a < b, ==0 if a == b, >0 if a > b The order is arbitrary, and is not guaranteed to be stable across different versions of the API. */ -GPR_API int gpr_slice_cmp(gpr_slice a, gpr_slice b); -GPR_API int gpr_slice_str_cmp(gpr_slice a, const char *b); +GPRAPI int gpr_slice_cmp(gpr_slice a, gpr_slice b); +GPRAPI int gpr_slice_str_cmp(gpr_slice a, const char *b); #ifdef __cplusplus } |