Skip to content

armgit / BUI

Public Imported from GitHub
0

Blender's GPU Accelerated UI, Decoupled from it's original codebase. Supports Rust, Python, JS, React, C & C++. Twice as good as GPUI

fix: tests & build

Preetham Pemmasani32126b4a1c40
diff --git a/bindings/python/bui/tksyntax/__pycache__/filedialog.cpython-314.pyc b/bindings/python/bui/tksyntax/__pycache__/filedialog.cpython-314.pyc
index 26d7c41..ff3f523 100644
Binary files a/bindings/python/bui/tksyntax/__pycache__/filedialog.cpython-314.pyc and b/bindings/python/bui/tksyntax/__pycache__/filedialog.cpython-314.pyc differ
diff --git a/core/include/BLI_dynamic_stack_buffer.hh b/core/include/BLI_dynamic_stack_buffer.hh
index 3e0ebb1..a7230da 100644
--- a/core/include/BLI_dynamic_stack_buffer.hh
+++ b/core/include/BLI_dynamic_stack_buffer.hh
@@ -8,6 +8,8 @@
* \ingroup bli
*/
+#include <cstdint>
+
#include "BLI_assert.h"
#include "MEM_guardedalloc.h"
diff --git a/core/include/BLI_string.h b/core/include/BLI_string.h
index 41d246a..3d0aff1 100644
--- a/core/include/BLI_string.h
+++ b/core/include/BLI_string.h
@@ -18,7 +18,7 @@
# include <string>
#endif
-/* BUI: string.c is compiled as C; C++ callers (core/intern/*.cc) need C linkage. */
+/* BUI: string.c is compiled as C; C++ callers (the .cc files in core/intern) need C linkage. */
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/core/include/MEM_guardedalloc.h b/core/include/MEM_guardedalloc.h
index 8f50978..38dc0de 100644
--- a/core/include/MEM_guardedalloc.h
+++ b/core/include/MEM_guardedalloc.h
@@ -6,6 +6,7 @@
#define __MEM_GUARDEDALLOC_H__
#include <stddef.h>
+#include <stdint.h> /* int64_t etc.: the C++ BLI headers use them unqualified */
/* Size-class helpers from upstream MEM_guardedalloc.hh (kept API-compatible). */
#define MEM_SIZE_OPTIMAL(size) ((size))
@@ -20,7 +21,7 @@ extern "C" {
#endif
/* Modern MEM API used by the C++ BLI headers (C linkage: guardedalloc.c is C,
- * and core/intern/*.cc call it). */
+ * and the C++ files in core/intern call it). */
void *MEM_new_uninitialized(size_t size, const char *name);
void *MEM_new_zeroed(size_t size, const char *name);
void *MEM_new_uninitialized_aligned(size_t size, size_t alignment, const char *name);
diff --git a/core/intern/string_search.cc b/core/intern/string_search.cc
index 2b68ddf..d7e4bbd 100644
--- a/core/intern/string_search.cc
+++ b/core/intern/string_search.cc
@@ -62,14 +62,14 @@ int damerau_levenshtein_distance(StringRef a, StringRef b)
v1[i] = i * insertion_cost;
}
- uint32_t prev_unicode_a;
+ uint32_t prev_unicode_a = 0;
size_t offset_a = 0;
for (const int i : IndexRange(size_a)) {
v2[0] = (i + 1) * deletion_cost;
const uint32_t unicode_a = BLI_str_utf8_as_unicode_step_safe(a.data(), a.size(), &offset_a);
- uint32_t prev_unicode_b;
+ uint32_t prev_unicode_b = 0;
size_t offset_b = 0;
for (const int j : IndexRange(size_b)) {
const uint32_t unicode_b = BLI_str_utf8_as_unicode_step_safe(b.data(), b.size(), &offset_b);
@@ -212,7 +212,7 @@ static std::optional<InitialsMatch> match_word_initials(StringRef query,
int first_found_word_index = -1;
- while (query_index < query.size()) {
+ while (query_index < size_t(query.size())) {
const uint query_unicode = BLI_str_utf8_as_unicode_step_safe(
query.data(), query.size(), &query_index);
while (true) {