Skip to content

Commit 9c812d8

Browse files
committed
Merge branch 'hash_maps' of github.com:wclodius2/stdlib into hash_maps
2 parents 421daa6 + 0f64bc0 commit 9c812d8

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/stdlib_hashmap_chaining.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ module subroutine init_chaining_map( map, &
406406
integer, intent(in), optional :: slots_bits
407407
integer(int32), intent(out), optional :: status
408408

409-
character(256) :: errmsg = ''
409+
character(256) :: errmsg
410410
integer(int_index) :: index
411411
character(*), parameter :: procedure = 'INIT'
412412
integer(int_index) :: slots

src/stdlib_hashmap_wrappers.f90

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,9 @@ subroutine get_char_key( key, value )
206206
key_as_char = key_size
207207
case(2)
208208
if ( iand( key_size, 1_int64 ) > 0 ) then
209-
stop 'KEY does not map to a character string.'
209+
error stop "Internal Error at stdlib_hashmaps:&
210+
& System uses 2 bytes per character, so&
211+
& key_size can't be an odd number"
210212
end if
211213
key_as_char = ishft( key_size, -1 )
212214
case(4)
@@ -262,7 +264,7 @@ subroutine set_char_key( key, value )
262264
!! key - the output key
263265
!! value - the input CHARACTER string
264266
type(key_type), intent(out) :: key
265-
character(*), intent(in) :: value(:)
267+
character(*), intent(in) :: value
266268

267269
key % value = transfer( value, key % value, &
268270
bytes_char * len( value ) )

0 commit comments

Comments
 (0)