From e5ff658875f634542eab9319f8a5450cd092385c Mon Sep 17 00:00:00 2001 From: Leif Andersen Date: Sat, 23 Jul 2016 01:14:42 -0400 Subject: [PATCH] Add docs for hash trees. --- pkgs/racket-doc/scribblings/inside/misc.scrbl | 21 +++++++++++++++++++ .../scribblings/inside/values.scrbl | 3 +++ 2 files changed, 24 insertions(+) diff --git a/pkgs/racket-doc/scribblings/inside/misc.scrbl b/pkgs/racket-doc/scribblings/inside/misc.scrbl index 714dc1a3d6..e3743b848a 100644 --- a/pkgs/racket-doc/scribblings/inside/misc.scrbl +++ b/pkgs/racket-doc/scribblings/inside/misc.scrbl @@ -309,6 +309,27 @@ can be @cpp{NULL} in that case as well. If the table holds keys weakly, then @var{key} points to a (weak) pointer to the actual key, and the weak pointer's value can be @cpp{NULL}.} +@function[(Scheme_Hash_Tree* scheme_make_hash_tree + [int type])]{ + Similar to @cpp{scheme_make_hash_table}, but creates a hash + tree. A hash tree is equivalent to an immutable hash table + created by @racket[hash]. The @var{type} argument must be + either either @cpp{SCHEME_hash_ptr} or + @cpp{SCHEME_hash_string}, which determines how keys are + compared.} + +@function[(void scheme_hash_tree_set + [Scheme_Hash_Tree* table] + [Scheme_Object* key] + [Scheme_Object* val])]{ +Like @cpp{scheme_hash_set}, but operates on @cpp{Scheme_Hash_Tree}. +} + +@function[(Scheme_Object* scheme_hash_tree_get + [Scheme_Hash_Tree* table] + [Scheme_Object* key])]{ +Like @cpp{scheme_hash_get}, but operates on @cpp{Scheme_Hash_Tree}. +} @function[(intptr_t scheme_double_to_int [char* where] diff --git a/pkgs/racket-doc/scribblings/inside/values.scrbl b/pkgs/racket-doc/scribblings/inside/values.scrbl index bf11ddd7ce..e484fa0f7d 100644 --- a/pkgs/racket-doc/scribblings/inside/values.scrbl +++ b/pkgs/racket-doc/scribblings/inside/values.scrbl @@ -203,6 +203,9 @@ types: @item{@cppdef{scheme_hash_table_type} --- test for this type with @cppdef{SCHEME_HASHTP}} + @item{@cppdef{scheme_hash_tree_type} --- test for this type + with @cppdef{SCHEME_HASHTRP}} + @item{@cppdef{scheme_bucket_table_type} --- test for this type with @cppdef{SCHEME_BUCKTP}}