Commit 7d8a6d95 authored by Sam Rushing's avatar Sam Rushing

unnecessary memset removed

parent ef388ade
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
# class wrappers. # class wrappers.
from cpython cimport PyBytes_FromStringAndSize, PyNumber_Long, PyLong_Check from cpython cimport PyBytes_FromStringAndSize, PyNumber_Long, PyLong_Check
from libc.string cimport memcpy, memset from libc.string cimport memcpy
from libc.stdint cimport uint64_t, int16_t from libc.stdint cimport uint64_t, int16_t
import sys import sys
...@@ -201,7 +201,6 @@ cdef _encode_double (double f): ...@@ -201,7 +201,6 @@ cdef _encode_double (double f):
cdef int16_t exp = ((x64 >> 52) & 0x7ff) - (1023 + 52) cdef int16_t exp = ((x64 >> 52) & 0x7ff) - (1023 + 52)
cdef uint64_t man = (x64 & MANTISSA_MASK) cdef uint64_t man = (x64 & MANTISSA_MASK)
cdef unsigned char result[10] cdef unsigned char result[10]
memset (<void*>&result[0], 0, 10);
# bit 8 says binary encoding # bit 8 says binary encoding
result[0] = 0b10000000 result[0] = 0b10000000
if negative: if negative:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment