Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #2958

Merged
merged 2 commits into from Mar 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/ruby/st.h
@@ -1,7 +1,7 @@
/* This is a public domain general purpose hash table package
originally written by Peter Moore @ UCB.

The hash table data strutures were redesigned and the package was
The hash table data structures were redesigned and the package was
rewritten by Vladimir Makarov <vmakarov@redhat.com>. */

#ifndef RUBY_ST_H
Expand Down
2 changes: 1 addition & 1 deletion internal/bits.h
Expand Up @@ -230,7 +230,7 @@ static inline unsigned int
nlz_int32(uint32_t x)
{
#if defined(_MSC_VER) && defined(__AVX2__)
/* Note: It seems there is no such tihng like __LZCNT__ predefined in MSVC.
/* Note: It seems there is no such thing like __LZCNT__ predefined in MSVC.
* AMD CPUs have had this instruction for decades (since K10) but for
* Intel, Haswell is the oldest one. We need to use __AVX2__ for maximum
* safety. */
Expand Down
6 changes: 3 additions & 3 deletions st.c
Expand Up @@ -1073,7 +1073,7 @@ rebuild_table_if_necessary (st_table *tab)
}

/* Insert (KEY, VALUE) into table TAB and return zero. If there is
already entry with KEY in the table, return nonzero and and update
already entry with KEY in the table, return nonzero and update
the value of the found entry. */
int
st_insert(st_table *tab, st_data_t key, st_data_t value)
Expand Down Expand Up @@ -1155,7 +1155,7 @@ st_add_direct(st_table *tab, st_data_t key, st_data_t value)

/* Insert (FUNC(KEY), VALUE) into table TAB and return zero. If
there is already entry with KEY in the table, return nonzero and
and update the value of the found entry. */
update the value of the found entry. */
int
st_insert2(st_table *tab, st_data_t key, st_data_t value,
st_data_t (*func)(st_data_t))
Expand Down Expand Up @@ -1464,7 +1464,7 @@ st_general_foreach(st_table *tab, st_foreach_check_callback_func *func, st_updat

entries = tab->entries;
/* The bound can change inside the loop even without rebuilding
the table, e.g. by an entry inesrtion. */
the table, e.g. by an entry insertion. */
for (i = tab->entries_start; i < tab->entries_bound; i++) {
curr_entry_ptr = &entries[i];
if (EXPECT(DELETED_ENTRY_P(curr_entry_ptr), 0))
Expand Down