initial import
[panda.git] / goo / st-universe.c
blob4afcdd6725e30c9df4afb77066509ccad582d4bb
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; indent-offset: 4 -*- */
2 /*
3 * st-universe.c
5 * Copyright (C) 2008 Vincent Geddes
7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this software and associated documentation files (the "Software"), to deal
9 * in the Software without restriction, including without limitation the rights
10 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 * copies of the Software, and to permit persons to whom the Software is
12 * furnished to do so, subject to the following conditions:
14 * The above copyright notice and this permission notice shall be included in
15 * all copies or substantial portions of the Software.
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 * THE SOFTWARE.
26 #include <st-universe.h>
27 #include <st-utils.h>
28 #include <st-hashed-collection.h>
29 #include <st-symbol.h>
31 #include <string.h>
33 st_oop_t st_nil = ST_OOP (NULL),
34 st_true = ST_OOP (NULL),
35 st_false = ST_OOP (NULL),
36 st_symbol_table = ST_OOP (NULL),
37 st_smalltalk = ST_OOP (NULL),
38 st_undefined_object_class = ST_OOP (NULL),
39 st_metaclass_class = ST_OOP (NULL),
40 st_behavior_class = ST_OOP (NULL),
41 st_smi_class = ST_OOP (NULL),
42 st_float_class = ST_OOP (NULL),
43 st_character_class = ST_OOP (NULL),
44 st_true_class = ST_OOP (NULL),
45 st_false_class = ST_OOP (NULL),
46 st_array_class = ST_OOP (NULL),
47 st_byte_array_class = ST_OOP (NULL),
48 st_set_class = ST_OOP (NULL),
49 st_dictionary_class = ST_OOP (NULL),
50 st_association_class = ST_OOP (NULL),
51 st_string_class = ST_OOP (NULL),
52 st_symbol_class = ST_OOP (NULL),
53 st_compiled_method_class = ST_OOP (NULL),
54 st_compiled_block_class = ST_OOP (NULL);
57 st_oop_t
58 st_global_get (const char *name)
60 return st_dictionary_at (st_smalltalk, st_symbol_new (name));