Skip to content

Commit

Permalink
#2642 Fix replace calls for #2643 workaround.
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienRemy committed Jul 15, 2024
1 parent db3d952 commit 6d0bb74
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/psyclone/domain/gocean/kernel/psyir.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ def create_from_psyir(symbol):
# itself.
if isinstance(datatype, StructureType):
type_declaration = FortranWriter().gen_typedecl(symbol)
type_declaration.replace(", public", "").replace(", private", "")
type_declaration = type_declaration.replace(", public", "")
type_declaration = type_declaration.replace(", private", "")
return GOceanKernelMetadata.create_from_fortran_string(
type_declaration)

Expand Down
3 changes: 2 additions & 1 deletion src/psyclone/domain/lfric/kernel/lfric_kernel_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,8 @@ def create_from_psyir(symbol):
# itself.
if isinstance(datatype, StructureType):
type_declaration = FortranWriter().gen_typedecl(symbol)
type_declaration.replace(", public", "").replace(", private", "")
type_declaration = type_declaration.replace(", public", "")
type_declaration = type_declaration.replace(", private", "")
return LFRicKernelMetadata.create_from_fortran_string(
type_declaration)

Expand Down

0 comments on commit 6d0bb74

Please sign in to comment.