[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: gaf.git: branch: master updated (1.7.1-20110619-234-gebfe6ae)



The branch, master has been updated
       via  ebfe6ae6a76b6a44a0bbe2d184bf99bfee7d97bf (commit)
      from  70536e15af56db31075d72bef6db37b84098d698 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 gschem/src/o_misc.c                 |    5 ++---
 libgeda/include/libgeda/prototype.h |    1 +
 libgeda/src/s_clib.c                |   13 ++++++++++++-
 3 files changed, 15 insertions(+), 4 deletions(-)


=================
 Commit Messages
=================

commit ebfe6ae6a76b6a44a0bbe2d184bf99bfee7d97bf
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    Add s_clib_symbol_invalidate_data().
    
    This allows a symbol's data to be reloaded from disk without
    invalidating the full symbol data cache.
    
    Closes-bug: lp-698504

:100644 100644 49b7161... 29b24ce... M	gschem/src/o_misc.c
:100644 100644 8bbeb2c... 08fefce... M	libgeda/include/libgeda/prototype.h
:100644 100644 eb37f25... 5edcbb7... M	libgeda/src/s_clib.c

=========
 Changes
=========

commit ebfe6ae6a76b6a44a0bbe2d184bf99bfee7d97bf
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    Add s_clib_symbol_invalidate_data().
    
    This allows a symbol's data to be reloaded from disk without
    invalidating the full symbol data cache.
    
    Closes-bug: lp-698504

diff --git a/gschem/src/o_misc.c b/gschem/src/o_misc.c
index 49b7161..29b24ce 100644
--- a/gschem/src/o_misc.c
+++ b/gschem/src/o_misc.c
@@ -557,10 +557,9 @@ o_update_component (GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
 
   page = o_get_page (toplevel, o_current);
 
-  /* This should be replaced with API to invalidate only the specific
-   * symbol name we want to update */
-  s_clib_flush_symbol_cache ();
+  /* Force symbol data to be reloaded from source */
   clib = s_clib_get_symbol_by_name (o_current->complex_basename);
+  s_clib_symbol_invalidate_data (clib);
 
   if (clib == NULL) {
     s_log_message (_("Could not find symbol [%s] in library. Update failed.\n"),
diff --git a/libgeda/include/libgeda/prototype.h b/libgeda/include/libgeda/prototype.h
index 8bbeb2c..08fefce 100644
--- a/libgeda/include/libgeda/prototype.h
+++ b/libgeda/include/libgeda/prototype.h
@@ -299,6 +299,7 @@ gchar *s_clib_symbol_get_data (const CLibSymbol *symbol);
 GList *s_clib_search (const gchar *pattern, const CLibSearchMode mode);
 void s_clib_flush_search_cache ();
 void s_clib_flush_symbol_cache ();
+void s_clib_symbol_invalidate_data (CLibSymbol *symbol);
 const CLibSymbol *s_clib_get_symbol_by_name (const gchar *name);
 gchar *s_clib_symbol_get_data_by_name (const gchar *name);
 GList *s_toplevel_get_symbols (const TOPLEVEL *toplevel);
diff --git a/libgeda/src/s_clib.c b/libgeda/src/s_clib.c
index eb37f25..5edcbb7 100644
--- a/libgeda/src/s_clib.c
+++ b/libgeda/src/s_clib.c
@@ -1226,7 +1226,6 @@ gchar *s_clib_symbol_get_data (const CLibSymbol *symbol)
   return data;
 }
 
-
 /*! \brief Find all symbols matching a pattern.  
  *
  *  \par Function Description 
@@ -1354,6 +1353,18 @@ void s_clib_flush_symbol_cache ()
   g_hash_table_remove_all (clib_symbol_cache);  /* Introduced in glib 2.12 */
 }
 
+/*! \brief Invalidate all cached data about a symbol.
+ * \par Function Description
+ * Removes all cached symbol data for \a symbol.
+ *
+ * \param symbol Symbol to flush cached data for.
+ */
+void
+s_clib_symbol_invalidate_data (CLibSymbol *symbol)
+{
+  g_hash_table_remove (clib_symbol_cache, (gpointer) symbol);
+}
+
 /*! \brief Get symbol structure for a given symbol name.
  *  \par Function Description
  *  Return the first symbol found with the given \a name.  If more




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs