Skip to content

term_from_resource: fix C++ compat#2364

Open
pguyot wants to merge 1 commit into
atomvm:release-0.7from
pguyot:w28/fix-cpp-compat
Open

term_from_resource: fix C++ compat#2364
pguyot wants to merge 1 commit into
atomvm:release-0.7from
pguyot:w28/fix-cpp-compat

Conversation

@pguyot

@pguyot pguyot commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

term_from_resource is a static inline in term.h and can be reached from C++ translation units, but refc_binary_add_refcount relies on C11 <stdatomic.h>, which C++ does not support. Use the extern "C" refc_binary_increment_refcount helper instead.

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

term_from_resource is a static inline in term.h and can be reached from
C++ translation units, but refc_binary_add_refcount relies on C11
<stdatomic.h>, which C++ does not support. Use the extern "C"
refc_binary_increment_refcount helper instead.

Signed-off-by: Paul Guyot <pguyot@kallisys.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant