Re: [xml] Win32/MSVC Facelift



On Thu, Jul 26, 2001 at 11:55:29AM +0200, Igor  Zlatkovic wrote:
With this, each function would be preceded by XMLCALL, exportable
function would additionally end up preceeded by XMLPUBLIC and exportable
variable would be preceeded by XMLPUBLIC. Then a declaration would be a
thing far easier to understand:

  XMLPUBLIC int XMLCALL xmlSomeFunc(int arg);
  XMLPUBLIC int xmlSomeVar;

Now, that is The Right Highway, not true?

  Well adding one specifier before the declaration is okay. Adding 2
intermixed with the type is not a progress in my opinion ! I don't think
it will make it more readable for human, but I'm pretty sure it will
make it far harder for processing tools. 
  No I don't like this. One extra keyword is enough of a pain, and
this should not impact the declaration itself. I vetoe this out.

   XMLPUBLICFUNC
   int xmlSomeFunc(int arg);

   XMLPUBLICVAR
   int xmlSomeVar;

   If you provide patches for this I will incorporate them,

What this takes is 

  #if defined _MSC_VER
  #pragma pack(push, 8)
  #endif

at the beginning of every header file and a

  #if defined _MSC_VER
  #pragma pack(pop)
  #endif

at the end of every header file. Wanna have this in all headers? After a
time, one gets used to it, I must admit :-)) I am still against it, but
that is parhaps because I look at it every day and find relief when I
can see a header which doesn't begin that way :-))

  There is already similar cruft for the C++ compilers. This makes me 
sick to add one more of those, what does this bring ? Why is alignment
a concern ? 
  Can this and the C++ wrappers be put in HEADER_START and HEADER_END
macros ? This would keep the header cleans and allow customization from
the win32config.h header (or any other system specific one) without
having to modify everything each time there is a new compiler showing up !!!

Daniel

-- 
Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
veillard redhat com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
Sep 17-18 2001 Brussels Red Hat TechWorld http://www.redhat-techworld.com




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