This is the mail archive of the guile@cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: mod_guile design problems


>>>>> "forcer" == forcer  <forcer@mindless.com> writes: 
Date: Tue, 29 Jun 1999 16:50:47 -0400
From: Eric Moore <moore@lovecraft.chem.cmu.edu>


forcer> How do i check for a point to be "valid"?  I don't think that
forcer> installing a signal handler that catches SIGSEGV and longjmp's
forcer> back is a "nice" idea :] -forcer

just remember if it is:

typedef struct smob
{
  SCM valid;
  request * rptr;
} Smob;



void
called_by_apache (request * r)
{
  Smob smob;
  SCM smob_scm;
  smob = (Smob *)  scm_must_malloc(sizeof (Smob), "Smob");
  smob->rptr = r;
  smob->valid = SCM_BOOL_T;
  SCM_NEWCELL(smob_scm);
  SCM_SETCAR (smob_scm, smob_tag);
  SCM_SETCDR (smob_scm, smob);
  gh_apply (appropriate_mod_guile_thunk, smob_scm);
  /* since control is passing to apache, r may become invalid at any
  time */
  smob->valid = SCM_BOOL_F;
  return;
}




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]