Skip to content

Commit a0610b8

Browse files
committed
renamed 'name' argument to json_value_remove_if_present to 'path' since it is really a path. Fixes #329
1 parent a84ebda commit a0610b8

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/json_value_module.F90

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2715,39 +2715,39 @@ end subroutine json_value_validate
27152715
!> author: Jacob Williams
27162716
! date: 12/6/2014
27172717
!
2718-
! Given the path string, remove the variable from
2719-
! the [[json_value]] structure, if it exists.
2718+
! Given the path string, remove the variable
2719+
! from [[json_value]], if it exists.
27202720

2721-
subroutine json_value_remove_if_present(json,p,name)
2721+
subroutine json_value_remove_if_present(json,p,path)
27222722

27232723
implicit none
27242724

27252725
class(json_core),intent(inout) :: json
27262726
type(json_value),pointer :: p
2727-
character(kind=CK,len=*),intent(in) :: name
2727+
character(kind=CK,len=*),intent(in) :: path !! the path to the variable to remove
27282728

27292729
type(json_value),pointer :: p_var
27302730
logical(LK) :: found
27312731

2732-
call json%get(p,name,p_var,found)
2732+
call json%get(p,path,p_var,found)
27332733
if (found) call json%remove(p_var)
27342734

27352735
end subroutine json_value_remove_if_present
27362736
!*****************************************************************************************
27372737

27382738
!*****************************************************************************************
27392739
!>
2740-
! Alternate version of [[json_value_remove_if_present]], where `name` is kind=CDK.
2740+
! Alternate version of [[json_value_remove_if_present]], where `path` is kind=CDK.
27412741

2742-
subroutine wrap_json_value_remove_if_present(json,p,name)
2742+
subroutine wrap_json_value_remove_if_present(json,p,path)
27432743

27442744
implicit none
27452745

27462746
class(json_core),intent(inout) :: json
27472747
type(json_value),pointer :: p
2748-
character(kind=CDK,len=*),intent(in) :: name
2748+
character(kind=CDK,len=*),intent(in) :: path
27492749

2750-
call json%remove_if_present(p,to_unicode(name))
2750+
call json%remove_if_present(p,to_unicode(path))
27512751

27522752
end subroutine wrap_json_value_remove_if_present
27532753
!*****************************************************************************************

0 commit comments

Comments
 (0)