ACL 4.3 FFI compatibility issues

Table of Contents


Introduction

To use the compatibility mode, (require :ffcompat) and use the old (Allegro CL 4.3) functionality.  Most of the Allegro CL 4.3 interface is identical, including all of the deprecations between Allegro CL 4.2 and 4.3.

The following exceptions apply:

For ACL/WIN compatibility see ACLWin 3.x FFI Compatibility Support

To use the new functionality, source code can be changed piece by piece to the new interface. The following table shows the correspondences between the old and new functions. Note that some functions have not changed names, but will do so eventually.


PC symbols (exported from CT)

ACLWin symbol ACL symbol
*export-c-names* variable na
callocate macro allocate-fobject
defctype macro def-foreign-type
defun-callback macro defun-foreign-callable
defun-dll macro def-foreign-call
get-callback-procinst register-foreign-callable
ccallocate macro allocate-fobject
cpointer-value macro
cref macro
cset macro
csets macro
default-callback-style variable na
defcstruct macro def-foreign-type
deflhandle macro def-foreign-type
defshandle macro def-foreign-type
defun-c-callback defun-foreign-callable
defun-pascal-callback defun-foreign-callable
dll-handle
far-peek
far-poke
handle-value macro
handle= macro
list-dll-libraries list-all-foreign-libraries
null constant
null-cpointer-p macro
null-handle macro allocate-fobject
null-handle-p macro
rename-dll-libraries
sizeof macro    sizeof-fobject
strlen
unlink-dll unload-foreign-library
unlink-dll-functions

PC Types

  :void
  :char
  :unsigned-char
  :short
  :unsigned-short
  :long
  :unsigned-long
  :short-bool
  :long-bool
  :single-float
  :double-float
  :short-handle
  :long-handle

UNIX Symbols (exported from FF)

convert-to-lang function convert-foreign-name
def-c-type macro def-foreign-type(d)
def-c-typedef macro def-foreign-type(d)
defcstruct macro def-foreign-type(d)
defforeign function def-foreign-call
defforeign-list function obsolete
defun-c-callable macro defun-foreign-callable
foreign-address obsolete
foreign-argument obsolete
free-cstruct free-fobject
get-entry-point function get-entry-point (same)
get-entry-points function obsolete
lisp-value lisp-value (same)
load extension load extension
make-cstruct allocate-fobject
malloc-cstruct allocate-fobject
register-function register-foreign-callable
register-value register-lisp-value
remove-entry-point function obsolete
remove-extern-code-address unction obsolete
remove-extern-data-address unction obsolete
reset-entry-point-table function obsolete
string-to-char* function obsolete
unload-file unload-foreign-library
unregister-function unregister-foreign-callable
unregister-value unregister-lisp-value

UNIX Types

  :char   :byte    :unsigned-char   :unsigned-byte
  :int    :long    :unsigned-int    :unsigned-long
  :short  :unsigned-short
  :float  :double
  :bit ***
  :union  :struct  :array
  :lisp