Skip to content

Commit 4c22e16

Browse files
closes bpo-37633: Reëxport some function compatibility wrappers for macros in pythonrun.h. (GH-17056)
(cherry picked from commit 62161ce) Co-authored-by: Benjamin Peterson <[email protected]>
1 parent e8bad63 commit 4c22e16

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Reëxport some function compatibility wrappers for macros in ``pythonrun.h``.

Python/pythonrun.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1648,115 +1648,115 @@ PyOS_CheckStack(void)
16481648
/* Deprecated C API functions still provided for binary compatibility */
16491649

16501650
#undef PyParser_SimpleParseFile
1651-
node *
1651+
PyAPI_FUNC(node *)
16521652
PyParser_SimpleParseFile(FILE *fp, const char *filename, int start)
16531653
{
16541654
return PyParser_SimpleParseFileFlags(fp, filename, start, 0);
16551655
}
16561656

16571657
#undef PyParser_SimpleParseString
1658-
node *
1658+
PyAPI_FUNC(node *)
16591659
PyParser_SimpleParseString(const char *str, int start)
16601660
{
16611661
return PyParser_SimpleParseStringFlags(str, start, 0);
16621662
}
16631663

16641664
#undef PyRun_AnyFile
1665-
int
1665+
PyAPI_FUNC(int)
16661666
PyRun_AnyFile(FILE *fp, const char *name)
16671667
{
16681668
return PyRun_AnyFileExFlags(fp, name, 0, NULL);
16691669
}
16701670

16711671
#undef PyRun_AnyFileEx
1672-
int
1672+
PyAPI_FUNC(int)
16731673
PyRun_AnyFileEx(FILE *fp, const char *name, int closeit)
16741674
{
16751675
return PyRun_AnyFileExFlags(fp, name, closeit, NULL);
16761676
}
16771677

16781678
#undef PyRun_AnyFileFlags
1679-
int
1679+
PyAPI_FUNC(int)
16801680
PyRun_AnyFileFlags(FILE *fp, const char *name, PyCompilerFlags *flags)
16811681
{
16821682
return PyRun_AnyFileExFlags(fp, name, 0, flags);
16831683
}
16841684

16851685
#undef PyRun_File
1686-
PyObject *
1686+
PyAPI_FUNC(PyObject *)
16871687
PyRun_File(FILE *fp, const char *p, int s, PyObject *g, PyObject *l)
16881688
{
16891689
return PyRun_FileExFlags(fp, p, s, g, l, 0, NULL);
16901690
}
16911691

16921692
#undef PyRun_FileEx
1693-
PyObject *
1693+
PyAPI_FUNC(PyObject *)
16941694
PyRun_FileEx(FILE *fp, const char *p, int s, PyObject *g, PyObject *l, int c)
16951695
{
16961696
return PyRun_FileExFlags(fp, p, s, g, l, c, NULL);
16971697
}
16981698

16991699
#undef PyRun_FileFlags
1700-
PyObject *
1700+
PyAPI_FUNC(PyObject *)
17011701
PyRun_FileFlags(FILE *fp, const char *p, int s, PyObject *g, PyObject *l,
17021702
PyCompilerFlags *flags)
17031703
{
17041704
return PyRun_FileExFlags(fp, p, s, g, l, 0, flags);
17051705
}
17061706

17071707
#undef PyRun_SimpleFile
1708-
int
1708+
PyAPI_FUNC(int)
17091709
PyRun_SimpleFile(FILE *f, const char *p)
17101710
{
17111711
return PyRun_SimpleFileExFlags(f, p, 0, NULL);
17121712
}
17131713

17141714
#undef PyRun_SimpleFileEx
1715-
int
1715+
PyAPI_FUNC(int)
17161716
PyRun_SimpleFileEx(FILE *f, const char *p, int c)
17171717
{
17181718
return PyRun_SimpleFileExFlags(f, p, c, NULL);
17191719
}
17201720

17211721

17221722
#undef PyRun_String
1723-
PyObject *
1723+
PyAPI_FUNC(PyObject *)
17241724
PyRun_String(const char *str, int s, PyObject *g, PyObject *l)
17251725
{
17261726
return PyRun_StringFlags(str, s, g, l, NULL);
17271727
}
17281728

17291729
#undef PyRun_SimpleString
1730-
int
1730+
PyAPI_FUNC(int)
17311731
PyRun_SimpleString(const char *s)
17321732
{
17331733
return PyRun_SimpleStringFlags(s, NULL);
17341734
}
17351735

17361736
#undef Py_CompileString
1737-
PyObject *
1737+
PyAPI_FUNC(PyObject *)
17381738
Py_CompileString(const char *str, const char *p, int s)
17391739
{
17401740
return Py_CompileStringExFlags(str, p, s, NULL, -1);
17411741
}
17421742

17431743
#undef Py_CompileStringFlags
1744-
PyObject *
1744+
PyAPI_FUNC(PyObject *)
17451745
Py_CompileStringFlags(const char *str, const char *p, int s,
17461746
PyCompilerFlags *flags)
17471747
{
17481748
return Py_CompileStringExFlags(str, p, s, flags, -1);
17491749
}
17501750

17511751
#undef PyRun_InteractiveOne
1752-
int
1752+
PyAPI_FUNC(int)
17531753
PyRun_InteractiveOne(FILE *f, const char *p)
17541754
{
17551755
return PyRun_InteractiveOneFlags(f, p, NULL);
17561756
}
17571757

17581758
#undef PyRun_InteractiveLoop
1759-
int
1759+
PyAPI_FUNC(int)
17601760
PyRun_InteractiveLoop(FILE *f, const char *p)
17611761
{
17621762
return PyRun_InteractiveLoopFlags(f, p, NULL);

0 commit comments

Comments
 (0)