Hello Andy
I am using g-wrap 1.9.8 with great success. But I was facing facing
some problems with some crashes.
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. 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 have fixed this much and I have attached the resulting patch with
this email. It works for me now and I am no longer facing problems
with frequent crahses at the time of Garbage Collection.
Please include the patch in the official distribution. And let me know
if you need some clarifications.
Regards
Puneet
*** g-wrap-1.9.8/guile/g-wrap/guile-runtime.c Tue Jul 3 20:12:31 2007
--- g-wrap-1.9.8/guile/g-wrap/guile-runtime.c.~1~ Fri Apr 13 22:58:36 2007
***************
*** 681,698 ****
for (i = 0, args = arg_list;
i < fi->n_req_args;
i++, args = SCM_CDR (args))
{
! if (fi->arg_typespecs[i] & GW_TYPESPEC_AGGREGATED) {
! /* FIXED -- SCM_CAR on args -- not arg_list */
! SCM arg = SCM_CAR(args);
/* Add this argument to the list of dependencies (aggregated
objects) of the return value. */
! /* FIXED -- Do not want to add as a dependency in case of NULL
! pointer (null-ok) -- if that happens application crashes */
! if (SCM_NFALSEP(arg))
! deps = scm_cons (arg, deps);
! }
}
if (deps != SCM_EOL)
{
--- 681,692 ----
for (i = 0, args = arg_list;
i < fi->n_req_args;
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);
}
if (deps != SCM_EOL)
{
_______________________________________________
g-wrap-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/g-wrap-dev