Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Actually implement surf_resource_properties so that it links (sorry)
[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   if (resource->properties)
15     xbt_dict_free(&resource->properties);
16   free(resource);
17 }
18
19 const char *surf_resource_name(const void *resource) {
20   return ((surf_resource_t)resource)->name;
21 }
22
23 xbt_dict_t surf_resource_properties(const void *resource) {
24   return ((surf_resource_t)resource)->properties;
25 }