[fpc-devel]operator overloading problem

Marco van de Voort marcov at stack.nl
Wed Sep 27 10:36:06 CEST 2000


> >> What about a getenvansistring in the DOS unit? It doesn't marking
> >> porting harder because
> >> getenv will be a simple wrapper around getenvansistring. The parameter
> >> of getenvansistring
> >> should be an ansistring as well, of course.
> >
> >Getpchar is better. Can be autoconverted too, and also can be used to get
> >long env strings in plain tp mode.
> 
> But then you have to take care of deallocating the memory reserved for 
> returning the environment string in.

You could return a pointer into the protected mode copy of the environment.




More information about the fpc-devel mailing list