[issue3080] Full unicode import system

Amaury Forgeot d'Arc report at bugs.python.org
Thu Mar 10 09:01:21 CET 2011


Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:

Nice work! Is there a specific place for comments? Here are some of them already:

- Modules/zipimport.c::make_filename: remove the limit buffer, the code could
  look like:

  pathsize = PyUnicode_GET_SIZE(prefix) + PyUnicode_GET_SIZE(name);
  result = PyUnicode_FromUnicode(NULL, pathsize);
  path = PyUnicode_AS_UNICODE(ret);
  ...
  return result;

- Python/importdl.c::_PyImport_LoadDynamicModule: shortnameobj is not necessary:

  lastdot = Py_UNICODE_strrchr(nameuni, '.');
  if (lastdot == NULL)
      shortname = namenuni;
  else:
      shortname = lastdot + 1;

- _PyImport_GetDynLoadFunc still takes char* arguments. Can this fail on win32
  for example, in case the pathname cannot be encoded to mbcs?

----------

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


More information about the Python-bugs-list mailing list