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
6a587681
Commit
6a587681
authored
Mar 09, 2009
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
09556243
fe9f7400
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
101 additions
and
1 deletion
+101
-1
MANIFEST.in
MANIFEST.in
+1
-1
tests/bugs/char_constants_T99.pyx
tests/bugs/char_constants_T99.pyx
+24
-0
tests/bugs/class_attribute_init_values_T18.pyx
tests/bugs/class_attribute_init_values_T18.pyx
+55
-0
tests/bugs/missing_self_in_cpdef_method_T156.pyx
tests/bugs/missing_self_in_cpdef_method_T156.pyx
+5
-0
tests/bugs/missing_self_in_cpdef_method_T165.pyx
tests/bugs/missing_self_in_cpdef_method_T165.pyx
+5
-0
tests/run/specialfloat.pyx
tests/run/specialfloat.pyx
+11
-0
No files found.
MANIFEST.in
View file @
6a587681
...
...
@@ -6,7 +6,7 @@ include setup.py
include bin/cython
include cython.py
include Cython/Compiler/Lexicon.pickle
include Cython/Includes/
*.pxd
recursive-include Cython *.pyx
*.pxd
include Doc/*
include Demos/*.pyx
...
...
tests/bugs/char_constants_T99.pyx
0 → 100644
View file @
6a587681
__doc__
=
u"""
>>> global_c_and_s()
99
abcdef
>>> local_c_and_s()
98
bcdefg
"""
cdef
char
c
=
'c'
cdef
char
*
s
=
'abcdef'
def
global_c_and_s
():
pys
=
s
print
c
print
pys
.
decode
(
'ASCII'
)
def
local_c_and_s
():
cdef
char
c
=
'b'
cdef
char
*
s
=
'bcdefg'
pys
=
s
print
c
print
pys
.
decode
(
'ASCII'
)
tests/bugs/class_attribute_init_values_T18.pyx
0 → 100644
View file @
6a587681
__doc__
=
u"""
>>> f = PyFoo()
>>> print(f.bar)
5
>>> print(f.baz)
someval
>>> f = MyPyFoo()
>>> print(f.bar)
7
>>> print(f.baz)
anotherval
>>> f = CyFoo()
>>> print(f.bar)
5
>>> print(f.baz)
anotherval
>>> f = MyCyFoo()
>>> print(f.bar)
7
>>> print(f.baz)
anotherval
>>> f = AnotherFoo()
>>> print(f.bar)
8
>>> print(f.baz)
yetanotherval
"""
# this works:
class
PyFoo
(
object
):
bar
=
5
baz
=
u"someval"
class
MyPyFoo
(
PyFoo
):
bar
=
7
baz
=
u"anotherval"
# this doesn't:
cdef
class
CyFoo
:
cdef
public
int
bar
=
5
cdef
public
object
baz
=
u"someval"
cdef
class
MyCyFoo
(
CyFoo
):
cdef
public
int
bar
=
7
cdef
public
object
baz
=
u"anotherval"
class
AnotherFoo
(
CyFoo
):
bar
=
8
baz
=
u"yetanotherval"
tests/bugs/missing_self_in_cpdef_method_T156.pyx
0 → 100644
View file @
6a587681
cdef
class
B
:
cpdef
b
():
pass
tests/bugs/missing_self_in_cpdef_method_T165.pyx
0 → 100644
View file @
6a587681
cdef
class
A
:
cpdef
a
(
int
not_self
):
pass
tests/run/specialfloat.pyx
View file @
6a587681
...
...
@@ -44,6 +44,11 @@ __doc__ = u"""
-inf
>>> float_infn == float('-inf')
True
>>> global_floats()[1:] == (float('+inf'), float('-inf'))
True
>>> global_floats()[0]
nan
"""
DEF
FLOAT
=
12.5
...
...
@@ -51,6 +56,10 @@ DEF FLOAT_NAN = float('nan')
DEF
FLOAT_INFP
=
float
(
'+inf'
)
DEF
FLOAT_INFN
=
float
(
'-inf'
)
cdef
double
cdef
_float_nan
=
float
(
'nan'
)
cdef
double
cdef
_float_infp
=
float
(
'+inf'
)
cdef
double
cdef
_float_infn
=
float
(
'-inf'
)
float_nan
=
FLOAT_NAN
float_infp
=
FLOAT_INFP
float_infn
=
FLOAT_INFN
...
...
@@ -105,3 +114,5 @@ def infn3():
f
=
FLOAT_INFN
return
f
def
global_floats
():
return
(
cdef
_float_nan
,
cdef
_float_infp
,
cdef
_float_infn
)
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