[gdal-dev] Wrapping VSIStdoutSetRedirection
Even Rouault
even.rouault at spatialys.com
Tue Nov 10 09:41:06 PST 2015
Le mardi 10 novembre 2015 18:22:19, Ari Jolma a écrit :
> I'd like to wrap VSIStdoutSetRedirection.
>
> I would use it for streaming generated data in a web environment. The
> preferred way to stream data out nowadays in Perl web development is to
> use a write function in Perl space - i.e., not the standard print to
> stdout.
>
> I can capture stdout and achieve the wanted goal that way but it is a
> bit too hackish I think.
>
> I don't think the wrapping is such a big deal itself - it will require a
> bit unusual function typemap, so I'll limit it to Perl for now - but
> there is something in the C space I need to ask.
>
> How can one undo a redirection done with VSIStdoutSetRedirection? It
> seems to me that it would need a function:
>
> void VSIStdoutUnsetRedirection()
> {
> pWriteFunction = fwrite;
> pWriteStream = stdout;
> }
>
> but there is no such. Should there be one?
Why not just call VSIStdoutSetRedirection(fwrite, stdout) ?
>
> Best,
>
> Ari
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the gdal-dev
mailing list