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
e6a4d4e2
Commit
e6a4d4e2
authored
8 years ago
by
Paul Sokolovsky
Browse files
Options
Downloads
Patches
Plain Diff
py: Move stream-related declarations from obj.h to stream.h.
parent
e4cb7c61
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
py/obj.h
+0
-12
0 additions, 12 deletions
py/obj.h
py/stream.h
+13
-0
13 additions, 0 deletions
py/stream.h
with
13 additions
and
12 deletions
py/obj.h
+
0
−
12
View file @
e6a4d4e2
...
...
@@ -444,7 +444,6 @@ bool mp_get_buffer(mp_obj_t obj, mp_buffer_info_t *bufinfo, mp_uint_t flags);
void
mp_get_buffer_raise
(
mp_obj_t
obj
,
mp_buffer_info_t
*
bufinfo
,
mp_uint_t
flags
);
// Stream protocol
#define MP_STREAM_ERROR ((mp_uint_t)-1)
typedef
struct
_mp_stream_p_t
{
// On error, functions should return MP_STREAM_ERROR and fill in *errcode (values
// are implementation-dependent, but will be exposed to user, e.g. via exception).
...
...
@@ -454,17 +453,6 @@ typedef struct _mp_stream_p_t {
mp_uint_t
is_text
:
1
;
// default is bytes, set this for text stream
}
mp_stream_p_t
;
// Stream ioctl request codes
#define MP_STREAM_FLUSH (1)
#define MP_STREAM_SEEK (2)
#define MP_STREAM_POLL (3)
// Argument structure for MP_STREAM_SEEK
struct
mp_stream_seek_t
{
mp_off_t
offset
;
int
whence
;
};
struct
_mp_obj_type_t
{
mp_obj_base_t
base
;
qstr
name
;
...
...
This diff is collapsed.
Click to expand it.
py/stream.h
+
13
−
0
View file @
e6a4d4e2
...
...
@@ -28,6 +28,19 @@
#include
"py/obj.h"
#define MP_STREAM_ERROR ((mp_uint_t)-1)
// Stream ioctl request codes
#define MP_STREAM_FLUSH (1)
#define MP_STREAM_SEEK (2)
#define MP_STREAM_POLL (3)
// Argument structure for MP_STREAM_SEEK
struct
mp_stream_seek_t
{
mp_off_t
offset
;
int
whence
;
};
MP_DECLARE_CONST_FUN_OBJ
(
mp_stream_read_obj
);
MP_DECLARE_CONST_FUN_OBJ
(
mp_stream_readinto_obj
);
MP_DECLARE_CONST_FUN_OBJ
(
mp_stream_readall_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