summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2016-05-04 18:35:55 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2016-05-04 18:35:55 +0200
commit6b9b3b16ac738f99bddde3d7d375f9986bb1c09a (patch)
treeaaf4e66adfb1d19edc5f648aaa963cede8329b06 /include
parent82adb27966eace72f810716c19c660efd7c8b15a (diff)
try to avoid unnecessary copy
Change-Id: I98cd69133ba3babb2719fad8c7e31c4dcaf1ae97 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'include')
-rw-r--r--include/afb-req-itf.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/afb-req-itf.h b/include/afb-req-itf.h
index df133f5c..111b1d53 100644
--- a/include/afb-req-itf.h
+++ b/include/afb-req-itf.h
@@ -31,7 +31,7 @@ struct afb_req_itf {
void (*success)(void *req_closure, struct json_object *obj, const char *info);
void (*fail)(void *req_closure, const char *status, const char *info);
const char *(*raw)(void *req_closure, size_t *size);
- void (*send)(void *req_closure, char *buffer, size_t size);
+ void (*send)(void *req_closure, const char *buffer, size_t size);
void *(*context_get)(void *ctx_closure);
void (*context_set)(void *ctx_closure, void *context, void (*free_context)(void*));
int (*session_create)(void *req_closure);
@@ -80,7 +80,7 @@ static inline const char *afb_req_raw(struct afb_req req, size_t *size)
return req.itf->raw(req.req_closure, size);
}
-static inline void afb_req_send(struct afb_req req, char *buffer, size_t size)
+static inline void afb_req_send(struct afb_req req, const char *buffer, size_t size)
{
req.itf->send(req.req_closure, buffer, size);
}