# HG changeset patch # User Jason R. Coombs # Date 1251943296 14400 # Branch py3k # Node ID 2ba9a1d659dbbdd499fb9f0e455181995da8ac83 # Parent afad025a9cda220fd1a988f9b71e1341a687fb16 Changed order of parameters to be consistent with Unix behavior. diff -r afad025a9cda -r 2ba9a1d659db Modules/posixmodule.c --- a/Modules/posixmodule.c Sat Jun 06 16:38:17 2009 -0400 +++ b/Modules/posixmodule.c Wed Sep 02 22:01:36 2009 -0400 @@ -4962,8 +4962,8 @@ } PyDoc_STRVAR(win_symlink__doc__, -"symlink(src, dest, target_is_directory=False)\n\n\ -Create a symbolic link pointo to src named dst.\n\n\ +"symlink(src, dst, target_is_directory=False)\n\n\ +Create a symbolic link pointing to src named dst.\n\n\ target_is_directory is required if the target is to be interpreted as\n\n\ a directory.\\\ This function requires Windows 6.0 or greater, and raises a\n\n\ @@ -4993,10 +4993,10 @@ return NULL; } - /* if dest is a directory, ensure target_is_directory==1 */ + /* if src is a directory, ensure target_is_directory==1 */ if( Py_GetFileAttributesExW( - PyUnicode_AsUnicode(dest), GetFileExInfoStandard, &dest_info + PyUnicode_AsUnicode(src), GetFileExInfoStandard, &dest_info )) { target_is_directory = target_is_directory || @@ -5005,8 +5005,8 @@ Py_BEGIN_ALLOW_THREADS res = Py_CreateSymbolicLinkW( + PyUnicode_AsUnicode(dest), PyUnicode_AsUnicode(src), - PyUnicode_AsUnicode(dest), target_is_directory); Py_END_ALLOW_THREADS Py_DECREF(src);