pyke/, ...: Extract utilities into a sort-of reusable library.
[catacomb-python] / bytestring.c
index 82d117f..eef8ed1 100644 (file)
@@ -30,7 +30,7 @@
 
 /*----- Main code ---------------------------------------------------------*/
 
-PyTypeObject *bytestring_pytype;
+static PyTypeObject *bytestring_pytype;
 
 static PyObject *empty, *bytev[256];
 
@@ -310,8 +310,6 @@ static PyMappingMethods bytestring_pymapping = {
   0,                                   /* @mp_ass_subscript@ */
 };
 
-static PyBufferProcs bytestring_pybuffer;
-
 static PyTypeObject bytestring_pytype_skel = {
   PyObject_HEAD_INIT(0) 0,             /* Header */
   "ByteString",                                /* @tp_name@ */
@@ -332,13 +330,13 @@ static PyTypeObject bytestring_pytype_skel = {
   0,                                   /* @tp_str@ */
   0,                                   /* @tp_getattro@ */
   0,                                   /* @tp_setattro@ */
-  &bytestring_pybuffer,                        /* @tp_as_buffer@ */
+  0,                                   /* @tp_as_buffer@ */
   Py_TPFLAGS_DEFAULT |                 /* @tp_flags@ */
     Py_TPFLAGS_CHECKTYPES |
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"ByteString(STR): byte string class.",
+  "ByteString(STR): byte string class.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -365,8 +363,8 @@ static PyTypeObject bytestring_pytype_skel = {
 
 static PyMethodDef methods[] = {
 #define METHNAME(func) meth_##func
-  METH  (ctstreq,              "ctstreq(S, T) -> BOOL")
-  METH (_ByteString_zero,      "zero(N) -> 0000...00")
+  METH (ctstreq,       "ctstreq(S, T) -> BOOL")
+  METH (_ByteString_zero, "zero(N) -> 0000...00")
 #undef METHNAME
   { 0 }
 };