pika-dev
[Top][All Lists]
Advanced

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

[Pika-dev] Replacing cport with a vtable object


From: Matthew Dempsky
Subject: [Pika-dev] Replacing cport with a vtable object
Date: 15 Mar 2004 11:51:51 -0600
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

So basically we'll have something like:

struct scm_port_binary_data
{
  int fd;
  enum uni_encoding_scheme enc;
};

along with

struct scm_port_vtable
{
  sizeof (scm_port_binary_data), 0, 0, 0,

  SCM_VTABLE_DISCIPLINE_INITIALIZERS (scm_port_)
};

and then all the scm_port_* functions.  Also, struct cport* everywhere
gets changed to t_scm_word *.  The functions that actually perform IO
now need to do error detection that the scm_word is of the correct
type (since it won't be type-checked at compile time anymore), but
they also don't need to bother with the cport_vtable indirection
anymore.

I expect cport_vtables to go away because any port structure we need
can probably be filled in at the VU level (file, socket, string, etc.)
as a virtual fd if needed.

-jivera




reply via email to

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