GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — bpo-36876: Make some static string literal arrays constant. by ericsnowcurrently · Pull Request #15760 · python/cpython Conversation
|
| dec_##MPDFUNC(PyObject *self, PyObject *args, PyObject *kwds) \ | ||
| { \ | ||
| static char *kwlist[] = {"other", "context", NULL}; \ | ||
| static const char *kwlist[] = {"other", "context", NULL}; \ |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Few other alignment issues like the ones above - probably best to align the newline escapes as above.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
When you're done making the requested changes, leave the comment: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are all the alignment issues I found. Hopefully the "suggestions" are the right number of spaces.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| int access = (access_mode)ACCESS_DEFAULT; | ||
| DWORD flProtect, dwDesiredAccess; | ||
| static char *keywords[] = { "fileno", "length", | ||
| static const char *keywords[] = { "fileno", "length", |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Next two lines are also misaligned.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| /* Beware that "in" clashes with Python's own "in" operator keyword */ | ||
| static char *keywords[] = {"out", "in", | ||
| static const char *keywords[] = {"out", "in", | ||
| "offset", "count", |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Alignment here again.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| Py_ssize_t count; | ||
| PyObject *offobj; | ||
| static char *keywords[] = {"out", "in", | ||
| static const char *keywords[] = {"out", "in", |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Alignment again.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| { | ||
| static char *kwd_list[] = {"message", "category", "filename", "lineno", | ||
| static const char *kwd_list[] = {"message", "category", "filename", "lineno", | ||
| "module", "registry", "module_globals", |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Alignment here again.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Changing It is possible to change the API, but it is long a complex process. It is a separate issue. Adding consts in |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Note also that you can add two See #15824 for changes in |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-Authored-By: Paul Ganssle <[email protected]>
Co-Authored-By: Paul Ganssle <[email protected]>
Co-Authored-By: Paul Ganssle <[email protected]>
Co-Authored-By: Paul Ganssle <[email protected]>
Co-Authored-By: Paul Ganssle <[email protected]>
|
Hmm, this won't work out. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
At the time there is a bunch of forgotten const / const_cast / The list includes the following pip packages (but definitely not limited to): Is there any way to continue working on the issue? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@serhiy-storchaka, could you, please, elaborate on
At the time the lack of const causes problems i. e. when compiling in MSVC standard conformance mode (which is default for |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.