Tcl CFFI package (v1.0.7)

Index

  • Type the index terms you want to search for in the text input field.
  • Matching terms will be shown incrementally as you type.
  • Press Enter to navigate to the target of the first displayed index entry.
  • Alternatively, Tab to move to the index entry of interest and then press Enter to navigate to that documentation page.
  • To jump to this page from any other documentation page, press browser-specific shortcut modifiers with i. For example, on IE and Edge this would be Alt-i while on Firefox and Chrome Alt-Shift-i. Other browsers and platforms may differ.
  • addressof
    OBJECT addressof symbol
    Returns the address of a symbol from the loaded library.
    ::cffi::Wrapper
  • alias
    alias subcommand ...
    A command ensemble.
    ::cffi
  • alias body
    alias body alias_name
    Returns the resolved body of an alias.
    ::cffi
  • alias clear
    alias clear 
    Deletes all aliases from the interpreter
    ::cffi
  • alias define
    alias define name definition
    alias define aliasdefs
    Defines one or more type aliases.
    ::cffi
  • alias delete
    alias delete pattern
    Deletes aliases matching a pattern.
    ::cffi
  • alias list
    alias list ?pattern?
    Returns a list of aliases that match the specified pattern.
    ::cffi
  • alias load
    alias load alias_set
    Loads predefined type aliases.
    ::cffi
  • allocate
    OBJECT allocate ?count?
    Allocates memory for one or more C structs.
    ::cffi::Struct
  • call
    call fnptr ?args?
    Invokes a C function through a function pointer.
    ::cffi
  • callback
    callback subcommand ...
    A command ensemble.
    ::cffi
  • callback free
    callback free cb
    Frees a callback pointer
    ::cffi
  • callback new
    callback new protoname cmdprefix error_value
    Wraps a script level command into a C function
    ::cffi
  • constructor
    Struct create OBJNAME definition ?args?
    Struct new definition ?args?
    Constructs a script level object that maps to a C struct definition.
    ::cffi::Struct
  • constructor
    Wrapper create OBJNAME path
    Wrapper new path
    Wraps a shared library / DLL, loading it in the process.
    ::cffi::Wrapper
  • describe
    OBJECT describe 
    Returns a human-readable description of the C struct definition.
    ::cffi::Struct
  • destructor
    OBJECT destroy 
    Destroys the object and releases internal resources.
    ::cffi::Wrapper
  • enum
    enum subcommand ...
    A command ensemble.
    ::cffi
  • enum clear
    enum clear 
    Deletes all enumerations from the interpreter
    ::cffi
  • enum define
    enum define enumname enumdefs
    Defines a new enumeration.
    ::cffi
  • enum delete
    enum delete pattern
    Deletes enumerations.
    ::cffi
  • enum flags
    enum flags enumname membernames
    Defines an enumeration as bit flags
    ::cffi
  • enum list
    enum list pattern
    Lists enumerations.
    ::cffi
  • enum mask
    enum mask enumname membernames
    Returns an integer mask formed by bitwise OR-ing the passed enumeration members
    ::cffi
  • enum members
    enum members enumname
    Returns a dictionary containing the members in an enumeration.
    ::cffi
  • enum name
    enum name enumname membervalue ?default?
    Returns the symbolic name of a value in an enumeration.
    ::cffi
  • enum sequence
    enum sequence enumname membernames start 0
    Defines an enumeration with consecutive member values
    ::cffi
  • enum unmask
    enum unmask enumname mask
    Returns a list of enumeration member names corresponding to the bits set in $mask. enumeration members
    ::cffi
  • enum value
    enum value enumname membername ?default?
    Returns the value of an enumeration member
    ::cffi
  • fieldpointer
    OBJECT fieldpointer pointer fieldname ?tag? ?index?
    Returns a pointer corresponding to the address of a field within a native structure
    ::cffi::Struct
  • free
    OBJECT free pointer
    Frees memory that was allocated for a native C struct.
    ::cffi::Struct
  • frombinary
    OBJECT frombinary bin_value
    Decodes a Tcl binary string containing a native C struct into a Tcl dictionary.
    ::cffi::Struct
  • fromnative
    OBJECT fromnative pointer ?index?
    Decodes native C struct(s) in memory into a Tcl dictionary.
    ::cffi::Struct
  • fromnative!
    OBJECT fromnative! pointer ?index?
    Decodes native C struct(s) in memory into a Tcl dictionary.
    ::cffi::Struct
  • function
    OBJECT function fnname fntype parameters
    Creates a Tcl command to invoke a C function in the loaded library.
    ::cffi::Wrapper
  • functions
    OBJECT functions fnlist
    Creates Tcl commands for multiple C functions within the loaded library.
    ::cffi::Wrapper
  • getnative
    OBJECT getnative pointer fieldname ?index?
    Returns the value of a field in a native structure in memory
    ::cffi::Struct
  • getnativefields
    OBJECT getnativefields pointer fieldnames ?index?
    Retrieve values of multiple fields from a native struct in memory.
    ::cffi::Struct
  • help
    help subcommand ...
    A command ensemble.
    ::cffi
  • help function
    help function FUNCNAME
    Returns a string describing the syntax for a CFFI wrapped function
    ::cffi
  • help functions
    help functions ?FUNCPATTERN?
    Returns a list of CFFI-wrapped functions matching the pattern FUNCPATTERN
    ::cffi
  • info
    OBJECT info 
    Returns a dictionary containing information about the struct layout
    ::cffi::Struct
  • limits
    limits type
    Get the lower and upper limits for an integral base type
    ::cffi
  • memory
    memory subcommand ...
    A command ensemble.
    ::cffi
  • memory allocate
    memory allocate sizespec ?tag?
    Allocates memory of the specified size
    ::cffi
  • memory fill
    memory fill pointer bytevalue count
    Fills memory locations to a specified value
    ::cffi
  • memory free
    memory free pointer
    Frees the memory referenced by the passed pointer
    ::cffi
  • memory frombinary
    memory frombinary bin_value ?tag?
    Allocates memory and copied the passed Tcl binary string into it.
    ::cffi
  • memory fromstring
    memory fromstring value ?encoding?
    Allocates memory and stores a Tcl string in it in the specified encoding.
    ::cffi
  • memory get
    memory get pointer typespec ?index?
    Converts a native value in memory into a Tcl script level value
    ::cffi
  • memory get!
    memory get! pointer typespec ?index?
    Converts a value as per a type specification and stores it in memory in native form
    ::cffi
  • memory new
    memory new typespec initializer ?tag?
    Allocates memory for a type and initializes it.
    ::cffi
  • memory set
    memory set pointer typespec value ?index?
    Converts a value as per a type specification and stores it in memory in native form
    ::cffi
  • memory set!
    memory set! pointer typespec value ?index?
    Converts a value as per a type specification and stores it in memory in native form
    ::cffi
  • memory tobinary
    memory tobinary pointer size
    Returns the content of a memory block as a Tcl binary string.
    ::cffi
  • memory tobinary!
    memory tobinary! pointer size
    Returns the content of a memory block as a Tcl binary string.
    ::cffi
  • memory tostring
    memory tostring pointer ?encoding?
    Returns the content of a memory block as a Tcl string.
    ::cffi
  • memory tostring!
    memory tostring! pointer ?encoding?
    Returns the content of a memory block as a Tcl string.
    ::cffi
  • name
    OBJECT name 
    Returns the name of the struct.
    ::cffi::Struct
  • new
    OBJECT new ?initval?
    Allocates and initializes a native struct in memory.
    ::cffi::Struct
  • path
    OBJECT path 
    Returns the file system path for the wrapped library or image wrapped by the object.
    ::cffi::Wrapper
  • pkgconfig
    pkgconfig subcommand ...
    A command ensemble.
    ::cffi
  • pkgconfig get
    pkgconfig get key
    Gets the value of a configuration key.
    ::cffi
  • pkgconfig list
    pkgconfig list 
    Returns the list of keys containing information about the package configuration.
    ::cffi
  • pointer
    pointer subcommand ...
    A command ensemble.
    ::cffi
  • pointer address
    pointer address pointer
    Returns the address component of the pointer.
    ::cffi
  • pointer cast
    pointer cast pointer ?TAG?
    Casts a pointer to a new tag.
    ::cffi
  • pointer castable
    pointer castable subtag supertag
    Specifies that pointers with tag $subtag are acceptable in declarations that require $supertag.
    ::cffi
  • pointer castables
    pointer castables 
    Returns a list of tags that have been marked as castable with the pointer castable command..
    ::cffi
  • pointer check
    pointer check pointer
    Validates a pointer and raise an exception if invalid.
    ::cffi
  • pointer counted
    pointer counted pointer
    Registers a pointer as a counted pointer
    ::cffi
  • pointer dispose
    pointer dispose pointer
    Unregisters a safe or counted pointer
    ::cffi
  • pointer isnull
    pointer isnull pointer
    Returns true if the pointer is a NULL pointer, false otherwise.
    ::cffi
  • pointer isvalid
    pointer isvalid pointer
    Validates a pointer.
    ::cffi
  • pointer list
    pointer list ?args?
    Returns a list of registered pointers optionally filtered by a tag.
    ::cffi
  • pointer make
    pointer make address ?tag?
    Return a pointer for a memory address
    ::cffi
  • pointer safe
    pointer safe pointer
    Registers a pointer as a safe uncounted pointer
    ::cffi
  • pointer tag
    pointer tag pointer
    Returns the pointer tag
    ::cffi
  • prototype
    prototype subcommand ...
    A command ensemble.
    ::cffi
  • prototype delete
    prototype delete pattern
    Deletes prototypes matching a pattern.
    ::cffi
  • prototype function
    prototype function name fntype parameters
    Defines a function prototype for calling a function using the default C calling convention.
    ::cffi
  • prototype list
    prototype list ?pattern?
    Returns a list of prototypes matching the specified pattern.
    ::cffi
  • prototype stdcall
    prototype stdcall name fntype parameters
    Defines a function prototype for calling a function using the stdcall calling convention.
    ::cffi
  • setnative
    OBJECT setnative pointer fieldname value ?index?
    Sets the value of a field in a native structure in memory
    ::cffi::Struct
  • stdcall
    OBJECT stdcall fnname fntype parameters
    Creates a Tcl command to invoke a C function that uses the __stdcall calling convention from the loaded library..
    ::cffi::Wrapper
  • stdcalls
    OBJECT stdcalls fnlist
    Creates Tcl commands for multiple C functions within the loaded library that all use the __stdcall calling convention.
    ::cffi::Wrapper
  • Struct ::cffi
  • tobinary
    OBJECT tobinary dict_value
    Encodes the Tcl representation of a C struct value into a Tcl binary string.
    ::cffi::Struct
  • tonative
    OBJECT tonative pointer initializer ?index?
    Writes the Tcl dictionary representation of a C struct value to memory in native form.
    ::cffi::Struct
  • type
    type subcommand ...
    A command ensemble.
    ::cffi
  • type count
    type count type
    Returns the count of elements in an array type
    ::cffi
  • type info
    type info typedecl ?parse_mode?
    Returns a dictionary containing various information about a type declaration
    ::cffi
  • type size
    type size type
    Returns the size of a type in terms of the number of bytes of memory occupied by that type.
    ::cffi
  • Wrapper ::cffi