author | Alberto Bertogli
<albertito@blitiri.com.ar> 2011-02-22 23:56:29 UTC |
committer | Alberto Bertogli
<albertito@blitiri.com.ar> 2011-02-22 23:56:29 UTC |
parent | c3c425bdfa3184eac6344882f085c63c0a3bf48b |
bindings/python/libjio.c | +4 | -4 |
libjio/libjio.h | +1 | -1 |
diff --git a/bindings/python/libjio.c b/bindings/python/libjio.c index e0c8c68..f147d65 100644 --- a/bindings/python/libjio.c +++ b/bindings/python/libjio.c @@ -378,7 +378,7 @@ static PyObject *jf_writev(jfile_object *fp, PyObject *args) /* truncate */ PyDoc_STRVAR(jf_truncate__doc, -"truncate(lenght)\n\ +"truncate(length)\n\ \n\ Truncate the file to the given size.\n\ It's a wrapper to jtruncate().\n"); @@ -386,13 +386,13 @@ It's a wrapper to jtruncate().\n"); static PyObject *jf_truncate(jfile_object *fp, PyObject *args) { int rv; - long long lenght; + long long length; - if (!PyArg_ParseTuple(args, "L:truncate", &lenght)) + if (!PyArg_ParseTuple(args, "L:truncate", &length)) return NULL; Py_BEGIN_ALLOW_THREADS - rv = jtruncate(fp->fs, lenght); + rv = jtruncate(fp->fs, length); Py_END_ALLOW_THREADS if (rv != 0) diff --git a/libjio/libjio.h b/libjio/libjio.h index 446b81a..20ddba6 100644 --- a/libjio/libjio.h +++ b/libjio/libjio.h @@ -384,7 +384,7 @@ ssize_t jwritev(jfs_t *fs, const struct iovec *vector, int count); /** Truncates the file to the given length. Works just like UNIX ftruncate(2). * * @param fs file to truncate - * @param length lenght to truncate to + * @param length length to truncate to * @returns 0 on success, -1 on error * @see ftruncate(2) * @ingroup unix