Skip to content

Commit

Permalink
Merge pull request #551 from jacobwilliams/550-real128-hotfix
Browse files Browse the repository at this point in the history
fixed a bug where compilation with REAL128 didn't work
  • Loading branch information
jacobwilliams authored Mar 6, 2024
2 parents 18ef4c6 + bf9add5 commit c80ef5e
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.3.0
8.4.0
19 changes: 17 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- [Change Log](#change-log)
- [Unreleased](#unreleased)
- [8.4.0 (2024-03-06)](#840-2024-03-06)
- [8.3.0 (2022-05-07)](#830-2022-05-07)
- [8.2.5 (2021-08-17)](#825-2021-08-17)
- [8.2.4 (2021-08-15)](#824-2021-08-15)
Expand Down Expand Up @@ -45,7 +46,22 @@

### [Unreleased](https://github.com/jacobwilliams/json-fortran/tree/HEAD)

[Complete Changeset](https://github.com/jacobwilliams/json-fortran/compare/8.3.0...HEAD)
[Complete Changeset](https://github.com/jacobwilliams/json-fortran/compare/8.4.0...HEAD)

### [8.4.0](https://github.com/jacobwilliams/json-fortran/tree/8.4.0) (2024-03-06)

[Complete Changeset](https://github.com/jacobwilliams/json-fortran/compare/8.3.0...8.4.0)
or [Download v8.4.0](https://github.com/jacobwilliams/json-fortran/releases/tag/8.4.0)

**Enhancements:**

- Minor updates for readme and documentation [\#521](https://github.com/jacobwilliams/json-fortran/pull/521) ([zmoon](https://github.com/zmoon))
- Updates for unit tests [\#536](https://github.com/jacobwilliams/json-fortran/issues/536) [\#543](https://github.com/jacobwilliams/json-fortran/pull/543) ([gha3mi](https://github.com/gha3mi), [jacobwilliams](https://github.com/jacobwilliams))

**Bug Fixes:**

- Fixed a bug where the library would not compile if using `REAL128` kind [\#550](https://github.com/jacobwilliams/json-fortran/issues/550) ([jacobwilliams](https://github.com/jacobwilliams))
- Fixes to GitHub Actions CI [\#535](https://github.com/jacobwilliams/json-fortran/pull/535) ([jacobwilliams](https://github.com/jacobwilliams))

### [8.3.0](https://github.com/jacobwilliams/json-fortran/tree/8.3.0) (2022-05-07)

Expand All @@ -59,7 +75,6 @@ or [Download v8.3.0](https://github.com/jacobwilliams/json-fortran/releases/tag/
- Add information on conda-forge distribution [\#506](https://github.com/jacobwilliams/json-fortran/pull/506) ([awvwgk](https://github.com/awvwgk)) [\#507](https://github.com/jacobwilliams/json-fortran/issues/507)
- Updated CMake to export include directories with target [\#504](https://github.com/jacobwilliams/json-fortran/pull/504) [\#503](https://github.com/jacobwilliams/json-fortran/issues/503) ([awvwgk](https://github.com/awvwgk))


**Bug Fixes:**

- Fixed a minor standards violation [\#510](https://github.com/jacobwilliams/json-fortran/issues/510) [\#511](https://github.com/jacobwilliams/json-fortran/pull/511) ([jacobwilliams](https://github.com/jacobwilliams))
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ cmake_minimum_required ( VERSION 2.8.8 FATAL_ERROR )
enable_language ( Fortran )
project ( jf_test NONE )
find_package ( jsonfortran-${CMAKE_Fortran_COMPILER_ID} 8.3.0 REQUIRED )
find_package ( jsonfortran-${CMAKE_Fortran_COMPILER_ID} 8.4.0 REQUIRED )
file ( GLOB JF_TEST_SRCS "src/tests/jf_test_*.F90" )
foreach ( UNIT_TEST ${JF_TEST_SRCS} )
Expand Down
2 changes: 1 addition & 1 deletion pages/development-resources/release-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ remain accurate.
1. Add `pages/releases/index.md` to the git index: `git add pages/releases/index.md`
1. Update the version string in remaining files requiring manual edits:
1. Edit the `.VERSION` file
1. Edit the CMake example on line 142 of `README.md`
1. Edit the CMake example on line 141 of `README.md`
1. Edit the `json_fortran_version` string in `json_module.F90`
1. Add these files to the git index: `git add .VERSION README.md ./src/json_module.F90`
1. Commit the changes to the master branch: `git commit`
Expand Down
3 changes: 3 additions & 0 deletions pages/releases/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ documentation from the documentation for official releases other than
using the browser's back button. Feel free to bookmark this page, or
the [main project page](|url|/index.html) for convenient navigation.

* [8.4.0](https://jacobwilliams.github.io/json-fortran/prev/8.4.0/index.html)
([FORD](https://github.com/Fortran-FOSS-Programmers/ford) generated documentation)
- [Download](https://github.com/jacobwilliams/json-fortran/releases/tag/8.4.0)
* [8.3.0](https://jacobwilliams.github.io/json-fortran/prev/8.3.0/index.html)
([FORD](https://github.com/Fortran-FOSS-Programmers/ford) generated documentation)
- [Download](https://github.com/jacobwilliams/json-fortran/releases/tag/8.3.0)
Expand Down
2 changes: 1 addition & 1 deletion src/json_module.F90
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ module json_module

implicit none

character(kind=json_CK,len=*),parameter,private :: version = '8.3.0'
character(kind=json_CK,len=*),parameter,private :: version = '8.4.0'
!! JSON-Fortran version.
!!
!!@note This string should match the one in the `.VERSION` file (which is used
Expand Down
16 changes: 14 additions & 2 deletions src/json_value_module.F90
Original file line number Diff line number Diff line change
Expand Up @@ -8763,8 +8763,14 @@ subroutine json_get_real64_by_path(json, me, path, value, found, default)
real(real64),intent(in),optional :: default !! default value if not found

real(RK) :: tmp
real(RK) :: tmp_default

call json%get(me, path, tmp, found, default)
if (present(default)) then
tmp_default = real(default, RK)
call json%get(me, path, tmp, found, tmp_default)
else
call json%get(me, path, tmp, found)
end if
value = real(tmp,real64)

end subroutine json_get_real64_by_path
Expand Down Expand Up @@ -8826,8 +8832,14 @@ subroutine json_get_real64_vec_by_path(json, me, path, vec, found, default)
real(real64),dimension(:),intent(in),optional :: default !! default value if not found

real(RK),dimension(:),allocatable :: tmp
real(RK),dimension(:),allocatable :: tmp_default

call json%get(me, path, tmp, found, default)
if (present(default)) then
tmp_default = real(default, RK)
call json%get(me, path, tmp, found, tmp_default)
else
call json%get(me, path, tmp, found)
end if
if (allocated(tmp)) vec = real(tmp,real64)

end subroutine json_get_real64_vec_by_path
Expand Down

0 comments on commit c80ef5e

Please sign in to comment.