aboutsummaryrefslogtreecommitdiffstats
path: root/src/estream.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2014-10-03 06:22:53 +0000
committerWerner Koch <[email protected]>2014-10-03 06:22:53 +0000
commit12b5188bd495e45775c34c8e6263e6be177c03da (patch)
treebf99c2fd1f6418d4b26453d97c79daef7d759eda /src/estream.c
parentw32: Make it build again. (diff)
downloadlibgpg-error-12b5188bd495e45775c34c8e6263e6be177c03da.tar.gz
libgpg-error-12b5188bd495e45775c34c8e6263e6be177c03da.zip
Change gpgrt_pending{,_unlocked} to macros.
* src/gpg-error.h.in (gpgrt_pending): Change to a macro. (gpgrt_pending_unlocked): Change to a macro. (_gpgrt_pending, _gpgrt_pending_unlocked): New private functions. * src/visibility.c, src/visibility.h: Change accordingly. * src/gpg-error.vers, src/gpg-error.def.in: Ditto. * src/estream.c (_gpgrt_pending_unlocked): Rename to _gpgrt__pending_unlocked. (_gpgrt_pending): Rename to _gpgrt__pending. -- The function are supposed to be used with gprt_getc and thus we need to avoid the function call overhead. We may want to change them to inline functions, though. gpgrt_pending is changed to a macro with the idea that we eventually can export the samestream flags and thus avoid the function call overhead in the samethread case too.
Diffstat (limited to 'src/estream.c')
-rw-r--r--src/estream.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/estream.c b/src/estream.c
index a17950e..42609ee 100644
--- a/src/estream.c
+++ b/src/estream.c
@@ -3471,7 +3471,7 @@ _gpgrt_syshd (estream_t stream, es_syshd_t *syshd)
int
-_gpgrt_pending_unlocked (estream_t stream)
+_gpgrt__pending_unlocked (estream_t stream)
{
return check_pending (stream);
}
@@ -3486,12 +3486,12 @@ _gpgrt_pending_unlocked (estream_t stream)
are pending the function is expected to return -1 in this case and
thus deviates from the standard behavior of read(2). */
int
-_gpgrt_pending (estream_t stream)
+_gpgrt__pending (estream_t stream)
{
int ret;
lock_stream (stream);
- ret = _gpgrt_pending_unlocked (stream);
+ ret = _gpgrt__pending_unlocked (stream);
unlock_stream (stream);
return ret;