25 #include <aerospike/as_util.h>
26 #include <aerospike/as_val.h>
39 typedef enum as_bytes_type_e {
239 typedef struct as_bytes_s {
292 #define as_bytes_inita(__bytes, __capacity)\
293 as_bytes_init(__bytes, 0);\
294 (__bytes)->type = AS_BYTES_BLOB;\
295 (__bytes)->free = false;\
296 (__bytes)->capacity = __capacity;\
297 (__bytes)->size = 0;\
298 (__bytes)->value = (uint8_t *) alloca(__capacity * sizeof(uint8_t));
410 if ( !bytes )
return 0;
425 if ( !bytes )
return 0;
454 if ( !bytes )
return;
476 return bytes ? bytes->
value : fallback;
648 return as_bytes_set(bytes, index, (uint8_t *) &value, 1);
664 return as_bytes_set(bytes, index, (uint8_t *) &value, 2);
680 return as_bytes_set(bytes, index, (uint8_t *) &value, 4);
696 return as_bytes_set(bytes, index, (uint8_t *) &value, 8);
853 if ( !bytes )
return NULL;