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
2c9e575d
Commit
2c9e575d
authored
Oct 25, 2016
by
Boxiang Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[WIP]Oct 25 fixing
parent
919582f2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
10 deletions
+15
-10
src/runtime/classobj.cpp
src/runtime/classobj.cpp
+2
-2
src/runtime/objmodel.cpp
src/runtime/objmodel.cpp
+4
-0
src/runtime/super.cpp
src/runtime/super.cpp
+3
-2
test/integration/zope_test.py
test/integration/zope_test.py
+5
-5
test/tests/none_not_settable.py
test/tests/none_not_settable.py
+1
-1
No files found.
src/runtime/classobj.cpp
View file @
2c9e575d
...
@@ -374,8 +374,8 @@ static Box* instanceGetattributeSimple(BoxedInstance* inst, BoxedString* attr_st
...
@@ -374,8 +374,8 @@ static Box* instanceGetattributeSimple(BoxedInstance* inst, BoxedString* attr_st
Box
*
r
=
inst
->
getattr
<
rewritable
>
(
attr_str
,
rewrite_args
);
Box
*
r
=
inst
->
getattr
<
rewritable
>
(
attr_str
,
rewrite_args
);
if
(
r
)
{
if
(
r
)
{
if
(
rewrite_args
)
//
if (rewrite_args)
rewrite_args
->
assertReturnConvention
(
ReturnConvention
::
HAS_RETURN
);
//
rewrite_args->assertReturnConvention(ReturnConvention::HAS_RETURN);
return
incref
(
r
);
return
incref
(
r
);
}
}
...
...
src/runtime/objmodel.cpp
View file @
2c9e575d
...
@@ -1239,6 +1239,10 @@ template <Rewritable rewritable> BORROWED(Box*) Box::getattr(BoxedString* attr,
...
@@ -1239,6 +1239,10 @@ template <Rewritable rewritable> BORROWED(Box*) Box::getattr(BoxedString* attr,
assert
(
attr
->
data
()[
attr
->
size
()]
==
'\0'
);
assert
(
attr
->
data
()[
attr
->
size
()]
==
'\0'
);
Box
*
r
=
PyDict_GetItem
(
d
,
attr
);
Box
*
r
=
PyDict_GetItem
(
d
,
attr
);
// r can be NULL if the item didn't exist
// r can be NULL if the item didn't exist
// if (r && rewrite_args)
// rewrite_args->setReturn(r, ReturnConvention::HAS_RETURN);
// else
// rewrite_args = NULL;
return
r
;
return
r
;
}
}
...
...
src/runtime/super.cpp
View file @
2c9e575d
...
@@ -178,9 +178,10 @@ template <ExceptionStyle S> BORROWED(BoxedClass*) superCheck(BoxedClass* type, B
...
@@ -178,9 +178,10 @@ template <ExceptionStyle S> BORROWED(BoxedClass*) superCheck(BoxedClass* type, B
}
}
static
BoxedString
*
class_str
=
getStaticString
(
"__class__"
);
static
BoxedString
*
class_str
=
getStaticString
(
"__class__"
);
Box
*
class_attr
=
obj
->
getattr
(
class_str
);
// Box* class_attr = obj->getattr(class_str);
PyObject
*
class_attr
=
PyObject_GetAttr
(
obj
,
class_str
);
if
(
class_attr
&&
PyType_Check
(
class_attr
)
&&
class_attr
!=
obj
->
cls
)
{
if
(
class_attr
&&
PyType_Check
(
class_attr
)
&&
class_attr
!=
obj
->
cls
)
{
Py_FatalError
(
"warning: this path never tested"
);
// blindly copied from CPython
//
Py_FatalError("warning: this path never tested"); // blindly copied from CPython
return
static_cast
<
BoxedClass
*>
(
class_attr
);
return
static_cast
<
BoxedClass
*>
(
class_attr
);
}
}
...
...
test/integration/zope_test.py
View file @
2c9e575d
...
@@ -68,11 +68,11 @@ modified_list = [
...
@@ -68,11 +68,11 @@ modified_list = [
(
"Acquisition-2.13.9"
,
"https://lab.nexedi.com/Daetalus/Acquisition-2.13.9/repository/archive.zip?ref=python_implementation"
),
(
"Acquisition-2.13.9"
,
"https://lab.nexedi.com/Daetalus/Acquisition-2.13.9/repository/archive.zip?ref=python_implementation"
),
(
"AccessControl-2.13.14"
,
"https://lab.nexedi.com/Daetalus/AccessControl-2.13.14/repository/archive.zip?ref=python_implementation"
),
(
"AccessControl-2.13.14"
,
"https://lab.nexedi.com/Daetalus/AccessControl-2.13.14/repository/archive.zip?ref=python_implementation"
),
(
"ExtensionClass-2.13.2"
,
"https://lab.nexedi.com/Daetalus/ExtensionClass-2.13.2/repository/archive.zip?ref=pyston_patch"
),
(
"ExtensionClass-2.13.2"
,
"https://lab.nexedi.com/Daetalus/ExtensionClass-2.13.2/repository/archive.zip?ref=pyston_patch"
),
(
"zope.container-3.11.2"
,
"https://lab.nexedi.com/Daetalus/zope.container-3.11.2/repository/archive.zip?ref=
master
"
),
(
"zope.container-3.11.2"
,
"https://lab.nexedi.com/Daetalus/zope.container-3.11.2/repository/archive.zip?ref=
pyston_patch
"
),
(
"zope.proxy-3.6.1"
,
"https://lab.nexedi.com/Daetalus/zope.proxy-3.6.1/repository/archive.zip?ref=
master
"
),
(
"zope.proxy-3.6.1"
,
"https://lab.nexedi.com/Daetalus/zope.proxy-3.6.1/repository/archive.zip?ref=
pyston_patch
"
),
(
"zope.security-3.7.4"
,
"https://lab.nexedi.com/Daetalus/zope.security-3.7.4/repository/archive.zip?ref=
master
"
),
(
"zope.security-3.7.4"
,
"https://lab.nexedi.com/Daetalus/zope.security-3.7.4/repository/archive.zip?ref=
pyston_patch
"
),
(
"DocumentTemplate-2.13.2"
,
"https://lab.nexedi.com/Daetalus/DocumentTemplate-2.13.2/repository/archive.zip?ref=
master
"
),
(
"DocumentTemplate-2.13.2"
,
"https://lab.nexedi.com/Daetalus/DocumentTemplate-2.13.2/repository/archive.zip?ref=
pyston_implementation
"
),
(
"RestrictedPython-3.6.0"
,
"https://lab.nexedi.com/Daetalus/RestrictedPython-3.6.0/repository/archive.zip?ref=
master
"
),
(
"RestrictedPython-3.6.0"
,
"https://lab.nexedi.com/Daetalus/RestrictedPython-3.6.0/repository/archive.zip?ref=
pyston_patch
"
),
(
"ZODB3-3.10.5"
,
"https://lab.nexedi.com/Daetalus/ZODB3-3.10.5/repository/archive.zip?ref=pyston_patch"
),
(
"ZODB3-3.10.5"
,
"https://lab.nexedi.com/Daetalus/ZODB3-3.10.5/repository/archive.zip?ref=pyston_patch"
),
(
"Zope2-2.13.24"
,
"https://lab.nexedi.com/Daetalus/Zope2-2.13.24/repository/archive.zip?ref=python_implementation"
),]
(
"Zope2-2.13.24"
,
"https://lab.nexedi.com/Daetalus/Zope2-2.13.24/repository/archive.zip?ref=python_implementation"
),]
...
...
test/tests/none_not_settable.py
View file @
2c9e575d
#
expected: fail
#
skip-if:True
# - not implemented yet
# - not implemented yet
import
sys
import
sys
...
...
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