mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 11:37:35 +00:00
e16a7d8f3b
`et` means `expandtab`. ```sh rg 'vi: .* :vi' -l -0 | \ xargs -0 sed -i '' 's/vi: \(.*\) et\(.*\) :vi/vi: \1 xoet\2:vi/' rg 'vi: .* :vi' -l -0 | \ xargs -0 sed -i '' 's/vi: \(.*\)noet\(.*\):vi/vi: \1et\2 :vi/' rg 'vi: .* :vi' -l -0 | \ xargs -0 sed -i '' 's/vi: \(.*\)xoet\(.*\):vi/vi: \1noet\2:vi/' ```
23 lines
1.4 KiB
C
23 lines
1.4 KiB
C
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│
|
|
│ vi: set et ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi │
|
|
╞══════════════════════════════════════════════════════════════════════════════╡
|
|
│ Python 3 │
|
|
│ https://docs.python.org/3/license.html │
|
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
|
#include "third_party/python/Include/pyerrors.h"
|
|
#include "third_party/python/Python/importdl.h"
|
|
|
|
/* Support for dynamic loading of extension modules */
|
|
|
|
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);
|
|
}
|