| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 6c32585 commit 009b811
25 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -38,7 +38,7 @@ static PyModuleDef noddymodule = { | |||
| 38 | 38 | }; | |
| 39 | 39 | ||
| 40 | 40 | PyMODINIT_FUNC | |
| 41 | - PyInit_noddy(void) | ||
| 41 | + PyInit_noddy(void) | ||
| 42 | 42 | { | |
| 43 | 43 | PyObject* m; | |
| 44 | 44 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -71,7 +71,7 @@ PyAPI_FUNC(int) PyCodec_KnownEncoding( | |||
| 71 | 71 | object is passed through the encoder function found for the given | |
| 72 | 72 | encoding using the error handling method defined by errors. errors | |
| 73 | 73 | may be NULL to use the default method defined for the codec. | |
| 74 | - | ||
| 74 | + | ||
| 75 | 75 | Raises a LookupError in case no encoder can be found. | |
| 76 | 76 | ||
| 77 | 77 | */ | |
@@ -87,7 +87,7 @@ PyAPI_FUNC(PyObject *) PyCodec_Encode( | |||
| 87 | 87 | object is passed through the decoder function found for the given | |
| 88 | 88 | encoding using the error handling method defined by errors. errors | |
| 89 | 89 | may be NULL to use the default method defined for the codec. | |
| 90 | - | ||
| 90 | + | ||
| 91 | 91 | Raises a LookupError in case no encoder can be found. | |
| 92 | 92 | ||
| 93 | 93 | */ | |
@@ -145,7 +145,7 @@ PyAPI_FUNC(PyObject *) _PyCodecInfo_GetIncrementalEncoder( | |||
| 145 | 145 | ||
| 146 | 146 | ||
| 147 | 147 | ||
| 148 | - /* --- Codec Lookup APIs -------------------------------------------------- | ||
| 148 | + /* --- Codec Lookup APIs -------------------------------------------------- | ||
| 149 | 149 | ||
| 150 | 150 | All APIs return a codec object with incremented refcount and are | |
| 151 | 151 | based on _PyCodec_Lookup(). The same comments w/r to the encoding | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -41,7 +41,7 @@ PyAPI_FUNC(int) _PySlice_GetLongIndices(PySliceObject *self, PyObject *length, | |||
| 41 | 41 | PyAPI_FUNC(int) PySlice_GetIndices(PyObject *r, Py_ssize_t length, | |
| 42 | 42 | Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step); | |
| 43 | 43 | PyAPI_FUNC(int) PySlice_GetIndicesEx(PyObject *r, Py_ssize_t length, | |
| 44 | - Py_ssize_t *start, Py_ssize_t *stop, | ||
| 44 | + Py_ssize_t *start, Py_ssize_t *stop, | ||
| 45 | 45 | Py_ssize_t *step, Py_ssize_t *slicelength); | |
| 46 | 46 | ||
| 47 | 47 | #ifdef __cplusplus | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -16,7 +16,7 @@ typedef struct { | |||
| 16 | 16 | int size; | |
| 17 | 17 | ||
| 18 | 18 | /* Get name for a given character code. Returns non-zero if | |
| 19 | - success, zero if not. Does not set Python exceptions. | ||
| 19 | + success, zero if not. Does not set Python exceptions. | ||
| 20 | 20 | If self is NULL, data come from the default version of the database. | |
| 21 | 21 | If it is not NULL, it should be a unicodedata.ucd_X_Y_Z object */ | |
| 22 | 22 | int (*getname)(PyObject *self, Py_UCS4 code, char* buffer, int buflen, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -666,7 +666,7 @@ _bz2_BZ2Decompressor___init___impl(BZ2Decompressor *self) | |||
| 666 | 666 | self->unused_data = PyBytes_FromStringAndSize(NULL, 0); | |
| 667 | 667 | if (self->unused_data == NULL) | |
| 668 | 668 | goto error; | |
| 669 | - | ||
| 669 | + | ||
| 670 | 670 | bzerror = BZ2_bzDecompressInit(&self->bzs, 0, 0); | |
| 671 | 671 | if (catch_bz2_error(bzerror)) | |
| 672 | 672 | goto error; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1055,7 +1055,7 @@ _buffered_readinto_generic(buffered *self, PyObject *args, char readinto1) | |||
| 1055 | 1055 | } | |
| 1056 | 1056 | else | |
| 1057 | 1057 | n = 0; | |
| 1058 | - | ||
| 1058 | + | ||
| 1059 | 1059 | if (n == 0 || (n == -2 && written > 0)) | |
| 1060 | 1060 | break; | |
| 1061 | 1061 | if (n < 0) { | |
@@ -1065,7 +1065,7 @@ _buffered_readinto_generic(buffered *self, PyObject *args, char readinto1) | |||
| 1065 | 1065 | } | |
| 1066 | 1066 | goto end; | |
| 1067 | 1067 | } | |
| 1068 | - | ||
| 1068 | + | ||
| 1069 | 1069 | /* At most one read in readinto1 mode */ | |
| 1070 | 1070 | if (readinto1) { | |
| 1071 | 1071 | written += n; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -149,10 +149,10 @@ grow_buffer(PyObject **buf, Py_ssize_t max_length) | |||
| 149 | 149 | { | |
| 150 | 150 | Py_ssize_t size = PyBytes_GET_SIZE(*buf); | |
| 151 | 151 | Py_ssize_t newsize = size + (size >> 3) + 6; | |
| 152 | - | ||
| 152 | + | ||
| 153 | 153 | if (max_length > 0 && newsize > max_length) | |
| 154 | 154 | newsize = max_length; | |
| 155 | - | ||
| 155 | + | ||
| 156 | 156 | return _PyBytes_Resize(buf, newsize); | |
| 157 | 157 | } | |
| 158 | 158 | ||
@@ -906,7 +906,7 @@ decompress_buf(Decompressor *d, Py_ssize_t max_length) | |||
| 906 | 906 | Py_ssize_t data_size = 0; | |
| 907 | 907 | PyObject *result; | |
| 908 | 908 | lzma_stream *lzs = &d->lzs; | |
| 909 | - | ||
| 909 | + | ||
| 910 | 910 | if (max_length < 0 || max_length >= INITIAL_BUFFER_SIZE) | |
| 911 | 911 | result = PyBytes_FromStringAndSize(NULL, INITIAL_BUFFER_SIZE); | |
| 912 | 912 | else | |
@@ -916,7 +916,7 @@ decompress_buf(Decompressor *d, Py_ssize_t max_length) | |||
| 916 | 916 | ||
| 917 | 917 | lzs->next_out = (uint8_t *)PyBytes_AS_STRING(result); | |
| 918 | 918 | lzs->avail_out = PyBytes_GET_SIZE(result); | |
| 919 | - | ||
| 919 | + | ||
| 920 | 920 | for (;;) { | |
| 921 | 921 | lzma_ret lzret; | |
| 922 | 922 | ||
@@ -947,7 +947,7 @@ decompress_buf(Decompressor *d, Py_ssize_t max_length) | |||
| 947 | 947 | goto error; | |
| 948 | 948 | ||
| 949 | 949 | return result; | |
| 950 | - | ||
| 950 | + | ||
| 951 | 951 | error: | |
| 952 | 952 | Py_XDECREF(result); | |
| 953 | 953 | return NULL; | |
@@ -959,11 +959,11 @@ decompress(Decompressor *d, uint8_t *data, size_t len, Py_ssize_t max_length) | |||
| 959 | 959 | char input_buffer_in_use; | |
| 960 | 960 | PyObject *result; | |
| 961 | 961 | lzma_stream *lzs = &d->lzs; | |
| 962 | - | ||
| 962 | + | ||
| 963 | 963 | /* Prepend unconsumed input if necessary */ | |
| 964 | 964 | if (lzs->next_in != NULL) { | |
| 965 | 965 | size_t avail_now, avail_total; | |
| 966 | - | ||
| 966 | + | ||
| 967 | 967 | /* Number of bytes we can append to input buffer */ | |
| 968 | 968 | avail_now = (d->input_buffer + d->input_buffer_size) | |
| 969 | 969 | - (lzs->next_in + lzs->avail_in); | |
@@ -987,7 +987,7 @@ decompress(Decompressor *d, uint8_t *data, size_t len, Py_ssize_t max_length) | |||
| 987 | 987 | } | |
| 988 | 988 | d->input_buffer = tmp; | |
| 989 | 989 | d->input_buffer_size = new_size; | |
| 990 | - | ||
| 990 | + | ||
| 991 | 991 | lzs->next_in = d->input_buffer + offset; | |
| 992 | 992 | } | |
| 993 | 993 | else if (avail_now < len) { | |
@@ -1054,7 +1054,7 @@ decompress(Decompressor *d, uint8_t *data, size_t len, Py_ssize_t max_length) | |||
| 1054 | 1054 | lzs->next_in = d->input_buffer; | |
| 1055 | 1055 | } | |
| 1056 | 1056 | } | |
| 1057 | - | ||
| 1057 | + | ||
| 1058 | 1058 | return result; | |
| 1059 | 1059 | ||
| 1060 | 1060 | error: | |
@@ -1247,7 +1247,7 @@ Decompressor_dealloc(Decompressor *self) | |||
| 1247 | 1247 | { | |
| 1248 | 1248 | if(self->input_buffer != NULL) | |
| 1249 | 1249 | PyMem_Free(self->input_buffer); | |
| 1250 | - | ||
| 1250 | + | ||
| 1251 | 1251 | lzma_end(&self->lzs); | |
| 1252 | 1252 | Py_CLEAR(self->unused_data); | |
| 1253 | 1253 | #ifdef WITH_THREAD | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -48,7 +48,7 @@ extern PyObject *pysqlite_microprotocols_adapt( | |||
| 48 | 48 | PyObject *obj, PyObject *proto, PyObject *alt); | |
| 49 | 49 | ||
| 50 | 50 | extern PyObject * | |
| 51 | - pysqlite_adapt(pysqlite_Cursor* self, PyObject *args); | ||
| 51 | + pysqlite_adapt(pysqlite_Cursor* self, PyObject *args); | ||
| 52 | 52 | #define pysqlite_adapt_doc \ | |
| 53 | 53 | "adapt(obj, protocol, alternate) -> adapt obj to given protocol. Non-standard." | |
| 54 | 54 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -190,7 +190,7 @@ ndbuf_delete(NDArrayObject *nd, ndbuf_t *elt) | |||
| 190 | 190 | elt->prev->next = elt->next; | |
| 191 | 191 | else | |
| 192 | 192 | nd->head = elt->next; | |
| 193 | - | ||
| 193 | + | ||
| 194 | 194 | if (elt->next) | |
| 195 | 195 | elt->next->prev = elt->prev; | |
| 196 | 196 | ||
@@ -767,7 +767,7 @@ ndarray_as_list(NDArrayObject *nd) | |||
| 767 | 767 | +-----------------+-----------+-------------+----------------+ | |
| 768 | 768 | | base.readonly | 0 | OK | OK | | |
| 769 | 769 | +-----------------+-----------+-------------+----------------+ | |
| 770 | - | base.format | NULL | OK | OK | | ||
| 770 | + | base.format | NULL | OK | OK | | ||
| 771 | 771 | +-----------------+-----------+-------------+----------------+ | |
| 772 | 772 | | base.ndim | 1 | 1 | OK | | |
| 773 | 773 | +-----------------+-----------+-------------+----------------+ | |
@@ -2018,7 +2018,7 @@ ndarray_get_obj(NDArrayObject *self, void *closure) | |||
| 2018 | 2018 | { | |
| 2019 | 2019 | Py_buffer *base = &self->head->base; | |
| 2020 | 2020 | ||
| 2021 | - if (base->obj == NULL) { | ||
| 2021 | + if (base->obj == NULL) { | ||
| 2022 | 2022 | Py_RETURN_NONE; | |
| 2023 | 2023 | } | |
| 2024 | 2024 | Py_INCREF(base->obj); | |
@@ -2558,7 +2558,7 @@ cmp_contig(PyObject *self, PyObject *args) | |||
| 2558 | 2558 | PyBuffer_Release(&v1); | |
| 2559 | 2559 | PyBuffer_Release(&v2); | |
| 2560 | 2560 | ||
| 2561 | - ret = equal ? Py_True : Py_False; | ||
| 2561 | + ret = equal ? Py_True : Py_False; | ||
| 2562 | 2562 | Py_INCREF(ret); | |
| 2563 | 2563 | return ret; | |
| 2564 | 2564 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2476,7 +2476,7 @@ make_memoryview_from_NULL_pointer(PyObject *self) | |||
| 2476 | 2476 | return NULL; | |
| 2477 | 2477 | return PyMemoryView_FromBuffer(&info); | |
| 2478 | 2478 | } | |
| 2479 | - | ||
| 2479 | + | ||
| 2480 | 2480 | static PyObject * | |
| 2481 | 2481 | test_from_contiguous(PyObject* self, PyObject *noargs) | |
| 2482 | 2482 | { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments