This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients eryksun, larry, paul.moore, serhiy.storchaka, steve.dower, tim.golden, zach.ware
Date 2016-05-07.11:47:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1462621659.76.0.795336987926.issue26708@psf.upfronthosting.co.za>
In-reply-to
Content
I get the following warnings:

..\Modules\posixmodule.c(7422): warning C4090: 'function': different 'const' qualifiers [...]
..\Modules\posixmodule.c(7423): warning C4090: 'function': different 'const' qualifiers [...]

        target_is_directory |= _check_dirW(src->wide, dst->wide);
        result = Py_CreateSymbolicLinkW(dst->wide, src->wide,
                                        target_is_directory);

..\Modules\posixmodule.c(7429): warning C4090: 'function': different 'const' qualifiers [...]

        result = Py_CreateSymbolicLinkA(dst->narrow, src->narrow,
                                        target_is_directory);

You can change _check_dirW to use LPCWSTR parameters, or const wchar_t * to be consistent with _check_dirA. In this context I prefer the Windows typedefs:

    _check_dirW(LPCWSTR src, LPCWSTR dest)
    _check_dirA(LPCSTR src, LPCSTR dest)

Change Py_CreateSymbolicLink[W|A] to use LPC[W]STR, which is how it's declared in Winbase.h:

    static DWORD (CALLBACK *Py_CreateSymbolicLinkW)(LPCWSTR, LPCWSTR, DWORD) = NULL;
    static DWORD (CALLBACK *Py_CreateSymbolicLinkA)(LPCSTR, LPCSTR, DWORD) = NULL;
History
Date User Action Args
2016-05-07 11:47:39eryksunsetrecipients: + eryksun, paul.moore, larry, tim.golden, zach.ware, serhiy.storchaka, steve.dower
2016-05-07 11:47:39eryksunsetmessageid: <1462621659.76.0.795336987926.issue26708@psf.upfronthosting.co.za>
2016-05-07 11:47:39eryksunlinkissue26708 messages
2016-05-07 11:47:39eryksuncreate