antirez / antirez/lua-cmsgpack

Compile error with MSVC2010

Open
#52 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
383
Forks
122
PR merge metrics
No merged PRs in 30d

Description

Please swap lines 549/550 to

void mp_decode_to_lua_array(lua_State *L, mp_cur *c, size_t len) {
int index = 1;
assert(len <= UINT_MAX);

as VC2010 otherwise complains about a variable "index" defined in the middle of a C block.
Variables have to be declared in the first line - in a pure C program...

Regards,
Helmut

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.