Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
af61a1a4
Commit
af61a1a4
authored
Jan 06, 2014
by
Paul Sokolovsky
Committed by
John R. Lenton
Jan 07, 2014
Browse files
Use constructor to create small int (avoid exposing mp_obj_t internals to VM).
parent
b6e9c7c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/vm.c
View file @
af61a1a4
...
...
@@ -106,7 +106,7 @@ bool mp_execute_byte_code_2(const byte **ip_in_out, mp_obj_t *fastn, mp_obj_t **
case
MP_BC_LOAD_CONST_SMALL_INT
:
unum
=
(
ip
[
0
]
|
(
ip
[
1
]
<<
8
)
|
(
ip
[
2
]
<<
16
))
-
0x800000
;
ip
+=
3
;
PUSH
(
(
mp_obj_t
)(
unum
<<
1
|
1
));
PUSH
(
MP_OBJ_NEW_SMALL_INT
(
unum
));
break
;
case
MP_BC_LOAD_CONST_DEC
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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