diff options
| author | Scott Shawcroft <scott.shawcroft@gmail.com> | 2017-10-24 22:31:16 -0700 |
|---|---|---|
| committer | Scott Shawcroft <scott.shawcroft@gmail.com> | 2017-10-24 22:31:16 -0700 |
| commit | 73c15dcf8b1b927757a595a867334b38355ddb8f (patch) | |
| tree | b1727518e47219b995611aa7e5c9da66e3df5075 /lib | |
| parent | d43564f854a6a1202dfff550986b9343952d5d32 (diff) | |
| parent | f869d6b2e339c04469c6c9ea3fb2fabd7bbb2d8c (diff) | |
Merge commit 'f869d6b2e339c04469c6c9ea3fb2fabd7bbb2d8c' into nrf2_merge
This is prep for merging in the NRF5 pull request.
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" |
