summaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/Python/pathconfig.c
diff options
context:
space:
mode:
authorbabenko <[email protected]>2026-04-20 17:50:17 +0300
committerbabenko <[email protected]>2026-04-20 22:50:12 +0300
commit7027f12467a5753b511a36710cc5f675560a94e4 (patch)
tree23f2be1798397f8c973460b2254eed4867325f54 /contrib/tools/python3/Python/pathconfig.c
parent91c37c768c512f70419570433421865c9696ccce (diff)
Fix GetThreadCount always returning 0 on missing Threads field
std::optional<int> threads = 0 initializes the optional with value 0, so threads.has_value() is always true. When the "Threads:" field is absent from /proc/self/status the function silently returned 0 instead of throwing NoSuchInfoInProcFS. Fix: initialize as std::optional<int> threads (nullopt) so the has_value() guard works as intended. commit_hash:d1ba29e41bc8ecc37567709081958febc263f56e
Diffstat (limited to 'contrib/tools/python3/Python/pathconfig.c')
0 files changed, 0 insertions, 0 deletions