@@@ py_buffer/freebin wip
[catacomb-python] / share.c
diff --git a/share.c b/share.c
index eadaa48..30bff92 100644 (file)
--- 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);
 }