Skip to content

Commit

Permalink
options.fn_params_const_char_pointer_with_default_null = True by default
Browse files Browse the repository at this point in the history
  • Loading branch information
pthom committed Nov 15, 2024
1 parent f869933 commit f546ae8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/litgen/internal/adapted_types/adapted_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def is_const_char_pointer_with_default_null(self) -> bool:

is_pointer = type_modifiers == ["*"]
is_const = "const" in type_specifiers
is_char = "char" in type_names
is_char = type_names == ["char"]
is_default_null = initial_value_cpp in ["NULL", "nullptr"]

r = is_pointer and is_const and is_char and is_default_null
Expand Down
2 changes: 1 addition & 1 deletion src/litgen/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ class LitgenOptions:
# with a lambda function wrapping around original interface.
#
# NOTE: Enable this for nanobind.
fn_params_const_char_pointer_with_default_null: bool = False
fn_params_const_char_pointer_with_default_null: bool = True

# As an alternative, we can also add the modified value to the returned type
# of the function (which will now be a tuple)
Expand Down

0 comments on commit f546ae8

Please sign in to comment.