Much more progress, still doesn't compile.

This commit is contained in:
Simon Brooke 2026-03-30 09:35:34 +01:00
parent 1ce9fbda77
commit 60921be3d4
25 changed files with 326 additions and 89 deletions

View file

@ -0,0 +1,43 @@
/**
* payloads/string.h
*
* A string cell.
*
* (c) 2026 Simon Brooke <simon@journeyman.cc>
* Licensed under GPL version 2.0, or, at your option, any later version.
*/
#ifndef __psse_payloads_string_h
#define __psse_payloads_string_h
/*
* wide characters
*/
#include <wchar.h>
#include <wctype.h>
#include "memory/pointer.h"
/**
* @brief Tag for string of characters, organised as a linked list.
*/
#define STRINGTAG "STR"
#define STRINGTV 5395539
/**
* @brief payload of a string cell.
*
* At least at first, only one UTF character will be stored in each cell. At
* present the payload of a symbol or keyword cell is identical
* to the payload of a string cell.
*/
struct string_payload {
/** the actual character stored in this cell */
wint_t character;
/** a hash of the string value, computed at store time. */
uint32_t hash;
/** the remainder of the string following this character. */
struct pso_pointer cdr;
};
#endif