mirror of
https://github.com/samba-team/samba.git
synced 2025-01-21 18:04:06 +03:00
f86d65117b
The inner values of HRESULT and WERROR are 32‐bit unsigned integers, which might not be representable in type ‘int’. We must then use the ‘k’ format specifier, which corresponds to ‘unsigned long’, a type guaranteed to be at least 32 bits in size. Commit c81aff362fe99a65385c6f8337ffcb47c9456829 fixed PyErr_FromNTSTATUS(), but it did not attempt to fix the other cases. PyErr_FromHRESULT() might return a tuple like this: (-2147024809, 'One or more arguments are invalid.') which, after this commit, will become this: (2147942487, 'One or more arguments are invalid.') Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>