[Gnucash-changes]
r13219 - gnucash/trunk - don't need to scm_gc_{un,
}protect_object on SCM_BOOL_F.
Derek Atkins
warlord at cvs.gnucash.org
Sat Feb 11 15:22:41 EST 2006
Author: warlord
Date: 2006-02-11 15:22:40 -0500 (Sat, 11 Feb 2006)
New Revision: 13219
Trac: http://svn.gnucash.org/trac/changeset/13219
Modified:
gnucash/trunk/ChangeLog
gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c
Log:
don't need to scm_gc_{un,}protect_object on SCM_BOOL_F.
Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog 2006-02-11 20:08:30 UTC (rev 13218)
+++ gnucash/trunk/ChangeLog 2006-02-11 20:22:40 UTC (rev 13219)
@@ -1,3 +1,8 @@
+2006-02-11 Derek Atkins <derek at ihtfp.com>
+
+ * src/report/report-gnome/gnc-plugin-page-report.c:
+ don't need to scm_gc_{un,}protect_object on SCM_BOOL_F.
+
2006-02-11 David Hampton <hampton at employees.org>
* src/gnome/glade/acctperiod.glade:
Modified: gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c
===================================================================
--- gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c 2006-02-11 20:08:30 UTC (rev 13218)
+++ gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c 2006-02-11 20:22:40 UTC (rev 13219)
@@ -384,10 +384,6 @@
priv->edited_reports = SCM_EOL;
priv->name_change_cb_id = SCM_BOOL_F;
- scm_gc_protect_object(priv->cur_report);
- scm_gc_protect_object(priv->initial_report);
- scm_gc_protect_object(priv->edited_reports);
-
g_object_get( ppage, "report-id", &report_id, NULL );
PINFO("report-id: %d\n", report_id);
@@ -399,7 +395,6 @@
}
if (priv->initial_report == SCM_BOOL_F) {
- scm_gc_unprotect_object(priv->initial_report);
priv->initial_report = inst_report;
scm_gc_protect_object(priv->initial_report);
}
@@ -462,7 +457,6 @@
}
if (priv->initial_report == SCM_BOOL_F) {
- scm_gc_unprotect_object(priv->initial_report);
priv->initial_report = inst_report;
scm_gc_protect_object(priv->initial_report);
@@ -818,8 +812,10 @@
priv->container = NULL;
priv->html = NULL;
- scm_gc_unprotect_object(priv->cur_report);
- scm_gc_unprotect_object(priv->edited_reports);
+ if (priv->cur_report != SCM_BOOL_F)
+ scm_gc_unprotect_object(priv->cur_report);
+ if (priv->edited_reports != SCM_BOOL_F)
+ scm_gc_unprotect_object(priv->edited_reports);
}
static GtkActionEntry report_actions[] =
@@ -957,7 +953,8 @@
SCM report)
{
SCM new_edited = scm_delete(priv->edited_reports, report);
- scm_gc_unprotect_object(priv->edited_reports);
+ if (priv->edited_reports != SCM_BOOL_F)
+ scm_gc_unprotect_object(priv->edited_reports);
priv->edited_reports = new_edited;
scm_gc_protect_object(priv->edited_reports);
}
@@ -967,7 +964,8 @@
SCM report)
{
SCM new_edited = scm_cons(report, priv->edited_reports);
- scm_gc_unprotect_object(priv->edited_reports);
+ if (priv->edited_reports != SCM_BOOL_F)
+ scm_gc_unprotect_object(priv->edited_reports);
priv->edited_reports = new_edited;
scm_gc_protect_object(priv->edited_reports);
}
More information about the gnucash-changes
mailing list