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
387c5032
Commit
387c5032
authored
Aug 21, 2018
by
scoder
Committed by
GitHub
Aug 21, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2553 from gabrieldemarmiesse/line_lenght
Set the maximum line length to 150.
parents
ba9ecff9
529dfc13
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
6 deletions
+11
-6
Cython/Compiler/Code.py
Cython/Compiler/Code.py
+2
-1
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+2
-1
Cython/Compiler/Symtab.py
Cython/Compiler/Symtab.py
+3
-1
tests/run/pure_py.py
tests/run/pure_py.py
+2
-1
tox.ini
tox.ini
+2
-2
No files found.
Cython/Compiler/Code.py
View file @
387c5032
...
...
@@ -2297,7 +2297,8 @@ class CCodeWriter(object):
# error handling
def
put_error_if_neg
(
self
,
pos
,
value
):
# return self.putln("if (unlikely(%s < 0)) %s" % (value, self.error_goto(pos))) # TODO this path is almost _never_ taken, yet this macro makes is slower!
# TODO this path is almost _never_ taken, yet this macro makes is slower!
# return self.putln("if (unlikely(%s < 0)) %s" % (value, self.error_goto(pos)))
return
self
.
putln
(
"if (%s < 0) %s"
%
(
value
,
self
.
error_goto
(
pos
)))
def
put_error_if_unbound
(
self
,
pos
,
entry
,
in_nogil_context
=
False
):
...
...
Cython/Compiler/ExprNodes.py
View file @
387c5032
...
...
@@ -5818,7 +5818,8 @@ class SimpleCallNode(CallNode):
and
self
.
type
.
is_int
and
self
.
type
.
signed
and
self
.
function
.
result
()
in
(
'abs'
,
'labs'
,
'__Pyx_abs_longlong'
)):
goto_error
=
'if (unlikely(%s < 0)) { PyErr_SetString(PyExc_OverflowError, "value too large"); %s; }'
%
(
self
.
result
(),
code
.
error_goto
(
self
.
pos
))
goto_error
=
'if (unlikely(%s < 0)) { PyErr_SetString(PyExc_OverflowError, "value too large"); %s; }'
%
(
self
.
result
(),
code
.
error_goto
(
self
.
pos
))
elif
exc_checks
:
goto_error
=
code
.
error_goto_if
(
" && "
.
join
(
exc_checks
),
self
.
pos
)
else
:
...
...
Cython/Compiler/Symtab.py
View file @
387c5032
...
...
@@ -2237,7 +2237,9 @@ class CClassScope(ClassScope):
# TODO(robertwb): Make this an error.
warning
(
pos
,
"Compatible but non-identical C method '%s' not redeclared "
"in definition part of extension type '%s'. This may cause incorrect vtables to be generated."
%
(
name
,
self
.
class_name
),
2
)
"in definition part of extension type '%s'. "
"This may cause incorrect vtables to be generated."
%
(
name
,
self
.
class_name
),
2
)
warning
(
entry
.
pos
,
"Previous declaration is here"
,
2
)
entry
=
self
.
add_cfunction
(
name
,
type
,
pos
,
cname
,
visibility
=
'ignore'
,
modifiers
=
modifiers
)
else
:
...
...
tests/run/pure_py.py
View file @
387c5032
...
...
@@ -20,7 +20,8 @@ def test_sizeof():
"""
x
=
cython
.
declare
(
cython
.
bint
)
print
(
cython
.
sizeof
(
x
)
==
cython
.
sizeof
(
cython
.
bint
))
print
(
cython
.
sizeof
(
cython
.
char
)
<=
cython
.
sizeof
(
cython
.
short
)
<=
cython
.
sizeof
(
cython
.
int
)
<=
cython
.
sizeof
(
cython
.
long
)
<=
cython
.
sizeof
(
cython
.
longlong
))
sizeof
=
cython
.
sizeof
print
(
sizeof
(
cython
.
char
)
<=
sizeof
(
cython
.
short
)
<=
sizeof
(
cython
.
int
)
<=
sizeof
(
cython
.
long
)
<=
sizeof
(
cython
.
longlong
))
print
(
cython
.
sizeof
(
cython
.
uint
)
==
cython
.
sizeof
(
cython
.
int
))
print
(
cython
.
sizeof
(
cython
.
p_int
)
==
cython
.
sizeof
(
cython
.
p_double
))
if
cython
.
compiled
:
...
...
tox.ini
View file @
387c5032
...
...
@@ -13,6 +13,6 @@ commands =
[pycodestyle]
ignore
=
W, E
select
=
E711, E714
max-line-length
=
30
0
select
=
E711, E714
, E501
max-line-length
=
15
0
format
=
pylint
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