Skip to content
Snippets Groups Projects
Unverified Commit 8a28aa8b authored by Maria's avatar Maria Committed by Alexander Turenko
Browse files

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)
parent 7f7c673a
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment