diff options
Diffstat (limited to 'lib')
| m--------- | lib/berkeley-db-1.xx | 0 | ||||
| -rw-r--r-- | lib/embed/abort_.c | 2 | ||||
| -rw-r--r-- | lib/libm/math.c | 7 | ||||
| -rw-r--r-- | lib/netutils/netutils.c | 2 | ||||
| m--------- | lib/stm32lib | 0 | ||||
| -rw-r--r-- | lib/utils/pyexec.c | 1 |
6 files changed, 7 insertions, 5 deletions
diff --git a/lib/berkeley-db-1.xx b/lib/berkeley-db-1.xx -Subproject dab957dacddcbf6cbc85d42df62e189e4877bb7 +Subproject 35aaec4418ad78628a3b935885dd189d41ce779 diff --git a/lib/embed/abort_.c b/lib/embed/abort_.c index a6df8143c..2fba0de4e 100644 --- a/lib/embed/abort_.c +++ b/lib/embed/abort_.c @@ -3,5 +3,5 @@ NORETURN void abort_(void); NORETURN void abort_(void) { - nlr_raise(mp_obj_new_exception_msg(&mp_type_RuntimeError, "abort() called")); + mp_raise_msg(&mp_type_RuntimeError, "abort() called"); } diff --git a/lib/libm/math.c b/lib/libm/math.c index a2313fcea..327a149b1 100644 --- a/lib/libm/math.c +++ b/lib/libm/math.c @@ -61,7 +61,12 @@ float log2f(float x) { return logf(x) / (float)_M_LN2; } static const float _M_LN10 = 2.30258509299404; // 0x40135d8e float log10f(float x) { return logf(x) / (float)_M_LN10; } -float tanhf(float x) { return sinhf(x) / coshf(x); } +float tanhf(float x) { + if (isinf(x)) { + return copysignf(1, x); + } + return sinhf(x) / coshf(x); +} /*****************************************************************************/ /*****************************************************************************/ diff --git a/lib/netutils/netutils.c b/lib/netutils/netutils.c index 15e70397c..06c3ff9b0 100644 --- a/lib/netutils/netutils.c +++ b/lib/netutils/netutils.c @@ -29,8 +29,6 @@ #include <stdio.h> #include <string.h> -#include "py/obj.h" -#include "py/nlr.h" #include "py/runtime.h" #include "lib/netutils/netutils.h" diff --git a/lib/stm32lib b/lib/stm32lib new file mode 160000 +Subproject d2bcfda543d3b99361e44112aca929225bdcc07 diff --git a/lib/utils/pyexec.c b/lib/utils/pyexec.c index d95084624..df93614a1 100644 --- a/lib/utils/pyexec.c +++ b/lib/utils/pyexec.c @@ -29,7 +29,6 @@ #include <stdint.h> #include <string.h> -#include "py/nlr.h" #include "py/compile.h" #include "py/runtime.h" #include "py/repl.h" |
