◐ Shell
reader mode source ↗
Skip to content

fix: check return code in unpack_callback_int64#665

Merged
methane merged 4 commits into
msgpack:mainfrom
KowalskiThomas:kowalski/fix-check-return-code-in-unpack_callback_int64
Apr 21, 2026
Merged

fix: check return code in unpack_callback_int64#665
methane merged 4 commits into
msgpack:mainfrom
KowalskiThomas:kowalski/fix-check-return-code-in-unpack_callback_int64

Conversation

@KowalskiThomas

Copy link
Copy Markdown
Contributor

This simply adds a null pointer check after calling PyLong_FromLongLong / PyLong_FromLong like other similar functions do it (example here).

@KowalskiThomas KowalskiThomas marked this pull request as ready for review April 19, 2026 12:45
@KowalskiThomas KowalskiThomas force-pushed the kowalski/fix-check-return-code-in-unpack_callback_int64 branch from 4b0097e to 5142b3d Compare April 20, 2026 18:07
methane pushed a commit that referenced this pull request Apr 21, 2026
Similar to #665, just a return value check to propagate the error in
case one happens (instead of silently ignoring it).

Note that as opposed to the previous lines, we don't need to
`PyErr_SetString` since `unpack_callback_uint32` calls
`PyLong_FromSize_t` which itself should set whatever Python error is
relevant; we just need to make it clear to the caller that an error
occurred.
methane added 2 commits April 21, 2026 18:08
Refactor unpack_callback_int64 to simplify PyObject creation.
Hide details View details @methane methane merged commit 95c8be5 into msgpack:main Apr 21, 2026
26 checks passed
@KowalskiThomas KowalskiThomas deleted the kowalski/fix-check-return-code-in-unpack_callback_int64 branch April 29, 2026 07:53
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