Skip to content

Commit

Permalink
ports: Remove typedef of machine_ptr_t, it's no longer needed.
Browse files Browse the repository at this point in the history
This type was used only for the typedef of mp_obj_t, which is now defined
by the object representation.  So we can now remove this unused typedef,
to simplify the mpconfigport.h file.
  • Loading branch information
dpgeorge committed Aug 15, 2016
1 parent 41fceae commit 675d1c9
Show file tree
Hide file tree
Showing 13 changed files with 0 additions and 31 deletions.
2 changes: 0 additions & 2 deletions bare-arm/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@

typedef int32_t mp_int_t; // must be pointer size
typedef uint32_t mp_uint_t; // must be pointer size
typedef void *machine_ptr_t; // must be of pointer size
typedef const void *machine_const_ptr_t; // must be of pointer size
typedef long mp_off_t;

// dummy print
Expand Down
2 changes: 0 additions & 2 deletions cc3200/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,6 @@ extern const struct _mp_obj_module_t mp_module_ussl;

typedef int32_t mp_int_t; // must be pointer size
typedef unsigned int mp_uint_t; // must be pointer size
typedef void *machine_ptr_t; // must be of pointer size
typedef const void *machine_const_ptr_t; // must be of pointer size
typedef long mp_off_t;

#define MP_PLAT_PRINT_STRN(str, len) mp_hal_stdout_tx_strn_cooked(str, len)
Expand Down
2 changes: 0 additions & 2 deletions esp8266/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,6 @@

typedef int32_t mp_int_t; // must be pointer size
typedef uint32_t mp_uint_t; // must be pointer size
typedef void *machine_ptr_t; // must be of pointer size
typedef const void *machine_const_ptr_t; // must be of pointer size
typedef long mp_off_t;
typedef uint32_t sys_prot_t; // for modlwip
// ssize_t, off_t as required by POSIX-signatured functions in stream.h
Expand Down
3 changes: 0 additions & 3 deletions examples/embedding/mpconfigport_minimal.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,6 @@ typedef long long mp_off_t;
typedef long mp_off_t;
#endif

typedef void *machine_ptr_t; // must be of pointer size
typedef const void *machine_const_ptr_t; // must be of pointer size

// We need to provide a declaration/definition of alloca()
#ifdef __FreeBSD__
#include <stdlib.h>
Expand Down
2 changes: 0 additions & 2 deletions minimal/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@
typedef int mp_int_t; // must be pointer size
typedef unsigned mp_uint_t; // must be pointer size

typedef void *machine_ptr_t; // must be of pointer size
typedef const void *machine_const_ptr_t; // must be of pointer size
typedef long mp_off_t;

#define MP_PLAT_PRINT_STRN(str, len) mp_hal_stdout_tx_strn_cooked(str, len)
Expand Down
3 changes: 0 additions & 3 deletions mpy-cross/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,6 @@ typedef long long mp_off_t;
typedef long mp_off_t;
#endif

typedef void *machine_ptr_t; // must be of pointer size
typedef const void *machine_const_ptr_t; // must be of pointer size

#define MP_PLAT_PRINT_STRN(str, len) (void)0

#ifndef MP_NOINLINE
Expand Down
2 changes: 0 additions & 2 deletions pic16bit/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@
typedef int mp_int_t; // must be pointer size
typedef unsigned int mp_uint_t; // must be pointer size

typedef void *machine_ptr_t; // must be pointer size
typedef const void *machine_const_ptr_t; // must be pointer size
typedef int mp_off_t;

#define MP_PLAT_PRINT_STRN(str, len) mp_hal_stdout_tx_strn_cooked(str, len)
Expand Down
2 changes: 0 additions & 2 deletions qemu-arm/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@

typedef int32_t mp_int_t; // must be pointer size
typedef uint32_t mp_uint_t; // must be pointer size
typedef void *machine_ptr_t; // must be of pointer size
typedef const void *machine_const_ptr_t; // must be of pointer size
typedef long mp_off_t;

#include <unistd.h>
Expand Down
2 changes: 0 additions & 2 deletions stmhal/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,6 @@ extern const struct _mp_obj_module_t mp_module_network;

typedef int mp_int_t; // must be pointer size
typedef unsigned int mp_uint_t; // must be pointer size
typedef void *machine_ptr_t; // must be of pointer size
typedef const void *machine_const_ptr_t; // must be of pointer size
typedef long mp_off_t;

#define MP_PLAT_PRINT_STRN(str, len) mp_hal_stdout_tx_strn_cooked(str, len)
Expand Down
2 changes: 0 additions & 2 deletions teensy/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ extern const struct _mp_obj_module_t time_module;

typedef int32_t mp_int_t; // must be pointer size
typedef unsigned int mp_uint_t; // must be pointer size
typedef void *machine_ptr_t; // must be of pointer size
typedef const void *machine_const_ptr_t; // must be of pointer size
typedef long mp_off_t;

#define MP_PLAT_PRINT_STRN(str, len) mp_hal_stdout_tx_strn_cooked(str, len)
Expand Down
3 changes: 0 additions & 3 deletions unix/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,6 @@ typedef long long mp_off_t;
typedef long mp_off_t;
#endif

typedef void *machine_ptr_t; // must be of pointer size
typedef const void *machine_const_ptr_t; // must be of pointer size

void mp_unix_alloc_exec(mp_uint_t min_size, void** ptr, mp_uint_t *size);
void mp_unix_free_exec(void *ptr, mp_uint_t size);
void mp_unix_mark_exec(void);
Expand Down
3 changes: 0 additions & 3 deletions unix/mpconfigport_minimal.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,6 @@ typedef long long mp_off_t;
typedef long mp_off_t;
#endif

typedef void *machine_ptr_t; // must be of pointer size
typedef const void *machine_const_ptr_t; // must be of pointer size

// We need to provide a declaration/definition of alloca()
#ifdef __FreeBSD__
#include <stdlib.h>
Expand Down
3 changes: 0 additions & 3 deletions windows/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,6 @@ typedef long long mp_off_t;
typedef long mp_off_t;
#endif

typedef void *machine_ptr_t; // must be of pointer size
typedef const void *machine_const_ptr_t; // must be of pointer size

#if MICROPY_PY_OS_DUPTERM
#define MP_PLAT_PRINT_STRN(str, len) mp_hal_stdout_tx_strn_cooked(str, len)
void mp_hal_dupterm_tx_strn(const char *str, size_t len);
Expand Down

0 comments on commit 675d1c9

Please sign in to comment.