diff --git a/CMakeLists.txt b/CMakeLists.txt index f8c93cb..a656f24 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.12) project (YAFYAML - VERSION 1.0.5 + VERSION 1.0.6 LANGUAGES Fortran) # Most users of this software do not (should not?) have permissions to diff --git a/ChangeLog.md b/ChangeLog.md index 2d4a9df..f74d1da 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -5,6 +5,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.0.6] - 2023-01-26 + +### Fixed + +- Workarounds for Intel 2021.7 +- Out of date examples have been updated + ## [1.0.5] - 2023-01-23 ### Fixed diff --git a/Examples/Iterators/iterator.F90 b/Examples/Iterators/iterator.F90 index 4607e57..c8cd083 100644 --- a/Examples/Iterators/iterator.F90 +++ b/Examples/Iterators/iterator.F90 @@ -9,10 +9,10 @@ program main implicit none type(Parser) :: p - class(AbstractNode), allocatable :: node + class(YAML_Node), allocatable :: node integer :: status - p = Parser('core') + p = Parser() node = p%load('iterator.yaml') write(10,'(dt)', iostat=status) node @@ -24,11 +24,11 @@ program main ! This procedure does not check any potential errors ! but is easier to follow as a result. subroutine optimistic(node) - class(AbstractNode), intent(in) :: node + class(YAML_Node), intent(in) :: node integer :: i integer :: prime - class(AbstractNode), pointer :: subcfg, subsubcfg + class(YAML_Node), pointer :: subcfg, subsubcfg class(NodeIterator), allocatable :: iter character(:), pointer :: shape integer :: n_edges @@ -58,11 +58,11 @@ end subroutine optimistic ! This procedure carefully checks all return codes. subroutine pessimistic(node) - class(AbstractNode), intent(in) :: node + class(YAML_Node), intent(in) :: node integer :: i integer :: prime - class(AbstractNode), pointer :: subcfg, subsubcfg + class(YAML_Node), pointer :: subcfg, subsubcfg class(NodeIterator), allocatable :: iter character(:), pointer :: shape, key integer :: n_edges diff --git a/Examples/JSON/integer-array/test-integer-array.f90 b/Examples/JSON/integer-array/test-integer-array.f90 index d32881e..8666f5b 100644 --- a/Examples/JSON/integer-array/test-integer-array.f90 +++ b/Examples/JSON/integer-array/test-integer-array.f90 @@ -6,7 +6,7 @@ program main class(YAML_Node), allocatable :: c integer, allocatable :: nodes(:) - p = Parser('core') + p = Parser() c = p%load('integer-array.json') call c%get(nodes, 'nodes') diff --git a/Examples/JSON/nested-object-array/test-nested-object-array.f90 b/Examples/JSON/nested-object-array/test-nested-object-array.f90 index 421eb09..b4bbb7c 100644 --- a/Examples/JSON/nested-object-array/test-nested-object-array.f90 +++ b/Examples/JSON/nested-object-array/test-nested-object-array.f90 @@ -18,7 +18,7 @@ program main integer :: i, j, status - p = Parser('core') + p = Parser() c = p%load('nested-object-array.json') dag_vertices => c%at('dag', 'vertices', rc=status) if (status /= YAFYAML_SUCCESS) error stop "did not find 'dag' 'vertices'" diff --git a/Examples/JSON/trivial/test-trivial.f90 b/Examples/JSON/trivial/test-trivial.f90 index 5fb272c..535abf5 100644 --- a/Examples/JSON/trivial/test-trivial.f90 +++ b/Examples/JSON/trivial/test-trivial.f90 @@ -1,13 +1,15 @@ program main - use yafyaml, only : Parser, YAML_Node, assignment(=) + use yafyaml + use fy_CoreSchema implicit none type(Parser) p class(YAML_Node), allocatable :: c logical :: science = .false. + integer :: rc - p = Parser('core') - c = p%load('trivial.json') + p = Parser() + c = p%load('trivial.json', rc=rc) science = c%at('science') ! this should overwrite science with .true. if (.not. science) error stop "Test failed" diff --git a/Examples/JSON/trivial/trivial.json b/Examples/JSON/trivial/trivial.json index 4ddc1c5..964d2e9 100644 --- a/Examples/JSON/trivial/trivial.json +++ b/Examples/JSON/trivial/trivial.json @@ -1 +1,2 @@ { "science" : true } + diff --git a/Examples/Simple/simple.F90 b/Examples/Simple/simple.F90 index a595975..679eb97 100644 --- a/Examples/Simple/simple.F90 +++ b/Examples/Simple/simple.F90 @@ -5,8 +5,8 @@ program main implicit none type(Parser) :: p - class(AbstractNode), allocatable :: node - class(AbstractNode), pointer :: subnode + class(YAML_Node), allocatable :: node + class(YAML_Node), pointer :: subnode real :: x character(:), allocatable :: name diff --git a/Examples/Simple/simple2.F90 b/Examples/Simple/simple2.F90 index ca147fc..1e99a28 100644 --- a/Examples/Simple/simple2.F90 +++ b/Examples/Simple/simple2.F90 @@ -7,7 +7,7 @@ program Simple2 implicit none type(Parser) :: p - class(AbstractNode), allocatable :: node + class(YAML_Node), allocatable :: node character(:), allocatable :: name ! Define the parser object and load the file diff --git a/Examples/Trivial/trivial.F90 b/Examples/Trivial/trivial.F90 index 1fe5498..d1dfa1d 100644 --- a/Examples/Trivial/trivial.F90 +++ b/Examples/Trivial/trivial.F90 @@ -3,11 +3,11 @@ program main implicit none type(Parser) :: p - class(AbstractNode), allocatable :: node + class(YAML_Node), allocatable :: node integer :: prime integer :: status - p = Parser('core') + p = Parser() node = p%load(FileStream('trivial.yaml')) prime = node%of('prime') diff --git a/src/Parser.F90 b/src/Parser.F90 index e1cd634..f094186 100644 --- a/src/Parser.F90 +++ b/src/Parser.F90 @@ -74,8 +74,9 @@ module fy_Parser function new_Parser_default() result(p) type(Parser) :: p - - p = Parser(CoreSchema()) + type(CoreSchema) :: c + c = CoreSchema() + p = Parser(c) end function new_Parser_default