Skip to content
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

feat: add c api #62

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

feat: add c api #62

wants to merge 1 commit into from

Conversation

cthulhu-irl
Copy link
Owner

issue #61

@cthulhu-irl cthulhu-irl self-assigned this Sep 28, 2024
@codecov-commenter
Copy link

codecov-commenter commented Sep 28, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.84%. Comparing base (1ff40a7) to head (cf8f694).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #62   +/-   ##
=======================================
  Coverage   94.84%   94.84%           
=======================================
  Files          12       12           
  Lines         233      233           
  Branches       26       26           
=======================================
  Hits          221      221           
  Misses          7        7           
  Partials        5        5           

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

@cthulhu-irl cthulhu-irl force-pushed the 61-add-c-api branch 4 times, most recently from 284577b to e7c54bf Compare October 5, 2024 18:25
@cthulhu-irl cthulhu-irl force-pushed the 61-add-c-api branch 2 times, most recently from a79dd59 to e1d898a Compare October 5, 2024 21:20
Copy link

@sajadghorbanii sajadghorbanii left a comment

Choose a reason for hiding this comment

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

The code appears efficient and well-structured

return parsi_charset_t{ .bitset = { bytes[0], bytes[1], bytes[2], bytes[3] } };
}

parsi_parser_t* parsi_alloc_parser(parsi_parser_t parser)

Choose a reason for hiding this comment

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

The std::malloc call could fail, returning nullptr. It's good practice to check if malloc was successful before using the pointer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants