[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug Report and Patch for g-wrap
From: |
Ludovic Courtès |
Subject: |
Re: Bug Report and Patch for g-wrap |
Date: |
Tue, 03 Jul 2007 21:35:34 +0200 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
Hi,
(Removed `guile-gtk-general'.)
Puneet <address@hidden> 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 <address@hidden>.
#
# committer: Ludovic Courtes <address@hidden>
# 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:address@hidden
... vp6
# revision id: address@hidden
# sha1: 17b28e868dc6a19bfb6ab618298d50e90c6271d2
# inventory sha1: 0021133ee9f43621688af0b8ae099f74f2c88772
# parent ids:
# address@hidden
# base id: address@hidden
# properties:
# branch-nick: g-wrap