I have to delete the one occurrence of the word "inline" in perl-libxml-mm.c. That is, in perl-libxml-mm.c, there's a function declared as 'static inline void'
Probably because C doesn't have inline. Perhaps a compiler switch is needed to enable C99 mode, or at least those features that the compiler can do anyway because they are in C++.

I can't find any such options in the online help. But, using __inline should do the trick. Or, use optimization flags that tell it to inline whatever it feels like. That would be /Ob2, which is included in any of /O1, /O2, or /Ox (size, speed, full, respectively).

If the filehandle is allocated by one dll, the other dll won't know nothing about it - and will throw a tizzy when the filehandle gets passed over to it.
Such is my experience. I remember looking at the RTL source code, and finding that the default heap behavior was being changed during start-up. If they had left it alone, it would have worked just fine. There is a "per process" heap created by Win32 for that very reason. The RTL startup code created a fresh heap and pointed the handle (used by malloc etc.) at that one.

You make a good point about XS in general. Which behavior can it generate that causes memory to be allocated/freed using the normal C routines? That should cause warnings at the very least.

I found the "PlatformSDK for Windows Server 2003 R2" and installed it without any problem. Since you've gotten this far, shoulnd't it be a matter of using the command shell for that set-up and re-running the installer that you already fixed? Or is there still manual work involved?

I recall other discussions saying that the PlatformSDK compiler uses the same simple runtime DLL as Windows itself and the bundled apps. I would suppose that this uses the Process Heap.

Hmm, I looked at the crt source for that, and it's exactly the same as the 8.0 one. It creates its own Win32 Heap at first use. So, if this does link to the same MSVCRT.DLL that is already in Windows, using GetProcessHeap still won't help. The variable _crtheap is not exported.

You could use GetProcessHeaps, which returns handles to all the heaps that are valid for the process. If there is more than one for some reason, you would still have to determine which is the right one that is used by malloc/free. Oh why couldn't they just have used GetProcessHeap instead of HeapCreate?

I think you'd better use the same compiler, or expose malloc/free functions from the Perl DLL that all xs code is required to use. I'm surprised it doesn't do that already.

—John


In reply to Re^9: XML::LibXML on 64-bit Windows (solved) by John M. Dlugosz
in thread XML::LibXML on 64-bit Windows by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.