2 /* Copyright (c) 2009 The SimGrid Team. All rights reserved. */
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. */
8 #ifndef SURF_RESOURCE_H
9 #define SURF_RESOURCE_H
11 static XBT_INLINE void surf_resource_free(void* r) {
12 surf_resource_t resource = r;
15 if (resource->properties)
16 xbt_dict_free(&resource->properties);
20 static XBT_INLINE const char *surf_resource_name(const void *resource) {
21 return ((surf_resource_t)resource)->name;
24 static XBT_INLINE xbt_dict_t surf_resource_properties(const void *resource) {
25 return ((surf_resource_t)resource)->properties;
28 #endif /* SURF_RESOURCE_H */