Debian Codegraph @

pypy/module/binascii/interp_crc32.py

raw symbols SCIP
1 from pypy.interpreter.gateway import unwrap_spec
2 from rpython.rlib.rarithmetic import r_uint
3 from rpython.rlib import rzipfile
4
5 @unwrap_spec(data='bufferstr', oldcrc='truncatedint_w')
6 def crc32(space, data, oldcrc=0):
7 "Compute the CRC-32 incrementally."
8 crc = rzipfile.crc32(data, r_uint(oldcrc))
9 return space.newint(crc)