Exemplo n.º 1
0
/*内部使用的struct unpack函数封装*/
int __wt_struct_unpack(WT_SESSION_IMPL *session,
	const void *buffer, size_t size, const char *fmt, ...)
{
	WT_DECL_RET;
	va_list ap;

	va_start(ap, fmt);
	ret = __wt_struct_unpackv(session, buffer, size, fmt, ap);
	va_end(ap);

	return (ret);
}
Exemplo n.º 2
0
/*
 * wiredtiger_struct_unpack --
 *	Unpack a byte string (extension API).
 */
int
wiredtiger_struct_unpack(WT_SESSION *wt_session,
    const void *buffer, size_t len, const char *format, ...)
{
	WT_DECL_RET;
	WT_SESSION_IMPL *session;
	va_list ap;

	session = (WT_SESSION_IMPL *)wt_session;

	va_start(ap, format);
	ret = __wt_struct_unpackv(session, buffer, len, format, ap);
	va_end(ap);

	return (ret);
}
Exemplo n.º 3
0
/*
 * __wt_ext_struct_unpack --
 *	Unpack a byte string (extension API).
 */
int
__wt_ext_struct_unpack(WT_EXTENSION_API *wt_api, WT_SESSION *wt_session,
    const void *buffer, size_t len, const char *fmt, ...)
{
	WT_DECL_RET;
	WT_SESSION_IMPL *session;
	va_list ap;

	session = (wt_session != NULL) ? (WT_SESSION_IMPL *)wt_session :
	    ((WT_CONNECTION_IMPL *)wt_api->conn)->default_session;

	va_start(ap, fmt);
	ret = __wt_struct_unpackv(session, buffer, len, fmt, ap);
	va_end(ap);

	return (ret);
}