Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
111408b7ae4dcb9dfc58bed5b1774603c8b6edb3
[simgrid.git] / src / surf / surf_resource.c
1
2 /* Copyright (c) 2009 The SimGrid Team. All rights reserved.                */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #include "surf_private.h"
8 #include "xbt/dict.h"
9
10 void surf_resource_free(void* r) {
11   surf_resource_t resource = r;
12   if (resource->name)
13     free(resource->name);
14   free(resource);
15 }
16
17 const char *surf_resource_name(const void *resource) {
18   return ((surf_resource_t)resource)->name;
19 }
20