Loading...
Searching...
No Matches
vspace::DictSpec Struct Reference

`#include <vspace.h>`

## Public Types

typedef VString | Key
typedef VString | Value

## Static Public Member Functions

static size_t | hash (const VString *s)
static bool | equal (const VString *s1, const VString *s2)
static void | free_key (VRef< Key > key)
static void | free_value (VRef< Value > value)

## Detailed Description

Definition at line 2295 of file vspace.h.

## Member Typedef Documentation

## Key

typedef VString vspace::DictSpec::Key

Definition at line 2296 of file vspace.h.

## Value

typedef VString vspace::DictSpec::Value

Definition at line 2297 of file vspace.h.

## Member Function Documentation

## equal()

bool vspace::DictSpec::equal | ( | const VString * | s1,
|  | const VString * | s2 )

inline static

Definition at line 2308 of file vspace.h.

{
if (s1->len() != s2->len())
return false;
size_t len = s1->len();
const char *str1 = s1->str(), *str2 = s2->str();
for (size_t i = 0; i < len; i++) {
if (str1[i] != str2[i])
return false;
}
return true;
}
i
int i
Definition cfEzgcd.cc:132

## free_key()

void vspace::DictSpec::free_key | ( | VRef< Key > | key | ) |

inline static

Definition at line 2325 of file vspace.h.

{
// do nothing
}

## free_value()

void vspace::DictSpec::free_value | ( | VRef< Value > | value | ) |

inline static

Definition at line 2328 of file vspace.h.

{
// do nothing
}

## hash()

size_t vspace::DictSpec::hash | ( | const VString * | s | ) |

inline static

Definition at line 2298 of file vspace.h.

{
// DJB hash
size_t len = s->len();
const char *str = s->str();
size_t hash = 5381;
for (size_t i = 0; i < len; i++) {
hash = 33 * hash + str[i];
}
return hash;
}
s
const CanonicalForm int s
Definition facAbsFact.cc:51
LibThread::str
char * str(leftv arg)
Definition shared.cc:699
vspace::DictSpec::hash
static size_t hash(const VString *s)
Definition vspace.h:2298

The documentation for this struct was generated from the following file:

- kernel/oswrapper/vspace.h