diff options
author | Michael Buesch <m@bues.ch> | 2018-12-31 23:30:57 +0100 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2019-01-02 14:55:24 +0100 |
commit | 9c50ee378d30eff8f171b6c5c449a8d5bace2d59 (patch) | |
tree | 6e7c47a3fdb6b87d57b5042735f3b6a9bf294b3e | |
parent | 433e6992ca89e0c7059b87cbae0e9536f11aa58f (diff) | |
download | cython-9c50ee378d30eff8f171b6c5c449a8d5bace2d59.tar.gz |
TypeConversion: Fix pointer qualifier compiler warning
This fixes the following compiler warning:
warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual]
-rw-r--r-- | Cython/Utility/TypeConversion.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Cython/Utility/TypeConversion.c b/Cython/Utility/TypeConversion.c index 796c8bed9..2cddd6a76 100644 --- a/Cython/Utility/TypeConversion.c +++ b/Cython/Utility/TypeConversion.c @@ -730,14 +730,14 @@ static CYTHON_INLINE PyObject* {{TO_PY_FUNCTION}}({{TYPE}} value, Py_ssize_t wid digit_pos = abs((int)(remaining % (8*8))); remaining = ({{TYPE}}) (remaining / (8*8)); dpos -= 2; - *(uint16_t*)dpos = ((uint16_t*)DIGIT_PAIRS_8)[digit_pos]; /* copy 2 digits at a time */ + *(uint16_t*)dpos = ((const uint16_t*)DIGIT_PAIRS_8)[digit_pos]; /* copy 2 digits at a time */ last_one_off = (digit_pos < 8); break; case 'd': digit_pos = abs((int)(remaining % (10*10))); remaining = ({{TYPE}}) (remaining / (10*10)); dpos -= 2; - *(uint16_t*)dpos = ((uint16_t*)DIGIT_PAIRS_10)[digit_pos]; /* copy 2 digits at a time */ + *(uint16_t*)dpos = ((const uint16_t*)DIGIT_PAIRS_10)[digit_pos]; /* copy 2 digits at a time */ last_one_off = (digit_pos < 10); break; case 'x': |