Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
Copyright © 2005 James Bielman <jamesjb at jamesjb.com>
Copyright © 2005-2015 Luís Oliveira
<loliveira at common-lisp.net>
Copyright © 2005-2006 Dan Knapp <danka at accela.net>
Copyright © 2005-2006 Emily Backes <lucca at accela.net>
Copyright © 2006 Stephen Compall <s11 at member.fsf.org>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
• Introduction | What is CFFI? | |
• Installation | ||
• Implementation Support | ||
• Tutorial | Interactive intro to using CFFI. | |
• Wrapper generators | CFFI forms from munging C source code. | |
• Foreign Types | ||
• Pointers | ||
• Strings | ||
• Variables | ||
• Functions | ||
• Libraries | ||
• Callbacks | ||
• The Groveller | ||
• Static Linking | ||
• Limitations | ||
• Platform-specific features | Details about the underlying system. | |
• Glossary | List of CFFI-specific terms and meanings. | |
• Comprehensive Index | ||
— Dictionary — Foreign Types | ||
---|---|---|
• convert-from-foreign | Outside interface to backward type translator. | |
• convert-to-foreign | Outside interface to forward type translator. | |
• defbitfield | Defines a bitfield. | |
• defcstruct | Defines a C structure type. | |
• defcunion | Defines a C union type. | |
• defctype | Defines a foreign typedef. | |
• defcenum | Defines a C enumeration. | |
• define-foreign-type | Defines a foreign type specifier. | |
• define-parse-method | Specifies how a type should be parsed. | |
• foreign-bitfield-symbols | Returns a list of symbols for a bitfield type. | |
• foreign-bitfield-value | Calculates a value for a bitfield type. | |
• foreign-enum-keyword | Finds a keyword in an enum type. | |
• foreign-enum-value | Finds a value in an enum type. | |
• foreign-slot-names | Returns a list of slot names in a foreign struct. | |
• foreign-slot-offset | Returns the offset of a slot in a foreign struct. | |
• foreign-slot-pointer | Returns a pointer to a slot in a foreign struct. | |
• foreign-slot-value | Returns the value of a slot in a foreign struct. | |
• foreign-type-alignment | Returns the alignment of a foreign type. | |
• foreign-type-size | Returns the size of a foreign type. | |
• free-converted-object | Outside interface to typed object deallocators. | |
• free-translated-object | Defines how to free a oreign object. | |
• translate-from-foreign | Defines a foreign-to-Lisp object translation. | |
• translate-to-foreign | Defines a Lisp-to-foreign object translation. | |
• with-foreign-object | Allocates a foreign object with dynamic extent. | |
• with-foreign-objects | Plural form of with-foreign-object .
| |
• with-foreign-slots | Accesses the slots of a foreign structure. | |
Pointers | ||
• foreign-free | Deallocates memory. | |
• foreign-alloc | Allocates memory. | |
• foreign-symbol-pointer | Returns a pointer to a foreign symbol. | |
• inc-pointer | Increments the address held by a pointer. | |
• incf-pointer | Increments the pointer address in a place. | |
• make-pointer | Returns a pointer to a given address. | |
• mem-aptr | The pointer to an element of an array. | |
• mem-aref | Accesses the value of an index in an array. | |
• mem-ref | Dereferences a pointer. | |
• null-pointer | Returns a NULL pointer. | |
• null-pointer-p | Tests a pointer for NULL value. | |
• pointerp | Tests whether an object is a pointer or not. | |
• pointer-address | Returns the address pointed to by a pointer. | |
• pointer-eq | Tests if two pointers point to the same address. | |
• with-foreign-pointer | Allocates memory with dynamic extent. | |
Strings | ||
• *default-foreign-encoding* | Default encoding for the string types. | |
• foreign-string-alloc | Converts a Lisp string to a foreign string. | |
• foreign-string-free | Deallocates memory used by a foreign string. | |
• foreign-string-to-lisp | Converts a foreign string to a Lisp string. | |
• lisp-string-to-foreign | Copies a Lisp string into a foreign string. | |
• with-foreign-string | Allocates a foreign string with dynamic extent. | |
• with-foreign-strings | Plural form of with-foreign-string .
| |
• with-foreign-pointer-as-string | Similar to CL’s with-output-to-string. | |
Variables | ||
• defcvar | Defines a C global variable. | |
• get-var-pointer | Returns a pointer to a defined global variable. | |
Functions | ||
• defcfun | Defines a foreign function. | |
• foreign-funcall | Performs a call to a foreign function. | |
• foreign-funcall-pointer | Performs a call through a foreign pointer. | |
• translate-camelcase-name | Converts a camelCase foreign name to/from a Lisp name. | |
• translate-name-from-foreign | Converts a foreign name to a Lisp name. | |
• translate-name-to-foreign | Converts a Lisp name to a foreign name. | |
• translate-underscore-separated-name | Converts an underscore_separated foreign name to/from a Lisp name. | |
Libraries | ||
• close-foreign-library | Closes a foreign library. | |
• *darwin-framework-directories* | Search path for Darwin frameworks. | |
• define-foreign-library | Explain how to load a foreign library. | |
• *foreign-library-directories* | Search path for shared libraries. | |
• load-foreign-library | Load a foreign library. | |
• load-foreign-library-error | Signalled on failure of its namesake. | |
• use-foreign-library | Load a foreign library when needed. | |
Callbacks | ||
• callback | Returns a pointer to a defined callback. | |
• defcallback | Defines a Lisp callback. | |
• get-callback | Returns a pointer to a defined callback. | |
Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]