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
GitLab 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
64da62ec
Commit
64da62ec
authored
8 years ago
by
Paul Sokolovsky
Browse files
Options
Downloads
Patches
Plain Diff
unix/file: Use generic stream flush() method.
parent
aa4ada94
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
unix/file.c
+1
-9
1 addition, 9 deletions
unix/file.c
with
1 addition
and
9 deletions
unix/file.c
+
1
−
9
View file @
64da62ec
...
@@ -129,14 +129,6 @@ STATIC mp_uint_t fdfile_ioctl(mp_obj_t o_in, mp_uint_t request, uintptr_t arg, i
...
@@ -129,14 +129,6 @@ STATIC mp_uint_t fdfile_ioctl(mp_obj_t o_in, mp_uint_t request, uintptr_t arg, i
}
}
}
}
STATIC
mp_obj_t
fdfile_flush
(
mp_obj_t
self_in
)
{
mp_obj_fdfile_t
*
self
=
MP_OBJ_TO_PTR
(
self_in
);
check_fd_is_open
(
self
);
fsync
(
self
->
fd
);
return
mp_const_none
;
}
STATIC
MP_DEFINE_CONST_FUN_OBJ_1
(
fdfile_flush_obj
,
fdfile_flush
);
STATIC
mp_obj_t
fdfile_close
(
mp_obj_t
self_in
)
{
STATIC
mp_obj_t
fdfile_close
(
mp_obj_t
self_in
)
{
mp_obj_fdfile_t
*
self
=
MP_OBJ_TO_PTR
(
self_in
);
mp_obj_fdfile_t
*
self
=
MP_OBJ_TO_PTR
(
self_in
);
close
(
self
->
fd
);
close
(
self
->
fd
);
...
@@ -237,7 +229,7 @@ STATIC const mp_rom_map_elem_t rawfile_locals_dict_table[] = {
...
@@ -237,7 +229,7 @@ STATIC const mp_rom_map_elem_t rawfile_locals_dict_table[] = {
{
MP_ROM_QSTR
(
MP_QSTR_write
),
MP_ROM_PTR
(
&
mp_stream_write_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_write
),
MP_ROM_PTR
(
&
mp_stream_write_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_seek
),
MP_ROM_PTR
(
&
mp_stream_seek_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_seek
),
MP_ROM_PTR
(
&
mp_stream_seek_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_tell
),
MP_ROM_PTR
(
&
mp_stream_tell_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_tell
),
MP_ROM_PTR
(
&
mp_stream_tell_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_flush
),
MP_ROM_PTR
(
&
fdfile
_flush_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_flush
),
MP_ROM_PTR
(
&
mp_stream
_flush_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_close
),
MP_ROM_PTR
(
&
fdfile_close_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_close
),
MP_ROM_PTR
(
&
fdfile_close_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR___enter__
),
MP_ROM_PTR
(
&
mp_identity_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR___enter__
),
MP_ROM_PTR
(
&
mp_identity_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR___exit__
),
MP_ROM_PTR
(
&
fdfile___exit___obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR___exit__
),
MP_ROM_PTR
(
&
fdfile___exit___obj
)
},
...
...
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