Name

def-function — Declares a function. Macro

Syntax

	  def-function name args &key module returning
	

Arguments and Values

name

A string or list specificying the function name. If it is a string, that names the foreign function. A Lisp name is created by translating #\_ to #\- and by converting to upper-case in case-insensitive Lisp implementations. If it is a list, the first item is a string specifying the foreign function name and the second it is a symbol stating the Lisp name.

args

A list of argument declarations. If NIL, indicates that the function does not take any arguments.

module

A string specifying which module (or library) that the foreign function resides. (Required by Lispworks)

returning

A declaration specifying the result type of the foreign function. If :void indicates module does not return any value.

Description

Declares a foreign function.

Examples

(def-function "gethostname" 
  ((name (* :unsigned-char))
   (len :int))
  :returning :int)
	

Side Effects

None.

Affected by

None.

Exceptional Situations

None.