X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb-python/blobdiff_plain/be17c8c27ee7ae2e14fe34bb517484a11b1cf300..cfb291f03e0882cba9037be2a2756a6af41fb76a:/share.c diff --git a/share.c b/share.c index eadaa48..30bff92 100644 --- a/share.c +++ b/share.c @@ -137,7 +137,7 @@ static PyObject *gfsmeth_get(PyObject *me, PyObject *arg) if (!PyArg_ParseTuple(arg, "O&:get", convuint, &i)) goto end; if (i >= 255) VALERR("index must be < 255"); rc = bytestring_pywrap(0, GFSHARE_S(me)->sz); - gfshare_get(GFSHARE_S(me), i, PyString_AS_STRING(rc)); + gfshare_get(GFSHARE_S(me), i, BIN_PTR(rc)); end: return (rc); } @@ -246,7 +246,7 @@ static PyObject *gfsmeth_combine(PyObject *me) PyObject *rc = 0; if (GFSHARE_S(me)->i < GFSHARE_S(me)->t) VALERR("not enough shares yet"); rc = bytestring_pywrap(0, GFSHARE_S(me)->sz); - gfshare_combine(GFSHARE_S(me), PyString_AS_STRING(rc)); + gfshare_combine(GFSHARE_S(me), BIN_PTR(rc)); end: return (rc); }