New submission from Chris Angelico <ros...@gmail.com>:

An anomaly in the argument types of similar functions: 
PyImport_ImportModuleLevel takes char *, while the related functions 
PyImport_AddModule, PyImport_ImportModule, and PyImport_ImportModuleNoBlock all 
take const char *. This made a nuisance of itself for me when I tried to 
compile my code against Python.h (embedding Python). Attached is a relatively 
trivial patch to add const. Should not impact existing code, as the compiler 
will happily pass a char* to a const char* (just not the other way).

----------
components: Interpreter Core
files: importconst.patch
keywords: patch
messages: 136829
nosy: Rosuav
priority: normal
severity: normal
status: open
title: PyImport_ImportModuleLevel doesn't have 'const' on its argument
type: feature request
versions: Python 3.3
Added file: http://bugs.python.org/file22103/importconst.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12173>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to