1. 05 7月, 2021 1 次提交
  2. 02 7月, 2021 4 次提交
  3. 01 7月, 2021 8 次提交
  4. 30 6月, 2021 1 次提交
  5. 28 6月, 2021 1 次提交
  6. 26 6月, 2021 9 次提交
  7. 25 6月, 2021 12 次提交
  8. 24 6月, 2021 4 次提交
    • D
      py/mperrno: Add MP_ECANCELED error code. · b51ae20c
      David Lechner 提交于
      This is useful when binding asynchronous functions in C.
      Signed-off-by: NDavid Lechner <david@pybricks.com>
      b51ae20c
    • A
      unix/modffi: Add option to lock GC in callback, and cfun access. · cb332dda
      Amir Gonnen 提交于
      Add an optional 'lock' kwarg to callback that locks GC and scheduler.  This
      allows the callback to be invoked asynchronously in 'interrupt context',
      for example as a signal handler.
      
      Also add the 'cfun' member function to callback, that allows retrieving the
      C callback function address.  This is needed when the callback should be
      set to a struct field.
      
      See related #7373.
      Signed-off-by: NAmir Gonnen <amirgonnen@gmail.com>
      cb332dda
    • J
      all: Fix signed shifts and NULL access errors from -fsanitize=undefined. · 413f34cd
      Jeff Epler 提交于
      Fixes the following (the line numbers match commit 0e87459e):
      
      ../../extmod/crypto-algorithms/sha256.c:49:19: runtime error: left shif...
      ../../extmod/moduasyncio.c:106:35: runtime error: member access within ...
      ../../py/binary.c:210:13: runtime error: left shift of negative value -...
      ../../py/mpz.c:744:16: runtime error: negation of -9223372036854775808 ...
      ../../py/objint.c:109:22: runtime error: left shift of 1 by 31 places c...
      ../../py/objint_mpz.c:374:9: runtime error: left shift of 4611686018427...
      ../../py/objint_mpz.c:374:9: runtime error: left shift of negative valu...
      ../../py/parsenum.c:106:14: runtime error: left shift of 46116860184273...
      ../../py/runtime.c:395:33: runtime error: left shift of negative value ...
      ../../py/showbc.c:177:28: runtime error: left shift of negative value -...
      ../../py/vm.c:321:36: runtime error: left shift of negative value -1```
      
      Testing was done on an amd64 Debian Buster system using gcc-8.3 and these
      settings:
      
          CFLAGS += -g3 -Og -fsanitize=undefined
          LDFLAGS += -fsanitize=undefined
      
      The introduced TASK_PAIRHEAP macro's conditional (x ? &x->i : NULL)
      assembles (under amd64 gcc 8.3 -Os) to the same as &x->i, since i is the
      initial field of the struct.  However, for the purposes of undefined
      behavior analysis the conditional is needed.
      Signed-off-by: NJeff Epler <jepler@gmail.com>
      413f34cd
    • D
      esp32/main: Allow MICROPY_DIR to be overridden. · 0009a7dc
      Damien George 提交于
      This is necessary when building a custom out-of-tree board.
      Signed-off-by: NDamien George <damien@micropython.org>
      0009a7dc