static wi_hash_code_t _wi_number_hash(wi_runtime_instance_t *instance) { wi_number_t *number = instance; switch(number->storage_type) { case WI_NUMBER_STORAGE_INT8: return wi_hash_int(number->value.i8); break; case WI_NUMBER_STORAGE_INT16: return wi_hash_int(number->value.i16); break; case WI_NUMBER_STORAGE_INT32: return wi_hash_int(number->value.i32); break; case WI_NUMBER_STORAGE_INT64: return wi_hash_double(number->value.i64); break; case WI_NUMBER_STORAGE_FLOAT: return wi_hash_double(number->value.f); break; case WI_NUMBER_STORAGE_DOUBLE: return wi_hash_double(number->value.d); break; default: return 0; break; } }
static wi_hash_code_t _wi_date_hash(wi_runtime_instance_t *instance) { wi_date_t *date = instance; return wi_hash_double(date->interval); }