Updated readme

This commit is contained in:
retropikzel 2024-05-18 16:51:23 +03:00
parent af1d808ea5
commit 66b68e6a23
3 changed files with 61 additions and 22 deletions

View File

@ -46,7 +46,35 @@ main.sld is the real main which is copied to main.scm
On some implementations these are procedures, on some macros. On some implementations these are procedures, on some macros.
### pffi-shared-object-auto-load ### Types
Types are given as symbols, for example 'int8 or 'pointer.
- int8
- uint8
- int16
- uint16
- int32
- uint32
- int64
- uint64
- char
- unsigned-char
- short
- unsigned-short
- int
- unsigned-int
- long
- unsigned-long
- float
- double
- string
- pointer
### Procedures or macros
#### pffi-shared-object-auto-load
Arguments: Arguments:
@ -59,7 +87,7 @@ Returns:
- (object) Shared object, the type depends on the implementation - (object) Shared object, the type depends on the implementation
### pffi-shared-object-load #### pffi-shared-object-load
It is recommended to use the pffi-shared-object-auto-load instead of this It is recommended to use the pffi-shared-object-auto-load instead of this
directly. directly.
@ -77,3 +105,15 @@ Returns:
#### pffi-define
Defines new foreign procedure.
Arguments:
- scheme-name () The name of the procedure used on scheme side
- shared-object (object) The shared object
- Use pffi-shared-object-auto-load and pffi-shared-object-load to get this
- c-name (symbol) The name of the C function
- return-type (symbol) The return type of the C function
- arguments-types (list (symbol) ...) The C function argument types

View File

@ -106,8 +106,6 @@
uint32 uint32
int64 int64
uint64 uint64
intptr
uintptr
char char
unsigned-char unsigned-char
short short
@ -118,6 +116,7 @@
unsigned-long unsigned-long
float float
double double
string
pointer)) pointer))
(define string-split (define string-split