Updates since the latest release

Brian Rice water at tunes.org
Wed Jun 29 02:14:44 PDT 2005


The plugins/ area is now adjusted to use the  
ExternalPrimitivesHolder, which simplifies the code considerably.

For example, the generic sockets code FFI specs:

Net UnixSocket traits define: #Lib
   &builder: [ExternalPrimitivesHolder newForLibrary: 'socket'  
primitives:
   #((Int CreateSocketAndConnectByDNS (CString Int))
     (Int CreateSocketAndConnectByIP (Int Int))
     (Int ReadIntoByteArray (Int Int Bytes Int))
     (Int WriteFromByteArray (Int Int Bytes Int))
     (Int BindToPort (Int Int))
     (Int DisableBlocking (Int))
     (Int ListenForConnections (Int))
     (Int AcceptConnection (Int))
     (Int SetOption (Int Int Int))
     (Int SetAddressReuse (Int))
     (Int SetPortReuse (Int))
     (Int SetKeepAlive (Int))
     (Int CloseSocket (Int))
     (Int HandleSetNew ())
     (Int HandleSetClear (Int))
     (Int HandleSetAdd (Int Int))
     (Int HandleSetIncludes (Int Int))
     (Int HandleSetRemove (Int Int))
     (Int SelectHandles (Int Int Int Int))) &leader: 'socket_'].

handles the functions from src/plugins/socket/unix/socket.c. So it's  
designed to look like a group of C declarations for now. There are  
various type-translations, like Bytes for String/ByteArray contents  
passed in as an argument, or CString for a nul-terminated string  
returned from a primitive.

I've also made the platform/ plugin fully functional on any platforms  
where uname() is defined. For other platforms, if you are such a  
user, please send me some suggestions about the right values to  
lookup or API to call. Also, I've added Environment in the globals  
area with an at: method, to lookup environment bindings.

I've also uploaded a new AutoLoad database file for the plugins/ code  
to make them easier to use.

On Jun 19, 2005, at 10:22 PM, Brian Rice wrote:
> * ExternalPrimitivesHolder as a facade for ExternalLibrary stuff.  
> See the end of extlib.slate or the FFI wiki page: http:// 
> slate.tunes.org:8080/wiki/60

--
-Brian




More information about the Slate mailing list