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
081c0648
Commit
081c0648
authored
8 years ago
by
Renato Aguiar
Committed by
Damien George
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
unix: Fix build for when MICROPY_PY_SOCKET=0.
parent
dd0e6ddf
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
unix/moduselect.c
+7
-1
7 additions, 1 deletion
unix/moduselect.c
with
7 additions
and
1 deletion
unix/moduselect.c
+
7
−
1
View file @
081c0648
...
@@ -40,7 +40,9 @@
...
@@ -40,7 +40,9 @@
#include
"py/mphal.h"
#include
"py/mphal.h"
#include
"fdfile.h"
#include
"fdfile.h"
#if MICROPY_PY_SOCKET
extern
const
mp_obj_type_t
mp_type_socket
;
extern
const
mp_obj_type_t
mp_type_socket
;
#endif
// Flags for poll()
// Flags for poll()
#define FLAG_ONESHOT (1)
#define FLAG_ONESHOT (1)
...
@@ -57,7 +59,11 @@ typedef struct _mp_obj_poll_t {
...
@@ -57,7 +59,11 @@ typedef struct _mp_obj_poll_t {
STATIC
int
get_fd
(
mp_obj_t
fdlike
)
{
STATIC
int
get_fd
(
mp_obj_t
fdlike
)
{
int
fd
;
int
fd
;
// Shortcut for fdfile compatible types
// Shortcut for fdfile compatible types
if
(
MP_OBJ_IS_TYPE
(
fdlike
,
&
mp_type_fileio
)
||
MP_OBJ_IS_TYPE
(
fdlike
,
&
mp_type_socket
))
{
if
(
MP_OBJ_IS_TYPE
(
fdlike
,
&
mp_type_fileio
)
#if MICROPY_PY_SOCKET
||
MP_OBJ_IS_TYPE
(
fdlike
,
&
mp_type_socket
)
#endif
)
{
mp_obj_fdfile_t
*
fdfile
=
MP_OBJ_TO_PTR
(
fdlike
);
mp_obj_fdfile_t
*
fdfile
=
MP_OBJ_TO_PTR
(
fdlike
);
fd
=
fdfile
->
fd
;
fd
=
fdfile
->
fd
;
}
else
{
}
else
{
...
...
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