Skip to content

Commit

Permalink
Merge pull request #4 from bottlenoselabs/rename
Browse files Browse the repository at this point in the history
Rename `c2json` to `c2ffi`
  • Loading branch information
lithiumtoast authored Mar 22, 2024
2 parents 9ca89cd + 2f245dd commit 558618c
Show file tree
Hide file tree
Showing 205 changed files with 1,670 additions and 1,667 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
steps:

- name: "Clone Git repository"
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: "Set version"
id: set-version
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:

- name: "Test .NET extract"
run: |
dotnet test '${{ github.workspace }}/src/cs/tests/c2json.Tests.EndToEnd.Extract/c2json.Tests.EndToEnd.Extract.csproj' --nologo --verbosity minimal --configuration Release
dotnet test '${{ github.workspace }}/src/cs/tests/c2ffi.Tests.EndToEnd.Extract/c2ffi.Tests.EndToEnd.Extract.csproj' --nologo --verbosity minimal --configuration Release
- name: "Upload generated FFI files"
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -90,5 +90,5 @@ jobs:
- name: "Test .NET merge"
run: |
dotnet test '${{ github.workspace }}/src/cs/tests/c2json.Tests.EndToEnd.Merge/c2json.Tests.EndToEnd.Merge.csproj' --nologo --verbosity minimal --configuration Release
dotnet test '${{ github.workspace }}/src/cs/tests/c2ffi.Tests.EndToEnd.Merge/c2ffi.Tests.EndToEnd.Merge.csproj' --nologo --verbosity minimal --configuration Release
10 changes: 5 additions & 5 deletions src/cs/c2json.sln
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "c2json.Tool", "production\c2json.Tool\c2json.Tool.csproj", "{3F9FAB9D-2FAD-4F1B-AC53-68F47CEDBC0E}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "c2ffi.Tool", "production\c2ffi.Tool\c2ffi.Tool.csproj", "{3F9FAB9D-2FAD-4F1B-AC53-68F47CEDBC0E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "production", "production", "{5958CFE5-69EC-4909-9325-15EC41A29A49}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{06F30AED-E9B8-4E52-ADF9-34A4FD08103D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "c2json.Tests.EndToEnd.Extract", "tests\c2json.Tests.EndToEnd.Extract\c2json.Tests.EndToEnd.Extract.csproj", "{0BCF52BC-43A0-4269-AD46-EFD744E68E2F}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "c2ffi.Tests.EndToEnd.Extract", "tests\c2ffi.Tests.EndToEnd.Extract\c2ffi.Tests.EndToEnd.Extract.csproj", "{0BCF52BC-43A0-4269-AD46-EFD744E68E2F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "c2json.Data", "production\c2json.Data\c2json.Data.csproj", "{14BAF06A-F498-4B99-AD01-FA300EFFAB42}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "c2ffi.Data", "production\c2ffi.Data\c2ffi.Data.csproj", "{14BAF06A-F498-4B99-AD01-FA300EFFAB42}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "c2json.Tests.Library", "tests\c2json.Tests.Library\c2json.Tests.Library.csproj", "{D8933EFB-2F00-4356-8F69-4438A9711DA3}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "c2ffi.Tests.Library", "tests\c2ffi.Tests.Library\c2ffi.Tests.Library.csproj", "{D8933EFB-2F00-4356-8F69-4438A9711DA3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "c2json.Tests.EndToEnd.Merge", "tests\c2json.Tests.EndToEnd.Merge\c2json.Tests.EndToEnd.Merge.csproj", "{CEC639D4-F1FD-40BD-81B7-B20B2DE18EA1}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "c2ffi.Tests.EndToEnd.Merge", "tests\c2ffi.Tests.EndToEnd.Merge\c2ffi.Tests.EndToEnd.Merge.csproj", "{CEC639D4-F1FD-40BD-81B7-B20B2DE18EA1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

using System.Collections.Immutable;
using System.Text.Json.Serialization;
using c2json.Data.Nodes;
using c2ffi.Data.Nodes;
using JetBrains.Annotations;

namespace c2json.Data;
namespace c2ffi.Data;

// NOTE: Properties are required for System.Text.Json serialization

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

using System.Collections.Immutable;
using System.Text.Json.Serialization;
using c2json.Data.Nodes;
using c2ffi.Data.Nodes;
using JetBrains.Annotations;

namespace c2json.Data;
namespace c2ffi.Data;

// NOTE: Properties are required for System.Text.Json serialization

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using JetBrains.Annotations;

namespace c2json.Data;
namespace c2ffi.Data;

/// <summary>
/// Defines the types of calling conventions in C.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Text.Json.Serialization;
using JetBrains.Annotations;

namespace c2json.Data;
namespace c2ffi.Data;

// NOTE: Properties are required for System.Text.Json serialization

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using JetBrains.Annotations;

namespace c2json.Data;
namespace c2ffi.Data;

/// <summary>
/// Defines the kind of C nodes in the <see cref="CFfiTargetPlatform" />.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using JetBrains.Annotations;

namespace c2json.Data;
namespace c2ffi.Data;

/// <summary>
/// Defines the kind of C records.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Text.Json.Serialization;
using JetBrains.Annotations;

namespace c2json.Data;
namespace c2ffi.Data;

// NOTE: Properties are required for System.Text.Json serialization

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Suppress warnings about [Obsolete] member usage in generated code.
#pragma warning disable CS0612, CS0618

namespace c2json.Data.Serialization
namespace c2ffi.Data.Serialization
{
public partial class JsonSerializerContextCFfiCrossPlatform
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,34 @@
// Suppress warnings about [Obsolete] member usage in generated code.
#pragma warning disable CS0612, CS0618

namespace c2json.Data.Serialization
namespace c2ffi.Data.Serialization
{
public partial class JsonSerializerContextCFfiCrossPlatform
{
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::c2json.Data.Nodes.CEnum>? _CEnum;
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::c2ffi.Data.Nodes.CEnum>? _CEnum;

/// <summary>
/// Defines the source generated JSON serialization contract metadata for a given type.
/// </summary>
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::c2json.Data.Nodes.CEnum> CEnum
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::c2ffi.Data.Nodes.CEnum> CEnum
{
get => _CEnum ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::c2json.Data.Nodes.CEnum>)Options.GetTypeInfo(typeof(global::c2json.Data.Nodes.CEnum));
get => _CEnum ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::c2ffi.Data.Nodes.CEnum>)Options.GetTypeInfo(typeof(global::c2ffi.Data.Nodes.CEnum));
}

private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::c2json.Data.Nodes.CEnum> Create_CEnum(global::System.Text.Json.JsonSerializerOptions options)
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::c2ffi.Data.Nodes.CEnum> Create_CEnum(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::c2json.Data.Nodes.CEnum>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::c2json.Data.Nodes.CEnum> jsonTypeInfo))
if (!TryGetTypeInfoForRuntimeCustomConverter<global::c2ffi.Data.Nodes.CEnum>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::c2ffi.Data.Nodes.CEnum> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::c2json.Data.Nodes.CEnum>
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::c2ffi.Data.Nodes.CEnum>
{
ObjectCreator = () => new global::c2json.Data.Nodes.CEnum(),
ObjectCreator = () => new global::c2ffi.Data.Nodes.CEnum(),
ObjectWithParameterizedConstructorCreator = null,
PropertyMetadataInitializer = _ => CEnumPropInit(options),
ConstructorParameterMetadataInitializer = null,
SerializeHandler = null
};

jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::c2json.Data.Nodes.CEnum>(options, objectInfo);
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::c2ffi.Data.Nodes.CEnum>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}

Expand All @@ -45,15 +45,15 @@ public partial class JsonSerializerContextCFfiCrossPlatform
{
var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[6];

var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::c2json.Data.CTypeInfo>
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::c2ffi.Data.CTypeInfo>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::c2json.Data.Nodes.CEnum),
DeclaringType = typeof(global::c2ffi.Data.Nodes.CEnum),
Converter = null,
Getter = static obj => ((global::c2json.Data.Nodes.CEnum)obj).IntegerTypeInfo,
Setter = static (obj, value) => ((global::c2json.Data.Nodes.CEnum)obj).IntegerTypeInfo = value!,
Getter = static obj => ((global::c2ffi.Data.Nodes.CEnum)obj).IntegerTypeInfo,
Setter = static (obj, value) => ((global::c2ffi.Data.Nodes.CEnum)obj).IntegerTypeInfo = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
Expand All @@ -62,17 +62,17 @@ public partial class JsonSerializerContextCFfiCrossPlatform
JsonPropertyName = "type_integer"
};

properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::c2json.Data.CTypeInfo>(options, info0);
properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::c2ffi.Data.CTypeInfo>(options, info0);

var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Immutable.ImmutableArray<global::c2json.Data.Nodes.CEnumValue>>
var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Immutable.ImmutableArray<global::c2ffi.Data.Nodes.CEnumValue>>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::c2json.Data.Nodes.CEnum),
DeclaringType = typeof(global::c2ffi.Data.Nodes.CEnum),
Converter = null,
Getter = static obj => ((global::c2json.Data.Nodes.CEnum)obj).Values,
Setter = static (obj, value) => ((global::c2json.Data.Nodes.CEnum)obj).Values = value!,
Getter = static obj => ((global::c2ffi.Data.Nodes.CEnum)obj).Values,
Setter = static (obj, value) => ((global::c2ffi.Data.Nodes.CEnum)obj).Values = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
Expand All @@ -81,17 +81,17 @@ public partial class JsonSerializerContextCFfiCrossPlatform
JsonPropertyName = "values"
};

properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Immutable.ImmutableArray<global::c2json.Data.Nodes.CEnumValue>>(options, info1);
properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Immutable.ImmutableArray<global::c2ffi.Data.Nodes.CEnumValue>>(options, info1);

var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::c2json.Data.CLocation?>
var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::c2ffi.Data.CLocation?>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::c2json.Data.Nodes.CNodeWithLocation),
DeclaringType = typeof(global::c2ffi.Data.Nodes.CNodeWithLocation),
Converter = null,
Getter = static obj => ((global::c2json.Data.Nodes.CNodeWithLocation)obj).Location,
Setter = static (obj, value) => ((global::c2json.Data.Nodes.CNodeWithLocation)obj).Location = value!,
Getter = static obj => ((global::c2ffi.Data.Nodes.CNodeWithLocation)obj).Location,
Setter = static (obj, value) => ((global::c2ffi.Data.Nodes.CNodeWithLocation)obj).Location = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
Expand All @@ -100,17 +100,17 @@ public partial class JsonSerializerContextCFfiCrossPlatform
JsonPropertyName = "location"
};

properties[2] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::c2json.Data.CLocation?>(options, info2);
properties[2] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::c2ffi.Data.CLocation?>(options, info2);

var info3 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::c2json.Data.Nodes.CNode),
DeclaringType = typeof(global::c2ffi.Data.Nodes.CNode),
Converter = null,
Getter = static obj => ((global::c2json.Data.Nodes.CNode)obj).Comment,
Setter = static (obj, value) => ((global::c2json.Data.Nodes.CNode)obj).Comment = value!,
Getter = static obj => ((global::c2ffi.Data.Nodes.CNode)obj).Comment,
Setter = static (obj, value) => ((global::c2ffi.Data.Nodes.CNode)obj).Comment = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
Expand All @@ -126,10 +126,10 @@ public partial class JsonSerializerContextCFfiCrossPlatform
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::c2json.Data.Nodes.CNode),
DeclaringType = typeof(global::c2ffi.Data.Nodes.CNode),
Converter = null,
Getter = static obj => ((global::c2json.Data.Nodes.CNode)obj).IsSystem,
Setter = static (obj, value) => ((global::c2json.Data.Nodes.CNode)obj).IsSystem = value!,
Getter = static obj => ((global::c2ffi.Data.Nodes.CNode)obj).IsSystem,
Setter = static (obj, value) => ((global::c2ffi.Data.Nodes.CNode)obj).IsSystem = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
Expand All @@ -145,7 +145,7 @@ public partial class JsonSerializerContextCFfiCrossPlatform
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::c2json.Data.Nodes.CNode),
DeclaringType = typeof(global::c2ffi.Data.Nodes.CNode),
Converter = null,
Getter = null,
Setter = null,
Expand Down
Loading

0 comments on commit 558618c

Please sign in to comment.