Skip to content

Commit 53d2b67

Browse files
committed
The "lookup" should be silent.
This patch resolves a fixme and requres compiler-research/CppInterOp#880
1 parent 58e5a82 commit 53d2b67

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

clingwrapper/src/clingwrapper.cxx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#ifndef _WIN32
1+
#ifndef _WIN32
22
#ifndef _CRT_SECURE_NO_WARNINGS
33
// silence warnings about getenv, strncpy, etc.
44
#define _CRT_SECURE_NO_WARNINGS
@@ -669,8 +669,7 @@ bool Cppyy::AppendTypesSlow(const std::string& name,
669669
Cpp::Declare(code.c_str(), /*silent=*/true); // initialize the trampoline
670670

671671
std::string var = "__Cppyy_s" + std::to_string(struct_count++);
672-
// FIXME: We cannot use silent because it erases our error code from Declare!
673-
if (!Cpp::Declare(("__Cppyy_AppendTypesSlow<" + resolved_name + "> " + var +";\n").c_str(), /*silent=*/false)) {
672+
if (!Cpp::Declare(("__Cppyy_AppendTypesSlow<" + resolved_name + "> " + var +";\n").c_str(), /*silent=*/true)) {
674673
std::lock_guard<std::recursive_mutex> Lock(InterOpMutex);
675674
TCppType_t varN =
676675
Cpp::GetVariableType(Cpp::GetNamed(var.c_str(), /*parent=*/nullptr));

0 commit comments

Comments
 (0)