-/* Copyright (c) 2010-2017. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2010-2018. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#define SMPI_KEYVALS_HPP_INCLUDED
#include "smpi/smpi.h"
-#include "xbt/ex.hpp"
#include <unordered_map>
template <typename T> int Keyval::keyval_create(smpi_copy_fn copy_fn, smpi_delete_fn delete_fn, int* keyval, void* extra_state){
- smpi_key_elem value = (smpi_key_elem)xbt_new0(s_smpi_key_elem_t, 1);
+ smpi_key_elem value = new s_smpi_key_elem_t;
value->copy_fn=copy_fn;
value->delete_fn=delete_fn;
}
if(elem->refcount==1){
T::keyvals_.erase(*keyval);
- xbt_free(elem);
+ delete elem;
}else{
elem->refcount--;
}