Skip to content

Commit 02afa33

Browse files
committed
app-utils - reduce guile-util api-surface
Make internal-use only function static and drop two unused functions.
1 parent efefac3 commit 02afa33

File tree

2 files changed

+2
-57
lines changed

2 files changed

+2
-57
lines changed

libgnucash/app-utils/guile-util.c

Lines changed: 2 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ struct _Process
110110
gboolean detached;
111111
};
112112

113-
114113
static void
115114
initialize_scm_functions()
116115
{
@@ -242,7 +241,7 @@ gnc_copy_split_scm_onto_split(SCM split_scm, Split *split,
242241
* Args: scm - a scheme object *
243242
* Returns: true if scm is a scheme split *
244243
\********************************************************************/
245-
gboolean
244+
static gboolean
246245
gnc_is_split_scm(SCM scm)
247246
{
248247
initialize_scm_functions();
@@ -258,7 +257,7 @@ gnc_is_split_scm(SCM scm)
258257
* Args: scm - a scheme object *
259258
* Returns: true if scm is a scheme transaction *
260259
\********************************************************************/
261-
gboolean
260+
static gboolean
262261
gnc_is_trans_scm(SCM scm)
263262
{
264263
initialize_scm_functions();
@@ -420,56 +419,6 @@ gnc_split_scm_set_value(SCM split_scm, gnc_numeric value)
420419
}
421420

422421

423-
/********************************************************************\
424-
* gnc_split_scm_get_memo *
425-
* return the newly allocated memo of a scheme split, or NULL. *
426-
* *
427-
* Args: split_scm - the scheme split *
428-
* Returns: newly allocated memo string, must be freed with g_free *
429-
\********************************************************************/
430-
char *
431-
gnc_split_scm_get_memo(SCM split_scm)
432-
{
433-
SCM result;
434-
435-
initialize_scm_functions();
436-
437-
if (!gnc_is_split_scm(split_scm))
438-
return NULL;
439-
440-
result = scm_call_1(getters.split_scm_memo, split_scm);
441-
if (!scm_is_string(result))
442-
return NULL;
443-
444-
return gnc_scm_to_utf8_string(result);
445-
}
446-
447-
448-
/**********************************************************************\
449-
* gnc_split_scm_get_action *
450-
* return the newly allocated action of a scheme split, or NULL. *
451-
* *
452-
* Args: split_scm - the scheme split *
453-
* Returns: newly allocated action string, must be freed with g_free *
454-
\**********************************************************************/
455-
char *
456-
gnc_split_scm_get_action(SCM split_scm)
457-
{
458-
SCM result;
459-
460-
initialize_scm_functions();
461-
462-
if (!gnc_is_split_scm(split_scm))
463-
return NULL;
464-
465-
result = scm_call_1(getters.split_scm_action, split_scm);
466-
if (!scm_is_string(result))
467-
return NULL;
468-
469-
return gnc_scm_to_utf8_string(result);
470-
}
471-
472-
473422
/********************************************************************\
474423
* gnc_split_scm_get_amount *
475424
* return the amount of a scheme split *

libgnucash/app-utils/guile-util.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@
3434

3535
/* The next set of functions is for manipulating scheme
3636
* representations of splits and transactions. */
37-
gboolean gnc_is_split_scm(SCM scm);
38-
gboolean gnc_is_trans_scm(SCM scm);
3937

4038
SCM gnc_copy_split(Split *split, gboolean use_cut_semantics);
4139
void gnc_copy_split_scm_onto_split(SCM split_scm, Split *split,
@@ -48,8 +46,6 @@ void gnc_split_scm_set_reconcile_state(SCM split_scm, char reconcile_state);
4846
void gnc_split_scm_set_amount(SCM split_scm, gnc_numeric amount);
4947
void gnc_split_scm_set_value(SCM split_scm, gnc_numeric value);
5048

51-
char * gnc_split_scm_get_memo(SCM split_scm);
52-
char * gnc_split_scm_get_action(SCM split_scm);
5349
gnc_numeric gnc_split_scm_get_amount(SCM split_scm);
5450
gnc_numeric gnc_split_scm_get_value(SCM split_scm);
5551

0 commit comments

Comments
 (0)