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
d6c61a46
Commit
d6c61a46
authored
Oct 24, 2007
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup builtin function code
parent
7c2bddc1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
17 deletions
+7
-17
Cython/Compiler/Builtin.py
Cython/Compiler/Builtin.py
+3
-3
Cython/Compiler/Symtab.py
Cython/Compiler/Symtab.py
+0
-13
Cython/Compiler/TypeSlots.py
Cython/Compiler/TypeSlots.py
+4
-1
No files found.
Cython/Compiler/Builtin.py
View file @
d6c61a46
...
@@ -19,14 +19,14 @@ builtin_function_table = [
...
@@ -19,14 +19,14 @@ builtin_function_table = [
#('filter', "", "", ""),
#('filter', "", "", ""),
(
'getattr'
,
"OO"
,
"O"
,
"PyObject_GetAttr"
),
(
'getattr'
,
"OO"
,
"O"
,
"PyObject_GetAttr"
),
(
'getattr3'
,
"OOO"
,
"O"
,
"__Pyx_GetAttr3"
,
"getattr"
),
(
'getattr3'
,
"OOO"
,
"O"
,
"__Pyx_GetAttr3"
,
"getattr"
),
(
'hasattr'
,
"OO"
,
"
i
"
,
"PyObject_HasAttr"
),
(
'hasattr'
,
"OO"
,
"
b
"
,
"PyObject_HasAttr"
),
(
'hash'
,
"O"
,
"i"
,
"PyObject_Hash"
),
(
'hash'
,
"O"
,
"i"
,
"PyObject_Hash"
),
#('hex', "", "", ""),
#('hex', "", "", ""),
#('id', "", "", ""),
#('id', "", "", ""),
#('input', "", "", ""),
#('input', "", "", ""),
(
'intern'
,
"s"
,
"O"
,
"PyString_InternFromString"
),
(
'intern'
,
"s"
,
"O"
,
"PyString_InternFromString"
),
(
'isinstance'
,
"OO"
,
"
i
"
,
"PyObject_IsInstance"
),
(
'isinstance'
,
"OO"
,
"
b
"
,
"PyObject_IsInstance"
),
(
'issubclass'
,
"OO"
,
"
i
"
,
"PyObject_IsSubclass"
),
(
'issubclass'
,
"OO"
,
"
b
"
,
"PyObject_IsSubclass"
),
(
'iter'
,
"O"
,
"O"
,
"PyObject_GetIter"
),
(
'iter'
,
"O"
,
"O"
,
"PyObject_GetIter"
),
(
'len'
,
"O"
,
"Z"
,
"PyObject_Length"
),
(
'len'
,
"O"
,
"Z"
,
"PyObject_Length"
),
#('map', "", "", ""),
#('map', "", "", ""),
...
...
Cython/Compiler/Symtab.py
View file @
d6c61a46
...
@@ -606,20 +606,7 @@ class BuiltinScope(Scope):
...
@@ -606,20 +606,7 @@ class BuiltinScope(Scope):
"unicode"
:
[
"PyObject_Unicode"
,
py_object_type
,
(
py_object_type
,
),
0
],
"unicode"
:
[
"PyObject_Unicode"
,
py_object_type
,
(
py_object_type
,
),
0
],
"type"
:
[
"PyObject_Type"
,
py_object_type
,
(
py_object_type
,
),
0
],
"type"
:
[
"PyObject_Type"
,
py_object_type
,
(
py_object_type
,
),
0
],
"hasattr"
:
[
"PyObject_HasAttr"
,
c_bint_type
,
(
py_object_type
,
py_object_type
)],
"setattr"
:
[
"PyObject_SetAttr"
,
c_int_type
,
(
py_object_type
,
py_object_type
,
py_object_type
),
-
1
],
"repr"
:
[
"PyObject_Repr"
,
py_object_type
,
(
py_object_type
,
),
0
],
# "str": ["PyObject_Str", py_object_type, (py_object_type, ), 0],
# "str": ["PyObject_Str", py_object_type, (py_object_type, ), 0],
"isinstance"
:
[
"PyObject_IsInstance"
,
c_bint_type
,
(
py_object_type
,
py_object_type
),
-
1
],
"issubclass"
:
[
"PyObject_IsSubclass"
,
c_bint_type
,
(
py_object_type
,
py_object_type
),
-
1
],
"hash"
:
[
"PyObject_Hash"
,
c_long_type
,
(
py_object_type
,
),
-
1
,
True
],
"len"
:
[
"PyObject_Size"
,
c_py_ssize_t_type
,
(
py_object_type
,
),
-
1
],
"dir"
:
[
"PyObject_Dir"
,
py_object_type
,
(
py_object_type
,
),
0
],
"iter"
:
[
"PyObject_GetIter"
,
py_object_type
,
(
py_object_type
,
),
0
],
"abs"
:
[
"PyNumber_Absolute"
,
py_object_type
,
(
py_object_type
,
),
0
],
"divmod"
:
[
"PyNumber_Divmod"
,
py_object_type
,
(
py_object_type
,
py_object_type
),
0
],
"pow"
:
[
"PyNumber_Power"
,
py_object_type
,
(
py_object_type
,
py_object_type
,
py_object_type
),
0
],
# "int": ["PyNumber_Int", py_object_type, (py_object_type, ), 0],
# "int": ["PyNumber_Int", py_object_type, (py_object_type, ), 0],
# "long": ["PyNumber_Long", py_object_type, (py_object_type, ), 0],
# "long": ["PyNumber_Long", py_object_type, (py_object_type, ), 0],
# "float": ["PyNumber_Float", py_object_type, (py_object_type, ), 0],
# "float": ["PyNumber_Float", py_object_type, (py_object_type, ), 0],
...
...
Cython/Compiler/TypeSlots.py
View file @
d6c61a46
...
@@ -42,6 +42,7 @@ class Signature:
...
@@ -42,6 +42,7 @@ class Signature:
'p'
:
PyrexTypes
.
c_void_ptr_type
,
'p'
:
PyrexTypes
.
c_void_ptr_type
,
'P'
:
PyrexTypes
.
c_void_ptr_ptr_type
,
'P'
:
PyrexTypes
.
c_void_ptr_ptr_type
,
'i'
:
PyrexTypes
.
c_int_type
,
'i'
:
PyrexTypes
.
c_int_type
,
'b'
:
PyrexTypes
.
c_bint_type
,
'I'
:
PyrexTypes
.
c_int_ptr_type
,
'I'
:
PyrexTypes
.
c_int_ptr_type
,
'l'
:
PyrexTypes
.
c_long_type
,
'l'
:
PyrexTypes
.
c_long_type
,
'Z'
:
PyrexTypes
.
c_py_ssize_t_type
,
'Z'
:
PyrexTypes
.
c_py_ssize_t_type
,
...
@@ -53,10 +54,12 @@ class Signature:
...
@@ -53,10 +54,12 @@ class Signature:
}
}
error_value_map
=
{
error_value_map
=
{
'O'
:
"
0
"
,
'O'
:
"
NULL
"
,
'i'
:
"-1"
,
'i'
:
"-1"
,
'b'
:
"-1"
,
'l'
:
"-1"
,
'l'
:
"-1"
,
'r'
:
"-1"
,
'r'
:
"-1"
,
'Z'
:
"-1"
,
}
}
def
__init__
(
self
,
arg_format
,
ret_format
):
def
__init__
(
self
,
arg_format
,
ret_format
):
...
...
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