Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
fcfd16c7
Commit
fcfd16c7
authored
Aug 16, 2020
by
Ashwin Srinath
Committed by
GitHub
Aug 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Python 3.4 + MSVC issue with elaborated type specifier for enum (GH-3782)
parent
fb02b15d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
1 deletion
+16
-1
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+1
-1
Cython/Compiler/Symtab.py
Cython/Compiler/Symtab.py
+3
-0
Cython/Utility/CppSupport.cpp
Cython/Utility/CppSupport.cpp
+12
-0
No files found.
Cython/Compiler/PyrexTypes.py
View file @
fcfd16c7
...
...
@@ -4049,7 +4049,7 @@ class CppScopedEnumType(CType):
self
.
cname
)
else
:
type_name
=
"
enum
%s"
%
self
.
cname
type_name
=
"
__PYX_ENUM_CLASS_DECL
%s"
%
self
.
cname
type_name
=
public_decl
(
type_name
,
dll_linkage
)
return
self
.
base_declaration_code
(
type_name
,
entity_code
)
...
...
Cython/Compiler/Symtab.py
View file @
fcfd16c7
...
...
@@ -701,6 +701,9 @@ class Scope(object):
type
=
PyrexTypes
.
c_anon_enum_type
entry
=
self
.
declare_type
(
name
,
type
,
pos
,
cname
=
cname
,
visibility
=
visibility
,
api
=
api
)
if
scoped
:
entry
.
utility_code
=
Code
.
UtilityCode
.
load_cached
(
"EnumClassDecl"
,
"CppSupport.cpp"
)
self
.
use_entry_utility_code
(
entry
)
entry
.
create_wrapper
=
create_wrapper
entry
.
enum_values
=
[]
...
...
Cython/Utility/CppSupport.cpp
View file @
fcfd16c7
...
...
@@ -67,3 +67,15 @@ auto __Pyx_pythran_to_python(T &&value) -> decltype(to_python(
#else
#define __PYX_STD_MOVE_IF_SUPPORTED(x) x
#endif
////////////// EnumClassDecl.proto //////////////////
#if defined (_MSC_VER)
#if PY_VERSION_HEX >= 0x03040000 && PY_VERSION_HEX < 0x03050000
#define __PYX_ENUM_CLASS_DECL
#else
#define __PYX_ENUM_CLASS_DECL enum
#endif
#else
#define __PYX_ENUM_CLASS_DECL enum
#endif
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