Hi!

> #   Slight C code generation improvements.
> #   
> #   * guile/g-wrap/enumerations.scm (val-array-cg): Use `static const' for
> #     arrays of `GWEnumPair's.

Here is an obvious followup to this one.

Thanks,
Ludovic.

# Bazaar revision bundle v0.9
#
# message:
#   Accept `const' enum pairs in run-time.
#   
#   * guile/g-wrap/guile-runtime.c (gw_guile_enum_val2sym): Accept `const'-qualified
#     enum pairs.
#     (gw_guile_enum_val2int): Likewise.
#   
#   * guile/g-wrap/guile-runtime.h: Updated.
#   
# committer: Ludovic Courtes <[EMAIL PROTECTED]>
# date: Tue 2007-07-03 19:33:40.259000063 +0200

=== modified file guile/g-wrap/guile-runtime.c
--- guile/g-wrap/guile-runtime.c
+++ guile/g-wrap/guile-runtime.c
@@ -55,7 +55,7 @@
 static void gw_guile_raise_error (GWLangArena arena, const char *proc,
                                   const char *error) GW_NORETURN;
 
-#if 0 // not used ATM
+#if 0 /* not used ATM */
 void
 gw_guile_runtime_get_version_info(int *major, int *revision, int *age)
 {
@@ -66,11 +66,12 @@
 #endif
 
 SCM
-gw_guile_enum_val2sym(GWEnumPair enum_pairs[], SCM scm_val, SCM scm_show_all_p)
+gw_guile_enum_val2sym(const GWEnumPair enum_pairs[], SCM scm_val,
+		      SCM scm_show_all_p)
 {
   int enum_val;
   SCM scm_result;
-  GWEnumPair *epair;
+  const GWEnumPair *epair;
   int return_all_syms = scm_is_true (scm_show_all_p);
 
   if (return_all_syms)
@@ -108,10 +109,10 @@
 }
 
 SCM
-gw_guile_enum_val2int (GWEnumPair enum_pairs[], SCM scm_val)
+gw_guile_enum_val2int (const GWEnumPair enum_pairs[], SCM scm_val)
 {
   char *symstr = NULL;
-  GWEnumPair *epair;
+  const GWEnumPair *epair;
 
   if (scm_is_true(scm_integer_p (scm_val)))
   {

=== modified file guile/g-wrap/guile-runtime.h
--- guile/g-wrap/guile-runtime.h
+++ guile/g-wrap/guile-runtime.h
@@ -39,9 +39,9 @@
 };
 
 void gw_guile_runtime_init (void);
-SCM gw_guile_enum_val2sym(GWEnumPair enum_pairs[], SCM scm_val,
+SCM gw_guile_enum_val2sym(const GWEnumPair enum_pairs[], SCM scm_val,
                           SCM scm_show_all_p);
-SCM gw_guile_enum_val2int(GWEnumPair enum_pairs[], SCM scm_val);
+SCM gw_guile_enum_val2int(const GWEnumPair enum_pairs[], SCM scm_val);
 
 void gw_guile_set_generics_module_x (SCM module);
 void gw_guile_make_latent_variable (SCM sym, SCM proc, SCM arg);

=== modified directory  // last-changed:[EMAIL PROTECTED]
... 7s1
# revision id: [EMAIL PROTECTED]
# sha1: 3775f8af32d4c3315cad462037c4ebfb9873b813
# inventory sha1: d6865b93e8b9f33b23c144310c5c42434d1fa634
# parent ids:
#   [EMAIL PROTECTED]
# base id: [EMAIL PROTECTED]
# properties:
#   branch-nick: g-wrap

_______________________________________________
g-wrap-dev mailing list
g-wrap-dev@nongnu.org
http://lists.nongnu.org/mailman/listinfo/g-wrap-dev

Reply via email to