Skip to content

Commit e7b17a6

Browse files
committed
Make C API compile as C++.
1 parent 7baf0a3 commit e7b17a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

c-api/compat-5.3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ COMPAT53_API char *luaL_prepbuffsize (luaL_Buffer_53 *B, size_t s) {
428428
newcap = B->nelems + s;
429429
if (newcap < B->capacity) /* overflow */
430430
luaL_error(B->L2, "buffer too large");
431-
newptr = lua_newuserdata(B->L2, newcap);
431+
newptr = (char*)lua_newuserdata(B->L2, newcap);
432432
memcpy(newptr, B->ptr, B->nelems);
433433
if (B->ptr != B->b.buffer)
434434
lua_replace(B->L2, -2); /* remove old buffer */

0 commit comments

Comments
 (0)