Cleanup: rename PIL to BLI

The term `PIL` stands for "platform independent library." It exists since the `Initial Revision`
commit from 2002. Nowadays, we generally just use the `BLI` (blenlib) prefix for such code
and the `PIL` prefix feels more confusing then useful. Therefore, this patch renames the
`PIL` to `BLI`.

Pull Request: https://projects.blender.org/blender/blender/pulls/117325
This commit is contained in:
Jacques Lucke
2024-01-19 14:32:28 +01:00
parent 35dcd79391
commit 4b47b46f9c
130 changed files with 392 additions and 478 deletions

View File

@@ -6,9 +6,10 @@
* \ingroup pythonintern
*/
#include "BLI_time.h"
#include "BLI_timer.h"
#include "BLI_utildefines.h"
#include "PIL_time.h"
#include <Python.h>
#include "BPY_extern.h"

View File

@@ -87,7 +87,7 @@ static bool py_use_system_env = false;
// #define TIME_PY_RUN /* Simple python tests. prints on exit. */
#ifdef TIME_PY_RUN
# include "PIL_time.h"
# include "BLI_time.h"
static int bpy_timer_count = 0;
/** Time since python starts. */
static double bpy_timer;
@@ -126,10 +126,10 @@ void bpy_context_set(bContext *C, PyGILState_STATE *gilstate)
#ifdef TIME_PY_RUN
if (bpy_timer_count == 0) {
/* Record time from the beginning. */
bpy_timer = PIL_check_seconds_timer();
bpy_timer = BLI_check_seconds_timer();
bpy_timer_run = bpy_timer_run_tot = 0.0;
}
bpy_timer_run = PIL_check_seconds_timer();
bpy_timer_run = BLI_check_seconds_timer();
bpy_timer_count++;
#endif
@@ -155,7 +155,7 @@ void bpy_context_clear(bContext * /*C*/, const PyGILState_STATE *gilstate)
#endif
#ifdef TIME_PY_RUN
bpy_timer_run_tot += PIL_check_seconds_timer() - bpy_timer_run;
bpy_timer_run_tot += BLI_check_seconds_timer() - bpy_timer_run;
bpy_timer_count++;
#endif
}
@@ -590,7 +590,7 @@ void BPY_python_end(const bool do_python_exit)
#ifdef TIME_PY_RUN
/* Measure time since Python started. */
bpy_timer = PIL_check_seconds_timer() - bpy_timer;
bpy_timer = BLI_check_seconds_timer() - bpy_timer;
printf("*bpy stats* - ");
printf("tot exec: %d, ", bpy_timer_count);