chiark / gitweb /
algorithms.c: Add support for Poly1305.
[catacomb-python] / bytestring.c
index fac797ce90aa431561ebea512eb5b86a0e8dd038..b3b32de52bd6159416412277b838b758b520f8f0 100644 (file)
@@ -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.
  *
  * 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@ */