Skip to content

Commit

Permalink
[C] UTF16 string initializer for arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
PeyTy committed May 26, 2024
1 parent 072549f commit 1105cee
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions source/targets/genC.hexa
Original file line number Diff line number Diff line change
Expand Up @@ -1112,6 +1112,9 @@ class GenCxx {
if generics[0] == project.typer.typeUInt8 {
return stringifyType(valueType) + ' ' + name + '_' + arraySize + ' = "' + string + '"'
}
if generics[0] == project.typer.typeUInt16 {
return stringifyType(valueType) + ' ' + name + '_' + arraySize + ' = L"' + string + '"'
}
throw 'String initializer is incompatible'
case null:
// TODO check this in typer
Expand Down

0 comments on commit 1105cee

Please sign in to comment.