Skip to content

Commit 7efa7ee

Browse files
committed
fixed some logical kinds.
also added exception check in is_child_of
1 parent 0d2cf1c commit 7efa7ee

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/json_value_module.F90

+4-2
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ function name_equal(json,p,name) result(is_equal)
791791
class(json_core),intent(inout) :: json
792792
type(json_value),intent(in) :: p !! the json object
793793
character(kind=CK,len=*),intent(in) :: name !! the name to check for
794-
logical :: is_equal !! true if the string are lexically equal
794+
logical(LK) :: is_equal !! true if the string are lexically equal
795795

796796
if (allocated(p%name)) then
797797

@@ -1556,10 +1556,12 @@ function json_value_is_child_of(json,p1,p2) result(is_child_of)
15561556
class(json_core),intent(inout) :: json
15571557
type(json_value),pointer :: p1
15581558
type(json_value),pointer :: p2
1559-
logical :: is_child_of
1559+
logical(LK) :: is_child_of
15601560

15611561
is_child_of = .false.
15621562

1563+
if (json%exception_thrown) return
1564+
15631565
if (associated(p1) .and. associated(p2)) then
15641566
if (associated(p1%children)) then
15651567
call json%traverse(p1%children,is_child_of_callback)

0 commit comments

Comments
 (0)