[Gnucash-changes] Fix a bunch of GUILE_WARN_DEPRECATED warnings.

Derek Atkins warlord at cvs.gnucash.org
Sat Jun 26 10:52:15 EDT 2004


Log Message:
-----------
Fix a bunch of GUILE_WARN_DEPRECATED warnings.

	* src/gnc-module/gnc-module.scm: create (and export) a re-export macro
	  is guile doesn't already provide one.  Then re-export the symbols
	  instead of exporting them.  Fixes some deprecated guile warnings.
	* src/guile-mappings.h: convert scm_gc_{un,}protect_object() back
	  to its pre-1.6 type for earlier guiles, but upconvert to the new
	  type to fix a deprecated warning.  Note that g-wrap is still
	  outputting deprecated code.
	* lots of other files:
	  convert scm_{un,}protect_object -> scm_gc_{un,}protect_object because
	  the former is now deprecated in guile.  Fixes a bunch of
	  GUILE_WARN_DEPRECATED warnings (but probably not all of them).

Modified Files:
--------------
    gnucash:
        ChangeLog
    gnucash/src:
        guile-mappings.h
    gnucash/src/app-utils:
        gnc-component-manager.c
        guile-util.c
        option-util.c
    gnucash/src/backend/file:
        sixtp-utils.c
    gnucash/src/business/business-core:
        gncBusGuile.c
    gnucash/src/business/business-gnome:
        dialog-invoice.c
    gnucash/src/engine:
        engine-helpers.c
        gnc-session-scm.c
    gnucash/src/gnc-module:
        gnc-module.scm
    gnucash/src/gnome:
        dialog-progress.c
        window-acct-tree.c
    gnucash/src/gnome-utils:
        dialog-options.c
        gnc-menu-extensions.c
    gnucash/src/import-export/qif-import:
        dialog-account-picker.c
        druid-qif-import.c
    gnucash/src/register/ledger-core:
        split-register.c
    gnucash/src/report/report-gnome:
        dialog-column-view.c
        dialog-style-sheet.c
        window-report.c

Revision Data
-------------
Index: ChangeLog
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/ChangeLog,v
retrieving revision 1.1819
retrieving revision 1.1820
diff -LChangeLog -LChangeLog -u -r1.1819 -r1.1820
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,17 @@
+2004-06-26  Derek Atkins  <derek at ihtfp.com>
+
+	* src/gnc-module/gnc-module.scm: create (and export) a re-export macro
+	  is guile doesn't already provide one.  Then re-export the symbols
+	  instead of exporting them.  Fixes some deprecated guile warnings.
+	* src/guile-mappings.h: convert scm_gc_{un,}protect_object() back
+	  to its pre-1.6 type for earlier guiles, but upconvert to the new
+	  type to fix a deprecated warning.  Note that g-wrap is still
+	  outputting deprecated code.
+	* lots of other files:
+	  convert scm_{un,}protect_object -> scm_gc_{un,}protect_object because
+	  the former is now deprecated in guile.  Fixes a bunch of
+	  GUILE_WARN_DEPRECATED warnings (but probably not all of them).
+
 2004-06-25  Derek Atkins  <derek at ihtfp.com>
 
 	* src/engine/gnc-numeric.c: small change to the 128-bit math
Index: guile-mappings.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/guile-mappings.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/guile-mappings.h -Lsrc/guile-mappings.h -u -r1.1 -r1.2
--- src/guile-mappings.h
+++ src/guile-mappings.h
@@ -40,6 +40,8 @@
   	gh_new_procedure(nm,fn,req,opt,rst)
   #define scm_num2long(a,b,c)	scm_num2long(a, (char *)b, c)
   #define scm_num2ulong(a,b,c)	scm_num2ulong(a, (char *)b, c)
+  #define scm_gc_project_object(x) scm_protect_object(x)
+  #define scm_gc_unprotect_object(x) scm_unprotect_object(x)
 
   #if ((GNC_GUILE_MAJOR_VERSION == 1) && (GNC_GUILE_MINOR_VERSION < 4))
     #define scm_make_real	gh_double2scm
@@ -59,6 +61,12 @@
   #else
     #define scm_str2symbol(a)	gh_symbol2scm(a)
   #endif /* Guile < 1.4 */
+#else /* Guile >= 1.6 */
+
+/* This fixes some g-wrap problems..  Once g-wrap fixes this, we can remove this */
+#define scm_protect_object(x)	scm_gc_protect_object(x)
+#define scm_unprotect_object(x)	scm_gc_unprotect_object(x)
+
 #endif /* Guile < 1.6 */
 
 
Index: option-util.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/option-util.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -Lsrc/app-utils/option-util.c -Lsrc/app-utils/option-util.c -u -r1.24 -r1.25
--- src/app-utils/option-util.c
+++ src/app-utils/option-util.c
@@ -209,7 +209,7 @@
   odb = g_new0(GNCOptionDB, 1);
 
   odb->guile_options = guile_options;
-  scm_protect_object(guile_options);
+  scm_gc_protect_object(guile_options);
 
   odb->option_sections = NULL;
   odb->options_dirty = FALSE;
@@ -369,7 +369,7 @@
     {
       GNCOption *option = onode->data;
 
-      scm_unprotect_object(option->guile_option);
+      scm_gc_unprotect_object(option->guile_option);
       g_free (option);
     }
 
@@ -397,7 +397,7 @@
     option_dbs = NULL;
   }
 
-  scm_unprotect_object(odb->guile_options);
+  scm_gc_unprotect_object(odb->guile_options);
   odb->guile_options = SCM_UNDEFINED;
 
   g_free(odb);
@@ -458,13 +458,13 @@
   if(void_type == SCM_UNDEFINED) {
     void_type = scm_c_eval_string("<gw:void*>");
     /* don't really need this - types are bound globally anyway. */
-    if(void_type != SCM_UNDEFINED) scm_protect_object(void_type);
+    if(void_type != SCM_UNDEFINED) scm_gc_protect_object(void_type);
   }
   if(callback_type == SCM_UNDEFINED) {
     callback_type = scm_c_eval_string("<gnc:OptionChangeCallback>");
     /* don't really need this - types are bound globally anyway. */
     if(callback_type != SCM_UNDEFINED)
-      scm_protect_object(callback_type);
+      scm_gc_protect_object(callback_type);
   }
 
   /* Now build the args list for apply */
@@ -1461,7 +1461,7 @@
   option->odb = odb;
 
   /* Prevent guile from garbage collecting the option */
-  scm_protect_object(guile_option);
+  scm_gc_protect_object(guile_option);
 
   /* Make the section structure */
   section = g_new0(GNCOptionSection, 1);
Index: gnc-component-manager.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/gnc-component-manager.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -Lsrc/app-utils/gnc-component-manager.c -Lsrc/app-utils/gnc-component-manager.c -u -r1.19 -r1.20
--- src/app-utils/gnc-component-manager.c
+++ src/app-utils/gnc-component-manager.c
@@ -466,10 +466,10 @@
   g_return_val_if_fail (ci, NO_COMPONENT);
 
   ci->refresh_handler_scm = refresh_handler;
-  scm_protect_object (refresh_handler);
+  scm_gc_protect_object (refresh_handler);
 
   ci->close_handler_scm = close_handler;
-  scm_protect_object (close_handler);
+  scm_gc_protect_object (close_handler);
 
   return ci->component_id;
 }
@@ -575,11 +575,11 @@
   ci->component_class = NULL;
 
   if (ci->refresh_handler_scm != SCM_BOOL_F)
-    scm_unprotect_object (ci->refresh_handler_scm);
+    scm_gc_unprotect_object (ci->refresh_handler_scm);
   ci->refresh_handler_scm = SCM_BOOL_F;
 
   if (ci->close_handler_scm != SCM_BOOL_F)
-    scm_unprotect_object (ci->close_handler_scm);
+    scm_gc_unprotect_object (ci->close_handler_scm);
   ci->close_handler_scm = SCM_BOOL_F;
 
   g_free (ci);
Index: guile-util.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/guile-util.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -Lsrc/app-utils/guile-util.c -Lsrc/app-utils/guile-util.c -u -r1.12 -r1.13
--- src/app-utils/guile-util.c
+++ src/app-utils/guile-util.c
@@ -381,7 +381,7 @@
   if(split_type == SCM_UNDEFINED) {
     split_type = scm_c_eval_string("<gnc:Split*>");
     /* don't really need this - types are bound globally anyway. */
-    if(split_type != SCM_UNDEFINED) scm_protect_object(split_type);
+    if(split_type != SCM_UNDEFINED) scm_gc_protect_object(split_type);
   }
 
   arg = gw_wcp_assimilate_ptr(split, split_type);
@@ -430,7 +430,7 @@
   if(split_type == SCM_UNDEFINED) {
     split_type = scm_c_eval_string("<gnc:Split*>");
     /* don't really need this - types are bound globally anyway. */
-    if(split_type != SCM_UNDEFINED) scm_protect_object(split_type);
+    if(split_type != SCM_UNDEFINED) scm_gc_protect_object(split_type);
   }
 
   arg = gw_wcp_assimilate_ptr(split, split_type);
@@ -750,7 +750,7 @@
   if(trans_type == SCM_UNDEFINED) {
     trans_type = scm_c_eval_string("<gnc:Transaction*>");
     /* don't really need this - types are bound globally anyway. */
-    if(trans_type != SCM_UNDEFINED) scm_protect_object(trans_type);
+    if(trans_type != SCM_UNDEFINED) scm_gc_protect_object(trans_type);
   }
 
   arg = gw_wcp_assimilate_ptr(trans, trans_type);
@@ -826,7 +826,7 @@
   if(trans_type == SCM_UNDEFINED) {
     trans_type = scm_c_eval_string("<gnc:Transaction*>");
     /* don't really need this - types are bound globally anyway. */
-    if(trans_type != SCM_UNDEFINED) scm_protect_object(trans_type);
+    if(trans_type != SCM_UNDEFINED) scm_gc_protect_object(trans_type);
   }
 
   arg = gw_wcp_assimilate_ptr(trans, trans_type);
Index: sixtp-utils.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/sixtp-utils.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -Lsrc/backend/file/sixtp-utils.c -Lsrc/backend/file/sixtp-utils.c -u -r1.10 -r1.11
--- src/backend/file/sixtp-utils.c
+++ src/backend/file/sixtp-utils.c
@@ -177,7 +177,7 @@
   
     if(!ready) {
       string_to_number = scm_c_eval_string("string->number");
-      scm_protect_object(string_to_number);
+      scm_gc_protect_object(string_to_number);
       ready = TRUE;
     }
     
Index: gncBusGuile.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncBusGuile.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/business/business-core/gncBusGuile.c -Lsrc/business/business-core/gncBusGuile.c -u -r1.3 -r1.4
--- src/business/business-core/gncBusGuile.c
+++ src/business/business-core/gncBusGuile.c
@@ -35,7 +35,7 @@
   if(account_type == SCM_UNDEFINED) {
     account_type = scm_c_eval_string("<gnc:Account*>");
     /* don't really need this - types are bound globally anyway. */
-    if(account_type != SCM_UNDEFINED) scm_protect_object(account_type);
+    if(account_type != SCM_UNDEFINED) scm_gc_protect_object(account_type);
   }
 
   return account_type;
Index: dialog-invoice.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/dialog-invoice.c,v
retrieving revision 1.99
retrieving revision 1.100
diff -Lsrc/business/business-gnome/dialog-invoice.c -Lsrc/business/business-gnome/dialog-invoice.c -u -r1.99 -r1.100
--- src/business/business-gnome/dialog-invoice.c
+++ src/business/business-gnome/dialog-invoice.c
@@ -600,13 +600,13 @@
   arg = gw_wcp_assimilate_ptr (invoice, scm_c_eval_string("<gnc:GncInvoice*>"));
   args = scm_cons (arg, args);
 
-  /* scm_protect_object(func); */
+  /* scm_gc_protect_object(func); */
 
   arg = scm_apply (func, args, SCM_EOL);
   g_return_if_fail (SCM_EXACTP (arg));
   report_id = scm_num2int (arg, SCM_ARG1, __FUNCTION__);
 
-  /* scm_unprotect_object(func); */
+  /* scm_gc_unprotect_object(func); */
   if (report_id >= 0)
     reportWindow (report_id);
 }
Index: gnc-session-scm.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-session-scm.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/engine/gnc-session-scm.c -Lsrc/engine/gnc-session-scm.c -u -r1.7 -r1.8
--- src/engine/gnc-session-scm.c
+++ src/engine/gnc-session-scm.c
@@ -84,10 +84,10 @@
 gnc_session_scm_set_callback (SCM percentage_cb)
 {
   if (gnc_session_scm_gui_cb != SCM_BOOL_F)
-    scm_unprotect_object(gnc_session_scm_gui_cb);
+    scm_gc_unprotect_object(gnc_session_scm_gui_cb);
 
   gnc_session_scm_gui_cb = percentage_cb;
   if (gnc_session_scm_gui_cb != SCM_BOOL_F)
-    scm_protect_object(gnc_session_scm_gui_cb);
+    scm_gc_protect_object(gnc_session_scm_gui_cb);
 }
 
Index: engine-helpers.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/engine-helpers.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -Lsrc/engine/engine-helpers.c -Lsrc/engine/engine-helpers.c -u -r1.39 -r1.40
--- src/engine/engine-helpers.c
+++ src/engine/engine-helpers.c
@@ -2102,7 +2102,7 @@
   if(trans_type == SCM_BOOL_F) {
     trans_type = scm_c_eval_string("<gnc:Transaction*>");
     /* don't really need this - types are bound globally anyway. */
-    if(trans_type != SCM_BOOL_F) scm_protect_object(trans_type);
+    if(trans_type != SCM_BOOL_F) scm_gc_protect_object(trans_type);
   }
   
   scm_trans = gw_wcp_assimilate_ptr(t, trans_type);
@@ -2179,7 +2179,7 @@
   
   if (bits00to15_mask == SCM_BOOL_F) {
     bits00to15_mask = scm_ulong2num(0xFFFF);
-    scm_protect_object (bits00to15_mask);
+    scm_gc_protect_object (bits00to15_mask);
   }
 
   /*
@@ -2231,8 +2231,8 @@
     tmp <<= 32;
     minval = gnc_gint64_to_scm(tmp);
 
-    scm_protect_object(maxval);
-    scm_protect_object(minval);
+    scm_gc_protect_object(maxval);
+    scm_gc_protect_object(minval);
     initialized = 1;
   }
 
@@ -2301,7 +2301,7 @@
   if(commodity_type == SCM_UNDEFINED) {
     commodity_type = scm_c_eval_string("<gnc:commodity*>");
     /* don't really need this - types are bound globally anyway. */
-    if(commodity_type != SCM_UNDEFINED) scm_protect_object(commodity_type);
+    if(commodity_type != SCM_UNDEFINED) scm_gc_protect_object(commodity_type);
   }
 
   if(!gw_wcp_is_of_type_p(commodity_type, scm)) {
@@ -2325,7 +2325,7 @@
   if(commodity_type == SCM_UNDEFINED) {
     commodity_type = scm_c_eval_string("<gnc:commodity*>");
     /* don't really need this - types are bound globally anyway. */
-    if(commodity_type != SCM_UNDEFINED) scm_protect_object(commodity_type);
+    if(commodity_type != SCM_UNDEFINED) scm_gc_protect_object(commodity_type);
   }
   
   return gw_wcp_assimilate_ptr((void *) commodity, commodity_type);
@@ -2348,7 +2348,7 @@
 
     /* don't really need this - types are bound globally anyway. */
     if (book_type != SCM_UNDEFINED)
-      scm_protect_object (book_type);
+      scm_gc_protect_object (book_type);
   }
   
   return gw_wcp_assimilate_ptr ((void *) book, book_type);
@@ -2371,7 +2371,7 @@
 
     /* don't really need this - types are bound globally anyway. */
     if (session_type != SCM_UNDEFINED)
-      scm_protect_object (session_type);
+      scm_gc_protect_object (session_type);
   }
 
   return gw_wcp_assimilate_ptr ((void *) session, session_type);
Index: gnc-module.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnc-module/gnc-module.scm,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/gnc-module/gnc-module.scm -Lsrc/gnc-module/gnc-module.scm -u -r1.5 -r1.6
--- src/gnc-module/gnc-module.scm
+++ src/gnc-module/gnc-module.scm
@@ -11,12 +11,18 @@
 
 (export gnc:module-system-init)
 
+(if (not (defined? 're-export))
+    (begin
+      (defmacro re-export names
+	`(eval export names))
+      (export re-export)))
+
 ;; symbols from gw-gnc-module
-(export gnc:module-system-refresh)
-(export gnc:module-load)
-(export gnc:module-load-optional)
-(export gnc:module-unload)
-(export gnc:module-lookup)
+(re-export gnc:module-system-refresh)
+(re-export gnc:module-load)
+(re-export gnc:module-load-optional)
+(re-export gnc:module-unload)
+(re-export gnc:module-lookup)
 
 (define (gnc:module-system-init)
   (let ((lib (if (or (string=? (version) "1.3")
Index: window-acct-tree.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/window-acct-tree.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -Lsrc/gnome/window-acct-tree.c -Lsrc/gnome/window-acct-tree.c -u -r1.53 -r1.54
--- src/gnome/window-acct-tree.c
+++ src/gnome/window-acct-tree.c
@@ -267,7 +267,7 @@
                                            mc, 
                                            N_("Account Tree"),
                                            N_("Name of account view"));
-  scm_protect_object(win->name_change_callback_id);
+  scm_gc_protect_object(win->name_change_callback_id);
 
   gnc_acct_tree_window_create_menu(win, mc);
   gnc_acct_tree_window_create_toolbar(win, mc);
@@ -1091,9 +1091,9 @@
   SCM func = scm_c_eval_string("gnc:make-new-acct-tree-window");
   SCM opts_and_id = scm_call_0(func);
   
-  scm_unprotect_object(win->options);
+  scm_gc_unprotect_object(win->options);
   win->options = SCM_CAR(opts_and_id);
-  scm_protect_object(win->options);
+  scm_gc_protect_object(win->options);
   win->options_id = scm_num2int(SCM_CDR(opts_and_id), SCM_ARG1, __FUNCTION__);
 }
 
@@ -1115,7 +1115,7 @@
 
   scm_call_1(free_tree, scm_int2num(win->options_id));
 
-  scm_unprotect_object(win->options);
+  scm_gc_unprotect_object(win->options);
   g_free (win);
 }
 
@@ -1134,7 +1134,7 @@
                                         "Enable EURO support");
   treewin->account_tree = gnc_mainwin_account_tree_new();
   treewin->options = SCM_BOOL_F;
-  scm_protect_object(treewin->options);
+  scm_gc_protect_object(treewin->options);
   treewin->editor_dialog = NULL;
 
   /* get the options and the window ID */ 
@@ -1156,9 +1156,9 @@
       temp = scm_call_1(find_options, scm_int2num(options_id));
 
       if(temp != SCM_BOOL_F) {
-        scm_unprotect_object(treewin->options);
+        scm_gc_unprotect_object(treewin->options);
         treewin->options = temp;
-        scm_protect_object(treewin->options);
+        scm_gc_protect_object(treewin->options);
         treewin->options_id = options_id;
       }
       else {
Index: dialog-progress.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/dialog-progress.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/gnome/dialog-progress.c -Lsrc/gnome/dialog-progress.c -u -r1.5 -r1.6
--- src/gnome/dialog-progress.c
+++ src/gnome/dialog-progress.c
@@ -148,7 +148,7 @@
   /* Make sure the callbacks aren't invoked */
   progress->cancel_func = NULL;
   if (progress->cancel_scm_func != SCM_UNDEFINED)
-    scm_unprotect_object (progress->cancel_scm_func);
+    scm_gc_unprotect_object (progress->cancel_scm_func);
   progress->cancel_scm_func = SCM_UNDEFINED;
 
   g_free(progress);
@@ -309,12 +309,12 @@
     return;
 
   if (progress->cancel_scm_func != SCM_UNDEFINED)
-    scm_unprotect_object (progress->cancel_scm_func);
+    scm_gc_unprotect_object (progress->cancel_scm_func);
 
   if (SCM_PROCEDUREP(cancel_scm_func))
   {
     progress->cancel_scm_func = cancel_scm_func;
-    scm_protect_object (cancel_scm_func);
+    scm_gc_protect_object (cancel_scm_func);
     gtk_widget_show (progress->cancel_button);
   }
   else
@@ -378,7 +378,7 @@
   /* Make sure the callbacks aren't invoked */
   progress->cancel_func = NULL;
   if (progress->cancel_scm_func != SCM_UNDEFINED)
-    scm_unprotect_object (progress->cancel_scm_func);
+    scm_gc_unprotect_object (progress->cancel_scm_func);
   progress->cancel_scm_func = SCM_UNDEFINED;
 
   if (!progress->finished)
Index: dialog-options.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/dialog-options.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -Lsrc/gnome-utils/dialog-options.c -Lsrc/gnome-utils/dialog-options.c -u -r1.31 -r1.32
--- src/gnome-utils/dialog-options.c
+++ src/gnome-utils/dialog-options.c
@@ -2949,11 +2949,11 @@
 
   if (cbdata->close_cb != SCM_BOOL_F) {
     scm_call_0 (cbdata->close_cb);
-    scm_unprotect_object (cbdata->close_cb);
+    scm_gc_unprotect_object (cbdata->close_cb);
   }
 
   if (cbdata->apply_cb != SCM_BOOL_F)
-    scm_unprotect_object (cbdata->apply_cb);
+    scm_gc_unprotect_object (cbdata->apply_cb);
 
   g_free (cbdata);
 }
@@ -2972,10 +2972,10 @@
   cbdata->close_cb = close_cb;
 
   if (apply_cb != SCM_BOOL_F)
-    scm_protect_object (cbdata->apply_cb);
+    scm_gc_protect_object (cbdata->apply_cb);
 
   if (close_cb != SCM_BOOL_F)
-    scm_protect_object (cbdata->close_cb);
+    scm_gc_protect_object (cbdata->close_cb);
 
   gnc_options_dialog_set_apply_cb (win, scm_apply_cb, cbdata);
   gnc_options_dialog_set_close_cb (win, scm_close_cb, cbdata);
Index: gnc-menu-extensions.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-menu-extensions.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -Lsrc/gnome-utils/gnc-menu-extensions.c -Lsrc/gnome-utils/gnc-menu-extensions.c -u -r1.11 -r1.12
--- src/gnome-utils/gnc-menu-extensions.c
+++ src/gnome-utils/gnc-menu-extensions.c
@@ -279,7 +279,7 @@
   ext_info->info[0].pixmap_type = GNOME_APP_PIXMAP_NONE;
   ext_info->info[1].type = GNOME_APP_UI_ENDOFINFO;
 
-  scm_protect_object(extension);
+  scm_gc_protect_object(extension);
   
   /* need to append so we can run them in order */
   extension_list = g_slist_append(extension_list, ext_info);
@@ -294,7 +294,7 @@
   ExtensionInfo *ext_info = extension_info;
 
   if (ext_info->extension)
-    scm_unprotect_object(ext_info->extension);
+    scm_gc_unprotect_object(ext_info->extension);
 
   g_free(ext_info->info[0].label);
   g_free(ext_info->info[0].hint);
Index: druid-qif-import.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/qif-import/druid-qif-import.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -Lsrc/import-export/qif-import/druid-qif-import.c -Lsrc/import-export/qif-import/druid-qif-import.c -u -r1.27 -r1.28
--- src/import-export/qif-import/druid-qif-import.c
+++ src/import-export/qif-import/druid-qif-import.c
@@ -156,20 +156,20 @@
 
   gtk_widget_destroy(window->window);
 
-  scm_unprotect_object(window->imported_files);
-  scm_unprotect_object(window->selected_file);
-  scm_unprotect_object(window->gnc_acct_info);
-  scm_unprotect_object(window->cat_display_info);
-  scm_unprotect_object(window->cat_map_info);
-  scm_unprotect_object(window->memo_display_info);
-  scm_unprotect_object(window->memo_map_info);
-  scm_unprotect_object(window->acct_display_info);
-  scm_unprotect_object(window->acct_map_info);
-  scm_unprotect_object(window->stock_hash);
-  scm_unprotect_object(window->new_stocks);
-  scm_unprotect_object(window->ticker_map);
-  scm_unprotect_object(window->imported_account_group);
-  scm_unprotect_object(window->match_transactions);
+  scm_gc_unprotect_object(window->imported_files);
+  scm_gc_unprotect_object(window->selected_file);
+  scm_gc_unprotect_object(window->gnc_acct_info);
+  scm_gc_unprotect_object(window->cat_display_info);
+  scm_gc_unprotect_object(window->cat_map_info);
+  scm_gc_unprotect_object(window->memo_display_info);
+  scm_gc_unprotect_object(window->memo_map_info);
+  scm_gc_unprotect_object(window->acct_display_info);
+  scm_gc_unprotect_object(window->acct_map_info);
+  scm_gc_unprotect_object(window->stock_hash);
+  scm_gc_unprotect_object(window->new_stocks);
+  scm_gc_unprotect_object(window->ticker_map);
+  scm_gc_unprotect_object(window->imported_account_group);
+  scm_gc_unprotect_object(window->match_transactions);
 
   g_free(window);
 }
@@ -479,9 +479,9 @@
     scm_qiffile          = scm_call_0(make_qif_file);    
     imported_files       = scm_cons(scm_qiffile, imported_files);    
 
-    scm_unprotect_object(wind->selected_file);      
+    scm_gc_unprotect_object(wind->selected_file);      
     wind->selected_file  = scm_qiffile;    
-    scm_protect_object(wind->selected_file);      
+    scm_gc_protect_object(wind->selected_file);      
     
     /* load the file */
     load_return = scm_call_3(qif_file_load, SCM_CAR(imported_files),
@@ -517,9 +517,9 @@
       imported_files = 
         scm_call_2(unload_qif_file, scm_qiffile, imported_files);
             
-      scm_unprotect_object(wind->imported_files);
+      scm_gc_unprotect_object(wind->imported_files);
       wind->imported_files = imported_files;
-      scm_protect_object(wind->imported_files);
+      scm_gc_protect_object(wind->imported_files);
 
       return TRUE;
     }
@@ -590,9 +590,9 @@
       } 
     }
     
-    scm_unprotect_object(wind->imported_files);
+    scm_gc_unprotect_object(wind->imported_files);
     wind->imported_files = imported_files;
-    scm_protect_object(wind->imported_files);
+    scm_gc_protect_object(wind->imported_files);
     
     /* turn back the cursor */
     gnc_unset_busy_cursor(NULL);
@@ -677,10 +677,10 @@
 
   if(SCM_LISTP(wind->imported_files) && 
      (scm_ilength(wind->imported_files) > row)) {
-    scm_unprotect_object(wind->selected_file);
+    scm_gc_unprotect_object(wind->selected_file);
     wind->selected_file = scm_list_ref(wind->imported_files,
 				       scm_int2num(row));   
-    scm_protect_object(wind->selected_file);
+    scm_gc_protect_object(wind->selected_file);
   } 
 }
 
@@ -741,13 +741,13 @@
     imported_files = 
       scm_call_2(unload_qif_file, wind->selected_file, wind->imported_files);
   
-    scm_unprotect_object(wind->imported_files);
+    scm_gc_unprotect_object(wind->imported_files);
     wind->imported_files = imported_files;
-    scm_protect_object(wind->imported_files);
+    scm_gc_protect_object(wind->imported_files);
 
-    scm_unprotect_object(wind->selected_file);
+    scm_gc_unprotect_object(wind->selected_file);
     wind->selected_file = SCM_BOOL_F;
-    scm_protect_object(wind->selected_file);
+    scm_gc_protect_object(wind->selected_file);
      
     update_file_page(wind);
   }
@@ -847,13 +847,13 @@
 
   files_list = scm_call_2(unload, wind->selected_file, wind->imported_files);
 
-  scm_unprotect_object(wind->imported_files);
+  scm_gc_unprotect_object(wind->imported_files);
   wind->imported_files = files_list;
-  scm_protect_object(wind->imported_files);
+  scm_gc_protect_object(wind->imported_files);
   
-  scm_unprotect_object(wind->selected_file);
+  scm_gc_unprotect_object(wind->selected_file);
   wind->selected_file = SCM_BOOL_F;
-  scm_protect_object(wind->selected_file);
+  scm_gc_protect_object(wind->selected_file);
   
   gnome_druid_set_page(GNOME_DRUID(wind->druid),
                        get_named_page(wind, "load_file_page"));
@@ -894,9 +894,9 @@
 			  map_info, 
 			  wind->gnc_acct_info);
 
-  scm_unprotect_object(*display_info);
+  scm_gc_unprotect_object(*display_info);
   *display_info = accts_left;  
-  scm_protect_object(*display_info);
+  scm_gc_protect_object(*display_info);
   
   gtk_clist_column_titles_passive (GTK_CLIST(list));
 
@@ -1183,14 +1183,14 @@
 		     _("An error occurred while importing "
 		       "QIF transactions into GnuCash. Your "
 		       "accounts are unchanged."));    
-    scm_unprotect_object(wind->imported_account_group);
+    scm_gc_unprotect_object(wind->imported_account_group);
     wind->imported_account_group = SCM_BOOL_F;
-    scm_protect_object(wind->imported_account_group);
+    scm_gc_protect_object(wind->imported_account_group);
   }
   else {
-    scm_unprotect_object(wind->imported_account_group);
+    scm_gc_unprotect_object(wind->imported_account_group);
     wind->imported_account_group = retval;
-    scm_protect_object(wind->imported_account_group);
+    scm_gc_protect_object(wind->imported_account_group);
 
     /* now detect duplicate transactions */ 
     gnc_set_busy_cursor(NULL, TRUE);
@@ -1199,9 +1199,9 @@
 			wind->imported_account_group);
     gnc_unset_busy_cursor(NULL);
     
-    scm_unprotect_object(wind->match_transactions);
+    scm_gc_unprotect_object(wind->match_transactions);
     wind->match_transactions = retval;
-    scm_protect_object(wind->match_transactions);
+    scm_gc_protect_object(wind->match_transactions);
 
     /* skip to the last page if we couldn't find duplicates 
      * in the new group */
@@ -1278,10 +1278,10 @@
   else {
     /* if we need to look at stocks, do that, otherwise import
      * xtns and go to the duplicates page */
-    scm_unprotect_object(wind->new_stocks);
+    scm_gc_unprotect_object(wind->new_stocks);
     wind->new_stocks = scm_call_3(update_stock, wind->stock_hash,
 				  wind->ticker_map, wind->acct_map_info);
-    scm_protect_object(wind->new_stocks);
+    scm_gc_protect_object(wind->new_stocks);
     
     if(wind->new_stocks != SCM_BOOL_F) {
       if(wind->show_doc_pages) {
@@ -1334,10 +1334,10 @@
   int show_matches;
 
   gnc_set_busy_cursor(NULL, TRUE);
-  scm_unprotect_object(wind->new_stocks);
+  scm_gc_unprotect_object(wind->new_stocks);
   wind->new_stocks =  scm_call_3(update_stock, wind->stock_hash, 
 				 wind->ticker_map, wind->acct_map_info);
-  scm_protect_object(wind->new_stocks);
+  scm_gc_protect_object(wind->new_stocks);
   
   if(wind->new_stocks != SCM_BOOL_F) {
     if(wind->show_doc_pages) {
@@ -2004,20 +2004,20 @@
   create_ticker_map = scm_c_eval_string("make-ticker-map");
   retval->ticker_map = scm_call_0(create_ticker_map);
   
-  scm_protect_object(retval->imported_files);
-  scm_protect_object(retval->selected_file);
-  scm_protect_object(retval->gnc_acct_info);
-  scm_protect_object(retval->cat_display_info);
-  scm_protect_object(retval->cat_map_info);
-  scm_protect_object(retval->memo_display_info);
-  scm_protect_object(retval->memo_map_info);
-  scm_protect_object(retval->acct_display_info);
-  scm_protect_object(retval->acct_map_info);
-  scm_protect_object(retval->stock_hash);
-  scm_protect_object(retval->new_stocks);
-  scm_protect_object(retval->ticker_map);
-  scm_protect_object(retval->imported_account_group);
-  scm_protect_object(retval->match_transactions);
+  scm_gc_protect_object(retval->imported_files);
+  scm_gc_protect_object(retval->selected_file);
+  scm_gc_protect_object(retval->gnc_acct_info);
+  scm_gc_protect_object(retval->cat_display_info);
+  scm_gc_protect_object(retval->cat_map_info);
+  scm_gc_protect_object(retval->memo_display_info);
+  scm_gc_protect_object(retval->memo_map_info);
+  scm_gc_protect_object(retval->acct_display_info);
+  scm_gc_protect_object(retval->acct_map_info);
+  scm_gc_protect_object(retval->stock_hash);
+  scm_gc_protect_object(retval->new_stocks);
+  scm_gc_protect_object(retval->ticker_map);
+  scm_gc_protect_object(retval->imported_account_group);
+  scm_gc_protect_object(retval->match_transactions);
   
   /* set a default currency for new accounts */
   gnc_ui_update_commodity_picker(retval->currency_picker,
Index: dialog-account-picker.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/qif-import/dialog-account-picker.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/import-export/qif-import/dialog-account-picker.c -Lsrc/import-export/qif-import/dialog-account-picker.c -u -r1.3 -r1.4
--- src/import-export/qif-import/dialog-account-picker.c
+++ src/import-export/qif-import/dialog-account-picker.c
@@ -259,7 +259,7 @@
   wind->selected_name = g_strdup(scmname);
   free(scmname);
 
-  scm_protect_object(wind->map_entry);
+  scm_gc_protect_object(wind->map_entry);
 
   gtk_signal_connect(GTK_OBJECT(wind->treeview), "tree_select_row",
                      GTK_SIGNAL_FUNC(gnc_ui_qif_account_picker_select_cb),
@@ -279,7 +279,7 @@
 
   retval = gnome_dialog_run_and_close(GNOME_DIALOG(wind->dialog));  
   
-  scm_unprotect_object(wind->map_entry);
+  scm_gc_unprotect_object(wind->map_entry);
   g_free(wind->selected_name);
   g_free(wind);
 
Index: split-register.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/ledger-core/split-register.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -Lsrc/register/ledger-core/split-register.c -Lsrc/register/ledger-core/split-register.c -u -r1.48 -r1.49
--- src/register/ledger-core/split-register.c
+++ src/register/ledger-core/split-register.c
@@ -695,10 +695,10 @@
 
   /* unprotect the old object, if any */
   if (copied_item != SCM_UNDEFINED)
-    scm_unprotect_object(copied_item);
+    scm_gc_unprotect_object(copied_item);
 
   copied_item = new_item;
-  scm_protect_object(copied_item);
+  scm_gc_protect_object(copied_item);
 
   copied_class = cursor_class;
 }
Index: dialog-column-view.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/report-gnome/dialog-column-view.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/report/report-gnome/dialog-column-view.c -Lsrc/report/report-gnome/dialog-column-view.c -u -r1.5 -r1.6
--- src/report/report-gnome/dialog-column-view.c
+++ src/report/report-gnome/dialog-column-view.c
@@ -81,8 +81,8 @@
 static void 
 gnc_column_view_edit_destroy(gnc_column_view_edit * view) {
   gnc_options_dialog_destroy(view->optwin);
-  scm_unprotect_object(view->options);
-  scm_unprotect_object(view->view);
+  scm_gc_unprotect_object(view->options);
+  scm_gc_unprotect_object(view->view);
   gnc_option_db_destroy(view->odb);
   g_free(view);
 }
@@ -113,9 +113,9 @@
     selection = SCM_UNDEFINED;
   }
 
-  scm_unprotect_object(view->available_list);
+  scm_gc_unprotect_object(view->available_list);
   view->available_list = names;
-  scm_protect_object(view->available_list);
+  scm_gc_protect_object(view->available_list);
 
   gtk_clist_freeze(view->available);
   gtk_clist_clear(view->available);
@@ -144,9 +144,9 @@
     selection = SCM_UNDEFINED;
   }
 
-  scm_unprotect_object(view->contents_list);
+  scm_gc_unprotect_object(view->contents_list);
   view->contents_list = contents;
-  scm_protect_object(view->contents_list);
+  scm_gc_protect_object(view->contents_list);
 
   gtk_clist_freeze(view->contents);
   gtk_clist_clear(view->contents);
@@ -273,10 +273,10 @@
                              editor, 
                              gtk_label_new(_("Contents")));
 
-    scm_protect_object(r->options);
-    scm_protect_object(r->view);
-    scm_protect_object(r->available_list);
-    scm_protect_object(r->contents_list);
+    scm_gc_protect_object(r->options);
+    scm_gc_protect_object(r->view);
+    scm_gc_protect_object(r->available_list);
+    scm_gc_protect_object(r->contents_list);
 
     gtk_signal_connect(GTK_OBJECT(r->available), "select_row", 
                        gnc_column_view_select_avail_cb, (gpointer)r);
@@ -344,9 +344,9 @@
       r->contents_selected = oldlength;
     }
     
-    scm_unprotect_object(r->contents_list);
+    scm_gc_unprotect_object(r->contents_list);
     r->contents_list = newlist;
-    scm_protect_object(r->contents_list);
+    scm_gc_protect_object(r->contents_list);
     
     gnc_column_view_set_option(r->odb, "__general", "report-list",
                                r->contents_list);
@@ -380,9 +380,9 @@
       r->contents_selected --;
     }
 
-    scm_unprotect_object(r->contents_list);
+    scm_gc_unprotect_object(r->contents_list);
     r->contents_list = newlist;
-    scm_protect_object(r->contents_list);
+    scm_gc_protect_object(r->contents_list);
 
     gnc_column_view_set_option(r->odb, "__general", "report-list",
                                r->contents_list);
@@ -413,9 +413,9 @@
     newlist = scm_cons(temp, scm_cons(SCM_CAR(oldlist), newlist));
     newlist = scm_append(scm_listify(scm_reverse(newlist), SCM_CDR(oldlist), SCM_UNDEFINED));
 
-    scm_unprotect_object(r->contents_list);
+    scm_gc_unprotect_object(r->contents_list);
     r->contents_list = newlist;
-    scm_protect_object(r->contents_list);
+    scm_gc_protect_object(r->contents_list);
 
     r->contents_selected = r->contents_selected - 1;
 
@@ -448,9 +448,9 @@
     newlist = scm_cons(temp, scm_cons(SCM_CAR(oldlist), newlist));
     newlist = scm_append(scm_listify(scm_reverse(newlist), SCM_CDR(oldlist), SCM_UNDEFINED));
 
-    scm_unprotect_object(r->contents_list);
+    scm_gc_unprotect_object(r->contents_list);
     r->contents_list = newlist;
-    scm_protect_object(r->contents_list);
+    scm_gc_protect_object(r->contents_list);
 
     r->contents_selected = r->contents_selected + 1;
 
@@ -501,11 +501,11 @@
                           scm_int2num(gtk_spin_button_get_value_as_int
                                      (GTK_SPIN_BUTTON(rowspin))),
                           SCM_BOOL_F);
-      scm_unprotect_object(r->contents_list);
+      scm_gc_unprotect_object(r->contents_list);
       r->contents_list = scm_list_set_x(r->contents_list, 
                                         scm_int2num(r->contents_selected),
                                         current);
-      scm_protect_object(r->contents_list);
+      scm_gc_protect_object(r->contents_list);
       gnc_options_dialog_changed (r->optwin);
       update_display_lists(r);
     }
Index: window-report.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/report-gnome/window-report.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -Lsrc/report/report-gnome/window-report.c -Lsrc/report/report-gnome/window-report.c -u -r1.19 -r1.20
--- src/report/report-gnome/window-report.c
+++ src/report/report-gnome/window-report.c
@@ -667,9 +667,9 @@
   }
 
   if(win->initial_report == SCM_BOOL_F) {    
-    scm_unprotect_object(win->initial_report);
+    scm_gc_unprotect_object(win->initial_report);
     win->initial_report = inst_report;
-    scm_protect_object(win->initial_report);
+    scm_gc_protect_object(win->initial_report);
     
     scm_call_2(set_needs_save, inst_report, SCM_BOOL_T);
 
@@ -689,9 +689,9 @@
   }
   
   if(win->cur_report != SCM_BOOL_F)
-    scm_unprotect_object(win->cur_report);
+    scm_gc_unprotect_object(win->cur_report);
   win->cur_report = inst_report;
-  scm_protect_object(win->cur_report);
+  scm_gc_protect_object(win->cur_report);
 
   win->cur_odb = gnc_option_db_new(scm_call_1(get_options, inst_report));  
   win->option_change_cb_id = 
@@ -791,9 +791,9 @@
   report->edited_reports   = SCM_EOL;
   report->name_change_cb_id = SCM_BOOL_F;
 
-  scm_protect_object(report->cur_report);
-  scm_protect_object(report->initial_report);
-  scm_protect_object(report->edited_reports);
+  scm_gc_protect_object(report->cur_report);
+  scm_gc_protect_object(report->initial_report);
+  scm_gc_protect_object(report->edited_reports);
 
   gnc_html_history_set_node_destroy_cb(gnc_html_get_history(report->html),
                                        gnc_report_window_history_destroy_cb,
@@ -958,8 +958,8 @@
   win->container     = NULL;
   win->html          = NULL;
   
-  scm_unprotect_object(win->cur_report);
-  scm_unprotect_object(win->edited_reports);
+  scm_gc_unprotect_object(win->cur_report);
+  scm_gc_unprotect_object(win->edited_reports);
   
   g_free(win);
 }
@@ -1058,7 +1058,7 @@
   
   scm_call_2(set_editor, win->cur_report, SCM_BOOL_F);
   gnc_option_db_destroy(win->db);
-  scm_unprotect_object(win->scm_options);
+  scm_gc_unprotect_object(win->scm_options);
   gnc_options_dialog_destroy(win->win);
   g_free(win);
 }
@@ -1097,8 +1097,8 @@
       free(title);
     }
 
-    scm_protect_object(prm->scm_options);
-    scm_protect_object(prm->cur_report);
+    scm_gc_protect_object(prm->scm_options);
+    scm_gc_protect_object(prm->cur_report);
     
     gnc_build_options_dialog_contents(prm->win, prm->db);
     gnc_option_db_clean(prm->db);
@@ -1120,18 +1120,18 @@
 gnc_report_window_remove_edited_report(gnc_report_window * win, SCM report)
 { 
   SCM new_edited = scm_delete(win->edited_reports, report);
-  scm_unprotect_object(win->edited_reports);
+  scm_gc_unprotect_object(win->edited_reports);
   win->edited_reports = new_edited;
-  scm_protect_object(win->edited_reports);
+  scm_gc_protect_object(win->edited_reports);
 }
 
 void
 gnc_report_window_add_edited_report(gnc_report_window * win, SCM report)
 {
   SCM new_edited = scm_cons(report, win->edited_reports);
-  scm_unprotect_object(win->edited_reports);
+  scm_gc_unprotect_object(win->edited_reports);
   win->edited_reports = new_edited;
-  scm_protect_object(win->edited_reports);
+  scm_gc_protect_object(win->edited_reports);
 }
 
 void
Index: dialog-style-sheet.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/report-gnome/dialog-style-sheet.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/report/report-gnome/dialog-style-sheet.c -Lsrc/report/report-gnome/dialog-style-sheet.c -u -r1.4 -r1.5
--- src/report/report-gnome/dialog-style-sheet.c
+++ src/report/report-gnome/dialog-style-sheet.c
@@ -87,7 +87,7 @@
   struct ss_info * ss = data;
   gnc_option_db_destroy(ss->odb);
   gnc_options_dialog_destroy(ss->odialog);
-  scm_unprotect_object(ss->stylesheet);
+  scm_gc_unprotect_object(ss->stylesheet);
   g_free(ss);
 }
 
@@ -113,7 +113,7 @@
     ssinfo->odb     = gnc_option_db_new(scm_options);
     ssinfo->stylesheet = SCM_CAR(stylesheets);
 
-    scm_protect_object(ssinfo->stylesheet);
+    scm_gc_protect_object(ssinfo->stylesheet);
     gtk_widget_ref(gnc_options_dialog_widget(ssinfo->odialog));
 
     gnc_build_options_dialog_contents(ssinfo->odialog, 


More information about the gnucash-changes mailing list