gnucash stable: Multiple changes pushed
John Ralls
jralls at code.gnucash.org
Fri Jan 9 19:21:29 EST 2026
Updated via https://github.com/Gnucash/gnucash/commit/1d9b80f7 (commit)
via https://github.com/Gnucash/gnucash/commit/79b43fb4 (commit)
via https://github.com/Gnucash/gnucash/commit/4bd23cf1 (commit)
from https://github.com/Gnucash/gnucash/commit/b5185e18 (commit)
commit 1d9b80f7ff4f53c2e8cdaa79d2be3fe5e0625c95
Author: John Ralls <jralls at ceridwen.us>
Date: Mon Jan 5 17:48:48 2026 -0800
gcc 15.2 is really picky about casting between ints of different sizes.
So subvert the warnings with a union.
Note that the exception is deliberatley unhandled: We want to crash out if there are high bits.
diff --git a/libgnucash/backend/sql/gnc-sql-column-table-entry.hpp b/libgnucash/backend/sql/gnc-sql-column-table-entry.hpp
index a079751a10..326ba62fb1 100644
--- a/libgnucash/backend/sql/gnc-sql-column-table-entry.hpp
+++ b/libgnucash/backend/sql/gnc-sql-column-table-entry.hpp
@@ -367,8 +367,26 @@ GncSqlColumnTableEntry::get_row_value_from_object(QofIdTypeConst obj_name,
{
QofAccessFunc getter = get_getter(obj_name);
if (getter != nullptr)
- result = reinterpret_cast<T>((getter)(const_cast<void*>(pObject),
+ {
+ if constexpr (sizeof(T) >= sizeof(void*))
+ result = reinterpret_cast<T>((getter)(const_cast<void*>(pObject),
nullptr));
+ else
+ {
+ union converter
+ {
+ intptr_t whole;
+ uint32_t upper;
+ uint32_t lower;
+ };
+ converter conv;
+ conv.whole = reinterpret_cast<intptr_t>((getter)(const_cast<void*>(pObject),
+ nullptr));
+ if (conv.upper)
+ throw std::runtime_error("Bits left over when converting pointer"); //crash out
+ result = conv.lower;
+ }
+ }
}
return result;
}
commit 79b43fb4f6eca2ee25f2d54aa32392384a71f40d
Author: John Ralls <jralls at ceridwen.us>
Date: Mon Jan 5 17:45:40 2026 -0800
Guile: Use the right conversion for size_t.
diff --git a/bindings/guile/gnc-optiondb.i b/bindings/guile/gnc-optiondb.i
index 29a7a9591a..2e20f2a7b3 100644
--- a/bindings/guile/gnc-optiondb.i
+++ b/bindings/guile/gnc-optiondb.i
@@ -59,8 +59,8 @@ namespace std {
%enddef
-%typemap(in) std::size_t "$1 = scm_to_ulong($input);";
-%typemap(out) std::size_t "$result = scm_from_ulong($1);";
+%typemap(in) std::size_t "$1 = scm_to_ssize_t($input);";
+%typemap(out) std::size_t "$result = scm_from_ssize_t($1);";
%begin
%{
commit 4bd23cf19563b37057841492653429c21ed8ef61
Author: John Ralls <jralls at ceridwen.us>
Date: Mon Jan 5 17:44:53 2026 -0800
Mingw 64-bit uses libgcc_s_seh-1 instead of libgcc_s_dw2-1.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 818164b401..7ce07851e2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1062,9 +1062,13 @@ if (WIN32)
if (NOT LIBSTDC++)
message(FATAL_ERROR "libstdc++ not found.")
endif()
- find_file(LIBDW2 libgcc_s_dw2-1.dll)
+ if ($ENV{MSYSTEM} STREQUAL "MINGW32")
+ find_file(LIBDW2 libgcc_s_dw2-1.dll)
+ else()
+ find_file(LIBDW2 libgcc_s_seh-1.dll)
+ endif()
if (NOT LIBDW2)
- message(FATAL_ERROR "libgcc_s_dw2-l not found.")
+ message(FATAL_ERROR "GCC exception library not found.")
endif()
set(MINGW_DLLS ${LIBSTDC++} ${LIBDW2})
install(PROGRAMS ${MINGW_DLLS} DESTINATION ${CMAKE_INSTALL_BINDIR})
Summary of changes:
CMakeLists.txt | 8 ++++++--
bindings/guile/gnc-optiondb.i | 4 ++--
.../backend/sql/gnc-sql-column-table-entry.hpp | 20 +++++++++++++++++++-
3 files changed, 27 insertions(+), 5 deletions(-)
More information about the gnucash-changes
mailing list