X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=types%2Ftypes.c;h=450c93ba6b5206c9edcdd8fb726e92c0b029d73a;hp=b9576ea3109ab98e07ff3473f23983a5a0d77e14;hb=91f361c1757256c11988ab16376419a72592e1a9;hpb=a35173fe7e72fe456cbd19db34a5ff7a09a0c7ff diff --git a/types/types.c b/types/types.c index b9576ea3..450c93ba 100644 --- a/types/types.c +++ b/types/types.c @@ -5,7 +5,9 @@ * * Types registry. * - * Copyright 2010, 2011 - Mathieu Desnoyers + * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation + * + * Author: Mathieu Desnoyers * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -19,7 +21,8 @@ */ #include -#include +#include +#include #include #include #include @@ -144,7 +147,7 @@ end: } static struct definition_scope * - get_definition_scope(struct definition *definition) + get_definition_scope(const struct definition *definition) { return definition->scope; } @@ -298,7 +301,7 @@ struct declaration_scope * scope->typedef_declarations = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, - (GDestroyNotify) definition_unref); + (GDestroyNotify) declaration_unref); scope->struct_declarations = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, (GDestroyNotify) declaration_unref); @@ -597,8 +600,7 @@ void free_definition_scope(struct definition_scope *scope) g_free(scope); } -static -struct definition *lookup_definition(struct definition *definition, +struct definition *lookup_definition(const struct definition *definition, const char *field_name) { struct definition_scope *scope = get_definition_scope(definition); @@ -610,7 +612,7 @@ struct definition *lookup_definition(struct definition *definition, scope); } -struct definition_integer *lookup_integer(struct definition *definition, +struct definition_integer *lookup_integer(const struct definition *definition, const char *field_name, int signedness) { @@ -628,7 +630,7 @@ struct definition_integer *lookup_integer(struct definition *definition, return lookup_integer; } -struct definition_enum *lookup_enum(struct definition *definition, +struct definition_enum *lookup_enum(const struct definition *definition, const char *field_name, int signedness) { @@ -646,7 +648,7 @@ struct definition_enum *lookup_enum(struct definition *definition, return lookup_enum; } -struct definition *lookup_variant(struct definition *definition, +struct definition *lookup_variant(const struct definition *definition, const char *field_name) { struct definition *lookup;