Skip to content

Commit

Permalink
Merge pull request #469 from goggle/typos01
Browse files Browse the repository at this point in the history
Correct some typos
  • Loading branch information
sjkelly committed Jun 6, 2023
2 parents 30dd578 + e98bb17 commit 9c99348
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
- Support for `const` fields in mutable structs

## 0.4.22
- Fix reconstruction of partially intialized structs
- Fix reconstruction of partially initialized structs

## 0.4.21
- Add explicit type mapping
Expand Down
2 changes: 1 addition & 1 deletion benchmark/benchmark.jl
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ bench("any_complex128_vector", Any[complex(rand(), rand()) for i = 1:1000000])
# Many empty arrays
bench("empty_arrays", Any[Int[] for i = 1:1000000])

# Many one-eleemnt arrays
# Many one-element arrays
bench("one_element_arrays", [[rand(typemin(Int):typemax(Int))] for i = 1:1000000])

# Equivalent benchmark from https://github.com/timholy/HDF5.jl/issues/170
Expand Down
2 changes: 1 addition & 1 deletion src/attributes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ end
"""
read_attribute(io::IO, f::JLDFile)
Read an attribute message at the current postion of the `io` object.
Read an attribute message at the current position of the `io` object.
Supports attribute message version 1 and 2.
"""
function read_attribute(io::IO, f::JLDFile)
Expand Down
2 changes: 1 addition & 1 deletion src/compression.jl
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ struct ShuffleFilter end

function decompress!(data::Vector{UInt8}, data_length, element_size, num_elements, decompressor::ShuffleFilter)
# Start with all least significant bytes, then work your way up
# I'll leave this for somenone else to make performant
# I'll leave this for someone else to make performant
@assert data_length == length(data)
@assert data_length % element_size == 0
@assert data_length÷element_size == num_elements
Expand Down
2 changes: 1 addition & 1 deletion src/data/custom_serialization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function jlconvert(::ReadRepresentation{T,CustomSerialization{S,ODR}},

if ismutabletype(T) && !(T <: Core.SimpleVector)
# May encounter a self-referential struct that used custom serialization
# provide an unitialized struct and later fill it with values
# provide an uninitialized struct and later fill it with values
obj = newstruct(T)
track_weakref!(f, header_offset, obj)

Expand Down
4 changes: 2 additions & 2 deletions src/data/writing_datatypes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ _odr(writtenas::DataType, readas::DataType, odr) =
# h5type is objodr's HDF5 companion. It should give the HDF5 datatype
# reflecting the on-disk representation
#
# Performance note: this should be inferrable.
# Performance note: this should be inferable.
function h5type(f::JLDFile, writtenas, x)
check_writtenas_type(writtenas)
T = typeof(x)
Expand Down Expand Up @@ -536,7 +536,7 @@ end

# The following two definitions are borrowed from BSON.
# They are used to generate instances of arbitrary types
# given their fields regarless of potential constructors.
# given their fields regardless of potential constructors.
# It is unclear to the author whether this approach is
# optimal.
newstruct(T) = ccall(:jl_new_struct_uninit, Any, (Any,), T)
Expand Down
2 changes: 1 addition & 1 deletion src/inlineunion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function write_dataset(f::JLDFile, x::Array{T}, wsession::JLDWriteSession, compr
end

# This function is identical to the one in data.jl
# exept for the ReadRepresentation and the very last line where the data is
# except for the ReadRepresentation and the very last line where the data is
# converted back into a Union Array
function read_array(f::JLDFile, dataspace::ReadDataspace,
rr::ReadRepresentation{InlineUnionEl{T1,T2},RR}, layout::DataLayout,
Expand Down
2 changes: 1 addition & 1 deletion src/loadsave.jl
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ Stores an object `x` in a new JLD2 file at `filename`. If a file exists at this
path, it will be overwritten.
Since the JLD2 format requires that all objects have a name, the object will be
stored as `single_sotred_object`. If you want to store more than one object, use
stored as `single_stored_object`. If you want to store more than one object, use
[`@save`](@ref) macro, [`jldopen`](@ref) or the FileIO API.
# Example
Expand Down
2 changes: 1 addition & 1 deletion src/object_headers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ function print_header_messages(f::JLDFile, roffset::RelOffset)
elseif msg.msg_type == HM_SYMBOL_TABLE
v1_btree_address = jlread(cio, RelOffset)
local_heap_address = jlread(cio, RelOffset)
println(""" required for \"old style" groups\n v1 B-Tree Adress: $(v1_btree_address)\n Local Heap Adress: $(local_heap_address)""")
println(""" required for \"old style" groups\n v1 B-Tree Address: $(v1_btree_address)\n Local Heap Address: $(local_heap_address)""")
elseif msg.msg_type == HM_ATTRIBUTE
if attrs === EMPTY_READ_ATTRIBUTES
attrs = ReadAttribute[read_attribute(cio, f)]
Expand Down
10 changes: 5 additions & 5 deletions src/superblock.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function read_superblock(io::IO)
version = jlread(cio, UInt8)
if version == 0
version_free_space_storage = jlread(cio, UInt8) # has to be zero
version_root_group_symbol_table_enty = jlread(cio, UInt8) # has to be zero
version_root_group_symbol_table_entry = jlread(cio, UInt8) # has to be zero
jlread(cio, UInt8)
version_share_header_msg_format = jlread(cio, UInt8) # has to be zero
size_of_offsets = jlread(cio, UInt8)
Expand All @@ -32,10 +32,10 @@ function read_superblock(io::IO)
jlread(cio, UInt32)
#indexed_storage_internal_node_k = jlread(cio, UInt16) # must be greater than zero
#jlread(cio, UInt16)
base_address = jlread(cio, UInt64) # base adress for offsets within file (also absolute address of superblock)
adress_free_space_info = jlread(cio, RelOffset) # Undefined Adress
end_of_file_address = jlread(cio, UInt64) # absolute adress of first byte past end of data
driver_info_block_adress = jlread(cio, RelOffset) # undefined of relative adress of driver info block
base_address = jlread(cio, UInt64) # base address for offsets within file (also absolute address of superblock)
address_free_space_info = jlread(cio, RelOffset) # Undefined Address
end_of_file_address = jlread(cio, UInt64) # absolute address of first byte past end of data
driver_info_block_address = jlread(cio, RelOffset) # undefined of relative address of driver info block
#root_group_symbol_table_entry = jlread(cio, UInt32) # symbol table entry of root group

link_name_offset = jlread(cio, RelOffset)
Expand Down

0 comments on commit 9c99348

Please sign in to comment.