From 44fb8369ff5f520ec862efb8c79ff6ddc900834e Mon Sep 17 00:00:00 2001 From: Nathan Hjelm Date: Mon, 5 Jan 2015 17:06:50 -0700 Subject: [PATCH] opal/convertor: add a function to get the pointer for an offset (instead of the current offset) Signed-off-by: Nathan Hjelm --- opal/datatype/opal_convertor.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/opal/datatype/opal_convertor.h b/opal/datatype/opal_convertor.h index 878fe724c0..0629b69aa2 100644 --- a/opal/datatype/opal_convertor.h +++ b/opal/datatype/opal_convertor.h @@ -1,4 +1,4 @@ -/* -*- Mode: C; c-basic-offset:4 ; -*- */ +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ /* * Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana * University Research and Technology @@ -219,6 +219,14 @@ static inline void opal_convertor_get_current_pointer( const opal_convertor_t* p *position = (void*)base; } +static inline void opal_convertor_get_offset_pointer( const opal_convertor_t* pConv, + size_t offset, void** position ) +{ + unsigned char* base = pConv->pBaseBuf + offset + pConv->pDesc->true_lb; + *position = (void*)base; +} + + /* * */