Re: [patch][c++] fix "invalid conversion from ‘void*’ to ‘char*’"
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: [patch][c++] fix "invalid conversion from ‘void*’ to ‘char*’"
- From: Roberto Ierusalimschy <roberto@...>
- Date: 2016年6月26日 16:16:46 -0300
> In the 5.3.3 release, lua/lstrlib.cc:936:
>
> char *ppoint = memchr(buff, point, nb);
>
> is not valid c++ code. This should be fixed with a c-style cast:
>
> @@ -935,3 +935,3 @@ static void checkdp (char *buff, int nb) {
> char point = lua_getlocaledecpoint(); /* try locale point */
> - char *ppoint = memchr(buff, point, nb);
> + char *ppoint = (char *)(memchr(buff, point, nb));
> if (ppoint) *ppoint = '.'; /* change it to a dot */
Thanks.
-- Roberto