Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
643284fc
Commit
643284fc
authored
11 years ago
by
Damien George
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of github.com:micropython/micropython
parents
ff91156d
26905259
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
py/gc.c
+1
-1
1 addition, 1 deletion
py/gc.c
py/objarray.c
+8
-0
8 additions, 0 deletions
py/objarray.c
with
9 additions
and
1 deletion
py/gc.c
+
1
−
1
View file @
643284fc
...
...
@@ -480,7 +480,7 @@ void *gc_realloc(void *ptr_in, machine_uint_t n_bytes) {
}
// compute number of new blocks that are requested
machine_uint_t
new_blocks
=
(
n_bytes
+
BYTES_PER_BLOCK
)
/
BYTES_PER_BLOCK
;
machine_uint_t
new_blocks
=
(
n_bytes
+
BYTES_PER_BLOCK
-
1
)
/
BYTES_PER_BLOCK
;
// get the number of consecutive tail blocks and
// the number of free blocks after last tail block
...
...
This diff is collapsed.
Click to expand it.
py/objarray.c
+
8
−
0
View file @
643284fc
...
...
@@ -136,10 +136,18 @@ STATIC mp_obj_t array_subscr(mp_obj_t self_in, mp_obj_t index_in, mp_obj_t value
if
(
value
==
MP_OBJ_NULL
)
{
// delete item
// TODO implement
// TODO: confirmed that both bytearray and array.array support
// slice deletion
return
MP_OBJ_NOT_SUPPORTED
;
}
else
{
mp_obj_array_t
*
o
=
self_in
;
if
(
MP_OBJ_IS_TYPE
(
index_in
,
&
mp_type_slice
))
{
if
(
value
!=
MP_OBJ_SENTINEL
)
{
// Only getting a slice is suported so far, not assignment
// TODO: confirmed that both bytearray and array.array support
// slice assignment (incl. of different size)
return
MP_OBJ_NOT_SUPPORTED
;
}
machine_uint_t
start
,
stop
;
if
(
!
m_seq_get_fast_slice_indexes
(
o
->
len
,
index_in
,
&
start
,
&
stop
))
{
assert
(
0
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment