[Bf-blender-cvs] [2678953f699] master: Cleanup: Correct an own earlier commit to use an existing utility function

Julian Eisel noreply at git.blender.org
Tue Dec 8 15:05:15 CET 2020


Commit: 2678953f699c27122d059eb8ab14e84a5be75c28
Author: Julian Eisel
Date:   Tue Dec 8 15:00:31 2020 +0100
Branches: master
https://developer.blender.org/rB2678953f699c27122d059eb8ab14e84a5be75c28

Cleanup: Correct an own earlier commit to use an existing utility function

Didn't know this function existed, better to use it then to avoid verbosity.

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

M	source/blender/blenloader/intern/blend_validate.c
M	source/blender/editors/space_file/filelist.c
M	source/blender/imbuf/intern/thumbs_blend.c
M	source/blender/python/intern/bpy_library_load.c

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

diff --git a/source/blender/blenloader/intern/blend_validate.c b/source/blender/blenloader/intern/blend_validate.c
index 9b42e2d5f40..c281e2fa643 100644
--- a/source/blender/blenloader/intern/blend_validate.c
+++ b/source/blender/blenloader/intern/blend_validate.c
@@ -148,7 +148,7 @@ bool BLO_main_validate_libraries(Main *bmain, ReportList *reports)
         }
       }
 
-      BLI_linklist_free(names, MEM_freeN);
+      BLI_linklist_freeN(names);
     }
 
     BLO_blendhandle_close(bh);
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 58887ae745b..1271feda1e7 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -2621,7 +2621,7 @@ static int filelist_readjob_list_lib(const char *root, ListBase *entries, const
     nbr_entries++;
   }
 
-  BLI_linklist_free(names, MEM_freeN);
+  BLI_linklist_freeN(names);
 
   return nbr_entries;
 }
diff --git a/source/blender/imbuf/intern/thumbs_blend.c b/source/blender/imbuf/intern/thumbs_blend.c
index a338ea599f8..d5ded02be62 100644
--- a/source/blender/imbuf/intern/thumbs_blend.c
+++ b/source/blender/imbuf/intern/thumbs_blend.c
@@ -68,7 +68,7 @@ ImBuf *IMB_thumb_load_blend(const char *blen_path, const char *blen_group, const
         printf("%s: error, found %d items, %d previews\n", __func__, nnames, nprevs);
       }
       BLI_linklist_free(previews, BKE_previewimg_freefunc);
-      BLI_linklist_free(names, MEM_freeN);
+      BLI_linklist_freeN(names);
       return ima;
     }
 
@@ -93,7 +93,7 @@ ImBuf *IMB_thumb_load_blend(const char *blen_path, const char *blen_group, const
     }
 
     BLI_linklist_free(previews, BKE_previewimg_freefunc);
-    BLI_linklist_free(names, MEM_freeN);
+    BLI_linklist_freeN(names);
   }
   else {
     BlendThumbnail *data;
diff --git a/source/blender/python/intern/bpy_library_load.c b/source/blender/python/intern/bpy_library_load.c
index 64590827933..c6f0fbd3a2b 100644
--- a/source/blender/python/intern/bpy_library_load.c
+++ b/source/blender/python/intern/bpy_library_load.c
@@ -227,7 +227,7 @@ static PyObject *_bpy_names(BPy_Library *self, int blocktype)
       PyList_SET_ITEM(list, counter, PyUnicode_FromString((char *)l->link));
       counter++;
     }
-    BLI_linklist_free(names, MEM_freeN); /* free linklist *and* each node's data */
+    BLI_linklist_freeN(names); /* free linklist *and* each node's data */
   }
 
   return list;



More information about the Bf-blender-cvs mailing list