Skip to content

Commit e66c901

Browse files
committed
Comment updates suggested by @rjmccall
1 parent 663783f commit e66c901

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

stdlib/public/runtime/ReflectionMirror.mm

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,11 @@ static void copyUnownedFieldContents(OpaqueValue *destContainer, const Metadata
164164
}
165165

166166
static void copyUnmanagedFieldContents(OpaqueValue *destContainer, const Metadata *type, OpaqueValue *fieldData) {
167+
// Also known as "unowned(unsafe)".
168+
// This is simpler than the unowned/weak cases because unmanaged
169+
// references are fundamentally the same as strong ones, so we
170+
// can use the regular strong reference support that already
171+
// knows how to handle existentials and Obj-C references.
167172
type->vw_initializeWithCopy(destContainer, fieldData);
168173
}
169174

@@ -179,7 +184,7 @@ static AnyReturn copyFieldContents(OpaqueValue *fieldData,
179184
type->vw_initializeWithCopy(destContainer, fieldData);
180185
}
181186

182-
// Generate a conditional clause for every known ownership type
187+
// Generate a conditional clause for every known ownership type.
183188
// If this causes errors, it's because someone added a new ownership type
184189
// to ReferenceStorage.def and missed some related updates.
185190
#define REF_STORAGE(Name, ...) \

0 commit comments

Comments
 (0)