--- libelwix/inc/elwix/aiov.h 2021/03/19 03:07:11 1.1.2.4 +++ libelwix/inc/elwix/aiov.h 2025/08/21 15:40:07 1.2.40.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aiov.h,v 1.1.2.4 2021/03/19 03:07:11 misho Exp $ +* $Id: aiov.h,v 1.2.40.1 2025/08/21 15:40:07 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -12,7 +12,7 @@ terms: All of the documentation and software included in the ELWIX and AITNET Releases is copyrighted by ELWIX - Sofia/Bulgaria -Copyright 2004 - 2021 +Copyright 2004 - 2024 by Michael Pounov . All rights reserved. Redistribution and use in source and binary forms, with or without @@ -56,6 +56,10 @@ typedef struct tagIOV iovec_t; #define iov_Size(x) (x)->iov_size #define iov_Array(x) (x)->iov_array +#ifdef __cplusplus +extern "C" { +#endif + /* * iov_Init() - Init new iovec array * @@ -140,6 +144,14 @@ int iov_PushPair(iovec_t * __restrict iov, const char */ int iov_PopPair(iovec_t * __restrict iov, char *name, size_t *namlen, void *data, size_t *datlen, int mustfree); +/* + * iov_FreePairs() - Free pairs/named data in iovec array + * + * @iov = iovec array + * @mustfree = data must be free before delete + * return: -1 error or 0 ok + */ +int iov_FreePairs(iovec_t * __restrict iov, int mustfree); /* * iov_Debug() - Debug of iovec array @@ -149,5 +161,8 @@ int iov_PopPair(iovec_t * __restrict iov, char *name, */ void iov_Debug(iovec_t * __restrict iov); +#ifdef __cplusplus +} +#endif #endif