NaturalHistoryMuseum / pyzbar

Read one-dimensional barcodes and QR codes from Python 2 and 3.
MIT License
718 stars 175 forks source link

fix return type of `zbar_symbol_get_orientation` #151

Open infacc opened 11 months ago

infacc commented 11 months ago

Fixes #139. Implements @simon-staal's proposed solution:

The ZBarOrientation enum class specifies an UNKNOWN type as -1 here. However, when setting zbar_symbol_get_orientation, the c_uint type is passed here. Presumably if this was changed to c_int this would solve this issue?

The original zbar implementation defines zbar_orientation_t as enum with ZBAR_ORIENT_UNKNOWN = -1. Hence, the return type of zbar_symbol_get_orientation is signed.