Contains common functions and structs used by the other modules.
More...
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <Python.h>
Go to the source code of this file.
|
| #define | UNUSED(x) (void)(x) |
| | Supresses unused variable warnings.
|
| |
| #define | STR_HELPER(x) #x |
| |
| #define | STR(x) STR_HELPER(x) |
| | Converts a macro to a string.
|
| |
|
| int | strtok_ri (const char *restrict str, char delim, Py_ssize_t *restrict strLen, occurrence_t *restrict lastoccurrence) |
| | Version of strtok_r that doesn't modify the original string.
|
| |
| void | percent_encode_char (char *restrict out, char c) |
| | Writes a percent encoded character to a buffer.
|
| |
| uint32_t | strncount (const char *restrict str, char c, size_t len) |
| | Counts the number of occurrences of c in str.
|
| |
| void * | memchr2 (const void *buf, int c1, int c2, size_t len) |
| | Finds the first occurrence of either c1 or c2 in buf.
|
| |
| pair_t * | iter_contigs (pair_t *ranges, size_t *size) |
| |
Contains common functions and structs used by the other modules.
◆ STR_HELPER
| #define STR_HELPER |
( |
|
x | ) |
#x |
◆ pair_t
◆ iter_contigs()
Merges overlapping ranges in a sorted array of pairs.
- Parameters
-
| ranges | the array of pairs to merge |
| size | pointer to the number of pairs in the array, will be updated to the number of merged pairs |
- Returns
- a pointer to the merged array of pairs