When a column is created, its data is initialized to the NA value of the

obitype
This commit is contained in:
Celine Mercier
2015-08-26 12:00:38 +02:00
parent 3f81dc0173
commit 9d91e907e5
2 changed files with 56 additions and 1 deletions

View File

@ -14,8 +14,9 @@
#define OBIInt_NA (INT32_MIN)
#define OBIFloat_NA (NAN)
#define OBIIdx_NA (SIZE_MAX)
#define OBIFloat_NA (float_NA())
#define OBIChar_NA (0) // TODO not sure about this one as it can be impossible to distinguish from uninitialized values
/**
@ -47,6 +48,22 @@ typedef char obichar_t;
typedef size_t obiidx_t;
typedef union
{
double value;
unsigned int word[2];
} ieee_double;
static double float_NA(void) // as defined in R
{
volatile ieee_double x;
x.word[0] = 0x7ff00000;
x.word[1] = 1954;
return x.value;
}
/**
* @brief returns the memory size in bytes of an OBIType
*