[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patch to Octave shutdown procedures
From: |
Jaroslav Hajek |
Subject: |
Re: Patch to Octave shutdown procedures |
Date: |
Wed, 20 May 2009 11:50:36 +0200 |
On Wed, May 20, 2009 at 11:41 AM, Michael Goffioul
<address@hidden> wrote:
> On Wed, May 20, 2009 at 10:18 AM, Jaroslav Hajek <address@hidden> wrote:
>> OK. Can you please give me a short clue about what the
>> OCTAVE_API/OCTINTERP_API tags are all about and what they should do? I
>> have no clue, so I'd like to at least know what I'm doing.
>
> They add context-dependent decoration to the target symbols. Under Win32, it
> tags symbols with __declspec(dllexport) when the DLL is compiled, and with
> __declspec(dllimport) when the DLL is used. This is needed as:
> 1) MSVC does not export all symbols by default
> 2) exporting data requires the dllimport decoration (when used by other code)
> to tell MSVC how to correctly locate and import the symbol from the DLL;
> this is technically not needed for functions, but is mandatory for data.
>
> So for instance, when you declare the following somewhere in liboctave
>
> extern OCTAVE_API int x;
>
> it expands to
>
> extern __declspec(dllexport) int x;
>
> when liboctave is compiled. And it expands to
>
> extern __declspec(dllimport) int x;
>
> when used outside liboctave compilation. This is controlled by the OCTAVE_DLL
> flag. As this is DLL-specific, you need such a mechanism for each DLL, that's
> why you have CRUFT_API, OCTAVE_API and OCTINTERP_API.
>
> So the main line is: if you want a symbol to be part of the API,
> decorate it with
> CRUFT_API, OCTAVE_API or OCTINTERP_API when that symbol is in
> libcruft, liboctave or liboctinterp respectively.
>
> Hope this makes things clearer.
>
Surely does; thanks a lot.
I tagged octave_exit as OCTINTERP_API:
http://hg.savannah.gnu.org/hgweb/octave/rev/00ce0ae4ec63
cheers
--
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
- Re: Patch to Octave shutdown procedures, (continued)
- Re: Patch to Octave shutdown procedures, John Swensen, 2009/05/19
- Re: Patch to Octave shutdown procedures, Jaroslav Hajek, 2009/05/19
- Re: Patch to Octave shutdown procedures, John Swensen, 2009/05/19
- Re: Patch to Octave shutdown procedures, Jaroslav Hajek, 2009/05/19
- Re: Patch to Octave shutdown procedures, John Swensen, 2009/05/19
- Re: Patch to Octave shutdown procedures, Jaroslav Hajek, 2009/05/20
- Re: Patch to Octave shutdown procedures, Jaroslav Hajek, 2009/05/20
- Re: Patch to Octave shutdown procedures, Michael Goffioul, 2009/05/20
- Re: Patch to Octave shutdown procedures, Jaroslav Hajek, 2009/05/20
- Re: Patch to Octave shutdown procedures, Michael Goffioul, 2009/05/20
- Re: Patch to Octave shutdown procedures,
Jaroslav Hajek <=
- Re: Patch to Octave shutdown procedures, Michael Goffioul, 2009/05/20
- Re: Patch to Octave shutdown procedures, Jaroslav Hajek, 2009/05/20
- Re: Patch to Octave shutdown procedures, John Swensen, 2009/05/20
- Re: Patch to Octave shutdown procedures, Jaroslav Hajek, 2009/05/20
- Re: Patch to Octave shutdown procedures, Michael Goffioul, 2009/05/20