File Coverage

lib/Digest/xxHash.xs
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine n/a
pod n/a
total 3 3 100.0


line stmt bran cond sub pod time code
1             #include "EXTERN.h"
2             #include "perl.h"
3             #include "XSUB.h"
4              
5             #include "ppport.h"
6              
7             /* define int64_t and uint64_t when using MinGW compiler */
8             #ifdef __MINGW32__
9             #include
10             #endif
11              
12             /* define int64_t and uint64_t when using MS compiler */
13             #ifdef _MSC_VER
14             #include
15             typedef __int64 int64_t;
16             typedef unsigned __int64 uint64_t;
17             #endif
18              
19             /* uncomment the following line to use native IVs if they are 64bits long */
20             #define MATH_INT64_NATIVE_IF_AVAILABLE
21              
22             #include "perl_math_int64.h"
23              
24             #include "xxhash.h"
25              
26             MODULE = Digest::xxHash PACKAGE = Digest::xxHash
27              
28             PROTOTYPES: DISABLE
29              
30             U32
31             xxhash32( const char *input, int length(input), UV seed )
32             CODE:
33 14           RETVAL = XXH32(input, STRLEN_length_of_input, seed);
34             OUTPUT:
35             RETVAL
36              
37             uint64_t
38             xxhash64( const char *input, int length(input), UV seed )
39             CODE:
40 13           PERL_MATH_INT64_LOAD;
41 13           RETVAL = XXH64(input, STRLEN_length_of_input, seed);
42             OUTPUT:
43             RETVAL