]> gitweb.factorcode.org Git - factor.git/blob - vm/strings.hpp
Merge Phil Dawes' VM work
[factor.git] / vm / strings.hpp
1 namespace factor
2 {
3
4 inline static cell string_capacity(string *str)
5 {
6         return untag_fixnum(str->length);
7 }
8
9 inline static cell string_size(cell size)
10 {
11         return sizeof(string) + size;
12 }
13
14 PRIMITIVE(string);
15 PRIMITIVE(resize_string);
16
17 PRIMITIVE(string_nth);
18 PRIMITIVE(set_string_nth_slow);
19 PRIMITIVE(set_string_nth_fast);
20
21 }