File tree 3 files changed +3
-13
lines changed 3 files changed +3
-13
lines changed Original file line number Diff line number Diff line change 37
37
#include "py/nlr.h"
38
38
#include "py/runtime.h"
39
39
#include "py/objtuple.h"
40
+ #include "py/mphal.h"
40
41
#include "extmod/misc.h"
41
42
42
43
// Can't include this, as FATFS structure definition is required,
@@ -51,10 +52,6 @@ extern const mp_obj_type_t mp_fat_vfs_type;
51
52
#define USE_STATFS 1
52
53
#endif
53
54
54
- #define RAISE_ERRNO (err_flag , error_val ) \
55
- { if (err_flag == -1) \
56
- { mp_raise_OSError(error_val); } }
57
-
58
55
STATIC mp_obj_t mod_os_stat (mp_obj_t path_in ) {
59
56
struct stat sb ;
60
57
mp_uint_t len ;
Original file line number Diff line number Diff line change 44
44
#include "py/runtime.h"
45
45
#include "py/stream.h"
46
46
#include "py/builtin.h"
47
+ #include "py/mphal.h"
47
48
48
49
/*
49
50
The idea of this module is to implement reasonable minimum of
@@ -72,10 +73,6 @@ typedef struct _mp_obj_socket_t {
72
73
const mp_obj_type_t mp_type_socket ;
73
74
74
75
// Helper functions
75
- #define RAISE_ERRNO (err_flag , error_val ) \
76
- { if (err_flag == -1) \
77
- { mp_raise_OSError(error_val); } }
78
-
79
76
static inline mp_obj_t mp_obj_from_sockaddr (const struct sockaddr * addr , socklen_t len ) {
80
77
return mp_obj_new_bytes ((const byte * )addr , len );
81
78
}
Original file line number Diff line number Diff line change 29
29
#include <unistd.h>
30
30
#include <errno.h>
31
31
32
- #include "py/nlr.h"
33
32
#include "py/objlist.h"
34
33
#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"
39
35
40
36
STATIC mp_obj_t mod_termios_tcgetattr (mp_obj_t fd_in ) {
41
37
struct termios term ;
You can’t perform that action at this time.
0 commit comments