Staging
v0.5.1
https://github.com/python/cpython
Revision c73ee5acc96b4bbd6885156883b224b8cc3e470c authored by Victor Stinner on 07 September 2020, 14:45:57 UTC, committed by GitHub on 07 September 2020, 14:45:57 UTC
The error is exposed on non-UTF-8 locales.

(cherry picked from commit 67987acd5dc9776f55f4e139e2b3d9e7a6434d9f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
1 parent b6d2acb
Raw File
Tip revision: c73ee5acc96b4bbd6885156883b224b8cc3e470c authored by Victor Stinner on 07 September 2020, 14:45:57 UTC
bpo-41401: Fix test_fspath_support in test_io. (GH-21640) (GH-22133)
Tip revision: c73ee5a
dynload_dl.c

/* Support for dynamic loading of extension modules */

#include "dl.h"

#include "Python.h"
#include "importdl.h"


extern char *Py_GetProgramName(void);

const char *_PyImport_DynLoadFiletab[] = {".o", NULL};


dl_funcptr _PyImport_FindSharedFuncptr(const char *prefix,
                                       const char *shortname,
                                       const char *pathname, FILE *fp)
{
    char funcname[258];

    PyOS_snprintf(funcname, sizeof(funcname), "%.20s_%.200s", prefix, shortname);
    return dl_loadmod(Py_GetProgramName(), pathname, funcname);
}
back to top