[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dynamic loading progress

From: Ted Zlatanov
Subject: Re: Dynamic loading progress
Date: Sun, 03 May 2015 06:55:05 -0400
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)

On Wed, 22 Apr 2015 11:25:51 -0500 Stephen Leake <address@hidden> wrote: 

SL> Ted Zlatanov <address@hidden> writes:

>> I would go simple for now: always make a copy of the string using UTF-8
>> encoding in the args, assuming that the majority of C modules can deal
>> with it, and we can stop worrying about string sharing and encoding for
>> now (we can revisit them later). We should free the copy right after
>> calling so the module doesn't have to free it.

SL> I'm not clear who is freeing what here; the module API does need to
SL> document that clearly.

"We" was Emacs. So the module API will state "passed strings are a
temporary copy that will be freed for you, so don't free() them, but if
you do, it won't break anything."

SL> We also need to document the GCPRO issues;
SL> should the module do GCPRO around the funcall, or does the funcall
SL> handle that?

IMHO Emacs should manage memory, period. Any time modules are given that
responsibility, it's an opportunity for bugs and a premature
optimization. Perhaps we'll find it necessary later to give this
responsibility to some modules, but let's not do it now.

SL> Also, we need to do something about the doc strings for lisp objects
SL> declared in modules. I don't think they need to be available before the
SL> module is loaded; if a particular author wants that, they can define an
SL> elisp wrapper with autoloads.

SL> At a minimum, default doc string should be provided that gives a pointer
SL> to the module source code.

I have no strong opinion on this, but your suggestion sounds fine.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]