Skip to content

py\obj.c: Get 64-bit integer arg. #8089

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

IhorNehrutsa
Copy link
Contributor

Add int64_t mp_obj_get_ll_int(mp_obj_t arg_in) function.

It's a pair to the mp_obj_t mp_obj_new_int_from_ll(long long val)

It uses in the
ESP32: New hardware PCNT Counter() and Encoder(). #6639

@robert-hh
Copy link
Contributor

Well, this code fails for each and every port. These lines are wrong:

   if (arg == mp_const_false) {
        return 0;
    } else if (arg == mp_const_true) {
        return 1;

Should probably be arg_in and not arg.

@codecov-commenter
Copy link

codecov-commenter commented Dec 15, 2021

Codecov Report

Attention: Patch coverage is 0% with 15 lines in your changes missing coverage. Please review.

Project coverage is 98.46%. Comparing base (8987b39) to head (c1e3553).

Files with missing lines Patch % Lines
py/obj.c 0.00% 15 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8089      +/-   ##
==========================================
- Coverage   98.53%   98.46%   -0.07%     
==========================================
  Files         169      169              
  Lines       21822    21837      +15     
==========================================
  Hits        21502    21502              
- Misses        320      335      +15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dpgeorge dpgeorge added the py-core Relates to py/ directory in source label Dec 17, 2021
Copy link
Member

@dpgeorge dpgeorge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There will need to be coverage tests added to ports/unix/coverage.c to get 100% coverage of this new function.

@IhorNehrutsa IhorNehrutsa requested a review from dpgeorge July 1, 2022 06:06
tannewt pushed a commit to tannewt/circuitpython that referenced this pull request Jul 7, 2023
Reset UART on deinit, reduces power consumption on nRF
@IhorNehrutsa IhorNehrutsa force-pushed the mp_obj_get_ll_int branch 2 times, most recently from 4f89fba to 773cd83 Compare July 21, 2023 11:00
@github-actions
Copy link

github-actions bot commented Jul 21, 2023

Code size report:

   bare-arm:    +0 +0.000% 
minimal x86:   -32 -0.017% 
   unix x64:    +0 +0.000% standard
      stm32:    +0 +0.000% PYBV10
     mimxrt:    +0 +0.000% TEENSY40
        rp2:    +0 +0.000% RPI_PICO_W
       samd:    +0 +0.000% ADAFRUIT_ITSYBITSY_M4_EXPRESS
  qemu rv32:    +0 +0.000% VIRT_RV32

@IhorNehrutsa IhorNehrutsa force-pushed the mp_obj_get_ll_int branch 3 times, most recently from 365bf24 to a2b7a98 Compare July 21, 2023 14:22
@IhorNehrutsa IhorNehrutsa force-pushed the mp_obj_get_ll_int branch 2 times, most recently from 41cfe10 to 873d53e Compare September 3, 2023 18:56
Wind-stormger pushed a commit to BPI-STEAM/micropython that referenced this pull request Sep 14, 2023
Wind-stormger pushed a commit to BPI-STEAM/micropython that referenced this pull request Sep 14, 2023
Wind-stormger pushed a commit to BPI-STEAM/micropython that referenced this pull request Sep 14, 2023
…rf-uart-power-saving

8.2.x revert micropython#8089 nrf uart power saving
@IhorNehrutsa IhorNehrutsa force-pushed the mp_obj_get_ll_int branch 4 times, most recently from af71370 to efbdedf Compare January 29, 2024 07:38
Signed-off-by: IhorNehrutsa <Ihor.Nehrutsa@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
py-core Relates to py/ directory in source
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants