File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3737#include "py/nlr.h"
3838#include "py/runtime.h"
3939#include "py/objtuple.h"
40+ #include "py/mphal.h"
4041#include "extmod/misc.h"
4142
4243// Can't include this, as FATFS structure definition is required,
@@ -51,10 +52,6 @@ extern const mp_obj_type_t mp_fat_vfs_type;
5152#define USE_STATFS 1
5253#endif
5354
54- #define RAISE_ERRNO (err_flag , error_val ) \
55- { if (err_flag == -1) \
56- { mp_raise_OSError(error_val); } }
57-
5855STATIC mp_obj_t mod_os_stat (mp_obj_t path_in ) {
5956 struct stat sb ;
6057 mp_uint_t len ;
Original file line number Diff line number Diff line change 4444#include "py/runtime.h"
4545#include "py/stream.h"
4646#include "py/builtin.h"
47+ #include "py/mphal.h"
4748
4849/*
4950 The idea of this module is to implement reasonable minimum of
@@ -72,10 +73,6 @@ typedef struct _mp_obj_socket_t {
7273const mp_obj_type_t mp_type_socket ;
7374
7475// Helper functions
75- #define RAISE_ERRNO (err_flag , error_val ) \
76- { if (err_flag == -1) \
77- { mp_raise_OSError(error_val); } }
78-
7976static inline mp_obj_t mp_obj_from_sockaddr (const struct sockaddr * addr , socklen_t len ) {
8077 return mp_obj_new_bytes ((const byte * )addr , len );
8178}
Original file line number Diff line number Diff line change 2929#include <unistd.h>
3030#include <errno.h>
3131
32- #include "py/nlr.h"
3332#include "py/objlist.h"
3433#include "py/runtime.h"
35-
36- #define RAISE_ERRNO (err_flag , error_val ) \
37- { if (err_flag == -1) \
38- { mp_raise_OSError(error_val); } }
34+ #include "py/mphal.h"
3935
4036STATIC mp_obj_t mod_termios_tcgetattr (mp_obj_t fd_in ) {
4137 struct termios term ;
You can’t perform that action at this time.
0 commit comments