Skip to content

Conversation

@asvetlov
Copy link
Member

  1. md_get_one(), md_get_all(), md_pop_one(), md_pop_all() now return 1 if key exists in multidict, 0 otherwise.
  2. md_set_default() now also returns 1 if key exists in multidict, 0 if key doesn't exist and the default was iserted into the object.
  3. All functions return -1 in case of error.

The PR doesn't affect any public API; it is a preparation step for introducing multidict's public C API.

@asvetlov asvetlov added the bot:chronographer:skip This PR does not need to include a change note label Jun 22, 2025
@asvetlov
Copy link
Member Author

@Vizonex FYI, I've changed md_*() functions as described in review for #1185

@codspeed-hq
Copy link

codspeed-hq bot commented Jun 22, 2025

CodSpeed Performance Report

Merging #1187 will degrade performances by 14.46%

Comparing asvetlov:md-api (b303039) with master (184dc41)

Summary

❌ 1 regressions
✅ 243 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
test_multidict_getall_str_hit[case-sensitive-pure-python-module] 99.8 µs 116.7 µs -14.46%

@asvetlov asvetlov merged commit 70fa9c5 into aio-libs:master Jun 22, 2025
63 of 64 checks passed
@Vizonex
Copy link
Contributor

Vizonex commented Jun 22, 2025

@asvetlov I'll make sure that I merge these items into #1190 incase and start making changes as well as macros for the capsule api.

Vizonex added a commit to Vizonex/multidict that referenced this pull request Jun 22, 2025
asvetlov added a commit that referenced this pull request Jun 24, 2025
It is a follow-up PR for #1187 that corrects retval of internal
`md_get_all()` function.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:skip This PR does not need to include a change note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants