lua: keeping the pointer type in msgpackffi.decode()
Method decode_unchecked returns two values - the one that has been decoded and a pointer to the new position within the buffer given as a parameter. The type of returned pointer used to be cdata<unsigned char *> and it was not possible to assign returned value to buf.rpos due to the following error: > cannot convert 'const unsigned char *' to 'char *' The patch fixes this by making decode_unchecked method return either cdata<char *> or cdata<const char *> depending on the given parameter. Closes #3926 (cherry picked from commit 84bcba52)
Loading
Please register or sign in to comment