Skip to content

Commit

Permalink
#3807 merge changes from git master: use uint64_t everywhere
Browse files Browse the repository at this point in the history
more correct and gives us better compatibility with various versions of Cython
  • Loading branch information
totaam committed Mar 29, 2023
1 parent 7aca69d commit a2ef126
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
5 changes: 3 additions & 2 deletions xpra/buffers/xxh.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
# Xpra is released under the terms of the GNU GPL v2, or, at your option, any
# later version. See the file COPYING for details.

#cdef unsigned long long xxh64(const void* input, size_t length, unsigned long long seed) nogil
cdef unsigned long long xxh3(const void* input, size_t length) nogil
from libc.stdint cimport uint64_t

cdef uint64_t xxh3(const void* input, size_t length) nogil
11 changes: 4 additions & 7 deletions xpra/buffers/xxh.pyx
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
# -*- coding: utf-8 -*-
# This file is part of Xpra.
# Copyright (C) 2015-2021 Antoine Martin <antoine@xpra.org>
# Copyright (C) 2015-2023 Antoine Martin <antoine@xpra.org>
# Xpra is released under the terms of the GNU GPL v2, or, at your option, any
# later version. See the file COPYING for details.

# xxhash wrapper

#cython: wraparound=False
from libc.stdint cimport uint64_t

cdef extern from "xxhash.h":
ctypedef unsigned long long XXH64_hash_t
#XXH64_hash_t XXH64(const void* input, size_t length, unsigned long long seed) nogil
ctypedef uint64_t XXH64_hash_t
XXH64_hash_t XXH3_64bits(const void* data, size_t len) nogil

#cdef unsigned long long xxh64(const void* input, size_t length, unsigned long long seed) nogil:
# return XXH64(input, length, seed)

cdef XXH64_hash_t xxh3(const void* input, size_t length) nogil:
cdef uint64_t xxh3(const void* input, size_t length) nogil:
return XXH3_64bits(input, length)

0 comments on commit a2ef126

Please sign in to comment.