py_raise_fec_error("Precondition violation: %u'th item is required to offer the single-segment read character buffer protocol, but it does not.\n", i);
goto err;
}
- if (PyObject_AsReadBuffer(fastinsharesitems[i], &(incshares[i]), &sz))
+ if (PyObject_AsReadBuffer(fastinsharesitems[i], (const void**)&(incshares[i]), &sz))
goto err;
if (oldsz != 0 && oldsz != sz) {
py_raise_fec_error("Precondition violation: Input shares are required to be all the same length. oldsz: %Zu, sz: %Zu\n", oldsz, sz);
pystrs_produced[check_share_index] = PyString_FromStringAndSize(NULL, sz);
if (pystrs_produced[check_share_index] == NULL)
goto err;
- check_shares_produced[check_share_index] = PyString_AsString(pystrs_produced[check_share_index]);
+ check_shares_produced[check_share_index] = (gf*)PyString_AsString(pystrs_produced[check_share_index]);
if (check_shares_produced[check_share_index] == NULL)
goto err;
check_share_index++;
py_raise_fec_error("Precondition violation: %u'th item is required to offer the single-segment read character buffer protocol, but it does not.\n", i);
goto err;
}
- if (PyObject_AsReadBuffer(fastsharesitems[i], &(cshares[i]), &sz))
+ if (PyObject_AsReadBuffer(fastsharesitems[i], (const void**)&(cshares[i]), &sz))
goto err;
if (oldsz != 0 && oldsz != sz) {
py_raise_fec_error("Precondition violation: Input shares are required to be all the same length. oldsz: %Zu, sz: %Zu\n", oldsz, sz);
unsigned char c = cshareids[i];
SWAP (cshareids[i], cshareids[c], int);
- SWAP (cshares[i], cshares[c], gf*);
+ SWAP (cshares[i], cshares[c], const gf*);
SWAP (fastsharesitems[i], fastsharesitems[c], PyObject*);
}
}
recoveredpystrs[i] = PyString_FromStringAndSize(NULL, sz);
if (recoveredpystrs[i] == NULL)
goto err;
- recoveredcstrs[i] = PyString_AsString(recoveredpystrs[i]);
+ recoveredcstrs[i] = (gf*)PyString_AsString(recoveredpystrs[i]);
if (recoveredcstrs[i] == NULL)
goto err;
}