// Path: src/main/java/org/lmdbjava/BufferProxy.java
// protected static final int MDB_VAL_STRUCT_SIZE = BYTES * 2;
// 
// Path: src/main/java/org/lmdbjava/BufferProxy.java
// protected static final int STRUCT_FIELD_OFFSET_SIZE = 0;
// 
// Path: src/main/java/org/lmdbjava/Library.java
// static final jnr.ffi.Runtime RUNTIME;


import static java.util.Objects.requireNonNull;
import static org.lmdbjava.BufferProxy.MDB_VAL_STRUCT_SIZE;
import static org.lmdbjava.BufferProxy.STRUCT_FIELD_OFFSET_SIZE;
import static org.lmdbjava.Library.RUNTIME;
import jnr.ffi.Pointer;
import jnr.ffi.provider.MemoryManager;
    return v;
  }

  void valIn(final T val) {
    proxy.in(val, ptrVal, ptrValAddr);
  }

  void valIn(final int size) {
    proxy.in(v, size, ptrVal, ptrValAddr);
  }

  /**
   * Prepares an array suitable for presentation as the data argument to a
   * <code>MDB_MULTIPLE</code> put.
   *
   * <p>
   * The returned array is equivalent of two <code>MDB_val</code>s as follows:
   *
   * <ul>
   * <li>ptrVal1.data = pointer to the data address of passed buffer</li>
   * <li>ptrVal1.size = size of each individual data element</li>
   * <li>ptrVal2.data = unused</li>
   * <li>ptrVal2.size = number of data elements (as passed to this method)</li>
   * </ul>
   *
   * @param val      a user-provided buffer with data elements (required)
   * @param elements number of data elements the user has provided
   * @return a properly-prepared pointer to an array for the operation
   */
  Pointer valInMulti(final T val, final int elements) {
// Path: src/main/java/org/lmdbjava/BufferProxy.java
// protected static final int MDB_VAL_STRUCT_SIZE = BYTES * 2;
// 
// Path: src/main/java/org/lmdbjava/BufferProxy.java
// protected static final int STRUCT_FIELD_OFFSET_SIZE = 0;
// 
// Path: src/main/java/org/lmdbjava/Library.java
// static final jnr.ffi.Runtime RUNTIME;


// Path: src/main/java/org/lmdbjava/KeyVal.java
import static java.util.Objects.requireNonNull;
import static org.lmdbjava.BufferProxy.MDB_VAL_STRUCT_SIZE;
import static org.lmdbjava.BufferProxy.STRUCT_FIELD_OFFSET_SIZE;
import static org.lmdbjava.Library.RUNTIME;
import jnr.ffi.Pointer;
import jnr.ffi.provider.MemoryManager;

    return v;
  }

  void valIn(final T val) {
    proxy.in(val, ptrVal, ptrValAddr);
  }

  void valIn(final int size) {
    proxy.in(v, size, ptrVal, ptrValAddr);
  }

  /**
   * Prepares an array suitable for presentation as the data argument to a
   * <code>MDB_MULTIPLE</code> put.
   *
   * <p>
   * The returned array is equivalent of two <code>MDB_val</code>s as follows:
   *
   * <ul>
   * <li>ptrVal1.data = pointer to the data address of passed buffer</li>
   * <li>ptrVal1.size = size of each individual data element</li>
   * <li>ptrVal2.data = unused</li>
   * <li>ptrVal2.size = number of data elements (as passed to this method)</li>
   * </ul>
   *
   * @param val      a user-provided buffer with data elements (required)
   * @param elements number of data elements the user has provided
   * @return a properly-prepared pointer to an array for the operation
   */
  Pointer valInMulti(final T val, final int elements) {
    final long ptrVal2SizeOff = MDB_VAL_STRUCT_SIZE + STRUCT_FIELD_OFFSET_SIZE;