Commit f82ea195 authored by Stefan Behnel's avatar Stefan Behnel

exclude comments from generated C file

parent 7551bd22
/////////////// ArrayAPI.proto /////////////// /////////////// ArrayAPI.proto ///////////////
/* arrayarray.h // arrayarray.h
//
Artificial C-API for Python's <array.array> type, // Artificial C-API for Python's <array.array> type,
used by array.pxd // used by array.pxd
//
last changes: 2009-05-15 rk // last changes: 2009-05-15 rk
2012-05-02 andreasvc // 2012-05-02 andreasvc
(see revision control) // (see revision control)
//
*/
#ifndef _ARRAYARRAY_H #ifndef _ARRAYARRAY_H
#define _ARRAYARRAY_H #define _ARRAYARRAY_H
struct arrayobject; /* Forward */ struct arrayobject; /* Forward */
/* All possible arraydescr values are defined in the vector "descriptors" // All possible arraydescr values are defined in the vector "descriptors"
* below. That's defined later because the appropriate get and set // below. That's defined later because the appropriate get and set
* functions aren't visible yet. // functions aren't visible yet.
*/
typedef struct arraydescr { typedef struct arraydescr {
int typecode; int typecode;
int itemsize; int itemsize;
...@@ -66,11 +64,7 @@ typedef struct arrayobject { ...@@ -66,11 +64,7 @@ typedef struct arrayobject {
#ifndef NO_NEWARRAY_INLINE #ifndef NO_NEWARRAY_INLINE
/* // fast creation of a new array
*
* fast creation of a new array
*/
static CYTHON_INLINE PyObject * newarrayobject(PyTypeObject *type, Py_ssize_t size, static CYTHON_INLINE PyObject * newarrayobject(PyTypeObject *type, Py_ssize_t size,
struct arraydescr *descr) { struct arraydescr *descr) {
arrayobject *op; arrayobject *op;
...@@ -113,8 +107,8 @@ PyObject* newarrayobject(PyTypeObject *type, Py_ssize_t size, ...@@ -113,8 +107,8 @@ PyObject* newarrayobject(PyTypeObject *type, Py_ssize_t size,
struct arraydescr *descr); struct arraydescr *descr);
#endif /* ifndef NO_NEWARRAY_INLINE */ #endif /* ifndef NO_NEWARRAY_INLINE */
/* fast resize (reallocation to the point) // fast resize (reallocation to the point)
not designed for filing small increments (but for fast opaque array apps) */ // not designed for filing small increments (but for fast opaque array apps)
static int resize(arrayobject *self, Py_ssize_t n) { static int resize(arrayobject *self, Py_ssize_t n) {
void *item= (void*) self->ob_item; void *item= (void*) self->ob_item;
PyMem_Resize(item, char, (size_t)(n * self->ob_descr->itemsize)); PyMem_Resize(item, char, (size_t)(n * self->ob_descr->itemsize));
...@@ -130,8 +124,8 @@ static int resize(arrayobject *self, Py_ssize_t n) { ...@@ -130,8 +124,8 @@ static int resize(arrayobject *self, Py_ssize_t n) {
return 0; return 0;
} }
/* suitable for small increments; over allocation 50% ; // suitable for small increments; over allocation 50% ;
Remains non-smart in Python 2.3- ; but exists for compatibility */ // Remains non-smart in Python 2.3- ; but exists for compatibility
static int resize_smart(arrayobject *self, Py_ssize_t n) { static int resize_smart(arrayobject *self, Py_ssize_t n) {
#if PY_VERSION_HEX >= 0x02040000 #if PY_VERSION_HEX >= 0x02040000
void *item = (void*) self->ob_item; void *item = (void*) self->ob_item;
...@@ -157,6 +151,5 @@ static int resize_smart(arrayobject *self, Py_ssize_t n) { ...@@ -157,6 +151,5 @@ static int resize_smart(arrayobject *self, Py_ssize_t n) {
#endif #endif
} }
#endif #endif
/* _ARRAYARRAY_H */ /* _ARRAYARRAY_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment