Skip to content

Commit ccd709e

Browse files
committed
Merge branch 'master' of https://github.com/jacobwilliams/json-fortran into 546-example
2 parents e13e088 + fff5372 commit ccd709e

File tree

9 files changed

+46
-15
lines changed

9 files changed

+46
-15
lines changed

.VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.3.0
1+
8.4.0

CHANGELOG.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

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

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

48-
[Complete Changeset](https://github.com/jacobwilliams/json-fortran/compare/8.3.0...HEAD)
49+
[Complete Changeset](https://github.com/jacobwilliams/json-fortran/compare/8.4.0...HEAD)
50+
51+
### [8.4.0](https://github.com/jacobwilliams/json-fortran/tree/8.4.0) (2024-03-06)
52+
53+
[Complete Changeset](https://github.com/jacobwilliams/json-fortran/compare/8.3.0...8.4.0)
54+
or [Download v8.4.0](https://github.com/jacobwilliams/json-fortran/releases/tag/8.4.0)
55+
56+
**Enhancements:**
57+
58+
- Minor updates for readme and documentation [\#521](https://github.com/jacobwilliams/json-fortran/pull/521) ([zmoon](https://github.com/zmoon))
59+
- 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))
60+
61+
**Bug Fixes:**
62+
63+
- 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))
64+
- Fixes to GitHub Actions CI [\#535](https://github.com/jacobwilliams/json-fortran/pull/535) ([jacobwilliams](https://github.com/jacobwilliams))
4965

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

@@ -59,7 +75,6 @@ or [Download v8.3.0](https://github.com/jacobwilliams/json-fortran/releases/tag/
5975
- 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)
6076
- 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))
6177

62-
6378
**Bug Fixes:**
6479

6580
- 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))

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ cmake_minimum_required ( VERSION 2.8.8 FATAL_ERROR )
138138
enable_language ( Fortran )
139139
project ( jf_test NONE )
140140
141-
find_package ( jsonfortran-${CMAKE_Fortran_COMPILER_ID} 8.3.0 REQUIRED )
141+
find_package ( jsonfortran-${CMAKE_Fortran_COMPILER_ID} 8.4.0 REQUIRED )
142142
143143
file ( GLOB JF_TEST_SRCS "src/tests/jf_test_*.F90" )
144144
foreach ( UNIT_TEST ${JF_TEST_SRCS} )

json-fortran.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ coloured_edges: true
2929
extra_filetypes: .inc !
3030
print_creation_date: true
3131
creation_date: %Y-%m-%d %H:%M %z
32-
extra_mods: iso_fortran_env:https://gcc.gnu.org/onlinedocs/gfortran/ISO_005fFORTRAN_005fENV.html
33-
ifcore:https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-tracebackqq
32+
extra_mods: iso_fortran_env:https://fortranwiki.org/fortran/show/iso_fortran_env
33+
ifcore:https://www.intel.com/content/www/us/en/docs/fortran-compiler/developer-guide-reference/2024-0/tracebackqq.html
34+
ieee_arithmetic:https://fortranwiki.org/fortran/show/ieee_arithmetic
3435
md_extensions: markdown.extensions.toc
3536
markdown.extensions.smarty
3637
---

pages/development-resources/release-checklist.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ remain accurate.
5252
1. Add `pages/releases/index.md` to the git index: `git add pages/releases/index.md`
5353
1. Update the version string in remaining files requiring manual edits:
5454
1. Edit the `.VERSION` file
55-
1. Edit the CMake example on line 142 of `README.md`
55+
1. Edit the CMake example on line 141 of `README.md`
5656
1. Edit the `json_fortran_version` string in `json_module.F90`
5757
1. Add these files to the git index: `git add .VERSION README.md ./src/json_module.F90`
5858
1. Commit the changes to the master branch: `git commit`

pages/releases/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ documentation from the documentation for official releases other than
2525
using the browser's back button. Feel free to bookmark this page, or
2626
the [main project page](|url|/index.html) for convenient navigation.
2727

28+
* [8.4.0](https://jacobwilliams.github.io/json-fortran/prev/8.4.0/index.html)
29+
([FORD](https://github.com/Fortran-FOSS-Programmers/ford) generated documentation)
30+
- [Download](https://github.com/jacobwilliams/json-fortran/releases/tag/8.4.0)
2831
* [8.3.0](https://jacobwilliams.github.io/json-fortran/prev/8.3.0/index.html)
2932
([FORD](https://github.com/Fortran-FOSS-Programmers/ford) generated documentation)
3033
- [Download](https://github.com/jacobwilliams/json-fortran/releases/tag/8.3.0)

src/json_module.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ module json_module
7373

7474
implicit none
7575

76-
character(kind=json_CK,len=*),parameter,private :: version = '8.3.0'
76+
character(kind=json_CK,len=*),parameter,private :: version = '8.4.0'
7777
!! JSON-Fortran version.
7878
!!
7979
!!@note This string should match the one in the `.VERSION` file (which is used

src/json_string_utilities.F90

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ subroutine string_to_integer(str,ival,status_ok)
127127
! Compute how many digits we need to read
128128
ndigits = 2*len_trim(str)
129129
if (ndigits/=0) then
130-
ndigits_digits = floor(log10(real(ndigits)))+1
130+
ndigits_digits = nint(log10(real(ndigits)))+1
131131
allocate(character(kind=CDK,len=ndigits_digits) :: digits)
132132
write(digits,'(I0)') ndigits !gfortran will have a runtime error with * edit descriptor here
133133
! gfortran bug: '*' edit descriptor for ISO_10646 strings does bad stuff.
@@ -484,9 +484,9 @@ subroutine unescape_string(str, error_message)
484484

485485
implicit none
486486

487-
character(kind=CK,len=:),allocatable,intent(inout) :: str !! in: string as stored
488-
!! in a [[json_value]].
489-
!! out: decoded string.
487+
character(kind=CK,len=:),allocatable,intent(inout) :: str !! * in: string as stored
488+
!! in a [[json_value]].
489+
!! * out: decoded string.
490490
character(kind=CK,len=:),allocatable,intent(out) :: error_message !! will be allocated if
491491
!! there was an error
492492

@@ -617,7 +617,7 @@ end subroutine unescape_string
617617

618618
!*****************************************************************************************
619619
!> author: Jacob Williams
620-
! date:6/14/2014
620+
! date: 6/14/2014
621621
!
622622
! Returns true if the string is a valid 4-digit hex string.
623623
!

src/json_value_module.F90

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8763,8 +8763,14 @@ subroutine json_get_real64_by_path(json, me, path, value, found, default)
87638763
real(real64),intent(in),optional :: default !! default value if not found
87648764

87658765
real(RK) :: tmp
8766+
real(RK) :: tmp_default
87668767

8767-
call json%get(me, path, tmp, found, default)
8768+
if (present(default)) then
8769+
tmp_default = real(default, RK)
8770+
call json%get(me, path, tmp, found, tmp_default)
8771+
else
8772+
call json%get(me, path, tmp, found)
8773+
end if
87688774
value = real(tmp,real64)
87698775

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

88288834
real(RK),dimension(:),allocatable :: tmp
8835+
real(RK),dimension(:),allocatable :: tmp_default
88298836

8830-
call json%get(me, path, tmp, found, default)
8837+
if (present(default)) then
8838+
tmp_default = real(default, RK)
8839+
call json%get(me, path, tmp, found, tmp_default)
8840+
else
8841+
call json%get(me, path, tmp, found)
8842+
end if
88318843
if (allocated(tmp)) vec = real(tmp,real64)
88328844

88338845
end subroutine json_get_real64_vec_by_path

0 commit comments

Comments
 (0)