eccLib 1.1.0
Python library for bioinformatics written in C
Loading...
Searching...
No Matches
Data Structures | Macros | Functions
hashmap_ext.h File Reference

Contains the declarations for our extension of the hashmap module. More...

#include <Python.h>
#include "../hashmap/hashmap.h"
#include "../xxHash/xxhash.h"
Include dependency graph for hashmap_ext.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  map_tuple
 A struct to store a key-value pair. More...
 

Macros

#define XXH_INLINE_ALL
 
#define XXH_NO_STREAM
 
#define XXH_STATIC_LINKING_ONLY
 
#define XXH_NO_STDLIB
 

Functions

int hashmap_put_tuple (struct hashmap_s *const m, const char *const key, const hashmap_uint32_t len, PyObject *py_key, PyObject *value)
 Put a key-value pair into the hashmap.
 
struct map_tuplehashmap_pop_tuple (struct hashmap_s *const m, const char *const key, const hashmap_uint32_t len)
 Remove a value from the hashmap.
 
void hashmap_destroy_tuple (struct hashmap_s *m)
 Destroy a hashmap, assuming the values are map_tuples.
 
void hashmap_destroy_py (struct hashmap_s *m)
 Destroy a hashmap, assuming the values are PyObjects.
 
int hashmap_create_xh (const hashmap_uint32_t initial_capacity, struct hashmap_s *const out_hashmap)
 Create a hashmap with a custom hash function.
 

Detailed Description

Contains the declarations for our extension of the hashmap module.

This file includes the declarations from hashmap.h, which should be located in hashmap dir in project root. By default that's a git submodule. This means, that in this project you should ideally include this file.

Macro Definition Documentation

◆ XXH_INLINE_ALL

#define XXH_INLINE_ALL

◆ XXH_NO_STDLIB

#define XXH_NO_STDLIB

◆ XXH_NO_STREAM

#define XXH_NO_STREAM

◆ XXH_STATIC_LINKING_ONLY

#define XXH_STATIC_LINKING_ONLY

Function Documentation

◆ hashmap_create_xh()

int hashmap_create_xh ( const hashmap_uint32_t  initial_capacity,
struct hashmap_s *const  out_hashmap 
)

Create a hashmap with a custom hash function.

Parameters
initial_capacitythe initial capacity of the hashmap
out_hashmapthe hashmap to create
Returns
0 on success, 1 on failure
Here is the call graph for this function:
Here is the caller graph for this function: