Beispiel #1
0
void hash_insert_ref(hash_type *hash , const char *key , const void *value) {
  hash_node_type *hash_node;
  {
    node_data_type * data_node = node_data_alloc_ptr( value , NULL , NULL);
    hash_node                  = hash_node_alloc_new(key , data_node , hash->hashf , hash->size);
    __hash_insert_node(hash , hash_node);
  }
}
Beispiel #2
0
void hash_insert_copy(hash_type *hash , const char *key , const void *value , copyc_ftype *copyc , free_ftype *del) {
  hash_node_type *hash_node;
  if (copyc == NULL || del == NULL)
    util_abort("%s: must provide copy constructer and delete operator for insert copy - aborting \n",__func__);
  {
    node_data_type * data_node = node_data_alloc_ptr( value , copyc , del );
    hash_node                  = hash_node_alloc_new(key , data_node , hash->hashf , hash->size);
    __hash_insert_node(hash , hash_node);
  }
}
Beispiel #3
0
void hash_insert_hash_owned_ref(hash_type *hash , const char *key , const void *value , free_ftype *del) {
  hash_node_type *hash_node;
  if (del == NULL)
    util_abort("%s: must provide delete operator for insert hash_owned_ref - aborting \n",__func__);
  {
    node_data_type * data_node = node_data_alloc_ptr( value , NULL , del );
    hash_node                  = hash_node_alloc_new(key , data_node , hash->hashf , hash->size);
    __hash_insert_node(hash , hash_node);
  }
}
Beispiel #4
0
void  vector_push_copy(vector_type * vector , const void * data , copyc_ftype * copyc , free_ftype * del) {
  node_data_type * node = node_data_alloc_ptr( data, copyc , del);
  vector_push_node(vector , node);
}
Beispiel #5
0
void vector_insert_copy(vector_type * vector , int index , const void * data , copyc_ftype * copyc , free_ftype * del) {
  node_data_type * node = node_data_alloc_ptr( data, copyc , del);
  vector_insert__(vector , index , node);
}
Beispiel #6
0
void vector_insert_owned_ref(vector_type * vector , int index , const void * data , free_ftype * del) {
  node_data_type * node = node_data_alloc_ptr( data, NULL , del);
  vector_insert__(vector , index , node);
}
Beispiel #7
0
int  vector_append_copy(vector_type * vector , const void * data , copyc_ftype * copyc , free_ftype * del) {
  node_data_type * node = node_data_alloc_ptr( data, copyc , del);
  return vector_append_node(vector , node);
}
Beispiel #8
0
void vector_push_front_owned_ref(vector_type * vector , const void * data , free_ftype * del) {
  node_data_type * node = node_data_alloc_ptr( data, NULL , del);
  vector_push_node(vector , node);
}
Beispiel #9
0
int vector_append_owned_ref(vector_type * vector , const void * data , free_ftype * del) {
  node_data_type * node = node_data_alloc_ptr( data, NULL , del);
  return vector_append_node(vector , node);
}
Beispiel #10
0
void vector_insert_ref(vector_type * vector , int index , const void * data) {
  node_data_type * node = node_data_alloc_ptr( data, NULL , NULL);
  vector_insert__(vector , index , node);
}
Beispiel #11
0
void vector_push_front_ref(vector_type * vector , const void * data) {
  node_data_type * node = node_data_alloc_ptr( data, NULL , NULL);
  vector_push_node(vector , node);
}
Beispiel #12
0
int vector_append_ref(vector_type * vector , const void * data) {
  node_data_type * node = node_data_alloc_ptr( data, NULL , NULL);
  return vector_append_node(vector , node);
}