From 2300a68c88162527786eaaf8c3247526dc992590 Mon Sep 17 00:00:00 2001 From: Akos Kiss Date: Wed, 21 Sep 2016 10:41:36 +0200 Subject: [PATCH] Unify (and fix) the naming convention of structures (#1358) The naming convention of the project for `struct`s is `typedef struct x_t { } x_t`, but only if it has self-recursive pointer members, otherwise `typedef struct { } x_t` is enough. This patch applies this style consistently throughout the code base. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu --- jerry-core/ecma/base/ecma-globals.h | 4 ++-- jerry-core/jmem/jmem-allocator.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jerry-core/ecma/base/ecma-globals.h b/jerry-core/ecma/base/ecma-globals.h index b1fb87d3a..da3016f17 100644 --- a/jerry-core/ecma/base/ecma-globals.h +++ b/jerry-core/ecma/base/ecma-globals.h @@ -533,7 +533,7 @@ typedef enum * Description of ECMA-object or lexical environment * (depending on is_lexical_environment). */ -typedef struct ecma_object_t +typedef struct { /** type : 3 bit : ecma_object_type_t or ecma_lexical_environment_type_t depending on ECMA_OBJECT_FLAG_BUILT_IN_OR_LEXICAL_ENV @@ -891,7 +891,7 @@ typedef enum /** * ECMA string-value descriptor */ -typedef struct ecma_string_t +typedef struct { /** Reference counter for the string */ uint16_t refs_and_container; diff --git a/jerry-core/jmem/jmem-allocator.h b/jerry-core/jmem/jmem-allocator.h index 4b8a04869..19272b111 100644 --- a/jerry-core/jmem/jmem-allocator.h +++ b/jerry-core/jmem/jmem-allocator.h @@ -103,9 +103,9 @@ typedef struct /** * Node for free chunk list */ -typedef struct mem_pools_chunk +typedef struct jmem_pools_chunk_t { - struct mem_pools_chunk *next_p; /* pointer to next pool chunk */ + struct jmem_pools_chunk_t *next_p; /* pointer to next pool chunk */ } jmem_pools_chunk_t; /**