[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Dynamic loading progress
From: |
Daniel Colascione |
Subject: |
Re: Dynamic loading progress |
Date: |
Sun, 15 Feb 2015 09:04:01 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
On 02/15/2015 09:00 AM, Eli Zaretskii wrote:
>> Date: Sun, 15 Feb 2015 05:50:07 -0800
>> From: Daniel Colascione <address@hidden>
>>
>>>> #ifdef WINDOWS
>>>> # ifdef emacs
>>>> # define EMACS_EXPORT __declspec(dllexport)
>>>> # else
>>>> # define EMACS_EXPORT __declspec(dllimport)
>>>> # endif
>>>> # else
>>>> # define EMACS_EXPORT
>>>> #endif
>>>>
>>>> That's because they should be exported by Emacs, but imported by
>>>> modules.
>>>
>>> Right, that makes sense.
>>
>> No it doesn't. Modules shouldn't be importing anything from Emacs: Emacs
>> should _give_ modules a table of all function pointers they need. It's a
>> lot less error-prone that way.
>
> I don't follow: how will the linker succeed in linking the module's
> shared library, if you don't submit to it an import library with the
> symbols in that table you mention? And how do you suggest to produce
> an import library, except by the above decorations?
>
> What am I missing?
Emacs doesn't provide symbols to modules. Modules provide an
initialization function to Emacs: Emacs then calls this initialization
function with a pointer to a C structure containing a table of function
pointers. Modules call these function pointers to do their work. There's
no need for Emacs itself to export any symbols.
signature.asc
Description: OpenPGP digital signature
- Re: Dynamic loading progress, (continued)
- Re: Dynamic loading progress, Stefan Monnier, 2015/02/13
- Re: Dynamic loading progress, Eli Zaretskii, 2015/02/13
- Re: Dynamic loading progress, Stephen Leake, 2015/02/13
- Re: Dynamic loading progress, Stephen Leake, 2015/02/13
- Re: Dynamic loading progress, Eli Zaretskii, 2015/02/14
- Re: Dynamic loading progress, Stephen Leake, 2015/02/14
- Re: Dynamic loading progress, Eli Zaretskii, 2015/02/14
- Re: Dynamic loading progress, Stephen Leake, 2015/02/14
- Re: Dynamic loading progress, Daniel Colascione, 2015/02/15
- Re: Dynamic loading progress, Eli Zaretskii, 2015/02/15
- Re: Dynamic loading progress,
Daniel Colascione <=
- Re: Dynamic loading progress, Eli Zaretskii, 2015/02/15
- Re: Dynamic loading progress, Daniel Colascione, 2015/02/15
- Re: Dynamic loading progress, Eli Zaretskii, 2015/02/15
- Re: Dynamic loading progress, Daniel Colascione, 2015/02/15
- Re: Dynamic loading progress, Eli Zaretskii, 2015/02/15
- Re: Dynamic loading progress, Daniel Colascione, 2015/02/15
- Re: Dynamic loading progress, Aurélien Aptel, 2015/02/16
- Re: Dynamic loading progress, Eli Zaretskii, 2015/02/16
- Re: Dynamic loading progress, Eli Zaretskii, 2015/02/16
- Re: Dynamic loading progress, Daniel Colascione, 2015/02/16