|
From: | Paolo Bonzini |
Subject: | Re: [Help-smalltalk] How to access environment variables ? |
Date: | Sat, 26 Mar 2011 08:10:39 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7 |
On 03/26/2011 02:12 AM, Mehul Sanghvi wrote:
OK so once I modify kernel/CFuncs.st and I believe I need to also modify libgst/cint.c what else do I need to do in order to get this to work ? In kernel/CFuncs.st environ: aString [ <category: 'c call-outs'> <cCall: 'environ' returning: #(#ptr #string) args: #()> ]
Where did you add this?
and in libgst/cint.c _gst_define_cfunc ("getenv", getenv); _gst_define_cfunc ("environ", environ);
You should do static char **get_environ(void) { return environ; } ... _gst_define_cfunc ("get_environ", get_environ); Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |