Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
926b0cb5
Commit
926b0cb5
authored
Apr 17, 2019
by
Inada Naoki
Committed by
GitHub
Apr 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-36641: Add "const" to PyDoc_VAR macro (GH-12854)
It reduces "data" segment in python about 200KB.
parent
31e8d69b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
2 deletions
+4
-2
Include/pymacro.h
Include/pymacro.h
+1
-1
Misc/NEWS.d/next/C API/2019-04-16-21-18-19.bpo-36641.pz-DIR.rst
...EWS.d/next/C API/2019-04-16-21-18-19.bpo-36641.pz-DIR.rst
+2
-0
Modules/_ssl.c
Modules/_ssl.c
+1
-1
No files found.
Include/pymacro.h
View file @
926b0cb5
...
...
@@ -67,7 +67,7 @@
/* Define macros for inline documentation. */
#define PyDoc_VAR(name) static char name[]
#define PyDoc_VAR(name) static c
onst c
har name[]
#define PyDoc_STRVAR(name,str) PyDoc_VAR(name) = PyDoc_STR(str)
#ifdef WITH_DOC_STRINGS
#define PyDoc_STR(str) str
...
...
Misc/NEWS.d/next/C API/2019-04-16-21-18-19.bpo-36641.pz-DIR.rst
0 → 100644
View file @
926b0cb5
:c:macro:`PyDoc_VAR(name)` and :c:macro:`PyDoc_STRVAR(name,str)` now create
``static const char name[]`` instead of ``static char name[]``. Patch by Inada Naoki.
Modules/_ssl.c
View file @
926b0cb5
...
...
@@ -557,7 +557,7 @@ SSLError_str(PyOSErrorObject *self)
static
PyType_Slot
sslerror_type_slots
[]
=
{
{
Py_tp_base
,
NULL
},
/* Filled out in module init as it's not a constant */
{
Py_tp_doc
,
SSLError_doc
},
{
Py_tp_doc
,
(
void
*
)
SSLError_doc
},
{
Py_tp_str
,
SSLError_str
},
{
0
,
0
},
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment