pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/python/cpython/commit/a826f32054710f7dc602573f99c6c87a725adbba

8faa60c69660fa.css" /> Merged revisions 71031 via svnmerge from · python/cpython@a826f32 · GitHub
Skip to content

Commit a826f32

Browse files
committed
Merged revisions 71031 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r71031 | brett.cannon | 2009-04-01 20:17:39 -0700 (Wed, 01 Apr 2009) | 6 lines PyImport_AppendInittab() took a char * as a first argument even though that string was stored beyond the life of the call. Changed the signature to be const char * to help make this point. Closes issue #1419652. ........
1 parent 3e2ea79 commit a826f32

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

Doc/c-api/import.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ Importing Modules
200200
tricks with this to provide a dynamically created collection of frozen modules.
201201

202202

203-
.. cfunction:: int PyImport_AppendInittab(char *name, PyObject* (*initfunc)(void))
203+
.. cfunction:: int PyImport_AppendInittab(const char *name, PyObject* (*initfunc)(void))
204204

205205
Add a single module to the existing table of built-in modules. This is a
206206
convenience wrapper around :cfunc:`PyImport_ExtendInittab`, returning ``-1`` if

Include/import.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ struct _inittab {
4343
PyAPI_DATA(PyTypeObject) PyNullImporter_Type;
4444
PyAPI_DATA(struct _inittab *) PyImport_Inittab;
4545

46-
PyAPI_FUNC(int) PyImport_AppendInittab(char *name, PyObject* (*initfunc)(void));
46+
PyAPI_FUNC(int) PyImport_AppendInittab(const char *name, PyObject* (*initfunc)(void));
4747
PyAPI_FUNC(int) PyImport_ExtendInittab(struct _inittab *newtab);
4848

4949
struct _frozen {

Python/import.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3488,13 +3488,13 @@ PyImport_ExtendInittab(struct _inittab *newtab)
34883488
/* Shorthand to add a single entry given a name and a function */
34893489

34903490
int
3491-
PyImport_AppendInittab(char *name, PyObject* (*initfunc)(void))
3491+
PyImport_AppendInittab(const char *name, PyObject* (*initfunc)(void))
34923492
{
34933493
struct _inittab newtab[2];
34943494

34953495
memset(newtab, '\0', sizeof newtab);
34963496

3497-
newtab[0].name = name;
3497+
newtab[0].name = (char *)name;
34983498
newtab[0].initfunc = initfunc;
34993499

35003500
return PyImport_ExtendInittab(newtab);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy