[fpc-devel]operator overloading problem
Michael Van Canneyt
michael.vancanneyt at wisa.be
Wed Sep 27 09:24:06 CEST 2000
On Wed, 27 Sep 2000, Jonas Maebe wrote:
> >> 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.
Yes. I don't think the pchar is a good idea; If you had this problem
in TP then you had to think of a solution by yourself already, so trying
to be TP compatible doesn't make sense for this, IMHO.
Michael.
More information about the fpc-devel
mailing list