[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A question about struct coding_system
From: |
Andreas Schwab |
Subject: |
Re: A question about struct coding_system |
Date: |
Mon, 21 Nov 2011 17:55:37 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (gnu/linux) |
Dmitry Antipov <address@hidden> 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, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."