Ejemplo n.º 1
0
    def rt_hash(self):
        if self._hash is None:
            n = r_uint32(0)
            hash = r_uint32(1)
            for x in range(self._cnt):
                hash = r_uint32(31) * hash + UT.hash(UT.nth(wrap_int(x)))._int_value
                n += 1
                x = RT.next.invoke1(x)

            self._hash = wrap_int(int(mix_col_hash(hash, n)))

        return self._hash
Ejemplo n.º 2
0
    def rt_hash(self):
        if self._hash is None:
            n = r_uint32(0)
            hash = r_uint32(1)
            for x in range(self._cnt):
                hash = r_uint32(31) * hash + UT.hash(UT.nth(
                    wrap_int(x)))._int_value
                n += 1
                x = RT.next.invoke1(x)

            self._hash = wrap_int(int(mix_col_hash(hash, n)))

        return self._hash
Ejemplo n.º 3
0
    def rt_hash(self):
        if self._hash is None:
            n = r_uint32(0)
            hash = r_uint32(1)
            x = RT.seq.invoke1(self)
            while x is not nil:
                hash = r_uint32(31) * hash + UT.hash(UT.first(x))._int_value
                n += 1
                x = RT.next.invoke1(x)

            self._hash = wrap_int(int(mix_col_hash(hash, n)))

        return self._hash
Ejemplo n.º 4
0
    def rt_hash(self):
        if self._hash is None:
            n = r_uint32(0)
            hash = r_uint32(1)
            x = RT.seq.invoke1(self)
            while x is not nil:
                hash = r_uint32(31) * hash + UT.hash(UT.first(x))._int_value
                n += 1
                x = RT.next.invoke1(x)


            self._hash = wrap_int(int(mix_col_hash(hash, n)))

        return self._hash