# MPIR_Type_dup

create a copy of a datatype

## Synopsis

    #undef FUNCNAME
    #define FUNCNAME MPIR_Type_dup
    #undef FCNAME
    #define FCNAME MPL_QUOTE(FUNCNAME)
    int MPIR_Type_dup(MPI_Datatype oldtype, MPI_Datatype * newtype)

## Input Parameters

oldtype
  handle of original datatype

## Output Parameters

newtype
  handle of newly created copy of datatype

## Return Value

0 on success, MPI error code on failure.