From 82c17082ba0e53d782ac6be703d71d188a331dde Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 23 Jun 2021 09:51:11 +0200 Subject: Revert "Revert "Enhanced stats/reports for blendfile reading."" This reverts commit rB3a48147b8ab92, and fixes the issues with linking etc. Change compared to previous buggy commit (rBf8d219dfd4c31) is that new `BlendFileReadReports` reports are now passed to the lowest level function generating the `FileData` (`filedata_new()`), which ensures (and asserts) that all code using it does have a valid non-NULL pointer to a `BlendFileReadReport` data. Sorry for the noise, it's always when you think a change is trivial and do not test it well enough that you end up doing those kind of mistakes... --- source/blender/blenloader/BLO_read_write.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'source/blender/blenloader/BLO_read_write.h') diff --git a/source/blender/blenloader/BLO_read_write.h b/source/blender/blenloader/BLO_read_write.h index ea0532d884b..86c7c367816 100644 --- a/source/blender/blenloader/BLO_read_write.h +++ b/source/blender/blenloader/BLO_read_write.h @@ -54,6 +54,7 @@ typedef struct BlendExpander BlendExpander; typedef struct BlendLibReader BlendLibReader; typedef struct BlendWriter BlendWriter; +struct BlendFileReadReport; struct Main; struct ReportList; @@ -216,7 +217,7 @@ bool BLO_read_requires_endian_switch(BlendDataReader *reader); bool BLO_read_data_is_undo(BlendDataReader *reader); void BLO_read_data_globmap_add(BlendDataReader *reader, void *oldaddr, void *newaddr); void BLO_read_glob_list(BlendDataReader *reader, struct ListBase *list); -struct ReportList *BLO_read_data_reports(BlendDataReader *reader); +struct BlendFileReadReport *BLO_read_data_reports(BlendDataReader *reader); /* Blend Read Lib API * =================== @@ -233,7 +234,7 @@ ID *BLO_read_get_new_id_address(BlendLibReader *reader, struct Library *lib, str /* Misc. */ bool BLO_read_lib_is_undo(BlendLibReader *reader); struct Main *BLO_read_lib_get_main(BlendLibReader *reader); -struct ReportList *BLO_read_lib_reports(BlendLibReader *reader); +struct BlendFileReadReport *BLO_read_lib_reports(BlendLibReader *reader); /* Blend Expand API * =================== @@ -250,8 +251,10 @@ void BLO_expand_id(BlendExpander *expander, struct ID *id); * =================== */ -void BLO_reportf_wrap(struct ReportList *reports, ReportType type, const char *format, ...) - ATTR_PRINTF_FORMAT(3, 4); +void BLO_reportf_wrap(struct BlendFileReadReport *reports, + ReportType type, + const char *format, + ...) ATTR_PRINTF_FORMAT(3, 4); #ifdef __cplusplus } -- cgit v1.2.3