rename BKE_assert() --> BLI_assert().
authorCampbell Barton <ideasman42@gmail.com>
Sun, 9 Jan 2011 15:12:08 +0000 (15:12 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 9 Jan 2011 15:12:08 +0000 (15:12 +0000)
15 files changed:
CMakeLists.txt
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/key.c
source/blender/blenkernel/intern/object.c
source/blender/blenlib/BLI_utildefines.h
source/blender/editors/interface/interface_icons.c
source/blender/editors/interface/resources.c
source/blender/editors/transform/transform_manipulator.c
source/blender/makesrna/intern/rna_access.c
source/blender/python/generic/mathutils_matrix.c
source/blender/python/generic/mathutils_quat.c
source/blender/python/generic/mathutils_vector.c
source/blender/python/intern/bpy_interface.c
source/blender/python/intern/bpy_rna.c
source/blender/windowmanager/intern/wm_files.c

index 772bca7..3a17eaf 100644 (file)
@@ -129,7 +129,7 @@ option(WITH_PYTHON_INSTALL       "Copy system python into the blender install fo
 option(WITH_CXX_GUARDEDALLOC "Enable GuardedAlloc for C++ memory allocation tracking" OFF)
 mark_as_advanced(WITH_CXX_GUARDEDALLOC)
 
-option(WITH_ASSERT_ABORT "Call abort() when raising an assertion through BKE_assert()" OFF)
+option(WITH_ASSERT_ABORT "Call abort() when raising an assertion through BLI_assert()" OFF)
 mark_as_advanced(WITH_ASSERT_ABORT)
 
 if(APPLE)
index 61865f5..71c3e76 100644 (file)
@@ -2452,7 +2452,7 @@ void DAG_id_tag_update(ID *id, short flag)
                        }
                }
                else {
-                       BKE_assert(!"invalid flag for this 'idtype'");
+                       BLI_assert(!"invalid flag for this 'idtype'");
                }
        }
 }
index 328fb1b..0955ccd 100644 (file)
@@ -552,7 +552,7 @@ static short key_pointer_size(const Key *key, const int mode, int *poinsize, int
 
                break;
        default:
-               BKE_assert(!"invalid 'key->from' ID type");
+               BLI_assert(!"invalid 'key->from' ID type");
                return FALSE;
        }
 
@@ -641,7 +641,7 @@ static void cp_key(const int start, int end, const int tot, char *poin, Key *key
                                /* should never happen */
                                if(freek1) MEM_freeN(freek1);
                                if(freekref) MEM_freeN(freekref);
-                               BKE_assert(!"invalid 'cp[1]'");
+                               BLI_assert(!"invalid 'cp[1]'");
                                return;
                        }
 
@@ -777,7 +777,7 @@ void do_rel_key(const int start, int end, const int tot, char *basispoin, Key *k
                                                        /* should never happen */
                                                        if(freefrom) MEM_freeN(freefrom);
                                                        if(freereffrom) MEM_freeN(freereffrom);
-                                                       BKE_assert(!"invalid 'cp[1]'");
+                                                       BLI_assert(!"invalid 'cp[1]'");
                                                        return;
                                                }
 
@@ -944,7 +944,7 @@ static void do_key(const int start, int end, const int tot, char *poin, Key *key
                                if(freek2) MEM_freeN(freek2);
                                if(freek3) MEM_freeN(freek3);
                                if(freek4) MEM_freeN(freek4);
-                               BKE_assert(!"invalid 'cp[1]'");
+                               BLI_assert(!"invalid 'cp[1]'");
                                return;
                        }
                        
index c943b2f..0ac9825 100644 (file)
@@ -2552,7 +2552,7 @@ void object_handle_update(Scene *scene, Object *ob)
                                {
 #if 0                          // XXX, comment for 2.56a release, background wont set 'scene->customdata_mask'
                                        EditMesh *em = (ob == scene->obedit)? BKE_mesh_get_editmesh(ob->data): NULL;
-                                       BKE_assert((scene->customdata_mask & CD_MASK_BAREMESH) == CD_MASK_BAREMESH);
+                                       BLI_assert((scene->customdata_mask & CD_MASK_BAREMESH) == CD_MASK_BAREMESH);
                                        if(em) {
                                                makeDerivedMesh(scene, ob, em,  scene->customdata_mask); /* was CD_MASK_BAREMESH */
                                                BKE_mesh_end_editmesh(ob->data, em);
index 468c146..ccda9c1 100644 (file)
 #endif
 
 
-/* BKE_assert(), default only to print
+/* BLI_assert(), default only to print
  * for aborting need to define WITH_ASSERT_ABORT
  */
 #if !defined NDEBUG
 #    define _dummy_abort() (void)0
 #  endif
 #  ifdef __GNUC__ /* just want to check if __func__ is available */
-#    define BKE_assert(a) \
+#    define BLI_assert(a) \
 do { \
        if (0 == (a)) { \
                fprintf(stderr, \
-                       "BKE_assert failed: %s, %s(), %d at \'%s\'\n", \
+                       "BLI_assert failed: %s, %s(), %d at \'%s\'\n", \
                        __FILE__, __func__, __LINE__, STRINGIFY(a)); \
                _dummy_abort(); \
        } \
 } while (0)
 #  else
-#    define BKE_assert(a) \
+#    define BLI_assert(a) \
 do { \
        if (0 == (a)) { \
                fprintf(stderr, \
-                       "BKE_assert failed: %s, %d at \'%s\'\n", \
+                       "BLI_assert failed: %s, %d at \'%s\'\n", \
                        __FILE__, __LINE__, STRINGIFY(a)); \
                _dummy_abort(); \
        } \
 } while (0)
 #  endif
 #else
-#  define BKE_assert(a) (void)0
+#  define BLI_assert(a) (void)0
 #endif
 
 #endif // BLI_UTILDEFINES_H
index 7d2f8e0..ff041c1 100644 (file)
@@ -851,7 +851,7 @@ static void icon_draw_rect(float x, float y, int w, int h, float UNUSED(aspect),
        /* sanity check */
        if(w<=0 || h<=0 || w>2000 || h>2000) {
                printf("icon_draw_rect: icons are %i x %i pixels?\n", w, h);
-               BKE_assert(!"invalid icon size");
+               BLI_assert(!"invalid icon size");
                return;
        }
 
index 9c5f406..b2f74e4 100644 (file)
@@ -981,7 +981,7 @@ void UI_make_axis_color(const unsigned char src_col[3], unsigned char dst_col[3]
                        dst_col[2]= src_col[2]>209?255:src_col[2]+46;
                        break;
                default:
-                       BKE_assert(!"invalid axis arg");
+                       BLI_assert(!"invalid axis arg");
        }
 }
 
index b4fe38b..d69ba22 100644 (file)
@@ -734,7 +734,7 @@ static void manipulator_setcolor(View3D *v3d, char axis, int colcode, unsigned c
                        col[2]= 220;
                        break;
                default:
-                       BKE_assert(!"invalid axis arg");
+                       BLI_assert(!"invalid axis arg");
                }
        }
 
index d509efb..bf5beb0 100644 (file)
@@ -3348,7 +3348,7 @@ static char *rna_idp_path(PointerRNA *ptr, IDProperty *haystack, IDProperty *nee
        IDProperty *iter;
        int i;
 
-       BKE_assert(haystack->type == IDP_GROUP);
+       BLI_assert(haystack->type == IDP_GROUP);
 
        link.up= parent_link;
        link.name= NULL;
@@ -3408,7 +3408,7 @@ static char *rna_path_from_ID_to_idpgroup(PointerRNA *ptr)
        IDProperty *haystack;
        IDProperty *needle;
 
-       BKE_assert(ptr->id.data != NULL);
+       BLI_assert(ptr->id.data != NULL);
        RNA_id_pointer_create(ptr->id.data, &id_ptr);
 
        haystack= RNA_struct_idprops(&id_ptr, FALSE);
index 4e33c31..2418f74 100644 (file)
@@ -1516,7 +1516,7 @@ static PyObject *Matrix_mul(PyObject * m1, PyObject * m2)
                }
        }
        else {
-               BKE_assert(!"internal error");
+               BLI_assert(!"internal error");
        }
 
        PyErr_Format(PyExc_TypeError, "Matrix multiplication: not supported between '%.200s' and '%.200s' types", Py_TYPE(m1)->tp_name, Py_TYPE(m2)->tp_name);
index 1de2492..18eabcb 100644 (file)
@@ -684,7 +684,7 @@ static PyObject *Quaternion_mul(PyObject * q1, PyObject * q2)
                }
        }
        else {
-               BKE_assert(!"internal error");
+               BLI_assert(!"internal error");
        }
 
        PyErr_Format(PyExc_TypeError, "Quaternion multiplication: not supported between '%.200s' and '%.200s' types", Py_TYPE(q1)->tp_name, Py_TYPE(q2)->tp_name);
index d25bd12..cc9f9d3 100644 (file)
@@ -1129,7 +1129,7 @@ static PyObject *Vector_mul(PyObject * v1, PyObject * v2)
                }
        }
        else {
-               BKE_assert(!"internal error");
+               BLI_assert(!"internal error");
        }
 
        PyErr_Format(PyExc_TypeError, "Vector multiplication: not supported between '%.200s' and '%.200s' types", Py_TYPE(v1)->tp_name, Py_TYPE(v2)->tp_name);
index 3c76e1a..f2ba9f6 100644 (file)
@@ -269,7 +269,7 @@ void BPY_python_start( int argc, char **argv )
                        Py_DECREF(mod);
                }
                else {
-                       BKE_assert(!"unable to load 'imp' module.");
+                       BLI_assert(!"unable to load 'imp' module.");
                }
 
        }
@@ -319,7 +319,7 @@ static int python_script_exec(bContext *C, const char *fn, struct Text *text, st
        PyObject *py_dict= NULL, *py_result= NULL;
        PyGILState_STATE gilstate;
 
-       BKE_assert(fn || text);
+       BLI_assert(fn || text);
 
        if (fn==NULL && text==NULL) {
                return 0;
index c0c4227..10b0290 100644 (file)
@@ -75,7 +75,7 @@ static int rna_id_write_error(PointerRNA *ptr, PyObject *key)
                        else                                                    pyname= "<UNKNOWN>";
        
                        /* make a nice string error */
-                       BKE_assert(idtype != NULL);
+                       BLI_assert(idtype != NULL);
                        PyErr_Format(PyExc_RuntimeError, "Writing to ID classes in this context is not allowed: %.200s, %.200s datablock, error setting %.200s.%.200s", id->name+2, idtype, RNA_struct_identifier(ptr->type), pyname);
        
                        return TRUE;
@@ -1572,7 +1572,7 @@ static PyObject *pyrna_prop_array_subscript_slice(BPy_PropertyArrayRNA *self, Po
                                break;
                        }
                default:
-                       BKE_assert(!"Invalid array type");
+                       BLI_assert(!"Invalid array type");
 
                        PyErr_SetString(PyExc_TypeError, "not an array type");
                        Py_DECREF(tuple);
@@ -2779,7 +2779,7 @@ static PyObject *pyrna_struct_getattro( BPy_StructRNA *self, PyObject *pyname )
                                        break;
                                default:
                                        /* should never happen */
-                                       BKE_assert(!"Invalid context type");
+                                       BLI_assert(!"Invalid context type");
 
                                        PyErr_Format(PyExc_AttributeError, "bpy_struct: Context type invalid %d, can't get \"%.200s\" from context", newtype, name);
                                        ret= NULL;
@@ -3400,7 +3400,7 @@ static PyObject *foreach_getset(BPy_PropertyRNA *self, PyObject *args, int set)
                                        break;
                                case PROP_RAW_UNSET:
                                        /* should never happen */
-                                       BKE_assert(!"Invalid array type - set");
+                                       BLI_assert(!"Invalid array type - set");
                                        break;
                                }
 
@@ -3455,7 +3455,7 @@ static PyObject *foreach_getset(BPy_PropertyRNA *self, PyObject *args, int set)
                                        break;
                                case PROP_RAW_UNSET:
                                        /* should never happen */
-                                       BKE_assert(!"Invalid array type - get");
+                                       BLI_assert(!"Invalid array type - get");
                                        break;
                                }
 
@@ -3813,7 +3813,7 @@ static PyObject * pyrna_func_call(PyObject *self, PyObject *args, PyObject *kw)
        void *retdata_single= NULL;
 
        /* Should never happen but it does in rare cases */
-       BKE_assert(self_ptr != NULL);
+       BLI_assert(self_ptr != NULL);
 
        if(self_ptr==NULL) {
                PyErr_SetString(PyExc_RuntimeError, "rna functions internal rna pointer is NULL, this is a bug. aborting");
index 518f7c4..0b88f0f 100644 (file)
@@ -341,7 +341,7 @@ void WM_read_file(bContext *C, const char *name, ReportList *reports)
        }
        else {
                BKE_reportf(reports, RPT_ERROR, "Unknown error loading: \"%s\".", name);
-               BKE_assert(!"invalid 'retval'");
+               BLI_assert(!"invalid 'retval'");
        }
 
        WM_cursor_wait(0);