8000 gh-117953: Add Internal struct _Py_ext_module_loader_info by ericsnowcurrently · Pull Request #118194 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-117953: Add Internal struct _Py_ext_module_loader_info #118194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Prev Previous commit
Next Next commit
_Py_ext_module_loader_info_from_spec() -> _Py_ext_module_loader_info_…
…init_from_spec()
  • Loading branch information
ericsnowcurrently committed Apr 24, 2024
commit 427280fcb94dc8887ab96fae030d2fa9b33a8a04
6 changes: 3 additions & 3 deletions Include/internal/pycore_importdl.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ struct _Py_ext_module_loader_info {
};
extern void _Py_ext_module_loader_info_clear(
struct _Py_ext_module_loader_info *info);
extern int _Py_ext_module_loader_info_from_spec(
PyObject *spec,
struct _Py_ext_module_loader_info *info);
extern int _Py_ext_module_loader_info_init_from_spec(
struct _Py_ext_module_loader_info *info,
PyObject *spec);

extern PyObject *_PyImport_LoadDynamicModuleWithSpec(
struct _Py_ext_module_loader_info *info,
Expand Down
2 changes: 1 addition & 1 deletion Python/import.c
Original file line number Diff line number Diff line change
Expand Up @@ -3882,7 +3882,7 @@ _imp_create_dynamic_impl(PyObject *module, PyObject *spec, PyObject *file)
FILE *fp;

struct _Py_ext_module_loader_info info;
if (_Py_ext_module_loader_info_from_spec(spec, &info) < 0) {
if (_Py_ext_module_loader_info_init_from_spec(&info, spec) < 0) {
return NULL;
}

Expand Down
5 changes: 3 additions & 2 deletions Python/importdl.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,9 @@ _Py_ext_module_loader_info_clear(struct _Py_ext_module_loader_info *info)
}

int
_Py_ext_module_loader_info_from_spec(PyObject *spec,
struct _Py_ext_module_loader_info *p_info)
_Py_ext_module_loader_info_init_from_spec(
struct _Py_ext_module_loader_info *p_info,
PyObject *spec)
{
struct _Py_ext_module_loader_info info = {0};

Expand Down
0