Re: [xml] Release of libxml2-2.4.21
- From: Igor Zlatkovic <igor stud fh-frankfurt de>
- To: "Aleksey Sanin" <aleksey aleksey com>
- Cc: <xml gnome org>
- Subject: Re: [xml] Release of libxml2-2.4.21
- Date: Tue, 30 Apr 2002 18:26:35 +0200
Hello,
I will need this functions for Win32 port of XML Sec Library so I have
to update these files :) I think I know another way of exportng functions
on Windows. The basic idea is that the "export" directive is specified
in the function and not in the *.def file.
To go this way we will need to
1) in xmlsec.h put something like this (do not remember exact syntax
but
it's a matter of checking help):
#ifdef _WINDOWS
#define LIBXML_EXPORT __declspec( dllexport )
#else /* _WINDOWS */
#define LIBXML_EXPORT
#endif /* _WINDOWS */
2) update all exported function decalarations and definitions in *.h
and *.c
as follows:
xmlNsPtr xmlNewNs(xmlNodePtr node, const xmlChar *href, const
xmlChar *prefix);
is converted to
LIBXML_EXPORT xmlNsPtr xmlNewNs(xmlNodePtr node, const xmlChar
*href, const xmlChar *prefix);
We can go a "lazy" way and say that all new functions should follow this
rule and keep
current *.def for existing function (with a goal to replace it other the
time).
The macro is there (in xmlconfig.h and win32config.h) and is called
LIBXML_DLL_IMPORT. The similar approach is used when importing variables,
but that only because it is absolutely necessary.
I have asked the community about this approach in the past. Most of those
who replied were against it, because it would put the responsibility of
using that macro on every libxml developer, no matter what platform she
uses, and because this macro would not exactly make the header files look
nicer. That was the birthday of *.def.src files :-)
Ciao
Igor
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]