[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: returning c string pointer to gforth
From: |
Bernd Paysan |
Subject: |
Re: returning c string pointer to gforth |
Date: |
Wed, 17 Mar 2021 15:38:34 +0100 |
Am Mittwoch, 17. März 2021, 15:06:55 CET schrieb Garry Ogle:
> Just to clarify:
>
> The C code works works as intended, and char pointer is set correctly. I
> simply cannot return a usable address to Gforth.
This is works for me. Here a short test code to check if you can return
usable addresses:
c-library test
\c const char * foo="Hello World!";
\c const char * foo_x() { return foo; }
c-function foo_x foo_x -- a
end-c-library
Try it:
foo_x cstring>sstring type Hello World! ok
--
Bernd Paysan
"If you want it done right, you have to do it yourself"
net2o id: kQusJzA;7*?t=uy@X}1GWr!+0qqp_Cn176t4(dQ*
https://net2o.de/
signature.asc
Description: This is a digitally signed message part.