X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb-python/blobdiff_plain/963a61481edc7a83698b18b518bf20cd93d268a6..828b13882f35b28275cf4062296b0419e0f0a7d1:/bytestring.c?ds=inline diff --git a/bytestring.c b/bytestring.c index fac797c..b3b32de 100644 --- a/bytestring.c +++ b/bytestring.c @@ -1,13 +1,11 @@ /* -*-c-*- * - * $Id$ - * * Byte strings * * (c) 2004 Straylight/Edgeware */ -/*----- Licensing notice --------------------------------------------------* +/*----- Licensing notice --------------------------------------------------* * * This file is part of the Python interface to Catacomb. * @@ -15,12 +13,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * Catacomb/Python is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with Catacomb/Python; if not, write to the Free Software Foundation, * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -68,7 +66,7 @@ static PyObject *bytestring_pynew(PyTypeObject *ty, const void *xv, *yv; \ const unsigned char *xp, *yp; \ unsigned char *zp; \ - int xsz, ysz; \ + Py_ssize_t xsz, ysz; \ int i; \ PyObject *rc = 0; \ if (PyObject_AsReadBuffer(x, &xv, &xsz) || \ @@ -90,7 +88,7 @@ BINOP(xor, ^) const void *xv; \ const unsigned char *xp; \ unsigned char *zp; \ - int xsz; \ + Py_ssize_t xsz; \ int i; \ PyObject *rc = 0; \ if (PyObject_AsReadBuffer(x, &xv, &xsz)) goto end; \ @@ -132,7 +130,7 @@ static PyBufferProcs bytestring_pybuffer; static PyTypeObject bytestring_pytype_skel = { PyObject_HEAD_INIT(0) 0, /* Header */ - "catacomb.ByteString", /* @tp_name@ */ + "ByteString", /* @tp_name@ */ 0, /* @tp_basicsize@ */ 0, /* @tp_itemsize@ */