Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
e5024517
Commit
e5024517
authored
Sep 12, 2018
by
Benjamin Peterson
Committed by
GitHub
Sep 12, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
closes bpo-34646: Remove PyAPI_* macros from declarations. (GH-9218)
parent
019f0a0c
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
33 additions
and
31 deletions
+33
-31
Modules/_hashopenssl.c
Modules/_hashopenssl.c
+1
-1
Modules/_io/winconsoleio.c
Modules/_io/winconsoleio.c
+1
-1
Modules/posixmodule.c
Modules/posixmodule.c
+2
-2
Objects/methodobject.c
Objects/methodobject.c
+1
-1
Objects/object.c
Objects/object.c
+1
-1
Parser/printgrammar.c
Parser/printgrammar.c
+1
-1
Python/_warnings.c
Python/_warnings.c
+1
-1
Python/compile.c
Python/compile.c
+1
-1
Python/graminit.c
Python/graminit.c
+1
-1
Python/import.c
Python/import.c
+1
-1
Python/pystrhex.c
Python/pystrhex.c
+4
-2
Python/pystrtod.c
Python/pystrtod.c
+2
-2
Python/pythonrun.c
Python/pythonrun.c
+16
-16
No files found.
Modules/_hashopenssl.c
View file @
e5024517
...
...
@@ -245,7 +245,7 @@ EVP_hexdigest(EVPobject *self, PyObject *unused)
EVP_MD_CTX_free
(
temp_ctx
);
return
_Py_strhex
((
const
char
*
)
digest
,
digest_size
);
return
_Py_strhex
((
const
char
*
)
digest
,
(
Py_ssize_t
)
digest_size
);
}
PyDoc_STRVAR
(
EVP_update__doc__
,
...
...
Modules/_io/winconsoleio.c
View file @
e5024517
...
...
@@ -1170,6 +1170,6 @@ PyTypeObject PyWindowsConsoleIO_Type = {
0
,
/* tp_finalize */
};
Py
API_DATA
(
PyObject
*
)
_PyWindowsConsoleIO_Type
=
(
PyObject
*
)
&
PyWindowsConsoleIO_Type
;
Py
Object
*
_PyWindowsConsoleIO_Type
=
(
PyObject
*
)
&
PyWindowsConsoleIO_Type
;
#endif
/* MS_WINDOWS */
Modules/posixmodule.c
View file @
e5024517
...
...
@@ -488,8 +488,8 @@ PyOS_AfterFork(void)
#ifdef MS_WINDOWS
/* defined in fileutils.c */
PyAPI_FUNC
(
void
)
_Py_time_t_to_FILE_TIME
(
time_t
,
int
,
FILETIME
*
);
PyAPI_FUNC
(
void
)
_Py_attribute_data_to_stat
(
BY_HANDLE_FILE_INFORMATION
*
,
void
_Py_time_t_to_FILE_TIME
(
time_t
,
int
,
FILETIME
*
);
void
_Py_attribute_data_to_stat
(
BY_HANDLE_FILE_INFORMATION
*
,
ULONG
,
struct
_Py_stat_struct
*
);
#endif
...
...
Objects/methodobject.c
View file @
e5024517
...
...
@@ -18,7 +18,7 @@ static int numfree = 0;
/* undefine macro trampoline to PyCFunction_NewEx */
#undef PyCFunction_New
Py
API_FUNC
(
PyObject
*
)
Py
Object
*
PyCFunction_New
(
PyMethodDef
*
ml
,
PyObject
*
self
)
{
return
PyCFunction_NewEx
(
ml
,
self
,
NULL
);
...
...
Objects/object.c
View file @
e5024517
...
...
@@ -2180,7 +2180,7 @@ _PyTrash_thread_destroy_chain(void)
/* For Py_LIMITED_API, we need an out-of-line version of _Py_Dealloc.
Define this here, so we can undefine the macro. */
#undef _Py_Dealloc
PyAPI_FUNC
(
void
)
_Py_Dealloc
(
PyObject
*
);
void
_Py_Dealloc
(
PyObject
*
);
void
_Py_Dealloc
(
PyObject
*
op
)
{
...
...
Parser/printgrammar.c
View file @
e5024517
...
...
@@ -18,7 +18,7 @@ printgrammar(grammar *g, FILE *fp)
fprintf
(
fp
,
"/* Generated by Parser/pgen */
\n\n
"
);
fprintf
(
fp
,
"#include
\"
pgenheaders.h
\"\n
"
);
fprintf
(
fp
,
"#include
\"
grammar.h
\"\n
"
);
fprintf
(
fp
,
"
PyAPI_DATA(grammar)
_PyParser_Grammar;
\n
"
);
fprintf
(
fp
,
"
grammar
_PyParser_Grammar;
\n
"
);
printdfas
(
g
,
fp
);
printlabels
(
g
,
fp
);
fprintf
(
fp
,
"grammar _PyParser_Grammar = {
\n
"
);
...
...
Python/_warnings.c
View file @
e5024517
...
...
@@ -1004,7 +1004,7 @@ PyErr_WarnEx(PyObject *category, const char *text, Py_ssize_t stack_level)
#undef PyErr_Warn
PyAPI_FUNC
(
int
)
int
PyErr_Warn
(
PyObject
*
category
,
const
char
*
text
)
{
return
PyErr_WarnEx
(
category
,
text
,
1
);
...
...
Python/compile.c
View file @
e5024517
...
...
@@ -5550,7 +5550,7 @@ assemble(struct compiler *c, int addNone)
}
#undef PyAST_Compile
Py
API_FUNC
(
PyCodeObject
*
)
Py
CodeObject
*
PyAST_Compile
(
mod_ty
mod
,
const
char
*
filename
,
PyCompilerFlags
*
flags
,
PyArena
*
arena
)
{
...
...
Python/graminit.c
View file @
e5024517
...
...
@@ -2,7 +2,7 @@
#include "pgenheaders.h"
#include "grammar.h"
PyAPI_DATA
(
grammar
)
_PyParser_Grammar
;
grammar
_PyParser_Grammar
;
static
arc
arcs_0_0
[
3
]
=
{
{
2
,
1
},
{
3
,
1
},
...
...
Python/import.c
View file @
e5024517
...
...
@@ -1138,7 +1138,7 @@ get_path_importer(PyObject *path_importer_cache, PyObject *path_hooks,
return
importer
;
}
Py
API_FUNC
(
PyObject
*
)
Py
Object
*
PyImport_GetImporter
(
PyObject
*
path
)
{
PyObject
*
importer
=
NULL
,
*
path_importer_cache
=
NULL
,
*
path_hooks
=
NULL
;
...
...
Python/pystrhex.c
View file @
e5024517
...
...
@@ -2,6 +2,8 @@
#include "Python.h"
#include "pystrhex.h"
static
PyObject
*
_Py_strhex_impl
(
const
char
*
argbuf
,
const
Py_ssize_t
arglen
,
int
return_bytes
)
{
...
...
@@ -48,14 +50,14 @@ static PyObject *_Py_strhex_impl(const char* argbuf, const Py_ssize_t arglen,
return
retval
;
}
Py
API_FUNC
(
PyObject
*
)
_Py_strhex
(
const
char
*
argbuf
,
const
Py_ssize_t
arglen
)
Py
Object
*
_Py_strhex
(
const
char
*
argbuf
,
const
Py_ssize_t
arglen
)
{
return
_Py_strhex_impl
(
argbuf
,
arglen
,
0
);
}
/* Same as above but returns a bytes() instead of str() to avoid the
* need to decode the str() when bytes are needed. */
Py
API_FUNC
(
PyObject
*
)
_Py_strhex_bytes
(
const
char
*
argbuf
,
const
Py_ssize_t
arglen
)
Py
Object
*
_Py_strhex_bytes
(
const
char
*
argbuf
,
const
Py_ssize_t
arglen
)
{
return
_Py_strhex_impl
(
argbuf
,
arglen
,
1
);
}
Python/pystrtod.c
View file @
e5024517
...
...
@@ -791,7 +791,7 @@ _PyOS_ascii_formatd(char *buffer,
/* The fallback code to use if _Py_dg_dtoa is not available. */
PyAPI_FUNC
(
char
*
)
PyOS_double_to_string
(
double
val
,
char
*
PyOS_double_to_string
(
double
val
,
char
format_code
,
int
precision
,
int
flags
,
...
...
@@ -1238,7 +1238,7 @@ format_float_short(double d, char format_code,
}
PyAPI_FUNC
(
char
*
)
PyOS_double_to_string
(
double
val
,
char
*
PyOS_double_to_string
(
double
val
,
char
format_code
,
int
precision
,
int
flags
,
...
...
Python/pythonrun.c
View file @
e5024517
...
...
@@ -1492,56 +1492,56 @@ PyOS_CheckStack(void)
/* Deprecated C API functions still provided for binary compatibility */
#undef PyParser_SimpleParseFile
PyAPI_FUNC
(
node
*
)
node
*
PyParser_SimpleParseFile
(
FILE
*
fp
,
const
char
*
filename
,
int
start
)
{
return
PyParser_SimpleParseFileFlags
(
fp
,
filename
,
start
,
0
);
}
#undef PyParser_SimpleParseString
PyAPI_FUNC
(
node
*
)
node
*
PyParser_SimpleParseString
(
const
char
*
str
,
int
start
)
{
return
PyParser_SimpleParseStringFlags
(
str
,
start
,
0
);
}
#undef PyRun_AnyFile
PyAPI_FUNC
(
int
)
int
PyRun_AnyFile
(
FILE
*
fp
,
const
char
*
name
)
{
return
PyRun_AnyFileExFlags
(
fp
,
name
,
0
,
NULL
);
}
#undef PyRun_AnyFileEx
PyAPI_FUNC
(
int
)
int
PyRun_AnyFileEx
(
FILE
*
fp
,
const
char
*
name
,
int
closeit
)
{
return
PyRun_AnyFileExFlags
(
fp
,
name
,
closeit
,
NULL
);
}
#undef PyRun_AnyFileFlags
PyAPI_FUNC
(
int
)
int
PyRun_AnyFileFlags
(
FILE
*
fp
,
const
char
*
name
,
PyCompilerFlags
*
flags
)
{
return
PyRun_AnyFileExFlags
(
fp
,
name
,
0
,
flags
);
}
#undef PyRun_File
Py
API_FUNC
(
PyObject
*
)
Py
Object
*
PyRun_File
(
FILE
*
fp
,
const
char
*
p
,
int
s
,
PyObject
*
g
,
PyObject
*
l
)
{
return
PyRun_FileExFlags
(
fp
,
p
,
s
,
g
,
l
,
0
,
NULL
);
}
#undef PyRun_FileEx
Py
API_FUNC
(
PyObject
*
)
Py
Object
*
PyRun_FileEx
(
FILE
*
fp
,
const
char
*
p
,
int
s
,
PyObject
*
g
,
PyObject
*
l
,
int
c
)
{
return
PyRun_FileExFlags
(
fp
,
p
,
s
,
g
,
l
,
c
,
NULL
);
}
#undef PyRun_FileFlags
Py
API_FUNC
(
PyObject
*
)
Py
Object
*
PyRun_FileFlags
(
FILE
*
fp
,
const
char
*
p
,
int
s
,
PyObject
*
g
,
PyObject
*
l
,
PyCompilerFlags
*
flags
)
{
...
...
@@ -1549,14 +1549,14 @@ PyRun_FileFlags(FILE *fp, const char *p, int s, PyObject *g, PyObject *l,
}
#undef PyRun_SimpleFile
PyAPI_FUNC
(
int
)
int
PyRun_SimpleFile
(
FILE
*
f
,
const
char
*
p
)
{
return
PyRun_SimpleFileExFlags
(
f
,
p
,
0
,
NULL
);
}
#undef PyRun_SimpleFileEx
PyAPI_FUNC
(
int
)
int
PyRun_SimpleFileEx
(
FILE
*
f
,
const
char
*
p
,
int
c
)
{
return
PyRun_SimpleFileExFlags
(
f
,
p
,
c
,
NULL
);
...
...
@@ -1564,28 +1564,28 @@ PyRun_SimpleFileEx(FILE *f, const char *p, int c)
#undef PyRun_String
Py
API_FUNC
(
PyObject
*
)
Py
Object
*
PyRun_String
(
const
char
*
str
,
int
s
,
PyObject
*
g
,
PyObject
*
l
)
{
return
PyRun_StringFlags
(
str
,
s
,
g
,
l
,
NULL
);
}
#undef PyRun_SimpleString
PyAPI_FUNC
(
int
)
int
PyRun_SimpleString
(
const
char
*
s
)
{
return
PyRun_SimpleStringFlags
(
s
,
NULL
);
}
#undef Py_CompileString
Py
API_FUNC
(
PyObject
*
)
Py
Object
*
Py_CompileString
(
const
char
*
str
,
const
char
*
p
,
int
s
)
{
return
Py_CompileStringExFlags
(
str
,
p
,
s
,
NULL
,
-
1
);
}
#undef Py_CompileStringFlags
Py
API_FUNC
(
PyObject
*
)
Py
Object
*
Py_CompileStringFlags
(
const
char
*
str
,
const
char
*
p
,
int
s
,
PyCompilerFlags
*
flags
)
{
...
...
@@ -1593,14 +1593,14 @@ Py_CompileStringFlags(const char *str, const char *p, int s,
}
#undef PyRun_InteractiveOne
PyAPI_FUNC
(
int
)
int
PyRun_InteractiveOne
(
FILE
*
f
,
const
char
*
p
)
{
return
PyRun_InteractiveOneFlags
(
f
,
p
,
NULL
);
}
#undef PyRun_InteractiveLoop
PyAPI_FUNC
(
int
)
int
PyRun_InteractiveLoop
(
FILE
*
f
,
const
char
*
p
)
{
return
PyRun_InteractiveLoopFlags
(
f
,
p
,
NULL
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment