From e711a9ac450246dce43a778e910fc7327a681db3 Mon Sep 17 00:00:00 2001 From: Dvir Volk Date: Sun, 3 Apr 2016 19:04:32 +0300 Subject: [PATCH] fixed the doc with a right function name --- src/modules/API.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/API.md b/src/modules/API.md index bc183251..3a0903c8 100644 --- a/src/modules/API.md +++ b/src/modules/API.md @@ -160,9 +160,10 @@ you may need to directly access the string object. There are a few functions in order to work with string objects: - const char *RedisModule_StringPtr(RedisModuleString *string, size_t *len); + const char *RedisModule_StringPtrLen(RedisModuleString *string, size_t *len); -The above function accesses a string by returning its pointer and length. +The above function accesses a string by returning its pointer and setting its +length in `len`. You should never write to a string object pointer, as you can see from the `const` pointer qualifier.