Skip to content
Open
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
3 changes: 3 additions & 0 deletions scripts/cgenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def __init__(self,
aliasMacro='',
misracstyle=False,
misracppstyle=False,
indentClosingBrace=False,
**kwargs
):
"""Constructor.
Expand Down Expand Up @@ -165,6 +166,8 @@ def __init__(self,
self.misracppstyle = misracppstyle
"""generate MISRA C++-friendly headers"""

self.indentClosingBrace = indentClosingBrace

self.codeGenerator = True
"""True if this generator makes compilable code"""

Expand Down
8 changes: 7 additions & 1 deletion scripts/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ def __init__(self,
sortProcedure=regSortFeatures,
requireCommandAliases=False,
requireDepends=True,
indentClosingBrace=False,
):
"""Constructor.

Expand Down Expand Up @@ -333,6 +334,8 @@ def __init__(self,
self.requireDepends = requireDepends
"""True if dependencies of API tags are transitively required."""

self.indentClosingBrace = indentClosingBrace

def emptyRegex(self, pat):
"""Substitute a regular expression which matches no version
or extension names for None or the empty string."""
Expand Down Expand Up @@ -1430,7 +1433,10 @@ def makeCDecls(self, cmd):
indentdecl = '(\n'
indentdecl += ',\n'.join(self.makeCParamDecl(p, self.genOpts.alignFuncParam)
for p in params)
indentdecl += ');'
if self.genOpts.indentClosingBrace:
indentdecl += '\n);'
else:
indentdecl += ');'
else:
indentdecl = '(void);'
# Non-indented parameters
Expand Down
3 changes: 2 additions & 1 deletion scripts/genvk.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,8 @@ def makeGenOpts(args):
apientryp = 'VKAPI_PTR *',
alignFuncParam = 48,
misracstyle = misracstyle,
misracppstyle = misracppstyle)
misracppstyle = misracppstyle,
indentClosingBrace = False)
]

genOpts['vulkan_base_core.h'] = [
Expand Down
Loading