Skip to content

Commit

Permalink
#1285: prevent clash with math log, add env var to disable xxhash for…
Browse files Browse the repository at this point in the history
… testing

git-svn-id: https://xpra.org/svn/Xpra/trunk@13431 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Aug 22, 2016
1 parent a964345 commit c25a805
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions src/xpra/server/window/motion.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,21 @@
#!python
#cython: boundscheck=False, wraparound=False, cdivision=True

import os
import time

try:
import xxhash
def hashfn(x):
return xxhash.xxh64(x).intdigest()
except ImportError as e:
from xpra.log import Logger
log = Logger("encoding")
log.warn("Warning: xxhash python bindings not found,")
log.warn(" using the slow zlib.crc32 fallback")
import zlib
hashfn = zlib.crc32
import zlib
hashfn = zlib.crc32
if os.environ.get("XPRA_XXHASH", "1")=="1":
try:
import xxhash
def hashfn(x):
return xxhash.xxh64(x).intdigest()
except ImportError as e:
from xpra.log import Logger
logger = Logger("encoding")
logger.warn("Warning: xxhash python bindings not found,")
logger.warn(" using the slow zlib.crc32 fallback")


cdef extern from "math.h":
Expand Down

0 comments on commit c25a805

Please sign in to comment.