Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
7784f12d
Commit
7784f12d
authored
May 26, 2006
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace Py_BuildValue("OO") by PyTuple_Pack.
parent
07bbfc6a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
Modules/_ctypes/_ctypes.c
Modules/_ctypes/_ctypes.c
+1
-1
Python/ast.c
Python/ast.c
+1
-1
Python/compile.c
Python/compile.c
+3
-3
No files found.
Modules/_ctypes/_ctypes.c
View file @
7784f12d
...
...
@@ -2185,7 +2185,7 @@ _CData_set(CDataObject *dst, PyObject *type, SETFUNC setfunc, PyObject *value,
only it's object list. So we create a tuple, containing
b_objects list PLUS the array itself, and return that!
*/
return
Py
_BuildValue
(
"(OO)"
,
keep
,
value
);
return
Py
Tuple_Pack
(
2
,
keep
,
value
);
}
PyErr_Format
(
PyExc_TypeError
,
"incompatible types, %s instance instead of %s instance"
,
...
...
Python/ast.c
View file @
7784f12d
...
...
@@ -107,7 +107,7 @@ ast_error_finish(const char *filename)
Py_DECREF
(
errstr
);
return
;
}
value
=
Py
_BuildValue
(
"(OO)"
,
errstr
,
tmp
);
value
=
Py
Tuple_Pack
(
2
,
errstr
,
tmp
);
Py_DECREF
(
errstr
);
Py_DECREF
(
tmp
);
if
(
!
value
)
...
...
Python/compile.c
View file @
7784f12d
...
...
@@ -334,7 +334,7 @@ list2dict(PyObject *list)
return
NULL
;
}
k
=
PyList_GET_ITEM
(
list
,
i
);
k
=
Py
_BuildValue
(
"(OO)"
,
k
,
k
->
ob_type
);
k
=
Py
Tuple_Pack
(
2
,
k
,
k
->
ob_type
);
if
(
k
==
NULL
||
PyDict_SetItem
(
dict
,
k
,
v
)
<
0
)
{
Py_XDECREF
(
k
);
Py_DECREF
(
v
);
...
...
@@ -377,7 +377,7 @@ dictbytype(PyObject *src, int scope_type, int flag, int offset)
return
NULL
;
}
i
++
;
tuple
=
Py
_BuildValue
(
"(OO)"
,
k
,
k
->
ob_type
);
tuple
=
Py
Tuple_Pack
(
2
,
k
,
k
->
ob_type
);
if
(
!
tuple
||
PyDict_SetItem
(
dest
,
tuple
,
item
)
<
0
)
{
Py_DECREF
(
item
);
Py_DECREF
(
dest
);
...
...
@@ -1841,7 +1841,7 @@ static int
compiler_lookup_arg
(
PyObject
*
dict
,
PyObject
*
name
)
{
PyObject
*
k
,
*
v
;
k
=
Py
_BuildValue
(
"(OO)"
,
name
,
name
->
ob_type
);
k
=
Py
Tuple_Pack
(
2
,
name
,
name
->
ob_type
);
if
(
k
==
NULL
)
return
-
1
;
v
=
PyDict_GetItem
(
dict
,
k
);
...
...
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