[Bf-blender-cvs] [5689dda6f76] master: Compositor: Limit C linkage of cryptomatte functions

Omar Emara noreply at git.blender.org
Wed Aug 10 14:59:21 CEST 2022


Commit: 5689dda6f766b0a49c235ed917d113e2bfdab7a4
Author: Omar Emara
Date:   Wed Aug 10 14:58:51 2022 +0200
Branches: master
https://developer.blender.org/rB5689dda6f766b0a49c235ed917d113e2bfdab7a4

Compositor: Limit C linkage of cryptomatte functions

Most of the functions in the compositor cryptomatte file are declared
with extern "C" linkage, which can cause symbol conflict even when
functions exist in separate namespaces. This is not actually necessary,
as the declaration of the few functions that require C linkage are
already declared as such in the header file, so this patch removes the
extern C scope from that file.

Differential Revision: https://developer.blender.org/D15656

Reviewed By: Clement Foucault

===================================================================

M	source/blender/nodes/composite/nodes/node_composite_cryptomatte.cc

===================================================================

diff --git a/source/blender/nodes/composite/nodes/node_composite_cryptomatte.cc b/source/blender/nodes/composite/nodes/node_composite_cryptomatte.cc
index a00f6fd4fcd..7e5544381a4 100644
--- a/source/blender/nodes/composite/nodes/node_composite_cryptomatte.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_cryptomatte.cc
@@ -107,7 +107,6 @@ static blender::bke::cryptomatte::CryptomatteSessionPtr cryptomatte_init_from_no
   return session;
 }
 
-extern "C" {
 static CryptomatteEntry *cryptomatte_find(const NodeCryptomatte &n, float encoded_hash)
 {
   LISTBASE_FOREACH (CryptomatteEntry *, entry, &n.entries) {
@@ -428,4 +427,3 @@ void register_node_type_cmp_cryptomatte_legacy()
 }
 
 /** \} */
-}



More information about the Bf-blender-cvs mailing list