Skip to content

Commit b0d42e8

Browse files
committed
Adding ReleaseNodes.md
1 parent 2968a13 commit b0d42e8

File tree

4 files changed

+45
-19
lines changed

4 files changed

+45
-19
lines changed

README.md

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,9 @@ R6RS Portable Foreign Function Interface
33

44
PFFI is a portable foreign function interface for R6RS Scheme implementations.
55

6-
## Changes
6+
## Release notes
77

8-
### version 25.05.16
9-
10-
**Breaking changes**
11-
12-
- Using ftype for `define-foreign-struct` and `define-foreign-union` on Chez
13-
This means, `alignment` keyword doesn't work on Chez.
14-
- Introducing `struct` keyword on struct member to distinguish primitive
15-
and struct.
16-
- Foreign types are now wrapped or ftype (on Chez), instead of symbols.
17-
18-
**New features**
19-
20-
- `define-type-alias` is introduced, similar usage as `typedef` in C.
21-
- `boolean` support for Scheme boolean.
22-
- Supporting array foreign variable.
23-
- Supporting `(* type)` pointer form for foreign variable.
24-
- Empty struct, i.e. `(define-foreign-struct foo)`, is supported
25-
- Supporting `wchar_t` as Scheme character.
8+
See [ReleasNotes](./ReleaseNotes.md)
269

2710
## Example
2811

ReleaseNotes.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
### version x.x.x (future release)
2+
3+
4+
### version 25.05.16
5+
6+
**Breaking changes**
7+
8+
- Using ftype for `define-foreign-struct` and `define-foreign-union` on Chez
9+
This means, `alignment` keyword doesn't work on Chez.
10+
- Introducing `struct` keyword on struct member to distinguish primitive
11+
and struct.
12+
- Foreign types are now wrapped or ftype (on Chez), instead of symbols.
13+
14+
**New features**
15+
16+
- `define-type-alias` is introduced, similar usage as `typedef` in C.
17+
- `boolean` support for Scheme boolean.
18+
- Supporting array foreign variable.
19+
- Supporting `(* type)` pointer form for foreign variable.
20+
- Empty struct, i.e. `(define-foreign-struct foo)`, is supported
21+
- Supporting `wchar_t` as Scheme character.

tests/functions.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,5 +148,15 @@ wchar_t wcallback(wchar_t wc, wchar_t (* proc)(wchar_t))
148148
return proc(wc);
149149
}
150150

151+
char * str_cb(char *st, char * (* cb)(char *))
152+
{
153+
return cb(st);
154+
}
155+
156+
wchar_t * wstr_cb(wchar_t *st, wchar_t * (* cb)(wchar_t *))
157+
{
158+
return cb(st);
159+
}
160+
151161

152162
/* TODO more */

tests/test.scm

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,4 +411,16 @@
411411
(lambda (wc) (char-upcase wc)))))
412412
(test-equal "wcallback" #\A (wcallback #\a callback))))
413413

414+
;; (define-syntax test-string-argument
415+
;; (syntax-rules ()
416+
;; ((_ type name)
417+
;; (let ()
418+
;; (define proc
419+
;; (foreign-procedure test-lib type name (type (callback type (type)))))
420+
;; (define cb (c-callback type (type) string-upcase))
421+
;; (test-equal "AA" (proc "aa" cb))))))
422+
;; ;; char*
423+
;; (test-string-argument char* str_cb)
424+
;; (test-string-argument wchar* wstr_cb)
425+
414426
(test-end)

0 commit comments

Comments
 (0)