FunctionType
represents C function.
Returns a new CType
object describing a C function.
CType FunctionType( abi, returnType[, argType1, ...] );
CType
indicating the type of the value returned by the function.CType
objects indicating the types of each of the parameters passed into the C function.A CType
describing the function type. The equivalent C function type declaration would be:
returnType (*) ([argType1, ..., argTypeN]);
returnType
or any of the argument types are not valid CType
objects.Property | Type | Description |
abi |
One of the ABI constants | The ABI of the function. Read only. |
argTypes |
CType[] |
A sealed array of the argument types. Read only. |
returnType |
CType |
The return type of the function. Read only. |
These properties are available on all CType
objects.
Property | Type | Description |
name |
String |
The type's name. Read only. For primitive types, this is just the name of the corresponding C type. For structure and opaque pointer types, this is simply the string that was passed to the constructor. For other function, pointer, and array types, this should be a valid C type expression. |
ptr |
CType | Returns a CType representing the data type "pointer to this type". This is the result of calling ctypes.PointerType(the_type) . Read only. |
size |
Number |
The size of the type, in bytes. This is the same value as the C Note:
ctypes.void_t.size is undefined. |
CType array([n]) |
String toSource() |
String toString() |
FunctionType
CData
cannot be constructed. Function pointer is created with FunctionType.ptr
.
CData functiontype.ptr([func]);
Function
.A CData
representing the newly allocated function pointer.
func
is not either pointer value or JavaScript Function
.