summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2012-02-05 15:43:51 -0700
committerCharles Harris <charlesr.harris@gmail.com>2012-02-05 15:43:51 -0700
commit5203d726962d32335fbf767e12ec5614df23dae0 (patch)
tree93b08651419d60f5e8a15a0ec0c95d56ddb534cd
parent6bde534712abc4ab4d15d3a461dd780fdf7eaa5b (diff)
downloadnumpy-5203d726962d32335fbf767e12ec5614df23dae0.tar.gz
STY: Cleanup some prefixing that crept into comments.
-rw-r--r--numpy/core/src/multiarray/methods.c3
-rw-r--r--numpy/core/src/multiarray/ucsnarrow.c38
2 files changed, 21 insertions, 20 deletions
diff --git a/numpy/core/src/multiarray/methods.c b/numpy/core/src/multiarray/methods.c
index c715008a4..13ef868ae 100644
--- a/numpy/core/src/multiarray/methods.c
+++ b/numpy/core/src/multiarray/methods.c
@@ -1724,7 +1724,8 @@ array_setstate(PyArrayObject *self, PyObject *args)
Py_DECREF(rawdata);
return PyErr_NoMemory();
}
- if (swap) { /* npy_byte-swap on pickle-read */
+ if (swap) {
+ /* byte-swap on pickle-read */
npy_intp numels = num / PyArray_DESCR(self)->elsize;
PyArray_DESCR(self)->f->copyswapn(PyArray_DATA(self),
PyArray_DESCR(self)->elsize,
diff --git a/numpy/core/src/multiarray/ucsnarrow.c b/numpy/core/src/multiarray/ucsnarrow.c
index 1dfd21e4e..dee7e3c0f 100644
--- a/numpy/core/src/multiarray/ucsnarrow.c
+++ b/numpy/core/src/multiarray/ucsnarrow.c
@@ -13,20 +13,20 @@
#include "numpy/npy_3kcompat.h"
-/* Functions only needed on narrow builds of Python
- for converting back and forth between the NumPy Unicode data-type
- (always 4-npy_byte)
- and the Python Unicode scalar (2-bytes on a narrow build).
-*/
+/*
+ * Functions only needed on narrow builds of Python for converting back and
+ * forth between the NumPy Unicode data-type (always 4-bytes) and the
+ * Python Unicode scalar (2-bytes on a narrow build).
+ */
/* the ucs2 buffer must be large enough to hold 2*ucs4length characters
- due to the use of surrogate pairs.
-
- The return value is the number of ucs2 bytes used-up which
- is ucs4length + number of surrogate pairs found.
-
- values above 0xffff are converted to surrogate pairs.
-*/
+ * due to the use of surrogate pairs.
+ *
+ * The return value is the number of ucs2 bytes used-up which
+ * is ucs4length + number of surrogate pairs found.
+ *
+ * values above 0xffff are converted to surrogate pairs.
+ */
NPY_NO_EXPORT int
PyUCS2Buffer_FromUCS4(Py_UNICODE *ucs2, npy_ucs4 *ucs4, int ucs4length)
{
@@ -51,13 +51,13 @@ PyUCS2Buffer_FromUCS4(Py_UNICODE *ucs2, npy_ucs4 *ucs4, int ucs4length)
/* This converts a UCS2 buffer of the given length to UCS4 buffer.
- It converts up to ucs4len characters of UCS2
-
- It returns the number of characters converted which can
- be less than ucs2len if there are surrogate pairs in ucs2.
-
- The return value is the actual size of the used part of the ucs4 buffer.
-*/
+ * It converts up to ucs4len characters of UCS2
+ *
+ * It returns the number of characters converted which can
+ * be less than ucs2len if there are surrogate pairs in ucs2.
+ *
+ * The return value is the actual size of the used part of the ucs4 buffer.
+ */
NPY_NO_EXPORT int
PyUCS2Buffer_AsUCS4(Py_UNICODE *ucs2, npy_ucs4 *ucs4, int ucs2len, int ucs4len)