Showing
6 changed files
with
38 additions
and
41 deletions
@@ -37,7 +37,14 @@ TR_INTERFACE(TR_StreamReader) { | @@ -37,7 +37,14 @@ TR_INTERFACE(TR_StreamReader) { | ||
37 | fptr_TR_streamReaderRead read; | 37 | fptr_TR_streamReaderRead read; |
38 | }; | 38 | }; |
39 | 39 | ||
40 | -extern ssize_t TR_streamReaderRead(void *, TR_Stream); | 40 | +inline |
41 | +ssize_t | ||
42 | +TR_streamReaderRead(void * object, TR_Stream st) | ||
43 | +{ | ||
44 | + ssize_t ret; | ||
45 | + TR_RETCALL(object, TR_StreamReader, read, ret, st); | ||
46 | + return ret; | ||
47 | +} | ||
41 | 48 | ||
42 | #endif // __TR_INTERFACE_READER_H__ | 49 | #endif // __TR_INTERFACE_READER_H__ |
43 | 50 |
@@ -42,8 +42,24 @@ TR_INTERFACE(TR_Socket) { | @@ -42,8 +42,24 @@ TR_INTERFACE(TR_Socket) { | ||
42 | fptr_TR_socketSend send; | 42 | fptr_TR_socketSend send; |
43 | }; | 43 | }; |
44 | 44 | ||
45 | -extern int TR_socketBindAction(void *); | ||
46 | -extern int TR_socketConnectAction(void *); | 45 | +inline |
46 | +int | ||
47 | +TR_socketBindAction(void * _this) | ||
48 | +{ | ||
49 | + int callret; | ||
50 | + TR_RETCALL(_this, TR_Socket, bind, callret); | ||
51 | + return callret; | ||
52 | +} | ||
53 | + | ||
54 | +inline | ||
55 | +int | ||
56 | +TR_socketConnectAction(void * _this) | ||
57 | +{ | ||
58 | + int callret; | ||
59 | + TR_RETCALL(_this, TR_Socket, connect, callret); | ||
60 | + return callret; | ||
61 | +} | ||
62 | + | ||
47 | extern TR_RemoteData TR_socketRecv(void *, size_t); | 63 | extern TR_RemoteData TR_socketRecv(void *, size_t); |
48 | extern ssize_t TR_socketSend(void *, TR_RemoteData); | 64 | extern ssize_t TR_socketSend(void *, TR_RemoteData); |
49 | 65 |
@@ -37,7 +37,14 @@ TR_INTERFACE(TR_StreamWriter) { | @@ -37,7 +37,14 @@ TR_INTERFACE(TR_StreamWriter) { | ||
37 | fptr_TR_streamWriterWrite write; | 37 | fptr_TR_streamWriterWrite write; |
38 | }; | 38 | }; |
39 | 39 | ||
40 | -ssize_t TR_streamWriterWrite(void *, TR_Stream); | 40 | +inline |
41 | +ssize_t | ||
42 | +TR_streamWriterWrite(void * object, TR_Stream st) | ||
43 | +{ | ||
44 | + ssize_t ret; | ||
45 | + TR_RETCALL(object, TR_StreamWriter, write, ret, st); | ||
46 | + return ret; | ||
47 | +} | ||
41 | 48 | ||
42 | #endif // __TR_INTERFACE_WRITER_H__ | 49 | #endif // __TR_INTERFACE_WRITER_H__ |
43 | 50 |
@@ -26,14 +26,6 @@ | @@ -26,14 +26,6 @@ | ||
26 | 26 | ||
27 | TR_CREATE_INTERFACE(TR_StreamReader, 1); | 27 | TR_CREATE_INTERFACE(TR_StreamReader, 1); |
28 | 28 | ||
29 | -ssize_t | ||
30 | -TR_streamReaderRead(void * object, TR_Stream st) | ||
31 | -{ | ||
32 | - ssize_t ret; | ||
33 | - | ||
34 | - TR_RETCALL(object, TR_StreamReader, read, ret, st); | ||
35 | - | ||
36 | - return ret; | ||
37 | -} | 29 | +extern inline ssize_t TR_streamReaderRead(void *, TR_Stream); |
38 | 30 | ||
39 | // vim: set ts=4 sw=4: | 31 | // vim: set ts=4 sw=4: |
@@ -28,25 +28,8 @@ | @@ -28,25 +28,8 @@ | ||
28 | 28 | ||
29 | TR_CREATE_INTERFACE(TR_Socket, 4); | 29 | TR_CREATE_INTERFACE(TR_Socket, 4); |
30 | 30 | ||
31 | -int | ||
32 | -TR_socketBindAction(void * _this) | ||
33 | -{ | ||
34 | - int callret; | ||
35 | - | ||
36 | - TR_RETCALL(_this, TR_Socket, bind, callret); | ||
37 | - | ||
38 | - return callret; | ||
39 | -} | ||
40 | - | ||
41 | -int | ||
42 | -TR_socketConnectAction(void * _this) | ||
43 | -{ | ||
44 | - int callret; | ||
45 | - | ||
46 | - TR_RETCALL(_this, TR_Socket, connect, callret); | ||
47 | - | ||
48 | - return callret; | ||
49 | -} | 31 | +extern inline int TR_socketBindAction(void *); |
32 | +extern inline int TR_socketConnectAction(void *); | ||
50 | 33 | ||
51 | TR_RemoteData | 34 | TR_RemoteData |
52 | TR_socketRecv(void * _this, size_t size) | 35 | TR_socketRecv(void * _this, size_t size) |
@@ -26,14 +26,6 @@ | @@ -26,14 +26,6 @@ | ||
26 | 26 | ||
27 | TR_CREATE_INTERFACE(TR_StreamWriter, 1); | 27 | TR_CREATE_INTERFACE(TR_StreamWriter, 1); |
28 | 28 | ||
29 | -ssize_t | ||
30 | -TR_streamWriterWrite(void * object, TR_Stream st) | ||
31 | -{ | ||
32 | - ssize_t ret; | ||
33 | - | ||
34 | - TR_RETCALL(object, TR_StreamWriter, write, ret, st); | ||
35 | - | ||
36 | - return ret; | ||
37 | -} | 29 | +extern inline ssize_t TR_streamWriterWrite(void *, TR_Stream); |
38 | 30 | ||
39 | // vim: set ts=4 sw=4: | 31 | // vim: set ts=4 sw=4: |
Please
register
or
login
to post a comment