Numworks Epsilon  1.4.1
Graphing Calculator Operating System
qstr.h File Reference
#include "py/mpconfig.h"
#include "py/misc.h"
#include "genhdr/qstrdefs.generated.h"

Go to the source code of this file.

Classes

struct  _qstr_pool_t
 

Macros

#define QDEF(id, str)   id,
 
#define QSTR_FROM_STR_STATIC(s)   (qstr_from_strn((s), strlen(s)))
 

Typedefs

typedef size_t qstr
 
typedef struct _qstr_pool_t qstr_pool_t
 

Enumerations

enum  { MP_QSTRnumber_of }
 

Functions

void qstr_init (void)
 
mp_uint_t qstr_compute_hash (const byte *data, size_t len)
 
qstr qstr_find_strn (const char *str, size_t str_len)
 
qstr qstr_from_str (const char *str)
 
qstr qstr_from_strn (const char *str, size_t len)
 
byteqstr_build_start (size_t len, byte **q_ptr)
 
qstr qstr_build_end (byte *q_ptr)
 
mp_uint_t qstr_hash (qstr q)
 
const char * qstr_str (qstr q)
 
size_t qstr_len (qstr q)
 
const byteqstr_data (qstr q, size_t *len)
 
void qstr_pool_info (size_t *n_pool, size_t *n_qstr, size_t *n_str_data_bytes, size_t *n_total_bytes)
 
void qstr_dump_data (void)
 

Macro Definition Documentation

◆ QDEF

#define QDEF (   id,
  str 
)    id,

Definition at line 41 of file qstr.h.

◆ QSTR_FROM_STR_STATIC

#define QSTR_FROM_STR_STATIC (   s)    (qstr_from_strn((s), strlen(s)))

Definition at line 58 of file qstr.h.

Typedef Documentation

◆ qstr

typedef size_t qstr

Definition at line 48 of file qstr.h.

◆ qstr_pool_t

typedef struct _qstr_pool_t qstr_pool_t

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
MP_QSTRnumber_of 

Definition at line 39 of file qstr.h.

Function Documentation

◆ qstr_build_end()

qstr qstr_build_end ( byte q_ptr)

Definition at line 253 of file qstr.c.

◆ qstr_build_start()

byte* qstr_build_start ( size_t  len,
byte **  q_ptr 
)

Definition at line 246 of file qstr.c.

◆ qstr_compute_hash()

mp_uint_t qstr_compute_hash ( const byte data,
size_t  len 
)

Definition at line 84 of file qstr.c.

◆ qstr_data()

const byte* qstr_data ( qstr  q,
size_t len 
)

Definition at line 283 of file qstr.c.

◆ qstr_dump_data()

void qstr_dump_data ( void  )

◆ qstr_find_strn()

qstr qstr_find_strn ( const char *  str,
size_t  str_len 
)

Definition at line 166 of file qstr.c.

◆ qstr_from_str()

qstr qstr_from_str ( const char *  str)

Definition at line 183 of file qstr.c.

◆ qstr_from_strn()

qstr qstr_from_strn ( const char *  str,
size_t  len 
)

Definition at line 187 of file qstr.c.

◆ qstr_hash()

mp_uint_t qstr_hash ( qstr  q)

Definition at line 269 of file qstr.c.

◆ qstr_init()

void qstr_init ( void  )

Definition at line 119 of file qstr.c.

◆ qstr_len()

size_t qstr_len ( qstr  q)

Definition at line 273 of file qstr.c.

◆ qstr_pool_info()

void qstr_pool_info ( size_t n_pool,
size_t n_qstr,
size_t n_str_data_bytes,
size_t n_total_bytes 
)

Definition at line 289 of file qstr.c.

◆ qstr_str()

const char* qstr_str ( qstr  q)

Definition at line 278 of file qstr.c.