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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
54693f22
Commit
54693f22
authored
Feb 22, 2015
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix compilation in pypy3 when special methods are inherited that are no longer available in Py3
parent
1862ddfe
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
Cython/Compiler/TypeSlots.py
Cython/Compiler/TypeSlots.py
+9
-5
No files found.
Cython/Compiler/TypeSlots.py
View file @
54693f22
...
@@ -194,6 +194,10 @@ class SlotDescriptor(object):
...
@@ -194,6 +194,10 @@ class SlotDescriptor(object):
return
guard
return
guard
def
generate
(
self
,
scope
,
code
):
def
generate
(
self
,
scope
,
code
):
preprocessor_guard
=
self
.
preprocessor_guard_code
()
if
preprocessor_guard
:
code
.
putln
(
preprocessor_guard
)
end_pypy_guard
=
False
end_pypy_guard
=
False
if
self
.
is_initialised_dynamically
:
if
self
.
is_initialised_dynamically
:
value
=
"0"
value
=
"0"
...
@@ -217,17 +221,17 @@ class SlotDescriptor(object):
...
@@ -217,17 +221,17 @@ class SlotDescriptor(object):
code
.
putln
(
"%s, /*%s*/"
%
(
inherited_value
,
self
.
slot_name
))
code
.
putln
(
"%s, /*%s*/"
%
(
inherited_value
,
self
.
slot_name
))
code
.
putln
(
"#else"
)
code
.
putln
(
"#else"
)
end_pypy_guard
=
True
end_pypy_guard
=
True
preprocessor_guard
=
self
.
preprocessor_guard_code
()
if
preprocessor_guard
:
code
.
putln
(
preprocessor_guard
)
code
.
putln
(
"%s, /*%s*/"
%
(
value
,
self
.
slot_name
))
code
.
putln
(
"%s, /*%s*/"
%
(
value
,
self
.
slot_name
))
if
end_pypy_guard
:
code
.
putln
(
"#endif"
)
if
self
.
py3
==
'<RESERVED>'
:
if
self
.
py3
==
'<RESERVED>'
:
code
.
putln
(
"#else"
)
code
.
putln
(
"#else"
)
code
.
putln
(
"0, /*reserved*/"
)
code
.
putln
(
"0, /*reserved*/"
)
if
preprocessor_guard
:
if
preprocessor_guard
:
code
.
putln
(
"#endif"
)
code
.
putln
(
"#endif"
)
if
end_pypy_guard
:
code
.
putln
(
"#endif"
)
# Some C implementations have trouble statically
# Some C implementations have trouble statically
# initialising a global with a pointer to an extern
# initialising a global with a pointer to an extern
...
...
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