[New-bugs-announce] [issue5422] load pyc file with mbcs file system in update_compiled_module

徐洲 report at bugs.python.org
Thu Mar 5 13:14:38 CET 2009


New submission from 徐洲 <x_o at 163.com>:

py3k 3.01

static int
update_compiled_module(PyCodeObject *co, char *pathname)
{
	PyObject *oldname, *newname;

	if (!PyUnicode_CompareWithASCIIString(co->co_filename, 
pathname))
		return 0;

/* string pathname related with FILE SYSTEM !!! 
 * old code is :
 * newname = PyUnicode_FromString(pathname); 
 */
	newname = PyUnicode_DecodeFSDefault(pathname);
	if (newname == NULL)
		return -1;

	oldname = co->co_filename;
	Py_INCREF(oldname);
	update_code_filenames(co, oldname, newname);
	Py_DECREF(oldname);
	Py_DECREF(newname);
	return 1;
}

----------
components: Windows
messages: 83190
nosy: joexo
severity: normal
status: open
title: load pyc file with mbcs file system in update_compiled_module
type: compile error
versions: Python 3.0

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5422>
_______________________________________


More information about the New-bugs-announce mailing list