(CC'd vm-dev)
On Mon, Aug 24, 2015 at 12:09 AM, Nicolai Hess <
nicolaihess@web.de> wrote:
And If you want to review the changes:
https://github.com/nicolaihess/pharo-vm/compare/master...nicolaihess:win-long-filename
I don't have a Windows machine to test on, but I perused the changes.
one spelling defect ../platforms/win32/vm/sqWin32.h, line 452 "functiosn"
Now my curiosity is aroused regarding sqFileDeleteNameSize() in [1].
Where does its parameter "char* fileNameIndex" get its null termination?
I can only guess maybe the following definition in primitiveFileDelete.st [2]
<var: 'nameIndex' type: 'char *'>
automatically appends a null to the Smalltalk string. My understanding
is that the Smalltalk string's internal representation is not null
terminated.
I ask since the sqFileDeleteNameSize()'s comment "convert the file
name into a null-terminated C string" indicates the null is added by
MultiByteToWideChar(), but [3] indicates that is not true -- that the
output of MultiByteToWideChar() is only null terminated if the input
is null terminated.