/*=============================================================================

  This file is the part of wordaccess.h for use under these
  conditions:

  * Compilers other than GCC
  * GCC before version 3.4
  * Specified by the user with WORDACCESS_GENERIC
=============================================================================*/

#include "intcode.h"

typedef uint32_t wordint;
typedef unsigned char wordintBytes[sizeof(wordint)];

    
static __inline__ wordint
bytesToWordint(wordintBytes  const bytes) {

    return (wordint)  pm_uintFromBigend32( * (bigend32*) bytes);
}


static __inline__ void
wordintToBytes(wordintBytes * const bytesP,
               wordint    const wordInt) {

    * (bigend32*) bytesP = pm_bigendFromUint32((uint32_t)wordInt);
}
