diff options
author | Aleksandr <ivansduck@gmail.com> | 2022-02-10 16:47:52 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:52 +0300 |
commit | ea6c5b7f172becca389cacaff7d5f45f6adccbe6 (patch) | |
tree | d16cef493ac1e092b4a03ab9437ec06ffe3d188f /contrib/tools/cython/Cython/Includes | |
parent | 37de222addabbef336dcaaea5f7c7645a629fc6d (diff) | |
download | ydb-ea6c5b7f172becca389cacaff7d5f45f6adccbe6.tar.gz |
Restoring authorship annotation for Aleksandr <ivansduck@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'contrib/tools/cython/Cython/Includes')
25 files changed, 353 insertions, 353 deletions
diff --git a/contrib/tools/cython/Cython/Includes/cpython/__init__.pxd b/contrib/tools/cython/Cython/Includes/cpython/__init__.pxd index c81f4e6655..d038304115 100644 --- a/contrib/tools/cython/Cython/Includes/cpython/__init__.pxd +++ b/contrib/tools/cython/Cython/Includes/cpython/__init__.pxd @@ -10,13 +10,13 @@ # Read http://docs.python.org/api/refcounts.html which is so # important I've copied it below. # -# For all the declaration below, whenever the Py_ function returns +# For all the declaration below, whenever the Py_ function returns # a *new reference* to a PyObject*, the return type is "object". # When the function returns a borrowed reference, the return # type is PyObject*. When Cython sees "object" as a return type # it doesn't increment the reference count. When it sees PyObject* # in order to use the result you must explicitly cast to <object>, -# and when you do that Cython increments the reference count whether +# and when you do that Cython increments the reference count whether # you want it to or not, forcing you to an explicit DECREF (or leak memory). # To avoid this we make the above convention. Note, you can # always locally override this convention by putting something like diff --git a/contrib/tools/cython/Cython/Includes/cpython/array.pxd b/contrib/tools/cython/Cython/Includes/cpython/array.pxd index 19230a0a82..f27d46aea4 100644 --- a/contrib/tools/cython/Cython/Includes/cpython/array.pxd +++ b/contrib/tools/cython/Cython/Includes/cpython/array.pxd @@ -1,46 +1,46 @@ """ array.pxd - + Cython interface to Python's array.array module. - + * 1D contiguous data view * tools for fast array creation, maximum C-speed and handiness * suitable as allround light weight auto-array within Cython code too - + Usage: - + >>> cimport array - Usage through Cython buffer interface (Py2.3+): - + Usage through Cython buffer interface (Py2.3+): + >>> def f(arg1, unsigned i, double dx) ... array.array[double] a = arg1 ... a[i] += dx - + Fast C-level new_array(_zeros), resize_array, copy_array, Py_SIZE(obj), zero_array - - cdef array.array[double] k = array.copy(d) + + cdef array.array[double] k = array.copy(d) cdef array.array[double] n = array.array(d, Py_SIZE(d) * 2 ) cdef array.array[double] m = array.zeros_like(FLOAT_TEMPLATE) array.resize(f, 200000) - - Zero overhead with naked data pointer views by union: - _f, _d, _i, _c, _u, ... + + Zero overhead with naked data pointer views by union: + _f, _d, _i, _c, _u, ... => Original C array speed + Python dynamic memory management cdef array.array a = inarray - if + if a._d[2] += 0.66 # use as double array without extra casting - + float *subview = vector._f + 10 # starting from 10th element - unsigned char *subview_buffer = vector._B + 4 - - Suitable as lightweight arrays intra Cython without speed penalty. - Replacement for C stack/malloc arrays; no trouble with refcounting, + unsigned char *subview_buffer = vector._B + 4 + + Suitable as lightweight arrays intra Cython without speed penalty. + Replacement for C stack/malloc arrays; no trouble with refcounting, mem.leaks; seamless Python compatibility, buffer() optional - + last changes: 2009-05-15 rk : 2009-12-06 bp : 2012-05-02 andreasvc @@ -75,8 +75,8 @@ cdef extern from *: # Hard-coded utility code hack. char *as_chars unsigned long *as_ulongs long *as_longs - unsigned long long *as_ulonglongs - long long *as_longlongs + unsigned long long *as_ulonglongs + long long *as_longlongs short *as_shorts unsigned short *as_ushorts Py_UNICODE *as_pyunicodes @@ -92,7 +92,7 @@ cdef extern from *: # Hard-coded utility code hack. def __getbuffer__(self, Py_buffer* info, int flags): # This implementation of getbuffer is geared towards Cython - # requirements, and does not yet fulfill the PEP. + # requirements, and does not yet fulfill the PEP. # In particular strided access is always provided regardless # of flags item_count = Py_SIZE(self) @@ -143,7 +143,7 @@ cdef inline array copy(array self): return op cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1: - """ efficient appending of new stuff of same type + """ efficient appending of new stuff of same type (e.g. of same array type) n: number of elements (not number of bytes!) """ cdef Py_ssize_t itemsize = self.ob_descr.itemsize diff --git a/contrib/tools/cython/Cython/Includes/cpython/datetime.pxd b/contrib/tools/cython/Cython/Includes/cpython/datetime.pxd index cd0f90719b..bf32617074 100644 --- a/contrib/tools/cython/Cython/Includes/cpython/datetime.pxd +++ b/contrib/tools/cython/Cython/Includes/cpython/datetime.pxd @@ -5,7 +5,7 @@ cdef extern from "Python.h": pass cdef extern from "datetime.h": - + ctypedef extern class datetime.date[object PyDateTime_Date]: pass @@ -23,11 +23,11 @@ cdef extern from "datetime.h": ctypedef struct PyDateTime_Date: pass - + ctypedef struct PyDateTime_Time: char hastzinfo PyObject *tzinfo - + ctypedef struct PyDateTime_DateTime: char hastzinfo PyObject *tzinfo @@ -36,22 +36,22 @@ cdef extern from "datetime.h": int days int seconds int microseconds - + # Define structure for C API. ctypedef struct PyDateTime_CAPI: - # type objects + # type objects PyTypeObject *DateType PyTypeObject *DateTimeType PyTypeObject *TimeType PyTypeObject *DeltaType PyTypeObject *TZInfoType - + # constructors object (*Date_FromDate)(int, int, int, PyTypeObject*) object (*DateTime_FromDateAndTime)(int, int, int, int, int, int, int, object, PyTypeObject*) object (*Time_FromTime)(int, int, int, int, object, PyTypeObject*) object (*Delta_FromDelta)(int, int, int, int, PyTypeObject*) - + # constructors for the DB API object (*DateTime_FromTimestamp)(object, object, object) object (*Date_FromTimestamp)(object, object) @@ -96,7 +96,7 @@ cdef extern from "datetime.h": # PyDateTime CAPI object. PyDateTime_CAPI *PyDateTimeAPI - + void PyDateTime_IMPORT() # Datetime C API initialization function. @@ -108,7 +108,7 @@ cdef inline void import_datetime(): # Note, there are no range checks for any of the arguments. cdef inline object date_new(int year, int month, int day): return PyDateTimeAPI.Date_FromDate(year, month, day, PyDateTimeAPI.DateType) - + # Create time object using DateTime CAPI factory function # Note, there are no range checks for any of the arguments. cdef inline object time_new(int hour, int minute, int second, int microsecond, object tz): @@ -127,7 +127,7 @@ cdef inline object timedelta_new(int days, int seconds, int useconds): # More recognizable getters for date/time/datetime/timedelta. # There are no setters because datetime.h hasn't them. # This is because of immutable nature of these objects by design. -# If you would change time/date/datetime/timedelta object you need to recreate. +# If you would change time/date/datetime/timedelta object you need to recreate. # Get tzinfo of time cdef inline object time_tzinfo(object o): @@ -136,7 +136,7 @@ cdef inline object time_tzinfo(object o): else: return None -# Get tzinfo of datetime +# Get tzinfo of datetime cdef inline object datetime_tzinfo(object o): if (<PyDateTime_DateTime*>o).hastzinfo: return <object>(<PyDateTime_DateTime*>o).tzinfo @@ -146,7 +146,7 @@ cdef inline object datetime_tzinfo(object o): # Get year of date cdef inline int date_year(object o): return PyDateTime_GET_YEAR(o) - + # Get month of date cdef inline int date_month(object o): return PyDateTime_GET_MONTH(o) @@ -158,7 +158,7 @@ cdef inline int date_day(object o): # Get year of datetime cdef inline int datetime_year(object o): return PyDateTime_GET_YEAR(o) - + # Get month of datetime cdef inline int datetime_month(object o): return PyDateTime_GET_MONTH(o) diff --git a/contrib/tools/cython/Cython/Includes/cpython/long.pxd b/contrib/tools/cython/Cython/Includes/cpython/long.pxd index eb8140d417..b4754dff6a 100644 --- a/contrib/tools/cython/Cython/Includes/cpython/long.pxd +++ b/contrib/tools/cython/Cython/Includes/cpython/long.pxd @@ -30,14 +30,14 @@ cdef extern from "Python.h": # Return value: New reference. # Return a new PyLongObject object from a C unsigned long, or NULL on failure. - object PyLong_FromSsize_t(Py_ssize_t v) - # Return value: New reference. - # Return a new PyLongObject object from a C Py_ssize_t, or NULL on failure.) - - object PyLong_FromSize_t(size_t v) - # Return value: New reference. - # Return a new PyLongObject object from a C size_t, or NULL on failure. - + object PyLong_FromSsize_t(Py_ssize_t v) + # Return value: New reference. + # Return a new PyLongObject object from a C Py_ssize_t, or NULL on failure.) + + object PyLong_FromSize_t(size_t v) + # Return value: New reference. + # Return a new PyLongObject object from a C size_t, or NULL on failure. + object PyLong_FromLongLong(PY_LONG_LONG v) # Return value: New reference. # Return a new PyLongObject object from a C long long, or NULL on failure. @@ -72,12 +72,12 @@ cdef extern from "Python.h": # range [2, 36]; if it is out of range, ValueError will be # raised. - # object PyLong_FromUnicodeObject(object u, int base) - # Convert a sequence of Unicode digits in the string u to a Python integer - # value. The Unicode string is first encoded to a byte string using - # PyUnicode_EncodeDecimal() and then converted using PyLong_FromString(). - # New in version 3.3. - + # object PyLong_FromUnicodeObject(object u, int base) + # Convert a sequence of Unicode digits in the string u to a Python integer + # value. The Unicode string is first encoded to a byte string using + # PyUnicode_EncodeDecimal() and then converted using PyLong_FromString(). + # New in version 3.3. + object PyLong_FromVoidPtr(void *p) # Return value: New reference. # Create a Python integer or long integer from the pointer p. The @@ -89,27 +89,27 @@ cdef extern from "Python.h": # Return a C long representation of the contents of pylong. If # pylong is greater than LONG_MAX, an OverflowError is raised. - # long PyLong_AsLongAndOverflow(object pylong, int *overflow) except? -1 - # Return a C long representation of the contents of pylong. If pylong is - # greater than LONG_MAX or less than LONG_MIN, set *overflow to 1 or -1, - # respectively, and return -1; otherwise, set *overflow to 0. If any other - # exception occurs (for example a TypeError or MemoryError), then -1 will - # be returned and *overflow will be 0. - # New in version 2.7. - - # PY_LONG_LONG PyLong_AsLongLongAndOverflow(object pylong, int *overflow) except? -1 - # Return a C long long representation of the contents of pylong. If pylong - # is greater than PY_LLONG_MAX or less than PY_LLONG_MIN, set *overflow to - # 1 or -1, respectively, and return -1; otherwise, set *overflow to 0. If - # any other exception occurs (for example a TypeError or MemoryError), then - # -1 will be returned and *overflow will be 0. - # New in version 2.7. - - Py_ssize_t PyLong_AsSsize_t(object pylong) except? -1 - # Return a C Py_ssize_t representation of the contents of pylong. If pylong - # is greater than PY_SSIZE_T_MAX, an OverflowError is raised and -1 will be - # returned. - + # long PyLong_AsLongAndOverflow(object pylong, int *overflow) except? -1 + # Return a C long representation of the contents of pylong. If pylong is + # greater than LONG_MAX or less than LONG_MIN, set *overflow to 1 or -1, + # respectively, and return -1; otherwise, set *overflow to 0. If any other + # exception occurs (for example a TypeError or MemoryError), then -1 will + # be returned and *overflow will be 0. + # New in version 2.7. + + # PY_LONG_LONG PyLong_AsLongLongAndOverflow(object pylong, int *overflow) except? -1 + # Return a C long long representation of the contents of pylong. If pylong + # is greater than PY_LLONG_MAX or less than PY_LLONG_MIN, set *overflow to + # 1 or -1, respectively, and return -1; otherwise, set *overflow to 0. If + # any other exception occurs (for example a TypeError or MemoryError), then + # -1 will be returned and *overflow will be 0. + # New in version 2.7. + + Py_ssize_t PyLong_AsSsize_t(object pylong) except? -1 + # Return a C Py_ssize_t representation of the contents of pylong. If pylong + # is greater than PY_SSIZE_T_MAX, an OverflowError is raised and -1 will be + # returned. + unsigned long PyLong_AsUnsignedLong(object pylong) except? -1 # Return a C unsigned long representation of the contents of # pylong. If pylong is greater than ULONG_MAX, an OverflowError is diff --git a/contrib/tools/cython/Cython/Includes/cpython/module.pxd b/contrib/tools/cython/Cython/Includes/cpython/module.pxd index 8eb323b010..a21d19c58d 100644 --- a/contrib/tools/cython/Cython/Includes/cpython/module.pxd +++ b/contrib/tools/cython/Cython/Includes/cpython/module.pxd @@ -35,19 +35,19 @@ cdef extern from "Python.h": # unless a non-empty fromlist was given. Changed in version 2.4: # failing imports remove incomplete module objects. - object PyImport_ImportModuleLevel(char *name, object globals, object locals, object fromlist, int level) - # Return value: New reference. - - # Import a module. This is best described by referring to the - # built-in Python function __import__(), as the standard - # __import__() function calls this function directly. - - # The return value is a new reference to the imported module or - # top-level package, or NULL with an exception set on failure. Like - # for __import__(), the return value when a submodule of a package - # was requested is normally the top-level package, unless a - # non-empty fromlist was given. - + object PyImport_ImportModuleLevel(char *name, object globals, object locals, object fromlist, int level) + # Return value: New reference. + + # Import a module. This is best described by referring to the + # built-in Python function __import__(), as the standard + # __import__() function calls this function directly. + + # The return value is a new reference to the imported module or + # top-level package, or NULL with an exception set on failure. Like + # for __import__(), the return value when a submodule of a package + # was requested is normally the top-level package, unless a + # non-empty fromlist was given. + object PyImport_Import(object name) # Return value: New reference. # This is a higher-level interface that calls the current ``import diff --git a/contrib/tools/cython/Cython/Includes/cpython/object.pxd b/contrib/tools/cython/Cython/Includes/cpython/object.pxd index 5a81166393..e7183a6a5f 100644 --- a/contrib/tools/cython/Cython/Includes/cpython/object.pxd +++ b/contrib/tools/cython/Cython/Includes/cpython/object.pxd @@ -10,27 +10,27 @@ cdef extern from "Python.h": ctypedef object (*unaryfunc)(object) ctypedef object (*binaryfunc)(object, object) ctypedef object (*ternaryfunc)(object, object, object) - ctypedef int (*inquiry)(object) except -1 - ctypedef Py_ssize_t (*lenfunc)(object) except -1 + ctypedef int (*inquiry)(object) except -1 + ctypedef Py_ssize_t (*lenfunc)(object) except -1 ctypedef object (*ssizeargfunc)(object, Py_ssize_t) ctypedef object (*ssizessizeargfunc)(object, Py_ssize_t, Py_ssize_t) - ctypedef int (*ssizeobjargproc)(object, Py_ssize_t, object) except -1 - ctypedef int (*ssizessizeobjargproc)(object, Py_ssize_t, Py_ssize_t, object) except -1 - ctypedef int (*objobjargproc)(object, object, object) except -1 - ctypedef int (*objobjproc)(object, object) except -1 + ctypedef int (*ssizeobjargproc)(object, Py_ssize_t, object) except -1 + ctypedef int (*ssizessizeobjargproc)(object, Py_ssize_t, Py_ssize_t, object) except -1 + ctypedef int (*objobjargproc)(object, object, object) except -1 + ctypedef int (*objobjproc)(object, object) except -1 - ctypedef Py_hash_t (*hashfunc)(object) except -1 + ctypedef Py_hash_t (*hashfunc)(object) except -1 ctypedef object (*reprfunc)(object) - ctypedef int (*cmpfunc)(object, object) except -2 + ctypedef int (*cmpfunc)(object, object) except -2 ctypedef object (*richcmpfunc)(object, object, int) # The following functions use 'PyObject*' as first argument instead of 'object' to prevent # accidental reference counting when calling them during a garbage collection run. ctypedef void (*destructor)(PyObject*) - ctypedef int (*visitproc)(PyObject*, void *) except -1 - ctypedef int (*traverseproc)(PyObject*, visitproc, void*) except -1 - ctypedef void (*freefunc)(void*) + ctypedef int (*visitproc)(PyObject*, void *) except -1 + ctypedef int (*traverseproc)(PyObject*, visitproc, void*) except -1 + ctypedef void (*freefunc)(void*) ctypedef object (*descrgetfunc)(object, object, object) ctypedef int (*descrsetfunc)(object, object, object) except -1 @@ -47,7 +47,7 @@ cdef extern from "Python.h": destructor tp_dealloc traverseproc tp_traverse inquiry tp_clear - freefunc tp_free + freefunc tp_free ternaryfunc tp_call hashfunc tp_hash @@ -104,8 +104,8 @@ cdef extern from "Python.h": # or NULL on failure. This is the equivalent of the Python # expression "o.attr_name". - object PyObject_GenericGetAttr(object o, object attr_name) - + object PyObject_GenericGetAttr(object o, object attr_name) + int PyObject_SetAttrString(object o, const char *attr_name, object v) except -1 # Set the value of the attribute named attr_name, for object o, to # the value v. Returns -1 on failure. This is the equivalent of @@ -116,8 +116,8 @@ cdef extern from "Python.h": # the value v. Returns -1 on failure. This is the equivalent of # the Python statement "o.attr_name = v". - int PyObject_GenericSetAttr(object o, object attr_name, object v) except -1 - + int PyObject_GenericSetAttr(object o, object attr_name, object v) except -1 + int PyObject_DelAttrString(object o, const char *attr_name) except -1 # Delete attribute named attr_name, for object o. Returns -1 on # failure. This is the equivalent of the Python statement: "del diff --git a/contrib/tools/cython/Cython/Includes/cpython/pythread.pxd b/contrib/tools/cython/Cython/Includes/cpython/pythread.pxd index 392bef7d64..3978ce25f4 100644 --- a/contrib/tools/cython/Cython/Includes/cpython/pythread.pxd +++ b/contrib/tools/cython/Cython/Includes/cpython/pythread.pxd @@ -6,11 +6,11 @@ cdef extern from "pythread.h": ctypedef void *PyThread_type_sema void PyThread_init_thread() - long PyThread_start_new_thread(void (*)(void *), void *) # FIXME: legacy - #unsigned long PyThread_start_new_thread(void (*)(void *), void *) # returned 'long' before Py3.7 + long PyThread_start_new_thread(void (*)(void *), void *) # FIXME: legacy + #unsigned long PyThread_start_new_thread(void (*)(void *), void *) # returned 'long' before Py3.7 void PyThread_exit_thread() - long PyThread_get_thread_ident() # FIXME: legacy - #unsigned long PyThread_get_thread_ident() # returned 'long' before Py3.7 + long PyThread_get_thread_ident() # FIXME: legacy + #unsigned long PyThread_get_thread_ident() # returned 'long' before Py3.7 PyThread_type_lock PyThread_allocate_lock() void PyThread_free_lock(PyThread_type_lock) @@ -31,7 +31,7 @@ cdef extern from "pythread.h": size_t PyThread_get_stacksize() int PyThread_set_stacksize(size_t) - # Thread Local Storage (TLS) API deprecated in CPython 3.7+ + # Thread Local Storage (TLS) API deprecated in CPython 3.7+ int PyThread_create_key() void PyThread_delete_key(int) int PyThread_set_key_value(int, void *) @@ -40,14 +40,14 @@ cdef extern from "pythread.h": # Cleanup after a fork void PyThread_ReInitTLS() - - # Thread Specific Storage (TSS) API in CPython 3.7+ (also backported) - #ctypedef struct Py_tss_t: pass # Cython built-in type - Py_tss_t Py_tss_NEEDS_INIT # Not normally useful: Cython auto-initialises declared "Py_tss_t" variables. - Py_tss_t * PyThread_tss_alloc() - void PyThread_tss_free(Py_tss_t *key) - int PyThread_tss_is_created(Py_tss_t *key) - int PyThread_tss_create(Py_tss_t *key) - void PyThread_tss_delete(Py_tss_t *key) - int PyThread_tss_set(Py_tss_t *key, void *value) - void * PyThread_tss_get(Py_tss_t *key) + + # Thread Specific Storage (TSS) API in CPython 3.7+ (also backported) + #ctypedef struct Py_tss_t: pass # Cython built-in type + Py_tss_t Py_tss_NEEDS_INIT # Not normally useful: Cython auto-initialises declared "Py_tss_t" variables. + Py_tss_t * PyThread_tss_alloc() + void PyThread_tss_free(Py_tss_t *key) + int PyThread_tss_is_created(Py_tss_t *key) + int PyThread_tss_create(Py_tss_t *key) + void PyThread_tss_delete(Py_tss_t *key) + int PyThread_tss_set(Py_tss_t *key, void *value) + void * PyThread_tss_get(Py_tss_t *key) diff --git a/contrib/tools/cython/Cython/Includes/cpython/set.pxd b/contrib/tools/cython/Cython/Includes/cpython/set.pxd index ae31d28ae3..244990fa04 100644 --- a/contrib/tools/cython/Cython/Includes/cpython/set.pxd +++ b/contrib/tools/cython/Cython/Includes/cpython/set.pxd @@ -44,15 +44,15 @@ cdef extern from "Python.h": # Return true if p is a set object or a frozenset object but not # an instance of a subtype. - bint PyFrozenSet_Check(object p) - # Return true if p is a frozenset object or an instance of a subtype. - + bint PyFrozenSet_Check(object p) + # Return true if p is a frozenset object or an instance of a subtype. + bint PyFrozenSet_CheckExact(object p) # Return true if p is a frozenset object but not an instance of a subtype. - bint PySet_Check(object p) - # Return true if p is a set object or an instance of a subtype. - + bint PySet_Check(object p) + # Return true if p is a set object or an instance of a subtype. + object PySet_New(object iterable) # Return value: New reference. # Return a new set containing objects returned by the diff --git a/contrib/tools/cython/Cython/Includes/cpython/tuple.pxd b/contrib/tools/cython/Cython/Includes/cpython/tuple.pxd index 09c46e0b4b..6541cb471d 100644 --- a/contrib/tools/cython/Cython/Includes/cpython/tuple.pxd +++ b/contrib/tools/cython/Cython/Includes/cpython/tuple.pxd @@ -45,7 +45,7 @@ cdef extern from "Python.h": # Return value: New reference. # Take a slice of the tuple pointed to by p from low to high and return it as a new tuple. - int PyTuple_SetItem(object p, Py_ssize_t pos, object o) except -1 + int PyTuple_SetItem(object p, Py_ssize_t pos, object o) except -1 # Insert a reference to object o at position pos of the tuple # pointed to by p. Return 0 on success. Note: This function # ``steals'' a reference to o. diff --git a/contrib/tools/cython/Cython/Includes/cpython/weakref.pxd b/contrib/tools/cython/Cython/Includes/cpython/weakref.pxd index 9c4b50f564..44deb5ce9a 100644 --- a/contrib/tools/cython/Cython/Includes/cpython/weakref.pxd +++ b/contrib/tools/cython/Cython/Includes/cpython/weakref.pxd @@ -33,7 +33,7 @@ cdef extern from "Python.h": # a weakly-referencable object, or if callback is not callable, # None, or NULL, this will return NULL and raise TypeError. - PyObject* PyWeakref_GetObject(object ref) except NULL + PyObject* PyWeakref_GetObject(object ref) except NULL # Return the referenced object from a weak reference, ref. If the # referent is no longer live, returns None. diff --git a/contrib/tools/cython/Cython/Includes/libc/limits.pxd b/contrib/tools/cython/Cython/Includes/libc/limits.pxd index 39d10a1ff9..21c323ba94 100644 --- a/contrib/tools/cython/Cython/Includes/libc/limits.pxd +++ b/contrib/tools/cython/Cython/Includes/libc/limits.pxd @@ -1,28 +1,28 @@ # 5.2.4.2.1 Sizes of integer types <limits.h> cdef extern from "<limits.h>": - const int CHAR_BIT - const int MB_LEN_MAX + const int CHAR_BIT + const int MB_LEN_MAX - const char CHAR_MIN - const char CHAR_MAX + const char CHAR_MIN + const char CHAR_MAX - const signed char SCHAR_MIN - const signed char SCHAR_MAX - const unsigned char UCHAR_MAX + const signed char SCHAR_MIN + const signed char SCHAR_MAX + const unsigned char UCHAR_MAX - const short SHRT_MIN - const short SHRT_MAX - const unsigned short USHRT_MAX + const short SHRT_MIN + const short SHRT_MAX + const unsigned short USHRT_MAX - const int INT_MIN - const int INT_MAX - const unsigned int UINT_MAX + const int INT_MIN + const int INT_MAX + const unsigned int UINT_MAX - const long LONG_MIN - const long LONG_MAX - const unsigned long ULONG_MAX + const long LONG_MIN + const long LONG_MAX + const unsigned long ULONG_MAX - const long long LLONG_MIN - const long long LLONG_MAX - const unsigned long long ULLONG_MAX + const long long LLONG_MIN + const long long LLONG_MAX + const unsigned long long ULLONG_MAX diff --git a/contrib/tools/cython/Cython/Includes/libc/signal.pxd b/contrib/tools/cython/Cython/Includes/libc/signal.pxd index 5d34935543..d110f6e716 100644 --- a/contrib/tools/cython/Cython/Includes/libc/signal.pxd +++ b/contrib/tools/cython/Cython/Includes/libc/signal.pxd @@ -13,52 +13,52 @@ cdef extern from "<signal.h>" nogil: sighandler_t signal (int signum, sighandler_t action) int raise_"raise" (int signum) - # Signals - enum: - # Program Error - SIGFPE - SIGILL - SIGSEGV - SIGBUS - SIGABRT - SIGIOT - SIGTRAP - SIGEMT - SIGSYS - SIGSTKFLT - # Termination - SIGTERM - SIGINT - SIGQUIT - SIGKILL - SIGHUP - # Alarm - SIGALRM - SIGVTALRM - SIGPROF - # Asynchronous I/O - SIGIO - SIGURG - SIGPOLL - # Job Control - SIGCHLD - SIGCLD - SIGCONT - SIGSTOP - SIGTSTP - SIGTTIN - SIGTTOU - # Operation Error - SIGPIPE - SIGLOST - SIGXCPU - SIGXFSZ - SIGPWR - # Miscellaneous - SIGUSR1 - SIGUSR2 - SIGWINCH - SIGINFO - # Real-time signals - SIGRTMIN - SIGRTMAX + # Signals + enum: + # Program Error + SIGFPE + SIGILL + SIGSEGV + SIGBUS + SIGABRT + SIGIOT + SIGTRAP + SIGEMT + SIGSYS + SIGSTKFLT + # Termination + SIGTERM + SIGINT + SIGQUIT + SIGKILL + SIGHUP + # Alarm + SIGALRM + SIGVTALRM + SIGPROF + # Asynchronous I/O + SIGIO + SIGURG + SIGPOLL + # Job Control + SIGCHLD + SIGCLD + SIGCONT + SIGSTOP + SIGTSTP + SIGTTIN + SIGTTOU + # Operation Error + SIGPIPE + SIGLOST + SIGXCPU + SIGXFSZ + SIGPWR + # Miscellaneous + SIGUSR1 + SIGUSR2 + SIGWINCH + SIGINFO + # Real-time signals + SIGRTMIN + SIGRTMAX diff --git a/contrib/tools/cython/Cython/Includes/libcpp/algorithm.pxd b/contrib/tools/cython/Cython/Includes/libcpp/algorithm.pxd index ec7c3835b4..04929eb3b0 100644 --- a/contrib/tools/cython/Cython/Includes/libcpp/algorithm.pxd +++ b/contrib/tools/cython/Cython/Includes/libcpp/algorithm.pxd @@ -7,14 +7,14 @@ cdef extern from "<algorithm>" namespace "std" nogil: bool binary_search[Iter, T, Compare](Iter first, Iter last, const T& value, Compare comp) - Iter lower_bound[Iter, T](Iter first, Iter last, const T& value) - Iter lower_bound[Iter, T, Compare](Iter first, Iter last, const T& value, - Compare comp) - - Iter upper_bound[Iter, T](Iter first, Iter last, const T& value) - Iter upper_bound[Iter, T, Compare](Iter first, Iter last, const T& value, - Compare comp) - + Iter lower_bound[Iter, T](Iter first, Iter last, const T& value) + Iter lower_bound[Iter, T, Compare](Iter first, Iter last, const T& value, + Compare comp) + + Iter upper_bound[Iter, T](Iter first, Iter last, const T& value) + Iter upper_bound[Iter, T, Compare](Iter first, Iter last, const T& value, + Compare comp) + void partial_sort[Iter](Iter first, Iter middle, Iter last) void partial_sort[Iter, Compare](Iter first, Iter middle, Iter last, Compare comp) @@ -22,10 +22,10 @@ cdef extern from "<algorithm>" namespace "std" nogil: void sort[Iter](Iter first, Iter last) void sort[Iter, Compare](Iter first, Iter last, Compare comp) - # Removing duplicates - Iter unique[Iter](Iter first, Iter last) - Iter unique[Iter, BinaryPredicate](Iter first, Iter last, BinaryPredicate p) - + # Removing duplicates + Iter unique[Iter](Iter first, Iter last) + Iter unique[Iter, BinaryPredicate](Iter first, Iter last, BinaryPredicate p) + # Binary heaps (priority queues) void make_heap[Iter](Iter first, Iter last) void make_heap[Iter, Compare](Iter first, Iter last, Compare comp) diff --git a/contrib/tools/cython/Cython/Includes/libcpp/deque.pxd b/contrib/tools/cython/Cython/Includes/libcpp/deque.pxd index 9e2b2291d0..baf5514cde 100644 --- a/contrib/tools/cython/Cython/Includes/libcpp/deque.pxd +++ b/contrib/tools/cython/Cython/Includes/libcpp/deque.pxd @@ -1,44 +1,44 @@ cdef extern from "<deque>" namespace "std" nogil: cdef cppclass deque[T,ALLOCATOR=*]: - ctypedef T value_type - ctypedef ALLOCATOR allocator_type - - # these should really be allocator_type.size_type and - # allocator_type.difference_type to be true to the C++ definition + ctypedef T value_type + ctypedef ALLOCATOR allocator_type + + # these should really be allocator_type.size_type and + # allocator_type.difference_type to be true to the C++ definition # but cython doesn't support deferred access on template arguments - ctypedef size_t size_type - ctypedef ptrdiff_t difference_type - + ctypedef size_t size_type + ctypedef ptrdiff_t difference_type + cppclass iterator: T& operator*() iterator operator++() iterator operator--() - iterator operator+(size_type) - iterator operator-(size_type) - difference_type operator-(iterator) + iterator operator+(size_type) + iterator operator-(size_type) + difference_type operator-(iterator) bint operator==(iterator) bint operator!=(iterator) - bint operator<(iterator) - bint operator>(iterator) - bint operator<=(iterator) - bint operator>=(iterator) + bint operator<(iterator) + bint operator>(iterator) + bint operator<=(iterator) + bint operator>=(iterator) cppclass reverse_iterator: T& operator*() - reverse_iterator operator++() - reverse_iterator operator--() - reverse_iterator operator+(size_type) - reverse_iterator operator-(size_type) - difference_type operator-(reverse_iterator) + reverse_iterator operator++() + reverse_iterator operator--() + reverse_iterator operator+(size_type) + reverse_iterator operator-(size_type) + difference_type operator-(reverse_iterator) bint operator==(reverse_iterator) bint operator!=(reverse_iterator) - bint operator<(reverse_iterator) - bint operator>(reverse_iterator) - bint operator<=(reverse_iterator) - bint operator>=(reverse_iterator) + bint operator<(reverse_iterator) + bint operator>(reverse_iterator) + bint operator<=(reverse_iterator) + bint operator>=(reverse_iterator) cppclass const_iterator(iterator): pass - cppclass const_reverse_iterator(reverse_iterator): - pass + cppclass const_reverse_iterator(reverse_iterator): + pass deque() except + deque(deque&) except + deque(size_t) except + diff --git a/contrib/tools/cython/Cython/Includes/libcpp/functional.pxd b/contrib/tools/cython/Cython/Includes/libcpp/functional.pxd index 94cbd9e1dd..413a5a8e80 100644 --- a/contrib/tools/cython/Cython/Includes/libcpp/functional.pxd +++ b/contrib/tools/cython/Cython/Includes/libcpp/functional.pxd @@ -1,13 +1,13 @@ -cdef extern from "<functional>" namespace "std" nogil: - cdef cppclass function[T]: - function() except + - function(T*) except + - function(function&) except + - function(void*) except + - - function operator=(T*) - function operator=(function&) - function operator=(void*) - function operator=[U](U) - - bint operator bool() +cdef extern from "<functional>" namespace "std" nogil: + cdef cppclass function[T]: + function() except + + function(T*) except + + function(function&) except + + function(void*) except + + + function operator=(T*) + function operator=(function&) + function operator=(void*) + function operator=[U](U) + + bint operator bool() diff --git a/contrib/tools/cython/Cython/Includes/libcpp/iterator.pxd b/contrib/tools/cython/Cython/Includes/libcpp/iterator.pxd index e0f8bd8d6e..680ba8f4bd 100644 --- a/contrib/tools/cython/Cython/Includes/libcpp/iterator.pxd +++ b/contrib/tools/cython/Cython/Includes/libcpp/iterator.pxd @@ -14,7 +14,7 @@ cdef extern from "<iterator>" namespace "std" nogil: pass cdef cppclass random_access_iterator_tag(bidirectional_iterator_tag): pass - + cdef cppclass back_insert_iterator[T](iterator[output_iterator_tag,void,void,void,void]): pass cdef cppclass front_insert_iterator[T](iterator[output_iterator_tag,void,void,void,void]): @@ -29,4 +29,4 @@ cdef extern from "<iterator>" namespace "std" nogil: ##insert_iterator<Container> inserter (Container& x, typename Container::iterator it) insert_iterator[CONTAINER] inserter[CONTAINER,ITERATOR](CONTAINER &, ITERATOR) - + diff --git a/contrib/tools/cython/Cython/Includes/libcpp/limits.pxd b/contrib/tools/cython/Cython/Includes/libcpp/limits.pxd index c325263b72..045fe5efdd 100644 --- a/contrib/tools/cython/Cython/Includes/libcpp/limits.pxd +++ b/contrib/tools/cython/Cython/Includes/libcpp/limits.pxd @@ -5,7 +5,7 @@ cdef extern from "<limits>" namespace "std" nogil: round_to_nearest = 1 round_toward_infinity = 2 round_toward_neg_infinity = 3 - + enum float_denorm_style: denorm_indeterminate = -1 denorm_absent = 0 @@ -37,7 +37,7 @@ cdef extern from "<limits>" namespace "std" nogil: const int min_exponent10 const int max_exponent const int max_exponent10 - + const bint has_infinity const bint has_quiet_NaN const bint has_signaling_NaN diff --git a/contrib/tools/cython/Cython/Includes/libcpp/memory.pxd b/contrib/tools/cython/Cython/Includes/libcpp/memory.pxd index 2151c1ec7f..a92c115e38 100644 --- a/contrib/tools/cython/Cython/Includes/libcpp/memory.pxd +++ b/contrib/tools/cython/Cython/Includes/libcpp/memory.pxd @@ -16,8 +16,8 @@ cdef extern from "<memory>" namespace "std" nogil: void construct( T *, const T &) #C++98. The C++11 version is variadic AND perfect-forwarding void destroy(T *) #C++98 void destroy[U](U *) #unique_ptr unit tests fail w/this - - + + cdef cppclass unique_ptr[T,DELETER=*]: unique_ptr() unique_ptr(nullptr_t) diff --git a/contrib/tools/cython/Cython/Includes/libcpp/string.pxd b/contrib/tools/cython/Cython/Includes/libcpp/string.pxd index a894144f1f..e72ee9b03a 100644 --- a/contrib/tools/cython/Cython/Includes/libcpp/string.pxd +++ b/contrib/tools/cython/Cython/Includes/libcpp/string.pxd @@ -164,30 +164,30 @@ cdef extern from "<string>" namespace "std" nogil: string substr(size_t pos) except + string substr() - #string& operator= (const string&) - #string& operator= (const char*) + #string& operator= (const string&) + #string& operator= (const char*) #string& operator= (char) string operator+ (const string&) except + string operator+ (const char*) except + - bint operator==(const string&) - bint operator==(const char*) + bint operator==(const string&) + bint operator==(const char*) bint operator!= (const string&) bint operator!= (const char*) - bint operator< (const string&) - bint operator< (const char*) + bint operator< (const string&) + bint operator< (const char*) - bint operator> (const string&) - bint operator> (const char*) + bint operator> (const string&) + bint operator> (const char*) - bint operator<= (const string&) - bint operator<= (const char*) + bint operator<= (const string&) + bint operator<= (const char*) - bint operator>= (const string&) - bint operator>= (const char*) + bint operator>= (const string&) + bint operator>= (const char*) string to_string(int val) except + diff --git a/contrib/tools/cython/Cython/Includes/libcpp/unordered_map.pxd b/contrib/tools/cython/Cython/Includes/libcpp/unordered_map.pxd index a00fbbed28..62b05f1a4b 100644 --- a/contrib/tools/cython/Cython/Includes/libcpp/unordered_map.pxd +++ b/contrib/tools/cython/Cython/Includes/libcpp/unordered_map.pxd @@ -43,8 +43,8 @@ cdef extern from "<unordered_map>" namespace "std" nogil: const_iterator const_end "end"() pair[iterator, iterator] equal_range(T&) pair[const_iterator, const_iterator] const_equal_range "equal_range"(const T&) - iterator erase(iterator) - iterator erase(iterator, iterator) + iterator erase(iterator) + iterator erase(iterator, iterator) size_t erase(T&) iterator find(T&) const_iterator const_find "find"(T&) diff --git a/contrib/tools/cython/Cython/Includes/libcpp/vector.pxd b/contrib/tools/cython/Cython/Includes/libcpp/vector.pxd index 9b007dd0c7..8c77e302bd 100644 --- a/contrib/tools/cython/Cython/Includes/libcpp/vector.pxd +++ b/contrib/tools/cython/Cython/Includes/libcpp/vector.pxd @@ -2,20 +2,20 @@ cdef extern from "<vector>" namespace "std" nogil: cdef cppclass vector[T,ALLOCATOR=*]: ctypedef T value_type ctypedef ALLOCATOR allocator_type - - # these should really be allocator_type.size_type and - # allocator_type.difference_type to be true to the C++ definition + + # these should really be allocator_type.size_type and + # allocator_type.difference_type to be true to the C++ definition # but cython doesn't support deferred access on template arguments - ctypedef size_t size_type - ctypedef ptrdiff_t difference_type - + ctypedef size_t size_type + ctypedef ptrdiff_t difference_type + cppclass iterator: T& operator*() iterator operator++() iterator operator--() - iterator operator+(size_type) - iterator operator-(size_type) - difference_type operator-(iterator) + iterator operator+(size_type) + iterator operator-(size_type) + difference_type operator-(iterator) bint operator==(iterator) bint operator!=(iterator) bint operator<(iterator) @@ -24,11 +24,11 @@ cdef extern from "<vector>" namespace "std" nogil: bint operator>=(iterator) cppclass reverse_iterator: T& operator*() - reverse_iterator operator++() - reverse_iterator operator--() - reverse_iterator operator+(size_type) - reverse_iterator operator-(size_type) - difference_type operator-(reverse_iterator) + reverse_iterator operator++() + reverse_iterator operator--() + reverse_iterator operator+(size_type) + reverse_iterator operator-(size_type) + difference_type operator-(reverse_iterator) bint operator==(reverse_iterator) bint operator!=(reverse_iterator) bint operator<(reverse_iterator) @@ -41,10 +41,10 @@ cdef extern from "<vector>" namespace "std" nogil: pass vector() except + vector(vector&) except + - vector(size_type) except + - vector(size_type, T&) except + + vector(size_type) except + + vector(size_type, T&) except + #vector[input_iterator](input_iterator, input_iterator) - T& operator[](size_type) + T& operator[](size_type) #vector& operator=(vector&) bint operator==(vector&, vector&) bint operator!=(vector&, vector&) @@ -52,13 +52,13 @@ cdef extern from "<vector>" namespace "std" nogil: bint operator>(vector&, vector&) bint operator<=(vector&, vector&) bint operator>=(vector&, vector&) - void assign(size_type, const T&) + void assign(size_type, const T&) void assign[input_iterator](input_iterator, input_iterator) except + - T& at(size_type) except + + T& at(size_type) except + T& back() iterator begin() const_iterator const_begin "begin"() - size_type capacity() + size_type capacity() void clear() bint empty() iterator end() @@ -67,19 +67,19 @@ cdef extern from "<vector>" namespace "std" nogil: iterator erase(iterator, iterator) T& front() iterator insert(iterator, const T&) except + - iterator insert(iterator, size_type, const T&) except + - iterator insert[Iter](iterator, Iter, Iter) except + - size_type max_size() + iterator insert(iterator, size_type, const T&) except + + iterator insert[Iter](iterator, Iter, Iter) except + + size_type max_size() void pop_back() void push_back(T&) except + reverse_iterator rbegin() - const_reverse_iterator const_rbegin "crbegin"() + const_reverse_iterator const_rbegin "crbegin"() reverse_iterator rend() - const_reverse_iterator const_rend "crend"() - void reserve(size_type) - void resize(size_type) except + - void resize(size_type, T&) except + - size_type size() + const_reverse_iterator const_rend "crend"() + void reserve(size_type) + void resize(size_type) except + + void resize(size_type, T&) except + + size_type size() void swap(vector&) # C++11 methods diff --git a/contrib/tools/cython/Cython/Includes/numpy/__init__.pxd b/contrib/tools/cython/Cython/Includes/numpy/__init__.pxd index 15700c05ef..ca49373471 100644 --- a/contrib/tools/cython/Cython/Includes/numpy/__init__.pxd +++ b/contrib/tools/cython/Cython/Includes/numpy/__init__.pxd @@ -18,7 +18,7 @@ DEF _buffer_format_string_len = 255 cimport cpython.buffer as pybuf from cpython.ref cimport Py_INCREF -from cpython.mem cimport PyObject_Malloc, PyObject_Free +from cpython.mem cimport PyObject_Malloc, PyObject_Free from cpython.object cimport PyObject, PyTypeObject from cpython.type cimport type cimport libc.stdio as stdio @@ -52,8 +52,8 @@ cdef extern from "numpy/arrayobject.h": NPY_STRING NPY_UNICODE NPY_VOID - NPY_DATETIME - NPY_TIMEDELTA + NPY_DATETIME + NPY_TIMEDELTA NPY_NTYPES NPY_NOTYPE @@ -90,7 +90,7 @@ cdef extern from "numpy/arrayobject.h": NPY_ANYORDER NPY_CORDER NPY_FORTRANORDER - NPY_KEEPORDER + NPY_KEEPORDER ctypedef enum NPY_CASTING: NPY_NO_CASTING @@ -194,12 +194,12 @@ cdef extern from "numpy/arrayobject.h": ctypedef void (*PyArray_VectorUnaryFunc)(void *, void *, npy_intp, void *, void *) - ctypedef struct PyArray_ArrayDescr: - # shape is a tuple, but Cython doesn't support "tuple shape" - # inside a non-PyObject declaration, so we have to declare it - # as just a PyObject*. - PyObject* shape - + ctypedef struct PyArray_ArrayDescr: + # shape is a tuple, but Cython doesn't support "tuple shape" + # inside a non-PyObject declaration, so we have to declare it + # as just a PyObject*. + PyObject* shape + ctypedef struct PyArray_Descr: pass @@ -209,11 +209,11 @@ cdef extern from "numpy/arrayobject.h": cdef PyTypeObject* typeobj cdef char kind cdef char type - # Numpy sometimes mutates this without warning (e.g. it'll - # sometimes change "|" to "<" in shared dtype objects on - # little-endian machines). If this matters to you, use - # PyArray_IsNativeByteOrder(dtype.byteorder) instead of - # directly accessing this field. + # Numpy sometimes mutates this without warning (e.g. it'll + # sometimes change "|" to "<" in shared dtype objects on + # little-endian machines). If this matters to you, use + # PyArray_IsNativeByteOrder(dtype.byteorder) instead of + # directly accessing this field. cdef char byteorder cdef char flags cdef int type_num @@ -221,10 +221,10 @@ cdef extern from "numpy/arrayobject.h": cdef int alignment cdef dict fields cdef tuple names - # Use PyDataType_HASSUBARRAY to test whether this field is - # valid (the pointer can be NULL). Most users should access - # this field via the inline helper method PyDataType_SHAPE. - cdef PyArray_ArrayDescr* subarray + # Use PyDataType_HASSUBARRAY to test whether this field is + # valid (the pointer can be NULL). Most users should access + # this field via the inline helper method PyDataType_SHAPE. + cdef PyArray_ArrayDescr* subarray ctypedef class numpy.flatiter [object PyArrayIterObject, check_size ignore]: # Use through macros @@ -257,11 +257,11 @@ cdef extern from "numpy/arrayobject.h": # -- the details of this may change. def __getbuffer__(ndarray self, Py_buffer* info, int flags): # This implementation of getbuffer is geared towards Cython - # requirements, and does not yet fulfill the PEP. + # requirements, and does not yet fulfill the PEP. # In particular strided access is always provided regardless # of flags - cdef int i, ndim + cdef int i, ndim cdef int endian_detector = 1 cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) @@ -277,10 +277,10 @@ cdef extern from "numpy/arrayobject.h": info.buf = PyArray_DATA(self) info.ndim = ndim - if sizeof(npy_intp) != sizeof(Py_ssize_t): + if sizeof(npy_intp) != sizeof(Py_ssize_t): # Allocate new buffer for strides and shape info. # This is allocated as one block, strides first. - info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim) + info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim) info.shape = info.strides + ndim for i in range(ndim): info.strides[i] = PyArray_STRIDES(self)[i] @@ -297,9 +297,9 @@ cdef extern from "numpy/arrayobject.h": cdef dtype descr = <dtype>PyArray_DESCR(self) cdef int offset - info.obj = self + info.obj = self - if not PyDataType_HASFIELDS(descr): + if not PyDataType_HASFIELDS(descr): t = descr.type_num if ((descr.byteorder == c'>' and little_endian) or (descr.byteorder == c'<' and not little_endian)): @@ -326,7 +326,7 @@ cdef extern from "numpy/arrayobject.h": info.format = f return else: - info.format = <char*>PyObject_Malloc(_buffer_format_string_len) + info.format = <char*>PyObject_Malloc(_buffer_format_string_len) info.format[0] = c'^' # Native data types, manual alignment offset = 0 f = _util_dtypestring(descr, info.format + 1, @@ -336,9 +336,9 @@ cdef extern from "numpy/arrayobject.h": def __releasebuffer__(ndarray self, Py_buffer* info): if PyArray_HASFIELDS(self): - PyObject_Free(info.format) + PyObject_Free(info.format) if sizeof(npy_intp) != sizeof(Py_ssize_t): - PyObject_Free(info.strides) + PyObject_Free(info.strides) # info.shape was stored after info.strides in the same block ctypedef unsigned char npy_bool @@ -388,28 +388,28 @@ cdef extern from "numpy/arrayobject.h": double imag ctypedef struct npy_clongdouble: - long double real - long double imag + long double real + long double imag ctypedef struct npy_complex64: - float real - float imag + float real + float imag ctypedef struct npy_complex128: double real double imag ctypedef struct npy_complex160: - long double real - long double imag + long double real + long double imag ctypedef struct npy_complex192: - long double real - long double imag + long double real + long double imag ctypedef struct npy_complex256: - long double real - long double imag + long double real + long double imag ctypedef struct PyArray_Dims: npy_intp *ptr @@ -476,7 +476,7 @@ cdef extern from "numpy/arrayobject.h": bint PyDataType_ISEXTENDED(dtype) bint PyDataType_ISOBJECT(dtype) bint PyDataType_HASFIELDS(dtype) - bint PyDataType_HASSUBARRAY(dtype) + bint PyDataType_HASSUBARRAY(dtype) bint PyArray_ISBOOL(ndarray) bint PyArray_ISUNSIGNED(ndarray) @@ -832,12 +832,12 @@ cdef inline object PyArray_MultiIterNew4(a, b, c, d): cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) -cdef inline tuple PyDataType_SHAPE(dtype d): - if PyDataType_HASSUBARRAY(d): - return <tuple>d.subarray.shape - else: - return () - +cdef inline tuple PyDataType_SHAPE(dtype d): + if PyDataType_HASSUBARRAY(d): + return <tuple>d.subarray.shape + else: + return () + cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # Recursive utility function used in __getbuffer__ to get format # string. The new location in the format string is returned. diff --git a/contrib/tools/cython/Cython/Includes/posix/signal.pxd b/contrib/tools/cython/Cython/Includes/posix/signal.pxd index 9fe7d9c36c..375799bba1 100644 --- a/contrib/tools/cython/Cython/Includes/posix/signal.pxd +++ b/contrib/tools/cython/Cython/Includes/posix/signal.pxd @@ -31,11 +31,11 @@ cdef extern from "<signal.h>" nogil: sigset_t sa_mask int sa_flags - ctypedef struct stack_t: - void *ss_sp - int ss_flags - size_t ss_size - + ctypedef struct stack_t: + void *ss_sp + int ss_flags + size_t ss_size + enum: SA_NOCLDSTOP enum: SIG_BLOCK enum: SIG_UNBLOCK @@ -69,5 +69,5 @@ cdef extern from "<signal.h>" nogil: int sigemptyset (sigset_t *) int sigfillset (sigset_t *) int sigismember (const sigset_t *, int) - - int sigaltstack(const stack_t *, stack_t *) + + int sigaltstack(const stack_t *, stack_t *) diff --git a/contrib/tools/cython/Cython/Includes/posix/stat.pxd b/contrib/tools/cython/Cython/Includes/posix/stat.pxd index 69c2eca166..090ab19f95 100644 --- a/contrib/tools/cython/Cython/Includes/posix/stat.pxd +++ b/contrib/tools/cython/Cython/Includes/posix/stat.pxd @@ -18,11 +18,11 @@ cdef extern from "<sys/stat.h>" nogil: time_t st_mtime time_t st_ctime - # st_birthtime exists on *BSD and OS X. - # Under Linux, defining it here does not hurt. Compilation under Linux - # will only (and rightfully) fail when attempting to use the field. - time_t st_birthtime - + # st_birthtime exists on *BSD and OS X. + # Under Linux, defining it here does not hurt. Compilation under Linux + # will only (and rightfully) fail when attempting to use the field. + time_t st_birthtime + # POSIX prescribes including both <sys/stat.h> and <unistd.h> for these cdef extern from "<unistd.h>" nogil: int fchmod(int, mode_t) diff --git a/contrib/tools/cython/Cython/Includes/posix/types.pxd b/contrib/tools/cython/Cython/Includes/posix/types.pxd index 308f2954ee..e751a892f0 100644 --- a/contrib/tools/cython/Cython/Includes/posix/types.pxd +++ b/contrib/tools/cython/Cython/Includes/posix/types.pxd @@ -22,8 +22,8 @@ cdef extern from "<sys/types.h>": ctypedef long nlink_t ctypedef long off_t ctypedef long pid_t - ctypedef struct sigset_t: - pass + ctypedef struct sigset_t: + pass ctypedef long suseconds_t ctypedef long time_t ctypedef long timer_t |