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

gEDA-cvs: branch: master updated (1.3.0-20071229-3-gac4f29f)



The branch, master has been updated
       via  ac4f29f0711a3e612fa5d94d1e3d771852bf42bb (commit)
      from  0525e60123ab47ff62c9c30f4a3159ca75bbb456 (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
=========

 libgeda/include/prototype.h |    3 +--
 libgeda/src/g_basic.c       |   15 +++++++++++++++
 2 files changed, 16 insertions(+), 2 deletions(-)


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

commit ac4f29f0711a3e612fa5d94d1e3d771852bf42bb
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Date:   Sun Dec 30 23:54:25 2007 +0000

    libgeda: Unbreak g_scm_c_eval_string_protected()
    
    Fix bad macro definition introduced in commit
    8575431a17efb7a753649ae16087dc8f203981ce by turning it into a proper
    function.

:100644 100644 e74bec0... a4234a1... M	libgeda/include/prototype.h
:100644 100644 4e71064... 1cfd062... M	libgeda/src/g_basic.c

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

commit ac4f29f0711a3e612fa5d94d1e3d771852bf42bb
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Date:   Sun Dec 30 23:54:25 2007 +0000

    libgeda: Unbreak g_scm_c_eval_string_protected()
    
    Fix bad macro definition introduced in commit
    8575431a17efb7a753649ae16087dc8f203981ce by turning it into a proper
    function.

diff --git a/libgeda/include/prototype.h b/libgeda/include/prototype.h
index e74bec0..a4234a1 100644
--- a/libgeda/include/prototype.h
+++ b/libgeda/include/prototype.h
@@ -28,8 +28,7 @@ void f_print_set_type(TOPLEVEL *toplevel, int type);
 /* g_basic.c */
 SCM g_scm_eval_protected (SCM exp, SCM module_or_state);
 SCM g_scm_eval_string_protected (SCM str);
-#define g_scm_c_eval_string_protected (x) \
-  g_scm_eval_string_protected (scm_from_locale_string (x))
+SCM g_scm_c_eval_string_protected (const gchar *str);
 int g_read_file(const gchar *filename);
 
 /* g_rc.c */
diff --git a/libgeda/src/g_basic.c b/libgeda/src/g_basic.c
index 4e71064..1cfd062 100644
--- a/libgeda/src/g_basic.c
+++ b/libgeda/src/g_basic.c
@@ -198,6 +198,21 @@ static SCM protected_body_eval_string (void *data)
   return scm_eval_string (str);
 }
 
+/*! \brief Evaluate a C string as a Scheme expression safely
+ *  \par Function Description
+ *
+ *  Evaluates a C string like scm_c_eval_string().  Simple wrapper for
+ *  g_scm_eval_string_protected().
+ *
+ *  \param str  String to evaluate.
+ *
+ *  \returns Evaluation results or SCM_BOOL_F if exception caught.
+ */
+SCM g_scm_c_eval_string_protected (const gchar *str) {
+  SCM s_str = scm_from_locale_string (str);
+  return g_scm_eval_string_protected (s_str);
+}
+
 /*! \brief Evaluate a string as a Scheme expression safely
  *  \par Function Description
  *




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