]> granicus.if.org Git - python/commit
This patch adds a new Python C API called PyString_AsStringAndSize()
authorMarc-André Lemburg <mal@egenix.com>
Tue, 19 Sep 2000 21:04:18 +0000 (21:04 +0000)
committerMarc-André Lemburg <mal@egenix.com>
Tue, 19 Sep 2000 21:04:18 +0000 (21:04 +0000)
commitd1ba443206b535f41154f10b9d56d4fc76a1a9d8
treeae56be2777275ca19f347e1154f756ddde4d4b22
parentf8d071332a485ede280675a55e3319e136826dd0
This patch adds a new Python C API called PyString_AsStringAndSize()
which implements the automatic conversion from Unicode to a string
object using the default encoding.

The new API is then put to use to have eval() and exec accept
Unicode objects as code parameter. This closes bugs #110924
and #113890.

As side-effect, the traditional C APIs PyString_Size() and
PyString_AsString() will also accept Unicode objects as
parameters.
Doc/api/api.tex
Doc/api/refcounts.dat
Include/stringobject.h
Lib/test/test_b1.py
Lib/test/test_grammar.py
Objects/stringobject.c
Python/bltinmodule.c
Python/ceval.c