Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
apply victor's comment
  • Loading branch information
shihai1991 committed Mar 19, 2021
commit c05f16fd65815d6c0665c6bd981c12269bdb13b7
2 changes: 2 additions & 0 deletions Include/compile.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ extern "C" {
#endif

#ifndef Py_LIMITED_API
# define Py_CPYTHON_COMPILE_H
# include "cpython/compile.h"
Comment thread
shihai1991 marked this conversation as resolved.
Outdated
# undef Py_CPYTHON_COMPILE_H
#endif
Comment thread
shihai1991 marked this conversation as resolved.
Outdated

#ifdef __cplusplus
Expand Down
16 changes: 1 addition & 15 deletions Include/cpython/compile.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
#ifndef Py_CPYTHON_COMPILE_H
#define Py_CPYTHON_COMPILE_H

#ifndef Py_LIMITED_API

#ifdef __cplusplus
extern "C" {
# error "this header file must not be included directly"
#endif
Comment thread
shihai1991 marked this conversation as resolved.

/* Public interface */
Expand All @@ -26,15 +21,13 @@ extern "C" {
#define PyCF_COMPILE_MASK (PyCF_ONLY_AST | PyCF_ALLOW_TOP_LEVEL_AWAIT | \
PyCF_TYPE_COMMENTS | PyCF_DONT_IMPLY_DEDENT)

#ifndef Py_LIMITED_API
typedef struct {
int cf_flags; /* bitmask of CO_xxx flags relevant to future */
int cf_feature_version; /* minor Python version (PyCF_ONLY_AST) */
} PyCompilerFlags;

#define _PyCompilerFlags_INIT \
(PyCompilerFlags){.cf_flags = 0, .cf_feature_version = PY_MINOR_VERSION}
#endif

/* Future feature support */

Expand Down Expand Up @@ -90,10 +83,3 @@ typedef struct {
} _PyASTOptimizeState;

PyAPI_FUNC(int) _PyAST_Optimize(struct _mod *, PyArena *arena, _PyASTOptimizeState *state);

#ifdef __cplusplus
}
#endif

#endif /* !Py_LIMITED_API */
#endif /* !Py_CPYTHON_COMPILE_H */

This file was deleted.