From e9e17be24eba558c30fcdc41ea5bb9a1da7fd4e7 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 12 Mar 2024 22:39:09 -0400 Subject: mark modules as @safe: (& identify what is not) --- org/default_misc.org | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'org/default_misc.org') diff --git a/org/default_misc.org b/org/default_misc.org index fd5681f..22a9781 100644 --- a/org/default_misc.org +++ b/org/default_misc.org @@ -29,6 +29,7 @@ default settings +/ module doc_reform.meta.defaults; +@safe: <> <> <> @@ -42,7 +43,7 @@ module doc_reform.meta.defaults; #+NAME: meta_defaults_template_node #+BEGIN_SRC d template spineNode() { - @safe static string[string] node_metadata_heading_str() { + static string[string] node_metadata_heading_str() { string[string] _node = [ "is" : "", "ocn" : "", @@ -53,7 +54,7 @@ template spineNode() { ]; return _node; } - @safe static int[string] node_metadata_heading_int() { + static int[string] node_metadata_heading_int() { int[string] _node = [ "ocn" : 0, // decide whether to use or keep? "ptr_doc_object" : 0, @@ -66,7 +67,7 @@ template spineNode() { ]; return _node; } - @safe static string[string] node_metadata_para_str() { + static string[string] node_metadata_para_str() { string[string] _node = [ "is" : "", "ocn" : "", @@ -74,7 +75,7 @@ template spineNode() { ]; return _node; } - @safe static int[string] node_metadata_para_int() { + static int[string] node_metadata_para_int() { int[string] _node = [ "ocn" : 0, "indent_base" : 0, @@ -91,7 +92,7 @@ template spineNode() { #+NAME: meta_defaults_template_curate_metadata #+BEGIN_SRC d template spineCurateMetadata() { - @safe auto spineCurateMetadata() { + auto spineCurateMetadata() { struct _Curate { struct Curate { string title = ""; @@ -131,7 +132,7 @@ template spineCurateMetadata() { template spineBiblio() { // required: deemed_author (author || editor); year; fulltitle; struct BibJsnStr { - @safe static auto biblio_entry_tags_jsonstr() { + static auto biblio_entry_tags_jsonstr() { string x = `{ "is" : "", "sortby_deemed_author_year_title" : "", @@ -179,6 +180,7 @@ template spineBiblio() { default settings +/ module doc_reform.io_out.defaults; +@safe: <> <> <> @@ -273,7 +275,7 @@ template InternalMarkup() { template spineLanguageCodes() { /+ language codes +/ struct Lang { - @safe static string[string][string] codes() { + static string[string][string] codes() { auto _lang_codes = [ "am": [ "c": "am", "n": "Amharic", "t": "Amharic", "xlp": "amharic" ], "bg": [ "c": "bg", "n": "Bulgarian", "t": "Български (Bəlgarski)", "xlp": "bulgarian" ], @@ -340,15 +342,15 @@ template spineLanguageCodes() { ]; return _lang_codes; } - @safe static string[] code_arr_ptr() { + static string[] code_arr_ptr() { string[] _lang_codes = ["am", "bg", "bn", "br", "ca", "cs", "cy", "da", "de", "el", "en", "eo", "es", "et", "eu", "fi", "fr", "ga", "gl", "he", "hi", "hr", "hy", "ia", "is", "it", "ja", "ko", "la", "lo", "lt", "lv", "ml", "mr", "nl", "no", "nn", "oc", "pl", "pt", "pt_BR", "ro", "ru", "sa", "se", "sk", "sl", "sq", "sr", "sv", "ta", "te", "th", "tk", "tr", "uk", "ur", "us", "vi", "zh", "en", "xx",]; return _lang_codes; } - @safe static string[] code_arr() { + static string[] code_arr() { string[] _lang_codes = ["am", "bg", "bn", "br", "ca", "cs", "cy", "da", "de", "el", "en", "eo", "es", "et", "eu", "fi", "fr", "ga", "gl", "he", "hi", "hr", "hy", "ia", "is", "it", "ja", "ko", "la", "lo", "lt", "lv", "ml", "mr", "nl", "no", "nn", "oc", "pl", "pt", "pt_BR", "ro", "ru", "sa", "se", "sk", "sl", "sq", "sr", "sv", "ta", "te", "th", "tk", "tr", "uk", "ur", "vi", "zh"]; return _lang_codes; } - @safe static auto codes_() { + static auto codes_() { return "(" ~ join(code_arr,"|") ~ ")"; } static auto codes_regex() { -- cgit v1.2.3