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

Re: SV: [xml] windows binary with different calling



Igor,

Personally (as one of those miserable Windows developers) I'd be happy if
the header files included a macro as part the declaration of every function
which is part of the libxml2 API. The macro would be analogous to the
LIBXML_DLL_IMPORT macro already in place for variables. The macro could be
named something like "LIBXML_ENTRYPOINT" or "LIBXML_API".

In the Windows enviroment, the macro could expand to something like "__cdecl
__declspec(dllexport)" when building the DLL (thereby eliminating the need
for a .def file!), and "__cdecl __declspec(dllimport)" when building
applications which use the DLL. In the Linux world, the macro could expand
to an empty string, just like it does with LIBXML_DLL_IMPORT.

This might seem like this change would be of benefit to Windows developers
only, but I suspect that it would also be of use on one or two other
platforms (maybe VMS?). What is more, it would have the added benefit of
providing a convention for distinguishing those functions which are designed
to be truly part of the libxml2 API from those which are intended for
"internal use only".

> Date: Tue, 03 Jun 2003 02:12:35 +0200
> From: Igor Zlatkovic <igor zlatkovic com>
> To: =?ISO-8859-1?Q?Gustaf_R=E4ntil=E4?= <opera home se>
> Cc: xml gnome org
> Subject: Re: SV: [xml] windows binary with different calling 
> conventions
> 
> Gustaf Räntilä wrote:
> > No, the problems are the header files, not his binaries. They work
> > either way. The difference is if every implementer of libxml should be
> > forced to edit the header files, or use a specific calling conventions
> > even though they practically wouldn't need to. It's only a question
> > about who'll do the job. Igor, Daniel or hundreds of "innocent"
> > developers :-)
> 
> Nono, the question is a different one. Will *you* do it, and get it 
> approved by the majority here, or will hundreds of innocent developers 
> do it, each on their own?
> 
> I won't do it without a very good reason. And I'll pour my precious beer 
> down the toilette if Daniel does it either way :-)

That's OK. Just be sure to filter it through yourself first!

> 
> Ciao,
> Igor

Eric Zurcher
CSIRO Livestock Industries
Canberra, Australia
Eric Zurcher csiro au



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