| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d32d6fa commit c2c50b6
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -120,7 +120,7 @@ typedef struct _tagPyUFuncObject { | |||
| 120 | 120 | const char *name; | |
| 121 | 121 | ||
| 122 | 122 | /* Array of type numbers, of size ('nargs' * 'ntypes') */ | |
| 123 | - char *types; | ||
| 123 | + const char *types; | ||
| 124 | 124 | ||
| 125 | 125 | /* Documentation string */ | |
| 126 | 126 | const char *doc; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -826,7 +826,7 @@ promote_and_get_info_and_ufuncimpl(PyUFuncObject *ufunc, | |||
| 826 | 826 | * This check should ensure a the right error message, but in principle | |
| 827 | 827 | * we could try to call the loop getter here. | |
| 828 | 828 | */ | |
| 829 | - char *types = ufunc->types; | ||
| 829 | + const char *types = ufunc->types; | ||
| 830 | 830 | npy_bool loop_exists = NPY_FALSE; | |
| 831 | 831 | for (int i = 0; i < ufunc->ntypes; ++i) { | |
| 832 | 832 | loop_exists = NPY_TRUE; /* assume it exists, break if not */ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5158,7 +5158,7 @@ PyUFunc_ReplaceLoopBySignature(PyUFuncObject *func, | |||
| 5158 | 5158 | /*UFUNC_API*/ | |
| 5159 | 5159 | NPY_NO_EXPORT PyObject * | |
| 5160 | 5160 | PyUFunc_FromFuncAndData(PyUFuncGenericFunction *func, void **data, | |
| 5161 | - char *types, int ntypes, | ||
| 5161 | + const char *types, int ntypes, | ||
| 5162 | 5162 | int nin, int nout, int identity, | |
| 5163 | 5163 | const char *name, const char *doc, int unused) | |
| 5164 | 5164 | { | |
@@ -5169,7 +5169,7 @@ PyUFunc_FromFuncAndData(PyUFuncGenericFunction *func, void **data, | |||
| 5169 | 5169 | /*UFUNC_API*/ | |
| 5170 | 5170 | NPY_NO_EXPORT PyObject * | |
| 5171 | 5171 | PyUFunc_FromFuncAndDataAndSignature(PyUFuncGenericFunction *func, void **data, | |
| 5172 | - char *types, int ntypes, | ||
| 5172 | + const char *types, int ntypes, | ||
| 5173 | 5173 | int nin, int nout, int identity, | |
| 5174 | 5174 | const char *name, const char *doc, | |
| 5175 | 5175 | int unused, const char *signature) | |
@@ -5182,7 +5182,7 @@ PyUFunc_FromFuncAndDataAndSignature(PyUFuncGenericFunction *func, void **data, | |||
| 5182 | 5182 | /*UFUNC_API*/ | |
| 5183 | 5183 | NPY_NO_EXPORT PyObject * | |
| 5184 | 5184 | PyUFunc_FromFuncAndDataAndSignatureAndIdentity(PyUFuncGenericFunction *func, void **data, | |
| 5185 | - char *types, int ntypes, | ||
| 5185 | + const char *types, int ntypes, | ||
| 5186 | 5186 | int nin, int nout, int identity, | |
| 5187 | 5187 | const char *name, const char *doc, | |
| 5188 | 5188 | const int unused, const char *signature, | |
@@ -5287,7 +5287,7 @@ PyUFunc_FromFuncAndDataAndSignatureAndIdentity(PyUFuncGenericFunction *func, voi | |||
| 5287 | 5287 | } | |
| 5288 | 5288 | } | |
| 5289 | 5289 | ||
| 5290 | - char *curr_types = ufunc->types; | ||
| 5290 | + const char *curr_types = ufunc->types; | ||
| 5291 | 5291 | for (int i = 0; i < ntypes * (nin + nout); i += nin + nout) { | |
| 5292 | 5292 | /* | |
| 5293 | 5293 | * Add all legacy wrapping loops here. This is normally not necessary, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1960,7 +1960,7 @@ linear_search_type_resolver(PyUFuncObject *self, | |||
| 1960 | 1960 | */ | |
| 1961 | 1961 | no_castable_output = 0; | |
| 1962 | 1962 | for (i = 0; i < self->ntypes; ++i) { | |
| 1963 | - char *orig_types = self->types + i*self->nargs; | ||
| 1963 | + const char *orig_types = self->types + i*self->nargs; | ||
| 1964 | 1964 | ||
| 1965 | 1965 | /* Copy the types into an int array for matching */ | |
| 1966 | 1966 | for (j = 0; j < nop; ++j) { | |
@@ -2042,7 +2042,7 @@ type_tuple_type_resolver_core(PyUFuncObject *self, | |||
| 2042 | 2042 | } | |
| 2043 | 2043 | ||
| 2044 | 2044 | for (i = 0; i < self->ntypes; ++i) { | |
| 2045 | - char *orig_types = self->types + i*self->nargs; | ||
| 2045 | + const char *orig_types = self->types + i*self->nargs; | ||
| 2046 | 2046 | ||
| 2047 | 2047 | /* | |
| 2048 | 2048 | * Check specified types and copy into an int array for matching | |
| Back | FazBrowse Home | New Git URL |
0 commit comments