aspell-devel
[Top][All Lists]
Advanced

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

Re: [aspell-devel] MSYS patch


From: Gary Setter
Subject: Re: [aspell-devel] MSYS patch
Date: Mon, 7 Feb 2005 19:54:33 -0600

----- Original Message ----- 
From: "Kevin Atkinson" <address@hidden>
To: "Gary Setter" <address@hidden>
Cc: <address@hidden>; <address@hidden>
Sent: Monday, February 07, 2005 1:17 PM
Subject: Re: [aspell-devel] MSYS patch


> On Mon, 7 Feb 2005, Gary Setter wrote:
>
> > > On Sun, 6 Feb 2005, Gary Setter wrote:
> > >
> > > > Whould you consider saving the the handle of the aspell
lib at
> > > > the time you do your LoadLibrary and define
get_module_handle()
> > > > to return that handle?
> > >
> > > Please submit a patch.
> > >
> > My plan was to submit that patch at the time each exported
> > function was marked with the ASPELL_API macro. I could submit
> > that in the next day or two, but until the c interface is
> > complete, the marking of exported functions will be
incomplete.
>
> How does this relate to exported functions?

I looked at exporting functions and managing the handle for the
dll as two parts of the same project. You could load a library
without exporting functions, but that didn't seem usefull to me.
Understand that I'm used to looking at things from a win32 point
of view and I don't normally export all the functions from a dll.
>
> > > > I thought the project was moving in the direction of a c
> > > > only interface. Are we there yet?
> > >
> > > No.  Its is getting closer.
> > >
> >  Release early, release often?
>
> I recently uploaded a snapshot.  I will upload another one is a
week or
> so.
>
>
> >
> > What about the generated files? I can visualize aspell.h
being
> > generated based on the ASPELL_API macro, but I still don't
> > understand how something like check_info.hpp is generated.
> > I just searched all the files distributed with the last
alpha,
> > and CheckInfo only shows up in check_info.hpp. Are all the
> > "Automatically generated file." comments up to date?
>
> Yes.  The stuff is generated by the mk-src.pl Perl program in
the auto/
> directory.
>

I found auto/mk-src.in. It looks like black magic to me.

You did get the idea to export a function, I'd hoped for the
ASPELL_API between extern "C" and the return type.
Something like this:
extern "C" ASPELL_API void aspell_gettext_init();

or to export a const
extern "C" ASPELL_API const ErrorInfo * const aerror_other;

One last thing. I discovered that I had macros that I could use
to determine if I was making a dll or not. So I could reduce the
number of macro that I needed to define myself. I'm thinking of
putting something like this in win32/settings.h
#if defined(ASPELL_NO_EXPORTS)
 #define ASPELL_API
#elif defined(_WINDLL) || defined(_USRDLL)
 #define ASPELL_API  _declspec(dllexport)
#else
 #define ASPELL_API  _declspec(dllimport)
#endif /*_DLL */

In the non - Windows settings.h I would just have this:
 #define ASPELL_API





reply via email to

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