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
83965b0c
Commit
83965b0c
authored
Mar 17, 2016
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More fixes
parent
c3e72d12
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
src/runtime/classobj.cpp
src/runtime/classobj.cpp
+2
-1
src/runtime/objmodel.cpp
src/runtime/objmodel.cpp
+2
-3
src/runtime/types.cpp
src/runtime/types.cpp
+4
-2
No files found.
src/runtime/classobj.cpp
View file @
83965b0c
...
...
@@ -510,7 +510,6 @@ template Box* instanceGetattroInternal<CAPI>(Box*, Box*, GetattrRewriteArgs*) no
template
Box
*
instanceGetattroInternal
<
CXX
>(
Box
*
,
Box
*
,
GetattrRewriteArgs
*
);
void
instanceSetattroInternal
(
Box
*
_inst
,
Box
*
_attr
,
STOLEN
(
Box
*
)
value
,
SetattrRewriteArgs
*
rewrite_args
)
{
assert
(
0
&&
"check refcounting"
);
STAT_TIMER
(
t0
,
"us_timer_instance_setattro"
,
0
);
RELEASE_ASSERT
(
_inst
->
cls
==
instance_cls
,
""
);
...
...
@@ -530,7 +529,9 @@ void instanceSetattroInternal(Box* _inst, Box* _attr, STOLEN(Box*) value, Setatt
if
(
value
->
cls
!=
classobj_cls
)
raiseExcHelper
(
TypeError
,
"__class__ must be set to a class"
);
auto
old_cls
=
inst
->
inst_cls
;
inst
->
inst_cls
=
static_cast
<
BoxedClassobj
*>
(
value
);
Py_DECREF
(
old_cls
);
return
;
}
}
...
...
src/runtime/objmodel.cpp
View file @
83965b0c
...
...
@@ -6847,10 +6847,9 @@ extern "C" Box* importStar(Box* _from_module, Box* to_globals) {
static
BoxedString
*
all_str
=
getStaticString
(
"__all__"
);
Box
*
all
=
from_module
->
getattr
(
all_str
);
Py_INCREF
(
all
);
AUTO_DECREF
(
all
);
if
(
all
)
{
KEEP_ALIVE
(
all
);
static
BoxedString
*
getitem_str
=
getStaticString
(
"__getitem__"
);
Box
*
all_getitem
=
typeLookup
(
all
->
cls
,
getitem_str
);
if
(
!
all_getitem
)
...
...
src/runtime/types.cpp
View file @
83965b0c
...
...
@@ -688,7 +688,7 @@ static Box* unicodeNewHelper(BoxedClass* type, Box* string, Box* encoding_obj, B
Box
*
args
;
if
(
!
string
)
args
=
EmptyTuple
;
args
=
incref
(
EmptyTuple
)
;
else
if
(
!
encoding_obj
)
args
=
BoxedTuple
::
create1
(
string
);
else
if
(
!
errors_obj
)
...
...
@@ -696,6 +696,8 @@ static Box* unicodeNewHelper(BoxedClass* type, Box* string, Box* encoding_obj, B
else
args
=
BoxedTuple
::
create3
(
string
,
encoding_obj
,
errors_obj
);
AUTO_DECREF
(
args
);
int
init_code
=
r
->
cls
->
tp_init
(
r
,
args
,
NULL
);
if
(
init_code
==
-
1
)
throwCAPIException
();
...
...
@@ -772,7 +774,7 @@ static Box* typeCallInner(CallRewriteArgs* rewrite_args, ArgPassSpec argspec, Bo
if
(
rewrite_args
)
{
rewrite_args
->
out_rtn
=
rewrite_args
->
rewriter
->
call
(
true
,
(
void
*
)
unicodeNewHelper
,
rewrite_args
->
arg1
,
rewrite_args
->
arg2
,
rewrite_args
->
arg3
,
rewrite_args
->
args
);
rewrite_args
->
arg3
,
rewrite_args
->
args
)
->
setType
(
RefType
::
OWNED
)
;
rewrite_args
->
out_success
=
true
;
}
...
...
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