[M3devel] RTLinker.envp, instance removal?

Jay K jay.krell at cornell.edu
Mon Aug 23 13:17:17 CEST 2010


RTLinker exposes:
  envp
  instance


envp is not entirely useless, but is redundant with Cstdlib.getenv,
which is exposed through libm3/Env.


RTLinker.envp appears somewhat broken on Windows, despite appearances
that I tried to fix it. In particular, broken for gui apps.
 (btw, gui apps and console apps are far more the same than
  people realize; this whole business where Modula-3's main
  varies for each of them is unnecessary; the actual
  entry point for any Win32 console or gui app takes no parameters;
  the parameters the C runtime passes to main or WinMain
  are created by it based on stuff such as GetCommandLine,
  GetStartupInfo, etc.)
  
 
instance is pretty much useless.
Anyone that needs it can get it via GetModuleHandle(NULL);

I suppose RTLinker.instance is more portable, as it'll reliably
be null on posix -- ie: the #ifdef is built into startup/m3core,
instead of the user's app.
(on the other hand, there's probably nothing portable
you can do with instance, given that it is useless on Posix)

Anyway, on the general premise that less is more and things
deemed buggy, of little value, and unused, are best just
removed instead of fixed or improved, I propose removing
both of these. Once I verify they are unused.


?


 - Jay




 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20100823/04feff20/attachment-0001.html>


More information about the M3devel mailing list