unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: Dmitry Antipov <antipov@mvista.com>
Cc: emacs-devel@gnu.org
Subject: Re: A question about struct coding_system
Date: Mon, 21 Nov 2011 17:55:37 +0100	[thread overview]
Message-ID: <m24nxx76uu.fsf@igel.home> (raw)
In-Reply-To: <4ECA78BD.4040904@yandex.ru> (Dmitry Antipov's message of "Mon, 21 Nov 2011 20:13:49 +0400")

Dmitry Antipov <antipov@mvista.com> writes:

> At a first glance, struct coding_system should be a vector-like
> object with src_object and dst_object at the beginning. But it
> isn't, and it looks like that src_object and dst_object are never
> marked directly. Thus, it should be guaranteed that, for any
> coding_system, objects referenced by src_object and dst_object
> are always reachable from another live objects. But I can't
> find any code that takes care about this, so I don't understand
> why and how it works at all :-(.

It's generally the duty of the caller to protect the object.  If it is a
buffer it should be the current buffer.  If it is passed in from Lisp it
is already protected.  Other cases should be explicitly protected.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



  reply	other threads:[~2011-11-21 16:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-21 16:13 A question about struct coding_system Dmitry Antipov
2011-11-21 16:55 ` Andreas Schwab [this message]
2011-11-21 20:22   ` Stefan Monnier
2011-11-21 20:32     ` Andreas Schwab
2011-11-21 17:47 ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m24nxx76uu.fsf@igel.home \
    --to=schwab@linux-m68k.org \
    --cc=antipov@mvista.com \
    --cc=emacs-devel@gnu.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).