From 156764618710cb058307181ef2c92796857feb39 Mon Sep 17 00:00:00 2001 From: Noel Warren Date: Sun, 20 Jul 2025 18:22:46 +0200 Subject: [PATCH] Add include guards to headers --- ext/attribute_dictionaries.h | 7 ++++++- ext/attribute_dictionary.h | 7 ++++++- ext/behavior.h | 7 ++++++- ext/color.h | 7 ++++++- ext/component_definition.h | 7 ++++++- ext/component_instance.h | 7 ++++++- ext/definition_list.h | 7 ++++++- ext/drawing_element.h | 7 ++++++- ext/entities.h | 7 ++++++- ext/entity.h | 7 ++++++- ext/material.h | 7 ++++++- ext/materials.h | 7 ++++++- ext/model.h | 7 ++++++- ext/not_implemented.h | 6 ++++++ ext/sketchup.h | 7 ++++++- ext/texture.h | 7 ++++++- ext/typed_value.h | 6 ++++++ ext/utils.h | 9 ++++++--- 18 files changed, 108 insertions(+), 18 deletions(-) diff --git a/ext/attribute_dictionaries.h b/ext/attribute_dictionaries.h index 9dcb601..94fc1ac 100644 --- a/ext/attribute_dictionaries.h +++ b/ext/attribute_dictionaries.h @@ -1,3 +1,8 @@ +#ifndef SCRIPTUP_ATTRIBUTE_DICTIONARIES_H +#define SCRIPTUP_ATTRIBUTE_DICTIONARIES_H + #include -VALUE AttributeDictionaries_Init(VALUE namespace_object, VALUE parent_class); \ No newline at end of file +VALUE AttributeDictionaries_Init(VALUE namespace_object, VALUE parent_class); + +#endif // SCRIPTUP_ATTRIBUTE_DICTIONARIES_H \ No newline at end of file diff --git a/ext/attribute_dictionary.h b/ext/attribute_dictionary.h index a4dc9e9..891bab1 100644 --- a/ext/attribute_dictionary.h +++ b/ext/attribute_dictionary.h @@ -1,3 +1,8 @@ +#ifndef SCRIPTUP_ATTRIBUTE_DICTIONARY_H +#define SCRIPTUP_ATTRIBUTE_DICTIONARY_H + #include -VALUE AttributeDictionary_Init(VALUE namespace_object, VALUE parent_class); \ No newline at end of file +VALUE AttributeDictionary_Init(VALUE namespace_object, VALUE parent_class); + +#endif // SCRIPTUP_ATTRIBUTE_DICTIONARY_H \ No newline at end of file diff --git a/ext/behavior.h b/ext/behavior.h index 2aa6079..97769f0 100644 --- a/ext/behavior.h +++ b/ext/behavior.h @@ -1,3 +1,8 @@ +#ifndef SCRIPTUP_BEHAVIOR_H +#define SCRIPTUP_BEHAVIOR_H + #include -VALUE Behavior_Init(VALUE namespace_object, VALUE parent_class); \ No newline at end of file +VALUE Behavior_Init(VALUE namespace_object, VALUE parent_class); + +#endif // SCRIPTUP_BEHAVIOR_H \ No newline at end of file diff --git a/ext/color.h b/ext/color.h index 7b01fdf..ddcb060 100644 --- a/ext/color.h +++ b/ext/color.h @@ -1,3 +1,8 @@ +#ifndef SCRIPTUP_COLOR_H +#define SCRIPTUP_COLOR_H + #include -void Color_Init(VALUE namespace_object, VALUE parent_class); \ No newline at end of file +void Color_Init(VALUE namespace_object, VALUE parent_class); + +#endif // SCRIPTUP_COLOR_H \ No newline at end of file diff --git a/ext/component_definition.h b/ext/component_definition.h index adbf6d7..6320f49 100644 --- a/ext/component_definition.h +++ b/ext/component_definition.h @@ -1,3 +1,8 @@ +#ifndef SCRIPTUP_COMPONENT_DEFINITION_H +#define SCRIPTUP_COMPONENT_DEFINITION_H + #include -VALUE ComponentDefinition_Init(VALUE namespace_object, VALUE parent_class); \ No newline at end of file +VALUE ComponentDefinition_Init(VALUE namespace_object, VALUE parent_class); + +#endif // SCRIPTUP_COMPONENT_DEFINITION_H \ No newline at end of file diff --git a/ext/component_instance.h b/ext/component_instance.h index 09fd43b..259b927 100644 --- a/ext/component_instance.h +++ b/ext/component_instance.h @@ -1,3 +1,8 @@ +#ifndef SCRIPTUP_COMPONENT_INSTANCE_H +#define SCRIPTUP_COMPONENT_INSTANCE_H + #include -VALUE ComponentInstance_Init(VALUE namespace_object, VALUE parent_class); \ No newline at end of file +VALUE ComponentInstance_Init(VALUE namespace_object, VALUE parent_class); + +#endif // SCRIPTUP_COMPONENT_INSTANCE_H \ No newline at end of file diff --git a/ext/definition_list.h b/ext/definition_list.h index 7f9bbb2..413b848 100644 --- a/ext/definition_list.h +++ b/ext/definition_list.h @@ -1,3 +1,8 @@ +#ifndef SCRIPTUP_DEFINITION_LIST_H +#define SCRIPTUP_DEFINITION_LIST_H + #include -VALUE DefinitionList_Init(VALUE namespace_object, VALUE parent_class); \ No newline at end of file +VALUE DefinitionList_Init(VALUE namespace_object, VALUE parent_class); + +#endif // SCRIPTUP_DEFINITION_LIST_H \ No newline at end of file diff --git a/ext/drawing_element.h b/ext/drawing_element.h index 14fb155..49763e1 100644 --- a/ext/drawing_element.h +++ b/ext/drawing_element.h @@ -1,3 +1,8 @@ +#ifndef SCRIPTUP_DRAWING_ELEMENT_H +#define SCRIPTUP_DRAWING_ELEMENT_H + #include -VALUE DrawingElement_Init(VALUE namespace_object, VALUE parent_class); \ No newline at end of file +VALUE DrawingElement_Init(VALUE namespace_object, VALUE parent_class); + +#endif // SCRIPTUP_DRAWING_ELEMENT_H \ No newline at end of file diff --git a/ext/entities.h b/ext/entities.h index a01df00..a9c8305 100644 --- a/ext/entities.h +++ b/ext/entities.h @@ -1,3 +1,8 @@ +#ifndef SCRIPTUP_ENTITIES_H +#define SCRIPTUP_ENTITIES_H + #include -VALUE Entities_Init(VALUE namespace_object, VALUE parent_class); \ No newline at end of file +VALUE Entities_Init(VALUE namespace_object, VALUE parent_class); + +#endif // SCRIPTUP_ENTITIES_H \ No newline at end of file diff --git a/ext/entity.h b/ext/entity.h index 8411207..1ae0341 100644 --- a/ext/entity.h +++ b/ext/entity.h @@ -1,3 +1,8 @@ +#ifndef SCRIPTUP_ENTITY_H +#define SCRIPTUP_ENTITY_H + #include -VALUE Entity_Init(VALUE namespace_object, VALUE parent_class); \ No newline at end of file +VALUE Entity_Init(VALUE namespace_object, VALUE parent_class); + +#endif // SCRIPTUP_ENTITY_H \ No newline at end of file diff --git a/ext/material.h b/ext/material.h index 4ad2e59..11561e1 100644 --- a/ext/material.h +++ b/ext/material.h @@ -1,3 +1,8 @@ +#ifndef SCRIPTUP_MATERIAL_H +#define SCRIPTUP_MATERIAL_H + #include -void Material_Init(VALUE namespace_object, VALUE parent_class); \ No newline at end of file +void Material_Init(VALUE namespace_object, VALUE parent_class); + +#endif // SCRIPTUP_MATERIAL_H \ No newline at end of file diff --git a/ext/materials.h b/ext/materials.h index eef5b80..6e344c2 100644 --- a/ext/materials.h +++ b/ext/materials.h @@ -1,3 +1,8 @@ +#ifndef SCRIPTUP_MATERIALS_H +#define SCRIPTUP_MATERIALS_H + #include -VALUE Materials_Init(VALUE namespace_object, VALUE parent_class); \ No newline at end of file +VALUE Materials_Init(VALUE namespace_object, VALUE parent_class); + +#endif // SCRIPTUP_MATERIALS_H \ No newline at end of file diff --git a/ext/model.h b/ext/model.h index 731f4dd..7283eed 100644 --- a/ext/model.h +++ b/ext/model.h @@ -1,3 +1,8 @@ +#ifndef SCRIPTUP_MODEL_H +#define SCRIPTUP_MODEL_H + #include -VALUE Model_Init(VALUE namespace_object, VALUE parent_class); \ No newline at end of file +VALUE Model_Init(VALUE namespace_object, VALUE parent_class); + +#endif // SCRIPTUP_MODEL_H \ No newline at end of file diff --git a/ext/not_implemented.h b/ext/not_implemented.h index 2e0b5d4..dae9a46 100644 --- a/ext/not_implemented.h +++ b/ext/not_implemented.h @@ -1,3 +1,6 @@ +#ifndef SCRIPTUP_NOT_IMPLEMENTED_H +#define SCRIPTUP_NOT_IMPLEMENTED_H + #include VALUE BoundingBox_Init(VALUE namespace_object, VALUE parent_class); @@ -11,3 +14,6 @@ VALUE Group_Init(VALUE namespace_object, VALUE parent_class); VALUE Image_Init(VALUE namespace_object, VALUE parent_class); VALUE SectionPlane_Init(VALUE namespace_object, VALUE parent_class); VALUE Text_Init(VALUE namespace_object, VALUE parent_class); + + +#endif // SCRIPTUP_NOT_IMPLEMENTED_H \ No newline at end of file diff --git a/ext/sketchup.h b/ext/sketchup.h index ae4c395..4422485 100644 --- a/ext/sketchup.h +++ b/ext/sketchup.h @@ -1,4 +1,9 @@ +#ifndef SCRIPTUP_SKETCHUP_H +#define SCRIPTUP_SKETCHUP_H + #include SUModelRef Sketchup_get_active_model(); -void Sketchup_set_active_model(SUModelRef model); \ No newline at end of file +void Sketchup_set_active_model(SUModelRef model); + +#endif // SCRIPTUP_SKETCHUP_H \ No newline at end of file diff --git a/ext/texture.h b/ext/texture.h index dfa0813..583f32e 100644 --- a/ext/texture.h +++ b/ext/texture.h @@ -1,3 +1,8 @@ +#ifndef SCRIPTUP_TEXTURE_H +#define SCRIPTUP_TEXTURE_H + #include -void Texture_Init(VALUE namespace_object, VALUE parent_class); \ No newline at end of file +void Texture_Init(VALUE namespace_object, VALUE parent_class); + +#endif // SCRIPTUP_TEXTURE_H \ No newline at end of file diff --git a/ext/typed_value.h b/ext/typed_value.h index 9738838..b52df7d 100644 --- a/ext/typed_value.h +++ b/ext/typed_value.h @@ -1,5 +1,11 @@ +#ifndef SCRIPTUP_TYPED_VALUE_H +#define SCRIPTUP_TYPED_VALUE_H + #include #include VALUE TypedValue_get_value_type(SUTypedValueRef* typedValue); VALUE TypedValue_set_value_type(SUTypedValueRef* typedValue, VALUE value); + + +#endif // SCRIPTUP_TYPED_VALUE_H \ No newline at end of file diff --git a/ext/utils.h b/ext/utils.h index a576c11..744af94 100644 --- a/ext/utils.h +++ b/ext/utils.h @@ -1,6 +1,8 @@ +#ifndef SCRIPTUP_UTILS_H +#define SCRIPTUP_UTILS_H + #include -#ifndef UTILS_H #ifdef TEXT #undef TEXT #endif //TEXT @@ -101,6 +103,7 @@ GETUTF8FROMSTRING(name, output); \ SUStringRelease(&name); \ } -#endif // UTILS_H -#pragma clang diagnostic pop \ No newline at end of file +#pragma clang diagnostic pop + +#endif // SCRIPTUP_UTILS_H \ No newline at end of file