The primitive types that can be used as parameters to external functions are a restricted subset of the JADE primitive types. External functions do not support mapping to
The external function mapping of standard C types to simple JADE primitive types is listed in the following table.
C Data Type | Stack Frame Size Bytes | Recommended JADE Primitive Type |
---|---|---|
int | 4 | Integer |
int64 | 8 | Integer64 |
void* | 4 (32‑bit) | MemoryAddress |
long | 4 | Integer |
short | 4 | Integer |
char (ANSI) | 4 | Character |
wchar_t (Unicode) | 4 | Character |
bool | 4 | Boolean |
float | 4 | Real[4] |
double | 8 | Real or Real[8] |
In this table, the stack frame size is passed by value. Any of the types can be passed by value or by reference. (For more details, see "Parameter Passing Conventions", later in this chapter.) When a parameter is passed by reference, the four‑byte (32‑bit) or eight‑byte (64‑bit) address of the variable is passed.
The minimum stack frame size used in 32-bit mode is four bytes.
The external function mapping of standard C types to structured JADE primitive types is listed in the following table.
C Data Type | Recommended JADE Primitive Type |
---|---|
char* containing null-terminated string | String |
char* containing binary data | Binary |
You can substitute other JADE primitive types to clarify the interface. For example, you can map a JADE
The unsigned qualifier makes no difference to the stack frame size that is passed, and affects only the interpretation of the values passed. The handling and interpretation of signed or unsigned values is left to the external function protocol and your use of the function.