Skip to content

Commit b2c8699

Browse files
committed
add libuv
1 parent 733505b commit b2c8699

1 file changed

Lines changed: 12 additions & 259 deletions

File tree

packages/net/uv-ffi.ss

Lines changed: 12 additions & 259 deletions
Original file line numberDiff line numberDiff line change
@@ -1,255 +1,8 @@
1-
IdentifierType: ['int']
2-
IdentifierType: ['int']
3-
IdentifierType: ['int']
4-
IdentifierType: ['unsigned', 'int']
5-
IdentifierType: ['int']
6-
IdentifierType: ['int']
7-
IdentifierType: ['int']
8-
IdentifierType: ['void']
9-
IdentifierType: ['size_t']
10-
IdentifierType: ['int']
11-
IdentifierType: ['int']
12-
;;<pycparser.c_ast.EllipsisParam object at 0x10a806c10>
13-
IdentifierType: ['int']
14-
IdentifierType: ['int']
15-
IdentifierType: ['void']
16-
IdentifierType: ['void']
17-
IdentifierType: ['void']
18-
IdentifierType: ['int']
19-
IdentifierType: ['void']
20-
IdentifierType: ['uint64_t']
21-
IdentifierType: ['int']
22-
IdentifierType: ['int']
23-
IdentifierType: ['int']
24-
IdentifierType: ['int']
25-
IdentifierType: ['size_t']
26-
IdentifierType: ['uv_handle_type']
27-
IdentifierType: ['void']
28-
IdentifierType: ['size_t']
29-
IdentifierType: ['void']
30-
IdentifierType: ['uv_req_type']
31-
IdentifierType: ['int']
32-
IdentifierType: ['void']
33-
IdentifierType: ['void']
34-
IdentifierType: ['void']
35-
IdentifierType: ['void']
36-
IdentifierType: ['int']
37-
IdentifierType: ['int']
38-
IdentifierType: ['int']
39-
IdentifierType: ['uv_buf_t']
40-
IdentifierType: ['size_t']
41-
IdentifierType: ['int']
42-
IdentifierType: ['int']
43-
IdentifierType: ['int']
44-
IdentifierType: ['int']
45-
IdentifierType: ['int']
46-
IdentifierType: ['int']
47-
IdentifierType: ['int']
48-
IdentifierType: ['int']
49-
IdentifierType: ['int']
50-
IdentifierType: ['int']
51-
IdentifierType: ['int']
52-
IdentifierType: ['int']
53-
IdentifierType: ['int']
54-
IdentifierType: ['int']
55-
IdentifierType: ['int']
56-
IdentifierType: ['int']
57-
IdentifierType: ['int']
58-
IdentifierType: ['int']
59-
IdentifierType: ['int']
60-
IdentifierType: ['int']
61-
IdentifierType: ['int']
62-
IdentifierType: ['int']
63-
IdentifierType: ['int']
64-
IdentifierType: ['int']
65-
IdentifierType: ['int']
66-
IdentifierType: ['int']
67-
IdentifierType: ['int']
68-
IdentifierType: ['int']
69-
IdentifierType: ['int']
70-
IdentifierType: ['int']
71-
IdentifierType: ['int']
72-
IdentifierType: ['int']
73-
IdentifierType: ['int']
74-
IdentifierType: ['int']
75-
IdentifierType: ['int']
76-
IdentifierType: ['int']
77-
IdentifierType: ['size_t']
78-
IdentifierType: ['size_t']
79-
IdentifierType: ['int']
80-
IdentifierType: ['int']
81-
IdentifierType: ['int']
82-
IdentifierType: ['int']
83-
IdentifierType: ['uv_handle_type']
84-
IdentifierType: ['int']
85-
IdentifierType: ['int']
86-
IdentifierType: ['int']
87-
IdentifierType: ['void']
88-
IdentifierType: ['int']
89-
IdentifierType: ['int']
90-
IdentifierType: ['void']
91-
IdentifierType: ['int']
92-
IdentifierType: ['uv_handle_type']
93-
IdentifierType: ['int']
94-
IdentifierType: ['int']
95-
IdentifierType: ['int']
96-
IdentifierType: ['int']
97-
IdentifierType: ['int']
98-
IdentifierType: ['int']
99-
IdentifierType: ['int']
100-
IdentifierType: ['int']
101-
IdentifierType: ['int']
102-
IdentifierType: ['int']
103-
IdentifierType: ['int']
104-
IdentifierType: ['int']
105-
IdentifierType: ['int']
106-
IdentifierType: ['int']
107-
IdentifierType: ['int']
108-
IdentifierType: ['int']
109-
IdentifierType: ['int']
110-
IdentifierType: ['int']
111-
IdentifierType: ['int']
112-
IdentifierType: ['int']
113-
IdentifierType: ['void']
114-
IdentifierType: ['uint64_t']
115-
IdentifierType: ['int']
116-
IdentifierType: ['void']
117-
IdentifierType: ['int']
118-
IdentifierType: ['int']
119-
IdentifierType: ['int']
120-
IdentifierType: ['int']
121-
IdentifierType: ['uv_pid_t']
122-
IdentifierType: ['int']
123-
IdentifierType: ['int']
124-
IdentifierType: ['int']
125-
IdentifierType: ['int']
126-
IdentifierType: ['int']
127-
IdentifierType: ['int']
128-
IdentifierType: ['uv_os_fd_t']
129-
IdentifierType: ['int']
130-
IdentifierType: ['int']
131-
IdentifierType: ['int']
132-
IdentifierType: ['int']
133-
IdentifierType: ['void']
134-
IdentifierType: ['uv_pid_t']
135-
IdentifierType: ['uv_pid_t']
136-
IdentifierType: ['int']
137-
IdentifierType: ['void']
138-
IdentifierType: ['int']
139-
IdentifierType: ['void']
140-
IdentifierType: ['int']
141-
IdentifierType: ['int']
142-
IdentifierType: ['int']
143-
IdentifierType: ['int']
144-
IdentifierType: ['uv_fs_type']
145-
IdentifierType: ['ssize_t']
146-
IdentifierType: ['void']
147-
IdentifierType: ['int']
148-
IdentifierType: ['int']
149-
IdentifierType: ['int']
150-
IdentifierType: ['int']
151-
IdentifierType: ['int']
152-
IdentifierType: ['int']
153-
IdentifierType: ['int']
154-
IdentifierType: ['int']
155-
IdentifierType: ['int']
156-
IdentifierType: ['int']
157-
IdentifierType: ['int']
158-
IdentifierType: ['int']
159-
IdentifierType: ['int']
160-
IdentifierType: ['int']
161-
IdentifierType: ['int']
162-
IdentifierType: ['int']
163-
IdentifierType: ['int']
164-
IdentifierType: ['int']
165-
IdentifierType: ['int']
166-
IdentifierType: ['int']
167-
IdentifierType: ['int']
168-
IdentifierType: ['int']
169-
IdentifierType: ['int']
170-
IdentifierType: ['int']
171-
IdentifierType: ['int']
172-
IdentifierType: ['int']
173-
IdentifierType: ['int']
174-
IdentifierType: ['int']
175-
IdentifierType: ['int']
176-
IdentifierType: ['int']
177-
IdentifierType: ['int']
178-
IdentifierType: ['int']
179-
IdentifierType: ['int']
180-
IdentifierType: ['int']
181-
IdentifierType: ['int']
182-
IdentifierType: ['int']
183-
IdentifierType: ['int']
184-
IdentifierType: ['int']
185-
IdentifierType: ['void']
186-
IdentifierType: ['int']
187-
IdentifierType: ['int']
188-
IdentifierType: ['int']
189-
IdentifierType: ['int']
190-
IdentifierType: ['int']
191-
IdentifierType: ['int']
192-
IdentifierType: ['int']
193-
IdentifierType: ['int']
194-
IdentifierType: ['int']
195-
IdentifierType: ['int']
196-
IdentifierType: ['int']
197-
IdentifierType: ['int']
198-
IdentifierType: ['int']
199-
IdentifierType: ['int']
200-
IdentifierType: ['int']
201-
IdentifierType: ['uint64_t']
202-
IdentifierType: ['uint64_t']
203-
IdentifierType: ['uint64_t']
204-
IdentifierType: ['void']
205-
IdentifierType: ['int']
206-
IdentifierType: ['void']
207-
IdentifierType: ['int']
208-
IdentifierType: ['int']
209-
IdentifierType: ['int']
210-
IdentifierType: ['void']
211-
IdentifierType: ['void']
212-
IdentifierType: ['int']
213-
IdentifierType: ['void']
214-
IdentifierType: ['int']
215-
IdentifierType: ['void']
216-
IdentifierType: ['void']
217-
IdentifierType: ['int']
218-
IdentifierType: ['void']
219-
IdentifierType: ['void']
220-
IdentifierType: ['int']
221-
IdentifierType: ['void']
222-
IdentifierType: ['int']
223-
IdentifierType: ['void']
224-
IdentifierType: ['void']
225-
IdentifierType: ['void']
226-
IdentifierType: ['int']
227-
IdentifierType: ['int']
228-
IdentifierType: ['void']
229-
IdentifierType: ['void']
230-
IdentifierType: ['void']
231-
IdentifierType: ['int']
232-
IdentifierType: ['void']
233-
IdentifierType: ['int']
234-
IdentifierType: ['void']
235-
IdentifierType: ['int']
236-
IdentifierType: ['void']
237-
TypeDecl: callback, []
238-
IdentifierType: ['void']
239-
;;ptr argType error <class 'pycparser.c_ast.FuncDecl'> <member 'type' of 'FuncDecl' objects>
240-
IdentifierType: ['int']
241-
IdentifierType: ['void']
242-
IdentifierType: ['void']
243-
IdentifierType: ['int']
244-
IdentifierType: ['uv_thread_t']
245-
IdentifierType: ['int']
246-
IdentifierType: ['int']
247-
IdentifierType: ['void']
2481
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
249-
;;作者:evilbinary on 2018-03-05 22:42:47.
2+
;;作者:evilbinary on 2018-03-05 22:43:58.
2503
;;邮箱:rootdebug@163.com
2514
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
252-
(library (net uv )
5+
(library (net uv-ffi)
2536
(export pthread-barrier-init
2547
pthread-barrier-wait
2558
pthread-barrier-destroy
@@ -515,10 +268,10 @@ IdentifierType: ['void']
515268

516269
(define lib-name
517270
(case (machine-type)
518-
((arm32le) ".so")
519-
((a6nt i3nt ta6nt ti3nt) ".dll")
520-
((a6osx i3osx ta6osx ti3osx) ".so")
521-
((a6le i3le ta6le ti3le) ".so")))
271+
((arm32le) "libuv.so")
272+
((a6nt i3nt ta6nt ti3nt) "libuv.dll")
273+
((a6osx i3osx ta6osx ti3osx) "libuv.dylib")
274+
((a6le i3le ta6le ti3le) "libuv.so")))
522275
(define lib (load-librarys lib-name ))
523276

524277
;;int pthread_barrier_init(pthread_barrier_t* barrier ,void* barrier_attr ,unsigned count)
@@ -583,7 +336,7 @@ IdentifierType: ['void']
583336

584337
;;int uv_run(uv_loop_t* ,uv_run_mode mode)
585338
(def-function uv-run
586-
"uv_run" (void* uv_run_mode) int)
339+
"uv_run" (void* int) int)
587340

588341
;;void uv_stop(uv_loop_t* )
589342
(def-function uv-stop
@@ -695,7 +448,7 @@ IdentifierType: ['void']
695448

696449
;;void uv_close(uv_handle_t* handle ,uv_close_cb close_cb)
697450
(def-function uv-close
698-
"uv_close" (void* uv_close_cb) void)
451+
"uv_close" (void* void*) void)
699452

700453
;;int uv_send_buffer_size(uv_handle_t* handle ,int* value)
701454
(def-function uv-send-buffer-size
@@ -719,27 +472,27 @@ IdentifierType: ['void']
719472

720473
;;int uv_listen(uv_stream_t* stream ,int backlog ,uv_connection_cb cb)
721474
(def-function uv-listen
722-
"uv_listen" (void* int uv_connection_cb) int)
475+
"uv_listen" (void* int void*) int)
723476

724477
;;int uv_accept(uv_stream_t* server ,uv_stream_t* client)
725478
(def-function uv-accept
726479
"uv_accept" (void* void*) int)
727480

728481
;;int uv_read_start(uv_stream_t* ,uv_alloc_cb alloc_cb ,uv_read_cb read_cb)
729482
(def-function uv-read-start
730-
"uv_read_start" (void* uv_alloc_cb uv_read_cb) int)
483+
"uv_read_start" (void* void* void*) int)
731484

732485
;;int uv_read_stop(uv_stream_t* )
733486
(def-function uv-read-stop
734487
"uv_read_stop" (void*) int)
735488

736489
;;int uv_write(uv_write_t* req ,uv_stream_t* handle ,uv_buf_t bufs[] ,unsigned int nbufs ,uv_write_cb cb)
737490
(def-function uv-write
738-
"uv_write" (void* void* void* int uv_write_cb) int)
491+
"uv_write" (void* void* void* int void*) int)
739492

740493
;;int uv_write2(uv_write_t* req ,uv_stream_t* handle ,uv_buf_t bufs[] ,unsigned int nbufs ,uv_stream_t* send_handle ,uv_write_cb cb)
741494
(def-function uv-write2
742-
"uv_write2" (void* void* void* int void* uv_write_cb) int)
495+
"uv_write2" (void* void* void* int void* void*) int)
743496

744497
;;int uv_try_write(uv_stream_t* handle ,uv_buf_t bufs[] ,unsigned int nbufs)
745498
(def-function uv-try-write

0 commit comments

Comments
 (0)