WIP: dev #1
@@ -176,7 +176,7 @@ public class Generator
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline void string_rc_inc(struct nub_core_string *string)
|
||||
static inline void nub_core_string_rc_inc(struct nub_core_string *string)
|
||||
{
|
||||
if (string == NULL)
|
||||
{
|
||||
@@ -192,7 +192,7 @@ public class Generator
|
||||
STR_DBG("INC: str=%p ref=%u \"%s\"", (void*)string, string->ref, string->data);
|
||||
}
|
||||
|
||||
static inline void string_rc_dec(struct nub_core_string *string)
|
||||
static inline void nub_core_string_rc_dec(struct nub_core_string *string)
|
||||
{
|
||||
if (string == NULL)
|
||||
{
|
||||
@@ -232,7 +232,7 @@ public class Generator
|
||||
}
|
||||
}
|
||||
|
||||
static inline struct nub_core_string *string_concat(struct nub_core_string *left, struct nub_core_string *right)
|
||||
static inline struct nub_core_string *nub_core_string_concat(struct nub_core_string *left, struct nub_core_string *right)
|
||||
{
|
||||
size_t new_length = left->length + right->length;
|
||||
|
||||
@@ -255,7 +255,7 @@ public class Generator
|
||||
return result;
|
||||
}
|
||||
|
||||
static inline struct nub_core_string *string_from_cstr(char* cstr)
|
||||
static inline struct nub_core_string *nub_core_string_from_cstr(char* cstr)
|
||||
{
|
||||
size_t len = strlen(cstr);
|
||||
|
||||
@@ -580,7 +580,7 @@ public class Generator
|
||||
if (expression.Operation == TypedNodeExpressionBinary.Op.Add && expression.Left.Type is NubTypeString && expression.Right.Type is NubTypeString)
|
||||
{
|
||||
scopes.Peek().DeconstructableNames.Add((name, expression.Type));
|
||||
writer.WriteLine($"{CType(NubTypeString.Instance, name)} = string_concat({left}, {right});");
|
||||
writer.WriteLine($"{CType(NubTypeString.Instance, name)} = nub_core_string_concat({left}, {right});");
|
||||
return name;
|
||||
}
|
||||
|
||||
@@ -690,7 +690,7 @@ public class Generator
|
||||
var name = Tmp();
|
||||
scopes.Peek().DeconstructableNames.Add((name, expression.Type));
|
||||
var value = EmitExpression(expression.Value);
|
||||
writer.WriteLine($"{CType(expression.Type, name)} = string_from_cstr({value});");
|
||||
writer.WriteLine($"{CType(expression.Type, name)} = nub_core_string_from_cstr({value});");
|
||||
return name;
|
||||
}
|
||||
|
||||
@@ -788,7 +788,7 @@ public class Generator
|
||||
{
|
||||
case NubTypeString:
|
||||
{
|
||||
writer.WriteLine($"string_rc_inc({value});");
|
||||
writer.WriteLine($"nub_core_string_rc_inc({value});");
|
||||
break;
|
||||
}
|
||||
case NubTypeStruct structType:
|
||||
@@ -859,7 +859,7 @@ public class Generator
|
||||
{
|
||||
case NubTypeString:
|
||||
{
|
||||
writer.WriteLine($"string_rc_dec({value});");
|
||||
writer.WriteLine($"nub_core_string_rc_dec({value});");
|
||||
break;
|
||||
}
|
||||
case NubTypeStruct structType:
|
||||
|
||||
Reference in New Issue
Block a user