diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/mruby.h | 4 | ||||
| -rw-r--r-- | include/mruby/array.h | 4 | ||||
| -rw-r--r-- | include/mruby/compile.h | 7 | ||||
| -rw-r--r-- | include/mruby/khash.h | 2 | ||||
| -rw-r--r-- | include/mruby/string.h | 8 |
5 files changed, 14 insertions, 11 deletions
diff --git a/include/mruby.h b/include/mruby.h index 25e0bf287..ccb76ebe4 100644 --- a/include/mruby.h +++ b/include/mruby.h @@ -1,7 +1,7 @@ /* ** mruby - An embeddable Ruby implementation ** -** Copyright (c) mruby developers 2010-2020 +** Copyright (c) mruby developers 2010-2021 ** ** Permission is hereby granted, free of charge, to any person obtaining ** a copy of this software and associated documentation files (the @@ -22,7 +22,7 @@ ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ** -** [ MIT license: http://www.opensource.org/licenses/mit-license.php ] +** [ MIT license: https://www.opensource.org/licenses/mit-license.php ] */ /** diff --git a/include/mruby/array.h b/include/mruby/array.h index 34011d537..da811606a 100644 --- a/include/mruby/array.h +++ b/include/mruby/array.h @@ -64,7 +64,7 @@ struct RArray { #define ARY_SET_EMBED_LEN(a,len) ((a)->flags = ((a)->flags&~MRB_ARY_EMBED_MASK) | ((uint32_t)(len) + 1)) #define ARY_EMBED_PTR(a) ((a)->as.ary) #endif - + #define ARY_LEN(a) (ARY_EMBED_P(a)?ARY_EMBED_LEN(a):(a)->as.heap.len) #define ARY_PTR(a) (ARY_EMBED_P(a)?ARY_EMBED_PTR(a):(a)->as.heap.ptr) #define RARRAY_LEN(a) ARY_LEN(RARRAY(a)) @@ -296,7 +296,7 @@ MRB_API mrb_value mrb_ary_clear(mrb_state *mrb, mrb_value self); * * @param mrb The mruby state reference. * @param ary The target array - * @param sep The separater, can be NULL + * @param sep The separator, can be NULL */ MRB_API mrb_value mrb_ary_join(mrb_state *mrb, mrb_value ary, mrb_value sep); diff --git a/include/mruby/compile.h b/include/mruby/compile.h index 7b5da4f69..8159cd696 100644 --- a/include/mruby/compile.h +++ b/include/mruby/compile.h @@ -99,6 +99,9 @@ enum mrb_string_type { /* heredoc structure */ struct mrb_parser_heredoc_info { mrb_bool allow_indent:1; + mrb_bool remove_indent:1; + size_t indent; + mrb_ast_node *indented; mrb_bool line_head:1; enum mrb_string_type type; const char *term; @@ -182,8 +185,8 @@ MRB_API struct mrb_parser_state* mrb_parse_nstring(mrb_state*,const char*,size_t MRB_API struct RProc* mrb_generate_code(mrb_state*, struct mrb_parser_state*); MRB_API mrb_value mrb_load_exec(mrb_state *mrb, struct mrb_parser_state *p, mrbc_context *c); -/** program load functions -* Please note! Currently due to interactions with the GC calling these functions will +/** program load functions +* Please note! Currently due to interactions with the GC calling these functions will * leak one RProc object per function call. * To prevent this save the current memory arena before calling and restore the arena * right after, like so diff --git a/include/mruby/khash.h b/include/mruby/khash.h index 4884ba73c..1fb6eecbb 100644 --- a/include/mruby/khash.h +++ b/include/mruby/khash.h @@ -91,7 +91,7 @@ kh_fill_flags(uint8_t *p, uint8_t c, size_t len) khval_t: value data type kh_is_map: (0: hash set / 1: hash map) __hash_func: hash function - __hash_equal: hash comparation function + __hash_equal: hash comparison function */ #define KHASH_DEFINE(name, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal) \ mrb_noreturn void mrb_raise_nomemory(mrb_state *mrb); \ diff --git a/include/mruby/string.h b/include/mruby/string.h index d53f09e96..4410accd5 100644 --- a/include/mruby/string.h +++ b/include/mruby/string.h @@ -159,7 +159,7 @@ MRB_API mrb_int mrb_str_index(mrb_state *mrb, mrb_value str, const char *p, mrb_ * * mrb_close(mrb); * return 0; - * } + * } * * Result: * @@ -345,9 +345,9 @@ MRB_API mrb_value mrb_str_new_capa(mrb_state *mrb, size_t capa); MRB_API const char *mrb_string_cstr(mrb_state *mrb, mrb_value str); /* NULL terminated C string from mrb_value; `str` will be updated */ MRB_API const char *mrb_string_value_cstr(mrb_state *mrb, mrb_value *str); -/* obslete: use RSTRING_PTR() */ +/* obsolete: use RSTRING_PTR() */ MRB_API const char *mrb_string_value_ptr(mrb_state *mrb, mrb_value str); -/* obslete: use RSTRING_LEN() */ +/* obsolete: use RSTRING_LEN() */ MRB_API mrb_int mrb_string_value_len(mrb_state *mrb, mrb_value str); /** @@ -433,7 +433,7 @@ MRB_API int mrb_str_cmp(mrb_state *mrb, mrb_value str1, mrb_value str2); * - Returned string does not contain any NUL characters (but terminator). * - It raises an ArgumentError exception if Ruby string contains * NUL characters. - * - Retured string will be freed automatically on next GC. + * - Returned string will be freed automatically on next GC. * - Caller can modify returned string without affecting Ruby string * (e.g. it can be used for mkstemp(3)). * |
