File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed
modules/core/include/opencv2/core Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 48
48
// ! @addtogroup core_utils
49
49
// ! @{
50
50
51
+ #if !defined CV_DOXYGEN && !defined CV_IGNORE_DEBUG_BUILD_GUARD
52
+ #if (defined(_MSC_VER) && (defined(DEBUG) || defined(_DEBUG))) || \
53
+ (defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_DEBUG_PEDANTIC))
54
+ // Guard to prevent using of binary incompatible binaries / runtimes
55
+ // https://github.com/opencv/opencv/pull/9161
56
+ #define CV__DEBUG_NS_BEGIN namespace debug_build_guard {
57
+ #define CV__DEBUG_NS_END }
58
+ namespace cv { namespace debug_build_guard { } using namespace debug_build_guard ; }
59
+ #endif
60
+ #endif
61
+
62
+ #ifndef CV__DEBUG_NS_BEGIN
63
+ #define CV__DEBUG_NS_BEGIN
64
+ #define CV__DEBUG_NS_END
65
+ #endif
66
+
67
+
51
68
#ifdef __OPENCV_BUILD
52
69
#include " cvconfig.h"
53
70
#endif
Original file line number Diff line number Diff line change @@ -62,6 +62,8 @@ namespace cv
62
62
enum { ACCESS_READ=1 <<24 , ACCESS_WRITE=1 <<25 ,
63
63
ACCESS_RW=3 <<24 , ACCESS_MASK=ACCESS_RW, ACCESS_FAST=1 <<26 };
64
64
65
+ CV__DEBUG_NS_BEGIN
66
+
65
67
class CV_EXPORTS _OutputArray;
66
68
67
69
// ////////////////////// Input/Output Array Arguments /////////////////////////////////
@@ -400,6 +402,8 @@ class CV_EXPORTS _InputOutputArray : public _OutputArray
400
402
401
403
};
402
404
405
+ CV__DEBUG_NS_END
406
+
403
407
typedef const _InputArray& InputArray;
404
408
typedef InputArray InputArrayOfArrays;
405
409
typedef const _OutputArray& OutputArray;
Original file line number Diff line number Diff line change 56
56
57
57
namespace cv
58
58
{
59
+ CV__DEBUG_NS_BEGIN
60
+
59
61
60
62
// ! @cond IGNORED
61
63
@@ -392,6 +394,8 @@ inline _InputOutputArray::_InputOutputArray(const ogl::Buffer& buf)
392
394
inline _InputOutputArray::_InputOutputArray (const cuda::HostMem& cuda_mem)
393
395
{ init (FIXED_TYPE + FIXED_SIZE + CUDA_HOST_MEM + ACCESS_RW, &cuda_mem); }
394
396
397
+ CV__DEBUG_NS_END
398
+
395
399
// ////////////////////////////////////////// Mat //////////////////////////////////////////
396
400
397
401
inline
You can’t perform that action at this time.
0 commit comments