Skip to content

Commit

Permalink
Don't generate ImGuiPrintableVarArg for cimgui_internal.h
Browse files Browse the repository at this point in the history
  • Loading branch information
ZimM-LostPolygon committed Oct 2, 2023
1 parent fb92a84 commit 54083ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dear_bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ def convert_header(
})

if generate_exploded_varargs_functions:
mod_add_exploded_variadic_functions.apply(dom_root, 7) # 7 arguments feels reasonable? Yes.
mod_add_exploded_variadic_functions.apply(dom_root, 7, not is_probably_imgui_internal) # 7 arguments feels reasonable? Yes.

if generate_unformatted_functions:
mod_add_unformatted_functions.apply(dom_root,
Expand Down
4 changes: 2 additions & 2 deletions src/modifiers/mod_add_exploded_variadic_functions.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from src import code_dom
from src import utils

def apply(dom_root, varargs_count_limit):
def apply(dom_root, varargs_count_limit, add_wrapper_type):
any_modifications_applied = False
for function in dom_root.list_all_children_of_type(code_dom.DOMFunctionDeclaration):
has_varargs = False
Expand Down Expand Up @@ -38,7 +38,7 @@ def apply(dom_root, varargs_count_limit):

function.parent.insert_after_child(function, [new_function])

if any_modifications_applied:
if any_modifications_applied and add_wrapper_type:
vararg_wrapper_type_insert_point = dom_root.children[0] # Default to adding at the top of the file if we can't find anywhere else

# Look for the right section to add these to - if we can, we want to put them in the same place as other custom types
Expand Down

0 comments on commit 54083ff

Please sign in to comment.