Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
micropython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
micropython
Commits
016dba0e
Commit
016dba0e
authored
Oct 07, 2016
by
Damien George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unix: Use common RAISE_ERRNO macro from mphalport.h.
parent
503089ea
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
13 deletions
+3
-13
unix/modos.c
unix/modos.c
+1
-4
unix/modsocket.c
unix/modsocket.c
+1
-4
unix/modtermios.c
unix/modtermios.c
+1
-5
No files found.
unix/modos.c
View file @
016dba0e
...
...
@@ -37,6 +37,7 @@
#include "py/nlr.h"
#include "py/runtime.h"
#include "py/objtuple.h"
#include "py/mphal.h"
#include "extmod/misc.h"
// Can't include this, as FATFS structure definition is required,
...
...
@@ -51,10 +52,6 @@ extern const mp_obj_type_t mp_fat_vfs_type;
#define USE_STATFS 1
#endif
#define RAISE_ERRNO(err_flag, error_val) \
{ if (err_flag == -1) \
{ mp_raise_OSError(error_val); } }
STATIC
mp_obj_t
mod_os_stat
(
mp_obj_t
path_in
)
{
struct
stat
sb
;
mp_uint_t
len
;
...
...
unix/modsocket.c
View file @
016dba0e
...
...
@@ -44,6 +44,7 @@
#include "py/runtime.h"
#include "py/stream.h"
#include "py/builtin.h"
#include "py/mphal.h"
/*
The idea of this module is to implement reasonable minimum of
...
...
@@ -72,10 +73,6 @@ typedef struct _mp_obj_socket_t {
const
mp_obj_type_t
mp_type_socket
;
// Helper functions
#define RAISE_ERRNO(err_flag, error_val) \
{ if (err_flag == -1) \
{ mp_raise_OSError(error_val); } }
static
inline
mp_obj_t
mp_obj_from_sockaddr
(
const
struct
sockaddr
*
addr
,
socklen_t
len
)
{
return
mp_obj_new_bytes
((
const
byte
*
)
addr
,
len
);
}
...
...
unix/modtermios.c
View file @
016dba0e
...
...
@@ -29,13 +29,9 @@
#include <unistd.h>
#include <errno.h>
#include "py/nlr.h"
#include "py/objlist.h"
#include "py/runtime.h"
#define RAISE_ERRNO(err_flag, error_val) \
{ if (err_flag == -1) \
{ mp_raise_OSError(error_val); } }
#include "py/mphal.h"
STATIC
mp_obj_t
mod_termios_tcgetattr
(
mp_obj_t
fd_in
)
{
struct
termios
term
;
...
...
Write
Preview
Markdown
is supported
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