CLISP FFI: C enumerations 
Author Message
 CLISP FFI: C enumerations

Hello.

What is the CLISP FFI C type for enum??  I can't find it in the
documentation, and i've tried (c-enum ) (c-enumeration ) (enum )
(enumeration ) and all give me an error.  The following fails, tells me
"*** - Incomplete FFI type ENUM_NET_TYPE is not allowed here.":

(def-c-enum enum_net_type NET_TYPE_TCPIP NET_TYPE_SOCKET NET_TYPE_NAMEDPIPE)

(def-c-struct st_net
  (nettype enum_net_type)
  (fd int)
  .... )

And with (c-enum ) and the others it just says it doesent know what they
are:

(def-c-struct st_net
  (nettype (c-enum enum_net_type))
  (fd int)
  .... )

here's the corresponding c code:

enum enum_net_type { NET_TYPE_TCPIP, NET_TYPE_SOCKET, NET_TYPE_NAMEDPIPE };

typedef struct st_net {
  enum enum_net_type nettype;
  int fd;
  ....

Quote:
};

Thanks.

-Eric de Groot



Fri, 14 Nov 2003 16:25:14 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. FFI in CLISP for WIN32

2. Clisp and FFI's to C++

3. Clisp FFI

4. FFI Calls in clisp

5. Clisp FFI

6. CLISP FFI (win32)

7. FFI for CLISP: UDP sockets

8. FFI for Clisp on PPC (OS X and Fink)

9. to CS: or not to CS: in F-PC assembler

10. wanted: Emacs integrated CLISP env for NT, *AND* mathematics package for CLISP

11. Follow up on enumerations

12. Eiffel enumerations

 

 
Powered by phpBB® Forum Software