[MLton-commit] r5215

Vesa Karvonen vesak at mlton.org
Fri Feb 16 01:59:42 PST 2007


Removed C-ism.
----------------------------------------------------------------------

U   mltonlib/trunk/com/ssh/windows/unstable/detail/windows.sml
U   mltonlib/trunk/com/ssh/windows/unstable/public/windows.sig

----------------------------------------------------------------------

Modified: mltonlib/trunk/com/ssh/windows/unstable/detail/windows.sml
===================================================================
--- mltonlib/trunk/com/ssh/windows/unstable/detail/windows.sml	2007-02-16 02:01:42 UTC (rev 5214)
+++ mltonlib/trunk/com/ssh/windows/unstable/detail/windows.sml	2007-02-16 09:59:41 UTC (rev 5215)
@@ -259,9 +259,12 @@
 
       val null = C.Ptr.null'
 
-      fun getFileName module =
-          (onError0ElseTruncatedSize "GetModuleFileName" 0w255)
-             (fn (b, s) => F_win_GetModuleFileName.f' (module, b, s))
+      fun getFileName moduleOpt = let
+         val module = getOpt (moduleOpt, null)
+      in
+         (onError0ElseTruncatedSize "GetModuleFileName" 0w255)
+            (fn (b, s) => F_win_GetModuleFileName.f' (module, b, s))
+      end
    end
 
    structure Path = struct

Modified: mltonlib/trunk/com/ssh/windows/unstable/public/windows.sig
===================================================================
--- mltonlib/trunk/com/ssh/windows/unstable/public/windows.sig	2007-02-16 02:01:42 UTC (rev 5214)
+++ mltonlib/trunk/com/ssh/windows/unstable/public/windows.sig	2007-02-16 09:59:41 UTC (rev 5215)
@@ -62,8 +62,7 @@
 
    structure Module : sig
       type hmodule
-      val null : hmodule
-      val getFileName : hmodule -> String.t
+      val getFileName : hmodule Option.t -> String.t
    end
 
    structure Path : sig




More information about the MLton-commit mailing list