Installing in Windows crashes in setup.py
python setup.py install
at Microsoft Visual Studio 9.0\VC\BIN\cl.exe ...
pygit2.c(496) : error C2275: 'PyObject' : illegal use of this type as an expression
Error is caused by variable declaration in the middle of the method in Repository_read;
Fix is to move the declaration to the beginning of the method
static PyObject *
Repository_read(Repository *self, PyObject *py_hex)
{
git_oid oid;
int err;
git_odb_object *obj;
size_t len;
PyObject* tuple; // add declaration in line 487
...
tuple = Py_BuildValue( // Remove tuple declaration in line 497
Installing in Windows crashes in setup.py
Error is caused by variable declaration in the middle of the method in Repository_read;
Fix is to move the declaration to the beginning of the method