Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix some typos; thanks Morel Bodin

  • Loading branch information...
commit af3362dfbbfbc40ae56f07c9833867a9e477f88b 1 parent 38b1779
@rfk authored
Showing with 6 additions and 6 deletions.
  1. +5 −5 tnetstring/_tnetstring.c
  2. +1 −1  tnetstring/tns_core.c
View
10 tnetstring/_tnetstring.c
@@ -16,7 +16,7 @@
#include "tns_core.c"
-// We have one static tns_ops struct far parsing bytestrings.
+// We have one static tns_ops struct for parsing bytestrings.
static tns_ops _tnetstring_ops_bytes;
// Unicode parsing ops are created on demand.
@@ -136,7 +136,7 @@ _tnetstring_load(PyObject* self, PyObject *args)
Py_INCREF(res);
if(!PyString_Check(res) || !PyString_GET_SIZE(res)) {
PyErr_SetString(PyExc_ValueError,
- "Not a tnetstring: invlaid or missing length prefix");
+ "Not a tnetstring: invalid or missing length prefix");
goto error;
}
c = PyString_AS_STRING(res)[0];
@@ -145,7 +145,7 @@ _tnetstring_load(PyObject* self, PyObject *args)
// If the first char is zero, it must be the only char.
if(c < '0' || c > '9') {
PyErr_SetString(PyExc_ValueError,
- "Not a tnetstring: invlaid or missing length prefix");
+ "Not a tnetstring: invalid or missing length prefix");
goto error;
} else if (c == '0') {
res = PyObject_CallMethodObjArgs(file, methnm, metharg, NULL);
@@ -155,7 +155,7 @@ _tnetstring_load(PyObject* self, PyObject *args)
Py_INCREF(res);
if(!PyString_Check(res) || !PyString_GET_SIZE(res)) {
PyErr_SetString(PyExc_ValueError,
- "Not a tnetstring: invlaid or missing length prefix");
+ "Not a tnetstring: invalid or missing length prefix");
goto error;
}
c = PyString_AS_STRING(res)[0];
@@ -172,7 +172,7 @@ _tnetstring_load(PyObject* self, PyObject *args)
Py_INCREF(res);
if(!PyString_Check(res) || !PyString_GET_SIZE(res)) {
PyErr_SetString(PyExc_ValueError,
- "Not a tnetstring: invlaid or missing length prefix");
+ "Not a tnetstring: invalid or missing length prefix");
goto error;
}
c = PyString_AS_STRING(res)[0];
View
2  tnetstring/tns_core.c
@@ -227,7 +227,7 @@ static int tns_parse_list(const tns_ops *ops, void *val, const char *data, size_
void *item = NULL;
char *remain = NULL;
- assert(value != NULL && "value cannot be NULL");
+ assert(val != NULL && "value cannot be NULL");
assert(data != NULL && "data cannot be NULL");
while(len > 0) {
Please sign in to comment.
Something went wrong with that request. Please try again.