Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
081c0648
Commit
081c0648
authored
Sep 08, 2016
by
Renato Aguiar
Committed by
Damien George
Sep 12, 2016
Browse files
unix: Fix build for when MICROPY_PY_SOCKET=0.
parent
dd0e6ddf
Changes
1
Hide whitespace changes
Inline
Side-by-side
unix/moduselect.c
View file @
081c0648
...
...
@@ -40,7 +40,9 @@
#include "py/mphal.h"
#include "fdfile.h"
#if MICROPY_PY_SOCKET
extern
const
mp_obj_type_t
mp_type_socket
;
#endif
// Flags for poll()
#define FLAG_ONESHOT (1)
...
...
@@ -57,7 +59,11 @@ typedef struct _mp_obj_poll_t {
STATIC
int
get_fd
(
mp_obj_t
fdlike
)
{
int
fd
;
// 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
);
fd
=
fdfile
->
fd
;
}
else
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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