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
7860c2a6
Commit
7860c2a6
authored
Nov 05, 2014
by
Damien George
Browse files
py: Fix some macros defines; cleanup some includes.
parent
be8e99c7
Changes
11
Hide whitespace changes
Inline
Side-by-side
py/bc.c
View file @
7860c2a6
...
...
@@ -44,6 +44,7 @@
#if 0 // print debugging info
#define DEBUG_PRINT (1)
#else
// don't print debugging info
#define DEBUG_PRINT (0)
#define DEBUG_printf(...) (void)0
#endif
...
...
py/builtinimport.c
View file @
7860c2a6
...
...
@@ -50,6 +50,7 @@
#define DEBUG_PRINT (1)
#define DEBUG_printf DEBUG_printf
#else
// don't print debugging info
#define DEBUG_PRINT (0)
#define DEBUG_printf(...) (void)0
#endif
...
...
py/gc.c
View file @
7860c2a6
...
...
@@ -44,6 +44,7 @@
#define DEBUG_PRINT (1)
#define DEBUG_printf DEBUG_printf
#else
// don't print debugging info
#define DEBUG_PRINT (0)
#define DEBUG_printf(...) (void)0
#endif
...
...
@@ -746,7 +747,9 @@ void gc_dump_alloc_table(void) {
if
(
*
ptr
==
(
mp_uint_t
)
&
mp_type_tuple
)
{
c
=
'T'
;
}
else
if
(
*
ptr
==
(
mp_uint_t
)
&
mp_type_list
)
{
c
=
'L'
;
}
else
if
(
*
ptr
==
(
mp_uint_t
)
&
mp_type_dict
)
{
c
=
'D'
;
}
#if MICROPY_PY_BUILTINS_FLOAT
else
if
(
*
ptr
==
(
mp_uint_t
)
&
mp_type_float
)
{
c
=
'F'
;
}
#endif
else
if
(
*
ptr
==
(
mp_uint_t
)
&
mp_type_fun_bc
)
{
c
=
'B'
;
}
else
if
(
*
ptr
==
(
mp_uint_t
)
&
mp_type_module
)
{
c
=
'M'
;
}
else
{
c
=
'h'
;
}
...
...
py/map.c
View file @
7860c2a6
...
...
@@ -358,7 +358,7 @@ void mp_set_clear(mp_set_t *set) {
set
->
table
=
NULL
;
}
#if DEBUG_PRINT
#if
defined(DEBUG_PRINT) &&
DEBUG_PRINT
void
mp_map_dump
(
mp_map_t
*
map
)
{
for
(
mp_uint_t
i
=
0
;
i
<
map
->
alloc
;
i
++
)
{
if
(
map
->
table
[
i
].
key
!=
NULL
)
{
...
...
py/mpconfig.h
View file @
7860c2a6
...
...
@@ -184,8 +184,8 @@
#endif
// Whether to enable finalisers in the garbage collector (ie call __del__)
#ifndef MICROPY_ENABLE_
GC_
FINALISER
#define MICROPY_ENABLE_
GC_
FINALISER (0)
#ifndef MICROPY_ENABLE_FINALISER
#define MICROPY_ENABLE_FINALISER (0)
#endif
// Whether to check C stack usage. C stack used for calling Python functions,
...
...
py/nlr.h
View file @
7860c2a6
...
...
@@ -36,7 +36,7 @@ struct _nlr_buf_t {
// the entries here must all be machine word size
nlr_buf_t
*
prev
;
void
*
ret_val
;
#if !MICROPY_NLR_SETJMP
#if
!defined(MICROPY_NLR_SETJMP) ||
!MICROPY_NLR_SETJMP
#if defined(__i386__)
void
*
regs
[
6
];
#elif defined(__x86_64__)
...
...
py/nlrthumb.S
View file @
7860c2a6
...
...
@@ -24,7 +24,7 @@
*
THE
SOFTWARE
.
*/
#if !MICROPY_NLR_SETJMP && (defined(__thumb2__) || defined(__thumb__) || defined(__arm__))
#if
(!defined(MICROPY_NLR_SETJMP) ||
!MICROPY_NLR_SETJMP
)
&& (defined(__thumb2__) || defined(__thumb__) || defined(__arm__))
//
We
only
need
the
functions
here
if
we
are
on
arm
/
thumb
,
and
we
are
not
//
using
setjmp
/
longjmp
.
...
...
@@ -138,4 +138,4 @@ nlr_jump:
nlr_top
:
.
space
4
#endif // !MICROPY_NLR_SETJMP && (defined(__thumb2__) || defined(__thumb__) || defined(__arm__))
#endif //
(!defined(MICROPY_NLR_SETJMP) ||
!MICROPY_NLR_SETJMP
)
&& (defined(__thumb2__) || defined(__thumb__) || defined(__arm__))
py/objfun.c
View file @
7860c2a6
...
...
@@ -44,6 +44,7 @@
#if 0 // print debugging info
#define DEBUG_PRINT (1)
#else
// don't print debugging info
#define DEBUG_PRINT (0)
#define DEBUG_printf(...) (void)0
#endif
...
...
py/objtype.c
View file @
7860c2a6
...
...
@@ -43,6 +43,7 @@
#define DEBUG_PRINT (1)
#define DEBUG_printf DEBUG_printf
#else
// don't print debugging info
#define DEBUG_PRINT (0)
#define DEBUG_printf(...) (void)0
#endif
...
...
stmhal/printf.c
View file @
7860c2a6
...
...
@@ -29,17 +29,10 @@
#include
<stdarg.h>
#include
"mpconfig.h"
#include
"std.h"
#include
"misc.h"
#include
"systick.h"
#include
"qstr.h"
#include
"obj.h"
#include
"pfenv.h"
#if 0
#include "lcd.h"
#endif
#include
"uart.h"
#include
"usb.h"
#include
"pybstdio.h"
#if MICROPY_PY_BUILTINS_FLOAT
...
...
stmhal/pybstdio.h
View file @
7860c2a6
...
...
@@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
extern
pyb_uart_obj_t
*
pyb_stdio_uart
;
extern
struct
_
pyb_uart_obj_t
*
pyb_stdio_uart
;
void
stdout_tx_str
(
const
char
*
str
);
void
stdout_tx_strn
(
const
char
*
str
,
mp_uint_t
len
);
...
...
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