| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a98c4a9 commit 85b0f5b
29 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1829,7 +1829,7 @@ static PyCArgObject * | |||
| 1829 | 1829 | PyCSimpleType_paramfunc(CDataObject *self) | |
| 1830 | 1830 | { | |
| 1831 | 1831 | StgDictObject *dict; | |
| 1832 | - char *fmt; | ||
| 1832 | + const char *fmt; | ||
| 1833 | 1833 | PyCArgObject *parg; | |
| 1834 | 1834 | struct fielddesc *fd; | |
| 1835 | 1835 | ||
@@ -2039,7 +2039,7 @@ static PyObject * | |||
| 2039 | 2039 | PyCSimpleType_from_param(PyObject *type, PyObject *value) | |
| 2040 | 2040 | { | |
| 2041 | 2041 | StgDictObject *dict; | |
| 2042 | - char *fmt; | ||
| 2042 | + const char *fmt; | ||
| 2043 | 2043 | PyCArgObject *parg; | |
| 2044 | 2044 | struct fielddesc *fd; | |
| 2045 | 2045 | PyObject *as_parameter; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -488,8 +488,8 @@ PyCStructUnionType_update_stgdict(PyObject *type, PyObject *fields, int isStruct | |||
| 488 | 488 | bitsize = 0; | |
| 489 | 489 | ||
| 490 | 490 | if (isStruct && !isPacked) { | |
| 491 | - char *fieldfmt = dict->format ? dict->format : "B"; | ||
| 492 | - char *fieldname = PyUnicode_AsUTF8(name); | ||
| 491 | + const char *fieldfmt = dict->format ? dict->format : "B"; | ||
| 492 | + const char *fieldname = PyUnicode_AsUTF8(name); | ||
| 493 | 493 | char *ptr; | |
| 494 | 494 | Py_ssize_t len; | |
| 495 | 495 | char *buf; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3613,7 +3613,7 @@ _elementtree_XMLParser__setevents_impl(XMLParserObject *self, | |||
| 3613 | 3613 | ||
| 3614 | 3614 | for (i = 0; i < PySequence_Size(events_seq); ++i) { | |
| 3615 | 3615 | PyObject *event_name_obj = PySequence_Fast_GET_ITEM(events_seq, i); | |
| 3616 | - char *event_name = NULL; | ||
| 3616 | + const char *event_name = NULL; | ||
| 3617 | 3617 | if (PyUnicode_Check(event_name_obj)) { | |
| 3618 | 3618 | event_name = PyUnicode_AsUTF8(event_name_obj); | |
| 3619 | 3619 | } else if (PyBytes_Check(event_name_obj)) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -305,7 +305,7 @@ _enter_buffered_busy(buffered *self) | |||
| 305 | 305 | "could not acquire lock for %A at interpreter " | |
| 306 | 306 | "shutdown, possibly due to daemon threads", | |
| 307 | 307 | (PyObject *) self); | |
| 308 | - char *msg = PyUnicode_AsUTF8(msgobj); | ||
| 308 | + const char *msg = PyUnicode_AsUTF8(msgobj); | ||
| 309 | 309 | Py_FatalError(msg); | |
| 310 | 310 | } | |
| 311 | 311 | return 1; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -693,7 +693,7 @@ _io_StringIO___init___impl(stringio *self, PyObject *value, | |||
| 693 | 693 | PyObject *newline_obj) | |
| 694 | 694 | /*[clinic end generated code: output=a421ea023b22ef4e input=cee2d9181b2577a3]*/ | |
| 695 | 695 | { | |
| 696 | - char *newline = "\n"; | ||
| 696 | + const char *newline = "\n"; | ||
| 697 | 697 | Py_ssize_t value_len; | |
| 698 | 698 | ||
| 699 | 699 | /* Parse the newline argument. We only want to allow unicode objects or | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1941,7 +1941,7 @@ save_long(PicklerObject *self, PyObject *obj) | |||
| 1941 | 1941 | goto error; | |
| 1942 | 1942 | } | |
| 1943 | 1943 | else { | |
| 1944 | - char *string; | ||
| 1944 | + const char *string; | ||
| 1945 | 1945 | ||
| 1946 | 1946 | /* proto < 2: write the repr and newline. This is quadratic-time (in | |
| 1947 | 1947 | the number of digits), in both directions. We add a trailing 'L' | |
@@ -2218,7 +2218,7 @@ write_unicode_binary(PicklerObject *self, PyObject *obj) | |||
| 2218 | 2218 | { | |
| 2219 | 2219 | PyObject *encoded = NULL; | |
| 2220 | 2220 | Py_ssize_t size; | |
| 2221 | - char *data; | ||
| 2221 | + const char *data; | ||
| 2222 | 2222 | int r; | |
| 2223 | 2223 | ||
| 2224 | 2224 | if (PyUnicode_READY(obj)) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1489,7 +1489,7 @@ pysqlite_connection_create_collation(pysqlite_Connection* self, PyObject* args) | |||
| 1489 | 1489 | PyObject* retval; | |
| 1490 | 1490 | Py_ssize_t i, len; | |
| 1491 | 1491 | _Py_IDENTIFIER(upper); | |
| 1492 | - char *uppercase_name_str; | ||
| 1492 | + const char *uppercase_name_str; | ||
| 1493 | 1493 | int rc; | |
| 1494 | 1494 | unsigned int kind; | |
| 1495 | 1495 | void *data; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -79,12 +79,12 @@ PyObject* pysqlite_row_item(pysqlite_Row* self, Py_ssize_t idx) | |||
| 79 | 79 | PyObject* pysqlite_row_subscript(pysqlite_Row* self, PyObject* idx) | |
| 80 | 80 | { | |
| 81 | 81 | Py_ssize_t _idx; | |
| 82 | - char* key; | ||
| 82 | + const char *key; | ||
| 83 | 83 | Py_ssize_t nitems, i; | |
| 84 | - char* compare_key; | ||
| 84 | + const char *compare_key; | ||
| 85 | 85 | ||
| 86 | - char* p1; | ||
| 87 | - char* p2; | ||
| 86 | + const char *p1; | ||
| 87 | + const char *p2; | ||
| 88 | 88 | ||
| 89 | 89 | PyObject* item; | |
| 90 | 90 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -112,7 +112,7 @@ int pysqlite_statement_create(pysqlite_Statement* self, pysqlite_Connection* con | |||
| 112 | 112 | int pysqlite_statement_bind_parameter(pysqlite_Statement* self, int pos, PyObject* parameter) | |
| 113 | 113 | { | |
| 114 | 114 | int rc = SQLITE_OK; | |
| 115 | - char* string; | ||
| 115 | + const char *string; | ||
| 116 | 116 | Py_ssize_t buflen; | |
| 117 | 117 | parameter_type paramtype; | |
| 118 | 118 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -536,7 +536,7 @@ SplitObj(PyObject *arg) | |||
| 536 | 536 | else if (PyUnicode_Check(arg)) { | |
| 537 | 537 | int argc; | |
| 538 | 538 | const char **argv; | |
| 539 | - char *list = PyUnicode_AsUTF8(arg); | ||
| 539 | + const char *list = PyUnicode_AsUTF8(arg); | ||
| 540 | 540 | ||
| 541 | 541 | if (list == NULL || | |
| 542 | 542 | Tcl_SplitList((Tcl_Interp *)NULL, list, &argc, &argv) != TCL_OK) { | |
@@ -993,7 +993,7 @@ asBignumObj(PyObject *value) | |||
| 993 | 993 | Tcl_Obj *result; | |
| 994 | 994 | int neg; | |
| 995 | 995 | PyObject *hexstr; | |
| 996 | - char *hexchars; | ||
| 996 | + const char *hexchars; | ||
| 997 | 997 | mp_int bigValue; | |
| 998 | 998 | ||
| 999 | 999 | neg = Py_SIZE(value) < 0; | |
@@ -1723,7 +1723,7 @@ class varname_converter(CConverter): | |||
| 1723 | 1723 | static int | |
| 1724 | 1724 | varname_converter(PyObject *in, void *_out) | |
| 1725 | 1725 | { | |
| 1726 | - char *s; | ||
| 1726 | + const char *s; | ||
| 1727 | 1727 | const char **out = (const char**)_out; | |
| 1728 | 1728 | if (PyBytes_Check(in)) { | |
| 1729 | 1729 | if (PyBytes_GET_SIZE(in) > INT_MAX) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments