Sorry for the line wrapping...
The code below is from Win32::GUI v0.0.665 GUI.xs:

        // #### add (or create) the tooltip
        if(perlcs.szTip != NULL) {
                        if(perlcs.hvParent != NULL) {
                                if(perlcs.hTooltip == NULL) {
                                        SV** t;
                                        t = hv_fetch_mg(NOTXSCALL perlcs.hvParent, 
"-tooltip", 8, 0);
                                        if(t != NULL) {
---->                                        perlcs.hTooltip = (HWND) SvIV(*t);
                                        }
                                }
                                if(perlcs.hTooltip == NULL) {
#ifdef PERLWIN32GUI_STRONGDEBUG
                                    printf("XS(Create): creating 
-tooltip...\n");
#endif
                                        perlcs.hTooltip = 
CreateTooltip(NOTXSCALL perlcs.hvParent);
                                }
                        }

The line that I've marked with ----> (line 641 of the released gui.xs) produces a warning, text below:

Use of uninitialized value in subroutine entry at C:/Perl/site/lib/Win32/GUI.pm line 524

The referenced line is a call to Win32::GUI::Create.

It seems like maybe the first -tip option defined in a subwindow results in this warning. So it would appear that dereferencing SvIV(*t) is what produces the warning. I don't (yet) speak XS well enough to say anything more about what the bug might be, such that the warning is generated.

I have some questions:

1) Does anyone else have sufficient knowledge to say anything more about how to fix the problem?

2) Is there an easy way to see what (source) line of Perl is being executed when debugging using VC++ and stepping through C code?

2b) Maybe a better question would be if there is a writeup or suggestions for debugging XS code under Win32

3) When first starting Perl in the debugger, it claims that it's symbol is from a file named "perlmain.c" which doesn't seem to exist (for Win32) in ActiveState Perl build 805. What does this really mean?

3b) [Somewhat off-topic for this group] There was a perlmain.c under the wince directory, but clearly it was the wrong one. Once a VC "workspace for debugging" was told that association, though, it "remembered" it, and I had to throw that workspace away, and start a new one to "disassociate" that file from the startup. Is there an easier way to do such disassociations?

After tomorrow, I probably won't be reading this group for about a week, but I'll try to respond when I next get a chance.

--
Glenn
=====
Wise men talk because they have something to say.
Fools talk because they have to say something." -- Plato


Reply via email to