Hi,

(Removed `guile-gtk-general'.)

Puneet <[EMAIL PROTECTED]> writes:

> I traced down the problem. It was with how GW_TYPESPEC_AGGREGATED was
> being handled in guile-runtime.c. For functions with multiple
> arguments the flag was getting enabled for the first argument --
> irrespective of which argument is tied with 'aggregated' flag in the
> specs file.

Good catch!  (I'm the guilty party...)

> Also if the argument is of type 'null-ok' and is actually
> SCM_BOOL_F at run-time, we should not add it to the dependecy list --
> otherwise it results in a crash.

I don't see how adding `#f' to DEPS can cause any problem.  That said, I
do agree that it's useless to add non-immediate values to DEPS.

Can you please apply the attached patch and confirm whether it works for
you?

Thanks!

Ludovic.

# Bazaar revision bundle v0.9
#
# message:
#   Fixed handling of aggregated args in RTI functions.
#   
#   * guile/g-wrap/guile-runtime.c (dynproc_smob_apply): Cons the car of ARGS
#     instead of that of ARG_LIST when building DEPS.  Don't cons immediates.
#     Reported by Puneet <[EMAIL PROTECTED]>.
#   
# committer: Ludovic Courtes <[EMAIL PROTECTED]>
# date: Tue 2007-07-03 21:28:42.130000114 +0200

=== modified file guile/g-wrap/guile-runtime.c
--- guile/g-wrap/guile-runtime.c
+++ guile/g-wrap/guile-runtime.c
@@ -684,9 +684,14 @@
 	 i++, args = SCM_CDR (args))
       {
 	if (fi->arg_typespecs[i] & GW_TYPESPEC_AGGREGATED)
-	  /* Add this argument to the list of dependencies (aggregated
-	     objects) of the return value.  */
-	  deps = scm_cons (SCM_CAR (arg_list), deps);
+	  {
+	    /* Add this argument to the list of dependencies (aggregated
+	       objects) of the return value.  */
+	    SCM arg = SCM_CAR (args);
+
+	    if (SCM_NIMP (arg))
+	      deps = scm_cons (arg, deps);
+	  }
       }
 
     if (deps != SCM_EOL)

=== modified directory  // last-changed:[EMAIL PROTECTED]
... vp6
# revision id: [EMAIL PROTECTED]
# sha1: 17b28e868dc6a19bfb6ab618298d50e90c6271d2
# inventory sha1: 0021133ee9f43621688af0b8ae099f74f2c88772
# parent ids:
#   [EMAIL PROTECTED]
# base id: [EMAIL PROTECTED]
# properties:
#   branch-nick: g-wrap

_______________________________________________
g-wrap-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/g-wrap-dev

Reply via email to