Author jaraco
Recipients giampaolo.rodola, jafo, jaraco, lemburg, loewis, nnorwitz, swarren
Date 2009-05-22.04:21:31
SpamBayes Score 2.28083e-06
Marked as misclassified No
Message-id <1242966100.94.0.996788852311.issue1578269@psf.upfronthosting.co.za>
In-reply-to
Content
Thanks very much for the tips Martin.

I cleaned up the function per your suggestions.  I also implemented
islink by setting two flags in st_mode if the file is a symlink.  The
implementation was a little convoluted, but it might just work.

The current patch does compile for me with just a few compiler warnings,
which I hope can be easily shaken out.

..\..\Modules\posixmodule.c(4794) : warning C4013: 'CreateSymbolicLink'
undefined; assuming extern returning int
..\..\Modules\posixmodule.c(4803) : warning C4133: 'function' :
incompatible types - from 'PyObject *' to 'char *'
..\..\Modules\posixmodule.c(7174) : warning C4113: 'PyObject *(__cdecl
*)(PyObject *,PyObject *,PyObject *)' differs in parameter lists from
'PyCFunction'

The first warning might be a problem.  I understand from the docs
(http://msdn.microsoft.com/en-us/library/aa363866.aspx) that all I need
to do is include windows.h, which is already included... but still the
function prototype isn't present.  This might be because a preprocessor
declaration of WINVER isn't set high enough... but since the same
executable is built for all versions of Windows, how is this reconciled
in the compiler?
History
Date User Action Args
2009-05-22 04:21:41jaracosetrecipients: + jaraco, lemburg, loewis, nnorwitz, jafo, giampaolo.rodola, swarren
2009-05-22 04:21:40jaracosetmessageid: <1242966100.94.0.996788852311.issue1578269@psf.upfronthosting.co.za>
2009-05-22 04:21:39jaracolinkissue1578269 messages
2009-05-22 04:21:35jaracocreate