- # Return a new native string initialized of `length`
- fun native_string_instance_len(length: Int): PrimitiveInstance[NativeString]
+ # Return a new C string instance sharing the same data space as `txt`
+ fun c_string_instance_fast_cstr(txt: CString, from: Int): Instance
+ do
+ var ncstr = txt.fast_cstring(from)
+ var t = mainmodule.c_string_type
+
+ var instance = new PrimitiveInstance[CString](t, ncstr)
+ init_instance_primitive(instance)
+
+ return instance
+ end
+
+ # Return a new C string initialized of `length`
+ fun c_string_instance_len(length: Int): PrimitiveInstance[CString]