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
Gwenaël Samain
cython
Commits
29c8e54e
Commit
29c8e54e
authored
Apr 21, 2010
by
Lisandro Dalcin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PyrexTypes: simplify CIntType, add CReturnCodeType
parent
406674e1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+6
-3
No files found.
Cython/Compiler/PyrexTypes.py
View file @
29c8e54e
...
@@ -796,9 +796,8 @@ class CIntType(CNumericType):
...
@@ -796,9 +796,8 @@ class CIntType(CNumericType):
from_py_function
=
None
from_py_function
=
None
exception_value
=
-
1
exception_value
=
-
1
def
__init__
(
self
,
rank
,
signed
,
is_returncode
=
0
):
def
__init__
(
self
,
rank
,
signed
):
CNumericType
.
__init__
(
self
,
rank
,
signed
)
CNumericType
.
__init__
(
self
,
rank
,
signed
)
self
.
is_returncode
=
is_returncode
if
self
.
to_py_function
is
None
:
if
self
.
to_py_function
is
None
:
self
.
to_py_function
=
self
.
get_to_py_type_conversion
()
self
.
to_py_function
=
self
.
get_to_py_type_conversion
()
if
self
.
from_py_function
is
None
:
if
self
.
from_py_function
is
None
:
...
@@ -862,6 +861,10 @@ class CAnonEnumType(CIntType):
...
@@ -862,6 +861,10 @@ class CAnonEnumType(CIntType):
def
sign_and_name
(
self
):
def
sign_and_name
(
self
):
return
'int'
return
'int'
class
CReturnCodeType
(
CIntType
):
is_returncode
=
1
class
CPyUnicodeIntType
(
CIntType
):
class
CPyUnicodeIntType
(
CIntType
):
# Py_UNICODE
# Py_UNICODE
...
@@ -2147,7 +2150,7 @@ c_int_ptr_type = CPtrType(c_int_type)
...
@@ -2147,7 +2150,7 @@ c_int_ptr_type = CPtrType(c_int_type)
c_py_ssize_t_ptr_type
=
CPtrType
(
c_py_ssize_t_type
)
c_py_ssize_t_ptr_type
=
CPtrType
(
c_py_ssize_t_type
)
c_size_t_ptr_type
=
CPtrType
(
c_size_t_type
)
c_size_t_ptr_type
=
CPtrType
(
c_size_t_type
)
c_returncode_type
=
C
IntType
(
3
,
1
,
is_returncode
=
1
)
c_returncode_type
=
C
ReturnCodeType
(
3
,
1
)
c_anon_enum_type
=
CAnonEnumType
(
-
1
,
1
)
c_anon_enum_type
=
CAnonEnumType
(
-
1
,
1
)
# the Py_buffer type is defined in Builtin.py
# the Py_buffer type is defined in Builtin.py
...
...
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