* defvar in dynamic modules
@ 2014-11-26 18:06 Aurélien Aptel
2014-11-26 18:28 ` Ted Zlatanov
2014-11-26 19:58 ` Stefan Monnier
0 siblings, 2 replies; 3+ messages in thread
From: Aurélien Aptel @ 2014-11-26 18:06 UTC (permalink / raw)
To: Emacs development discussions
Hi,
Variables defined with DEFVAR are currently stored as a field in a
global struct. This has to do with the emacs multi-threading attempt.
What should we do for modules? We can't dynamically add fields to the struct.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: defvar in dynamic modules
2014-11-26 18:06 defvar in dynamic modules Aurélien Aptel
@ 2014-11-26 18:28 ` Ted Zlatanov
2014-11-26 19:58 ` Stefan Monnier
1 sibling, 0 replies; 3+ messages in thread
From: Ted Zlatanov @ 2014-11-26 18:28 UTC (permalink / raw)
To: emacs-devel
On Wed, 26 Nov 2014 19:06:34 +0100 Aurélien Aptel <aurelien.aptel+emacs@gmail.com> wrote:
AA> Variables defined with DEFVAR are currently stored as a field in a
AA> global struct. This has to do with the emacs multi-threading attempt.
AA> What should we do for modules? We can't dynamically add fields to the struct.
Can modules be limited to only providing functions and can those be
added dynamically?
Ted
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: defvar in dynamic modules
2014-11-26 18:06 defvar in dynamic modules Aurélien Aptel
2014-11-26 18:28 ` Ted Zlatanov
@ 2014-11-26 19:58 ` Stefan Monnier
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2014-11-26 19:58 UTC (permalink / raw)
To: Aurélien Aptel; +Cc: Emacs development discussions
> Variables defined with DEFVAR are currently stored as a field in a
> global struct. This has to do with the emacs multi-threading attempt.
> What should we do for modules? We can't dynamically add fields to the struct.
Good point. Currently I think you have to do something like:
Lisp_Object Qmyvar = intern ("myvar");
and then use find_symbol_value(Qmyvar) whenever you need to lookup
its value.
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-11-26 19:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-26 18:06 defvar in dynamic modules Aurélien Aptel
2014-11-26 18:28 ` Ted Zlatanov
2014-11-26 19:58 ` Stefan Monnier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.