Post Scarcity
A prototype for a post scarcity programming environment
Loading...
Searching...
No Matches
hashmap.h
Go to the documentation of this file.
1/*
2 * hashmap.h
3 *
4 * Basic implementation of a hashmap.
5 *
6 * (c) 2021 Simon Brooke <simon@journeyman.cc>
7 * Licensed under GPL version 2.0, or, at your option, any later version.
8 */
9
10#ifndef __psse_hashmap_h
11#define __psse_hashmap_h
12
13#include "arith/integer.h"
14#include "memory/conspage.h"
16#include "memory/vectorspace.h"
17
18#define DFLT_HASHMAP_BUCKETS 32
19
20
21struct cons_pointer lisp_get_hash( struct stack_frame *frame,
22 struct cons_pointer frame_pointer,
23 struct cons_pointer env );
24
25struct cons_pointer lisp_hashmap_put( struct stack_frame *frame,
26 struct cons_pointer frame_pointer,
27 struct cons_pointer env );
28
30 struct cons_pointer frame_pointer,
31 struct cons_pointer env );
32
33struct cons_pointer lisp_make_hashmap( struct stack_frame *frame,
34 struct cons_pointer frame_pointer,
35 struct cons_pointer env );
36
37
38#endif
An indirect pointer to a cons cell.
A stack frame.
struct cons_pointer lisp_hashmap_put_all(struct stack_frame *frame, struct cons_pointer frame_pointer, struct cons_pointer env)
Lisp function expecting two arguments, a hashmap and an assoc list.
Definition hashmap.c:126
struct cons_pointer lisp_get_hash(struct stack_frame *frame, struct cons_pointer frame_pointer, struct cons_pointer env)
A lisp function signature conforming wrapper around get_hash, q.v.
Definition hashmap.c:25
struct cons_pointer lisp_hashmap_put(struct stack_frame *frame, struct cons_pointer frame_pointer, struct cons_pointer env)
Expects frame->arg[1] to be a hashmap or namespace; frame->arg[2] to be a string-like-thing (perhaps ...
Definition hashmap.c:106
struct cons_pointer lisp_make_hashmap(struct stack_frame *frame, struct cons_pointer frame_pointer, struct cons_pointer env)
Lisp funtion of up to four args (all optional), where.
Definition hashmap.c:39