Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #41562
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: Another Gforth snapshot |
| Date | 2015-08-26 16:04 +0000 |
| Organization | Institut fuer Computersprachen, Technische Universitaet Wien |
| Message-ID | <2015Aug26.180448@mips.complang.tuwien.ac.at> (permalink) |
| References | <mrgah4$11j$1@dont-email.me> <67f9ee58-3406-4cd5-9610-d70ee6394bd2@googlegroups.com> <mriulh$ih5$1@dont-email.me> <2015Aug26.095735@mips.complang.tuwien.ac.at> <mrkemb$sa1$1@dont-email.me> |
Bernd Paysan <bernd.paysan@gmx.de> writes:
>Anton Ertl wrote:
>> Doing it automatically (with SWIG) is not possible, because the C
>> headers don't contain information on whether the pointers point to
>> input strings or to output buffers (or something that serves as both).
>> So we need to provide that information manually.
>
>As long as the C declaration had "const" for those strings that aren't used
>as return values, it could be done.
There is no requirement to use "const" and therefore no guarantee that
it is used in that way. And even if it were, there is no guarantee
that a "const char *" refers to a string.
>Microsoft uses a defined type, LPCSTR (or LPCWSTR for wide char, they don't
>like C naming conventions) to specify strings only used as input, so that
>information can be automatically extracted from the C headers. Other, read-
>write (or write-only) strings are LPSTR and LPWSTR.
That sounds more promising.
- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: http://www.forth200x.org/forth200x.html
EuroForth 2015: http://www.rigwit.co.uk/EuroForth2015/
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Another Gforth snapshot Bernd Paysan <bernd.paysan@gmx.de> - 2015-08-25 01:50 +0200
Re: Another Gforth snapshot Bernd Paysan <bernd.paysan@gmx.de> - 2015-08-25 02:12 +0200
Re: Another Gforth snapshot peter.m.falth@gmail.com - 2015-08-25 13:57 -0700
Re: Another Gforth snapshot Bernd Paysan <bernd.paysan@gmx.de> - 2015-08-26 01:46 +0200
Re: Another Gforth snapshot peter.m.falth@gmail.com - 2015-08-25 23:56 -0700
Re: Another Gforth snapshot mhx@iae.nl - 2015-08-26 00:49 -0700
Re: Another Gforth snapshot anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-08-26 07:57 +0000
Re: Another Gforth snapshot Bernd Paysan <bernd.paysan@gmx.de> - 2015-08-26 15:26 +0200
Re: Another Gforth snapshot anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-08-26 16:04 +0000
Re: Another Gforth snapshot Bernd Paysan <bernd.paysan@gmx.de> - 2015-08-27 01:18 +0200
Re: Another Gforth snapshot Greg <borota@gmail.com> - 2015-08-25 20:20 -0700
Re: Another Gforth snapshot anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-08-26 09:03 +0000
Re: Another Gforth snapshot Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-08-27 11:29 +0100
Re: Another Gforth snapshot Bernd Paysan <bernd.paysan@gmx.de> - 2015-08-27 15:17 +0200
Re: Another Gforth snapshot Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-08-27 19:54 +0100
Re: Another Gforth snapshot Bernd Paysan <bernd.paysan@gmx.de> - 2015-08-28 04:06 +0200
Re: Another Gforth snapshot Bernd Paysan <bernd.paysan@gmx.de> - 2015-08-28 04:16 +0200
Re: Another Gforth snapshot mhx@iae.nl - 2015-11-28 03:12 -0800
Re: Another Gforth snapshot Bernd Paysan <bernd.paysan@gmx.de> - 2015-11-28 17:23 +0100
Re: Another Gforth snapshot Bernd Paysan <bernd.paysan@gmx.de> - 2015-11-28 22:11 +0100
Re: Another Gforth snapshot Bernd Paysan <bernd.paysan@gmx.de> - 2015-11-29 01:00 +0100
Re: Another Gforth snapshot mhx@iae.nl - 2015-11-28 17:11 -0800
Re: Another Gforth snapshot Bernd Paysan <bernd.paysan@gmx.de> - 2015-11-29 03:07 +0100
csiph-web