guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

marking SCM values in client data of port structure


From: Marco Maggi
Subject: marking SCM values in client data of port structure
Date: Sat, 11 Mar 2006 08:47:35 +0100

Ciao,

   from inspection of 'scm_markstream()' and
'scm_gc_mark_dependencies()' in I guess that: the mark
function of a port driver is invoked again and again
until it returns SCM_BOOL_F; in the sequence of
invocations it must return the next SCM value until
all of the values stored in the client data (stream
field of scm_t_port) have been returned once.

  So it is the business of the mark function to implement
an iterator over all the SCM values, keeping the iterator
state in the client data structure itself.

  But, it is my understanding that the mark function is
invoked with a single parameter, which: the first time
is the value in the 'stream' field and subsequent times
is the SCM value of the previous invocation.

  So: is it mandatory to organise SCM values in the
client data in a list and write the mark function to
return the cons cells? That is the at the first invocation
of the mark function we return the first cell and at
subsequent invocations we return the cdr?

--
Marco Maggi

"They say jump!, you say how high?"
Rage Against the Machine - "Bullet in the Head"





reply via email to

[Prev in Thread] Current Thread [Next in Thread]