Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4510e6d

Browse files
committed
mark dtrace stubs as static inline; remove stubs
C99 inline semantics don't work everywhere. (https://bugs.python.org/issue28092) We don't want these to have external visibility anyway.
1 parent a836362 commit 4510e6d

5 files changed

Lines changed: 19 additions & 48 deletions

File tree

Include/pydtrace.h

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,25 @@ extern "C" {
2525

2626
/* Without DTrace, compile to nothing. */
2727

28-
inline void PyDTrace_LINE(const char *arg0, const char *arg1, int arg2) {}
29-
inline void PyDTrace_FUNCTION_ENTRY(const char *arg0, const char *arg1, int arg2) {}
30-
inline void PyDTrace_FUNCTION_RETURN(const char *arg0, const char *arg1, int arg2) {}
31-
inline void PyDTrace_GC_START(int arg0) {}
32-
inline void PyDTrace_GC_DONE(int arg0) {}
33-
inline void PyDTrace_INSTANCE_NEW_START(int arg0) {}
34-
inline void PyDTrace_INSTANCE_NEW_DONE(int arg0) {}
35-
inline void PyDTrace_INSTANCE_DELETE_START(int arg0) {}
36-
inline void PyDTrace_INSTANCE_DELETE_DONE(int arg0) {}
37-
38-
inline int PyDTrace_LINE_ENABLED(void) { return 0; }
39-
inline int PyDTrace_FUNCTION_ENTRY_ENABLED(void) { return 0; }
40-
inline int PyDTrace_FUNCTION_RETURN_ENABLED(void) { return 0; }
41-
inline int PyDTrace_GC_START_ENABLED(void) { return 0; }
42-
inline int PyDTrace_GC_DONE_ENABLED(void) { return 0; }
43-
inline int PyDTrace_INSTANCE_NEW_START_ENABLED(void) { return 0; }
44-
inline int PyDTrace_INSTANCE_NEW_DONE_ENABLED(void) { return 0; }
45-
inline int PyDTrace_INSTANCE_DELETE_START_ENABLED(void) { return 0; }
46-
inline int PyDTrace_INSTANCE_DELETE_DONE_ENABLED(void) { return 0; }
28+
static inline void PyDTrace_LINE(const char *arg0, const char *arg1, int arg2) {}
29+
static inline void PyDTrace_FUNCTION_ENTRY(const char *arg0, const char *arg1, int arg2) {}
30+
static inline void PyDTrace_FUNCTION_RETURN(const char *arg0, const char *arg1, int arg2) {}
31+
static inline void PyDTrace_GC_START(int arg0) {}
32+
static inline void PyDTrace_GC_DONE(int arg0) {}
33+
static inline void PyDTrace_INSTANCE_NEW_START(int arg0) {}
34+
static inline void PyDTrace_INSTANCE_NEW_DONE(int arg0) {}
35+
static inline void PyDTrace_INSTANCE_DELETE_START(int arg0) {}
36+
static inline void PyDTrace_INSTANCE_DELETE_DONE(int arg0) {}
37+
38+
static inline int PyDTrace_LINE_ENABLED(void) { return 0; }
39+
static inline int PyDTrace_FUNCTION_ENTRY_ENABLED(void) { return 0; }
40+
static inline int PyDTrace_FUNCTION_RETURN_ENABLED(void) { return 0; }
41+
static inline int PyDTrace_GC_START_ENABLED(void) { return 0; }
42+
static inline int PyDTrace_GC_DONE_ENABLED(void) { return 0; }
43+
static inline int PyDTrace_INSTANCE_NEW_START_ENABLED(void) { return 0; }
44+
static inline int PyDTrace_INSTANCE_NEW_DONE_ENABLED(void) { return 0; }
45+
static inline int PyDTrace_INSTANCE_DELETE_START_ENABLED(void) { return 0; }
46+
static inline int PyDTrace_INSTANCE_DELETE_DONE_ENABLED(void) { return 0; }
4747

4848
#endif /* !WITH_DTRACE */
4949

Makefile.pre.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,6 @@ PYTHON_OBJS= \
355355
Python/compile.o \
356356
Python/codecs.o \
357357
Python/dynamic_annotations.o \
358-
Python/dtrace_stubs.o \
359358
Python/errors.o \
360359
Python/frozenmain.o \
361360
Python/future.o \

PCbuild/pythoncore.vcxproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,6 @@
356356
<ClCompile Include="..\Python\ceval.c" />
357357
<ClCompile Include="..\Python\codecs.c" />
358358
<ClCompile Include="..\Python\compile.c" />
359-
<ClCompile Include="..\Python\dtrace_stubs.c" />
360359
<ClCompile Include="..\Python\dynamic_annotations.c" />
361360
<ClCompile Include="..\Python\dynload_win.c" />
362361
<ClCompile Include="..\Python\errors.c" />

PCbuild/pythoncore.vcxproj.filters

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -851,9 +851,6 @@
851851
<ClCompile Include="..\Python\compile.c">
852852
<Filter>Python</Filter>
853853
</ClCompile>
854-
<ClCompile Include="..\Python\dtrace_stubs.c">
855-
<Filter>Python</Filter>
856-
</ClCompile>
857854
<ClCompile Include="..\Python\dynamic_annotations.c">
858855
<Filter>Python</Filter>
859856
</ClCompile>

Python/dtrace_stubs.c

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)