From c01cccbddc6049632ccfcc254c32cc419e3b40fb Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Sun, 20 Apr 2025 23:20:54 +0800 Subject: [PATCH] [gnc-engine-guile.cpp] helper gnc_split_to_scm function --- bindings/guile/gnc-engine-guile.cpp | 7 +++++++ bindings/guile/gnc-engine-guile.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/bindings/guile/gnc-engine-guile.cpp b/bindings/guile/gnc-engine-guile.cpp index fd6426d1bc..2c3f5be575 100644 --- a/bindings/guile/gnc-engine-guile.cpp +++ b/bindings/guile/gnc-engine-guile.cpp @@ -1781,6 +1781,13 @@ gnc_book_to_scm (const QofBook *book) return gnc_generic_to_scm (book, stype); } +SCM +gnc_split_to_scm (const Split *split) +{ + static auto stype = get_swig_type ("_p_Split"); + return gnc_generic_to_scm (split, stype); +} + GncAccountValue * gnc_scm_to_account_value_ptr (SCM valuearg) { GncAccountValue *res; diff --git a/bindings/guile/gnc-engine-guile.h b/bindings/guile/gnc-engine-guile.h index 2795e8e287..07687928d6 100644 --- a/bindings/guile/gnc-engine-guile.h +++ b/bindings/guile/gnc-engine-guile.h @@ -66,6 +66,8 @@ SCM gnc_commodity_to_scm(const gnc_commodity* commodity); SCM gnc_book_to_scm(const QofBook* book); +SCM gnc_split_to_scm (const Split *split); + /* Conversion routines used with tax tables */ GncAccountValue* gnc_scm_to_account_value_ptr(SCM valuearg);