Skip to content

Commit

Permalink
Avoid compound literal to fix MSVC compilation.
Browse files Browse the repository at this point in the history
This fixes python#3.
  • Loading branch information
Robert Xiao committed Jun 26, 2016
1 parent 7cf74d6 commit db241a9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lz4/frame/_frame.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ static PyObject *
py_lz4f_makePrefs (PyObject * Py_UNUSED (self), PyObject * args,
PyObject * keywds)
{
LZ4F_frameInfo_t frameInfo;
LZ4F_preferences_t *prefs;
PyObject *result = PyDict_New ();
static char *kwlist[] = { "blockSizeID", "blockMode", "chkFlag"
Expand All @@ -171,12 +170,13 @@ py_lz4f_makePrefs (PyObject * Py_UNUSED (self), PyObject * args,
}

prefs = calloc (1, sizeof (LZ4F_preferences_t));
frameInfo = (LZ4F_frameInfo_t)
{
blkID, blkMode, chkSumFlag, 0, 0,
{0, 0}
};
prefs->frameInfo = frameInfo;
LZ4F_frameInfo_t frameInfo = {
blkID, blkMode, chkSumFlag, 0, 0,
{0, 0}
};
prefs->frameInfo = frameInfo;
}
prefs->autoFlush = autoFlush;
result = PyCapsule_New (prefs, NULL, NULL);

Expand Down

0 comments on commit db241a9

Please sign in to comment.