guile-user
[Top][All Lists]
Advanced

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

Re: Problem with (eq? ...) and Serveez


From: Stephen Compall
Subject: Re: Problem with (eq? ...) and Serveez
Date: 27 Jan 2004 21:14:18 -0600
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Roland Besserer<address@hidden> writes:

> Why does eq? fail in the second case?
> Any pointers would be welcome.

Because, each time Serveez calls your callback function, it remakes
the smob that contains the socket.  It doesn't matter that the filedes
is the same; that is a case for equal?, just as the characters in a
string are a case for equal? not eq?.

The relevant code is in guile-server.c.  Each of the callbacks has a
wrapper.  Take guile_func_kicked_socket for example.  It calls
MAKE_SMOB (svz_socket, sock), which effectively calls the expansion of
GUILE_CONCAT3(guile_,svz_socket,create), a function that calls the
expansion of SCM_RETURN_NEWSMOB.  A new smob can't be eq? to anything
already in the system.

--
Stephen Compall or s11 or sirian

understand, v.:
        To reach a point, in your investigation of some subject, at which
        you cease to examine what is really present, and operate on the
        basis of your own internal model instead.

Firewalls Roswell Medco Ron Brown counter intelligence kilo class
Noriega espionage Verisign smuggle AMEMB MD5 LABLINK SEAL Team 6 fraud




reply via email to

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