Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
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
Boxiang Sun
Pyston
Commits
c6788275
Commit
c6788275
authored
May 20, 2015
by
Marius Wachtler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PySequence_DelItem, support for 'L' and 'K' inside do_mkvalue, PyNumber_Long(int)
parent
f6a8e880
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
3 deletions
+19
-3
src/capi/abstract.cpp
src/capi/abstract.cpp
+3
-0
src/capi/modsupport.cpp
src/capi/modsupport.cpp
+7
-0
src/runtime/capi.cpp
src/runtime/capi.cpp
+8
-2
src/runtime/objmodel.cpp
src/runtime/objmodel.cpp
+1
-1
No files found.
src/capi/abstract.cpp
View file @
c6788275
...
...
@@ -1879,6 +1879,9 @@ extern "C" PyObject* PyNumber_Long(PyObject* o) noexcept {
if
(
o
->
cls
==
float_cls
)
return
PyLong_FromDouble
(
PyFloat_AsDouble
(
o
));
if
(
o
->
cls
==
int_cls
)
return
PyLong_FromLong
(((
BoxedInt
*
)
o
)
->
n
);
fatalOrError
(
PyExc_NotImplementedError
,
"unimplemented"
);
return
nullptr
;
}
...
...
src/capi/modsupport.cpp
View file @
c6788275
...
...
@@ -184,6 +184,13 @@ static PyObject* do_mkvalue(const char** p_format, va_list* p_va, int flags) noe
}
return
v
;
}
#ifdef HAVE_LONG_LONG
case
'L'
:
return
PyLong_FromLongLong
((
PY_LONG_LONG
)
va_arg
(
*
p_va
,
PY_LONG_LONG
));
case
'K'
:
return
PyLong_FromUnsignedLongLong
((
PY_LONG_LONG
)
va_arg
(
*
p_va
,
unsigned
PY_LONG_LONG
));
#endif
#ifdef Py_USING_UNICODE
case
'u'
:
{
PyObject
*
v
;
...
...
src/runtime/capi.cpp
View file @
c6788275
...
...
@@ -461,8 +461,14 @@ extern "C" int PySequence_SetItem(PyObject* o, Py_ssize_t i, PyObject* v) noexce
}
extern
"C"
int
PySequence_DelItem
(
PyObject
*
o
,
Py_ssize_t
i
)
noexcept
{
fatalOrError
(
PyExc_NotImplementedError
,
"unimplemented"
);
return
-
1
;
try
{
// Not sure if this is really the same:
delitem
(
o
,
boxInt
(
i
));
return
0
;
}
catch
(
ExcInfo
e
)
{
setCAPIException
(
e
);
return
-
1
;
}
}
extern
"C"
int
PySequence_SetSlice
(
PyObject
*
o
,
Py_ssize_t
i1
,
Py_ssize_t
i2
,
PyObject
*
v
)
noexcept
{
...
...
src/runtime/objmodel.cpp
View file @
c6788275
...
...
@@ -4165,7 +4165,7 @@ Box* typeNew(Box* _cls, Box* arg1, Box* arg2, Box** _args) {
return
rtn
;
}
RELEASE_ASSERT
(
arg3
->
cls
==
dict_cls
,
"%s"
,
getTypeName
(
arg3
));
RELEASE_ASSERT
(
PyDict_Check
(
arg3
)
,
"%s"
,
getTypeName
(
arg3
));
BoxedDict
*
attr_dict
=
static_cast
<
BoxedDict
*>
(
arg3
);
RELEASE_ASSERT
(
arg2
->
cls
==
tuple_cls
,
""
);
...
...
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