From: Nikita Pettik <korablev@tarantool.org> To: tarantool-patches@dev.tarantool.org Cc: v.shpilevoy@tarantool.org Subject: [Tarantool-patches] [PATCH v3 3/6] box/error: clarify purpose of reference counting in struct error Date: Mon, 6 Apr 2020 17:17:12 +0300 [thread overview] Message-ID: <ec0cf87efacd3017ed7ea5830edb476c393f34de.1586181413.git.korablev@tarantool.org> (raw) In-Reply-To: <cover.1586181413.git.korablev@tarantool.org> In-Reply-To: <cover.1586181413.git.korablev@tarantool.org> --- src/lib/core/diag.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/lib/core/diag.h b/src/lib/core/diag.h index 9c238f5a2..7a5454d1c 100644 --- a/src/lib/core/diag.h +++ b/src/lib/core/diag.h @@ -71,6 +71,15 @@ struct error { error_f raise; error_f log; const struct type_info *type; + /** + * Reference counting is basically required since + * instances of this structure are available in Lua + * as well (as cdata with overloaded fields and methods + * by the means of introspection). Thus, it may turn + * out that Lua's GC attempts at releasing object + * meanwhile it is still used in C internals or vice + * versa. For details see luaT_pusherror(). + */ int refs; /** * Errno at the moment of the error -- 2.17.1
next prev parent reply other threads:[~2020-04-06 14:17 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-06 14:17 [Tarantool-patches] [PATCH v3 0/6] Stacked diagnostics Nikita Pettik 2020-04-06 14:17 ` [Tarantool-patches] [PATCH v3 1/6] box: introduce stacked diagnostic area Nikita Pettik 2020-04-06 14:17 ` [Tarantool-patches] [PATCH v3 2/6] box: use stacked diagnostic area for functional indexes Nikita Pettik 2020-04-06 14:17 ` Nikita Pettik [this message] 2020-04-06 14:17 ` [Tarantool-patches] [PATCH v3 4/6] iproto: refactor error encoding with mpstream Nikita Pettik 2020-04-06 14:17 ` [Tarantool-patches] [PATCH v3 5/6] box: always promote error created via box.error() to diag Nikita Pettik 2020-04-06 14:17 ` [Tarantool-patches] [PATCH v3 6/6] iproto: support error stacked diagnostic area Nikita Pettik 2020-04-07 11:13 ` [Tarantool-patches] [PATCH v3 0/6] Stacked diagnostics Kirill Yukhin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=ec0cf87efacd3017ed7ea5830edb476c393f34de.1586181413.git.korablev@tarantool.org \ --to=korablev@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH v3 3/6] box/error: clarify purpose of reference counting in struct error' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox