Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ObjCRuntime/Class.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ internal unsafe static void Initialize (Runtime.InitializationOptions* options)

for (int i = 0; i < map->assembly_count; i++) {
var assembly = map->assemblies [i];
Runtime.Registrar.SetAssemblyRegistered (Marshal.PtrToStringAuto (assembly.name));
Runtime.Registrar.SetAssemblyRegistered (Marshal.PtrToStringAuto (assembly.name)!);
}
}

Expand Down
156 changes: 86 additions & 70 deletions src/ObjCRuntime/DynamicRegistrar.cs

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion src/ObjCRuntime/Registrar.core.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
using System.Diagnostics.CodeAnalysis;
using System.Text;

#nullable enable

namespace Registrar {
abstract partial class Registrar {
[return: NotNullIfNotNull (nameof (getterSelector))]
internal static string? CreateSetterSelector (string? getterSelector)
{
if (string.IsNullOrEmpty (getterSelector))
Expand All @@ -16,8 +18,12 @@ abstract partial class Registrar {
return "set" + ((char) first).ToString () + getterSelector.Substring (1) + ":";
}

public static string SanitizeObjectiveCName (string name)
[return: NotNullIfNotNull (nameof (name))]
public static string? SanitizeObjectiveCName (string? name)
{
if (string.IsNullOrEmpty (name))
return name;

StringBuilder? sb = null;

for (int i = 0; i < name.Length; i++) {
Expand Down
Loading
Loading