Implement OBLISTs
[muddle-interpreter.git] / src / oblist.h
1 /*
2 Copyright (C) 2017-2018 Keziah Wesley
3
4 You can redistribute and/or modify this file under the terms of the
5 GNU Affero General Public License as published by the Free Software
6 Foundation, either version 3 of the License, or (at your option) any
7 later version.
8
9 This file is distributed in the hope that it will be useful, but
10 WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Affero General Public License for more details.
13
14 You should have received a copy of the GNU Affero General Public
15 License along with this file. If not, see
16 <http://www.gnu.org/licenses/>.
17 */
18
19 #ifndef OBLIST_H
20 #define OBLIST_H
21
22 #include "object.h"
23
24 // UVECTOR of LISTs of ATOMs
25 // each LIST is a hash bucket
26 // each LIST is sorted by PNAME
27 // each LIST is headed by a LOSE sentry object
28
29 // for now, 1 global oblist
30 extern uvector_object root;
31
32 uvector_object oblist_create (uint32_t buckct);
33
34 atom_object oblist_find_or_insert (uvector_object oblist, const char *name,
35                                    uint32_t namelen);
36
37 // returns a ATOM object or #FALSE ()
38 //object oblist_lookup (uvector_object oblist, const char * name, uint32_t namelen);
39
40 #endif