Skip to content

Commit

Permalink
fix icon4pygen (#442)
Browse files Browse the repository at this point in the history
The generated wrap_run subroutines were still generating unused pointer to before fields, which leads to compile errors on newer compilers. This is cleaned up here such that the pointers are not generated.
  • Loading branch information
huppd authored and iomaganaris committed Jun 18, 2024
1 parent a102c7e commit 6739c6d
Showing 1 changed file with 10 additions and 23 deletions.
33 changes: 10 additions & 23 deletions tools/src/icon4pytools/icon4pygen/bindings/codegen/f90.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,29 +525,16 @@ def __post_init__(self, *args: Any, **kwargs: Any) -> None:
param_fields = [F90Field(name=field.name) for field in self.all_fields] + [
F90Field(name=name) for name in _DOMAIN_ARGS
]
bind_fields = (
[
F90TypedField(
name=field.name,
dtype=field.renderer.render_ctype("f90"),
dims=field.renderer.render_ranked_dim_string(),
)
for field in self.all_fields
]
+ [
F90TypedField(
name=field.name,
suffix="before",
dtype=field.renderer.render_ctype("f90"),
dims=field.renderer.render_ranked_dim_string(),
)
for field in self.out_fields
]
+ [
F90TypedField(name=name, dtype="integer(c_int)", dims="value")
for name in _DOMAIN_ARGS
]
)
bind_fields = [
F90TypedField(
name=field.name,
dtype=field.renderer.render_ctype("f90"),
dims=field.renderer.render_ranked_dim_string(),
)
for field in self.all_fields
] + [
F90TypedField(name=name, dtype="integer(c_int)", dims="value") for name in _DOMAIN_ARGS
]
k_sizes_fields = [
F90TypedField(name=field.name, suffix=s, dtype="integer")
for s in ["k_size"]
Expand Down

0 comments on commit 6739c6d

Please sign in to comment.