Skip to content

Commit c129081

Browse files
author
Tommy Meisel
committed
update thrift to add sendable
1 parent fd839ac commit c129081

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

compiler/cpp/src/thrift/generate/t_swift_generator.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ void t_swift_generator::generate_enum(t_enum* tenum) {
440440
void t_swift_generator::generate_enum(ofstream& f_enum_decl, ofstream& f_enum_impl, t_enum* tenum) {
441441
print_doc(f_enum_decl, tenum, false);
442442

443-
f_enum_decl << indent() << "public enum " << tenum->get_name() << " : Int32";
443+
f_enum_decl << indent() << "public enum " << tenum->get_name() << " : Int, Sendable";
444444
block_open(f_enum_decl);
445445

446446
vector<t_enum_value*> constants = tenum->get_constants();
@@ -596,7 +596,10 @@ void t_swift_generator::generate_swift_struct(ofstream& out,
596596
out << indent() << visibility << " " << object_type << " " << tstruct->get_name();
597597

598598
if (tstruct->is_xception()) {
599-
out << " : ErrorType";
599+
out << " : ErrorType, @unchecked Sendable";
600+
}
601+
else {
602+
out << " : @unchecked Sendable";
600603
}
601604

602605
block_open(out);

0 commit comments

Comments
 (0)