Skip to content

Commit 574fbca

Browse files
Build Agenttritao
authored andcommitted
Add declaration context as object to function class block
1 parent 0100990 commit 574fbca

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/Generator/Generators/CLI/CLIHeaders.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ public void GenerateTypedefs(DeclarationContext decl)
218218

219219
public void GenerateFunctions(DeclarationContext decl)
220220
{
221-
PushBlock(BlockKind.FunctionsClass);
221+
PushBlock(BlockKind.FunctionsClass, decl);
222222

223223
WriteLine("public ref class {0}", TranslationUnit.FileNameWithoutExtension);
224224
WriteLine("{");

src/Generator/Generators/CLI/CLISources.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,14 @@ private void GenerateDeclContext(DeclarationContext @namespace)
9595
GenerateClass(@class);
9696
}
9797

98+
PushBlock(BlockKind.FunctionsClass, @namespace);
9899
// Generate all the function declarations for the module.
99100
foreach (var function in @namespace.Functions.Where(f => f.IsGenerated))
100101
{
101102
GenerateFunction(function, @namespace);
102103
NewLine();
103104
}
105+
PopBlock();
104106

105107
if (Options.GenerateFunctionTemplates)
106108
{

0 commit comments

Comments
 (0)