[Bf-blender-cvs] [3e41c8a] master: Fix compilation error with debug scons
Sergey Sharybin
noreply at git.blender.org
Mon Aug 11 17:01:07 CEST 2014
Commit: 3e41c8ad6fd194c567471b39b88fddccc599a946
Author: Sergey Sharybin
Date: Mon Aug 11 20:58:42 2014 +0600
Branches: master
https://developer.blender.org/rB3e41c8ad6fd194c567471b39b88fddccc599a946
Fix compilation error with debug scons
The issue is that we've got hell with DEBUG and _DEBUG,
theu're defined really inconsistent acros CMake and SCons.
Used more reliable NDEBUG definition for IDP_spit.
===================================================================
M source/blender/blenkernel/BKE_idprop.h
M source/blender/blenkernel/intern/idprop.c
M source/blender/python/generic/idprop_py_api.c
===================================================================
diff --git a/source/blender/blenkernel/BKE_idprop.h b/source/blender/blenkernel/BKE_idprop.h
index 0230eaf..2ab3d84 100644
--- a/source/blender/blenkernel/BKE_idprop.h
+++ b/source/blender/blenkernel/BKE_idprop.h
@@ -143,7 +143,7 @@ void IDP_UnlinkProperty(struct IDProperty *prop);
# define IDP_IDPArray(prop) ((IDProperty *) (prop)->data.pointer)
#endif
-#ifdef DEBUG
+#ifndef NDEBUG
/* for printout only */
void IDP_spit(IDProperty *prop);
#endif
diff --git a/source/blender/blenkernel/intern/idprop.c b/source/blender/blenkernel/intern/idprop.c
index 95bfd72..fa949bf 100644
--- a/source/blender/blenkernel/intern/idprop.c
+++ b/source/blender/blenkernel/intern/idprop.c
@@ -821,7 +821,7 @@ bool IDP_EqualsProperties_ex(IDProperty *prop1, IDProperty *prop2, const bool is
case IDP_INT:
return (IDP_Int(prop1) == IDP_Int(prop2));
case IDP_FLOAT:
-#if defined(DEBUG) && defined(WITH_PYTHON)
+#if !defined(NDEBUG) && defined(WITH_PYTHON)
{
float p1 = IDP_Float(prop1);
float p2 = IDP_Float(prop2);
diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c
index dcdda2c..8c9e84a 100644
--- a/source/blender/python/generic/idprop_py_api.c
+++ b/source/blender/python/generic/idprop_py_api.c
@@ -1541,7 +1541,7 @@ PyObject *BPyInit_idprop(void)
}
-#ifdef DEBUG
+#ifndef NDEBUG
/* -------------------------------------------------------------------- */
/* debug only function */
More information about the Bf-blender-cvs
mailing list