Skip to content

Commit

Permalink
Merge pull request #1404 from pguyot/w51/remove-unused-term_is_movabl…
Browse files Browse the repository at this point in the history
…e_boxed

Remove unused term_is_movable_boxed

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
  • Loading branch information
bettio committed Dec 16, 2024
2 parents abe99ef + 16698e6 commit 1ca523c
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions src/libAtomVM/term.h
Original file line number Diff line number Diff line change
Expand Up @@ -306,30 +306,6 @@ static inline bool term_is_boxed(term t)
return ((t & 0x3) == 0x2);
}

/**
* @brief Checks if a term is a movable boxed value
*
* @details Returns \c true if a term is a boxed value that can be safely copied with memcpy.
* @param t the term that will checked.
* @return \c true if check succeeds, \c false otherwise.
*/
static inline bool term_is_movable_boxed(term t)
{
/* boxed: 10 */
if ((t & 0x3) == 0x2) {
const term *boxed_value = term_to_const_term_ptr(t);
switch (boxed_value[0] & TERM_BOXED_TAG_MASK) {
case 0x10:
return true;

default:
return false;
}
} else {
return false;
}
}

/**
* @brief Returns size of a boxed term from its header
*
Expand Down

0 comments on commit 1ca523c

Please sign in to comment.