factor/vm/strings.hpp

15 lines
194 B
C++
Raw Normal View History

2009-05-04 02:46:13 -04:00
namespace factor
{
inline static cell string_capacity(const string *str)
2009-05-02 05:04:19 -04:00
{
return untag_fixnum(str->length);
2009-05-02 05:04:19 -04:00
}
2009-05-04 05:50:24 -04:00
inline static cell string_size(cell size)
2009-05-02 05:04:19 -04:00
{
2009-05-04 05:50:24 -04:00
return sizeof(string) + size;
2009-05-02 05:04:19 -04:00
}
2009-05-04 02:46:13 -04:00
}