From 9dd4487183e48fb82d1cf8dd22dbba5371201da0 Mon Sep 17 00:00:00 2001 From: Federico Perini Date: Mon, 25 Mar 2024 17:23:17 +0100 Subject: [PATCH] Patch `toml_error` --- src/fpm/toml.f90 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/fpm/toml.f90 b/src/fpm/toml.f90 index 2f0947d6a5..cdade643c0 100644 --- a/src/fpm/toml.f90 +++ b/src/fpm/toml.f90 @@ -256,7 +256,7 @@ subroutine load_from_unit(self, unit, error, json) !> Optional JSON format logical, optional, intent(in) :: json - type(toml_error), allocatable :: toml_error + type(toml_error), allocatable :: local_error type(toml_table), allocatable :: table type(toml_table), pointer :: jtable class(toml_value), allocatable :: object @@ -267,10 +267,10 @@ subroutine load_from_unit(self, unit, error, json) if (is_json) then !> init JSON interpreter - call json_load(object, unit, error=toml_error) - if (allocated(toml_error)) then + call json_load(object, unit, error=local_error) + if (allocated(local_error)) then allocate (error) - call move_alloc(toml_error%message, error%message) + call move_alloc(local_error%message, error%message) return end if @@ -286,11 +286,11 @@ subroutine load_from_unit(self, unit, error, json) else !> use default TOML parser - call toml_load(table, unit, error=toml_error) + call toml_load(table, unit, error=local_error) - if (allocated(toml_error)) then + if (allocated(local_error)) then allocate (error) - call move_alloc(toml_error%message, error%message) + call move_alloc(local_error%message, error%message) return end if