[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] How to access environment variables ?
From: |
Mehul Sanghvi |
Subject: |
Re: [Help-smalltalk] How to access environment variables ? |
Date: |
Fri, 25 Mar 2011 21:31:24 -0400 |
On Fri, Mar 25, 2011 at 21:12, Mehul Sanghvi <address@hidden> wrote:
> On Mon, Mar 21, 2011 at 03:40, Paolo Bonzini <address@hidden> wrote:
>>> I was wondering if this sort of POSIX support has been added to
>>> GST now ?
>>
>> Nope, not yet.
>>
>> http://smalltalk.gnu.org/news/gnu-smalltalk-3-2 is a rough list of the
>> new functionality that went in since that message.
>>
>> After 3.2, we went through a relatively long stabilization period with
>> limited new features, most of them are listed here:
>> http://smalltalk.gnu.org/news/gnu-smalltalk-3-2-3.
>>
>> Paolo
>>
>
>
> 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: #()>
>
> ]
>
>
>
> and in libgst/cint.c
>
> _gst_define_cfunc ("getenv", getenv);
> _gst_define_cfunc ("environ", environ);
>
>
>
When I do:
env := Smalltalk environ .
I get the following:
Object: SystemDictionary new: 512 "<0x40290818>" error: did not
understand #environ
MessageNotUnderstood(Exception)>>signal (ExcHandling.st:254)
SystemDictionary(Object)>>doesNotUnderstand: #environ (SysExcept.st:1407)
SystemDictionary(BindingDictionary)>>doesNotUnderstand: #environ
(BindingDict.st:181)
UndefinedObject>>executeStatements (test-cgi.st:13)
I'm sure there is something wrong with my Smalltalk code
as well as probably missing something in what I did to add environ.
One thing is that environ is a variable, not a function, maybe they
are handled differently ?
cheers,
mehul
--
Mehul N. Sanghvi
email: address@hidden
- Re: [Help-smalltalk] How to access environment variables ?, Mehul Sanghvi, 2011/03/20
- Re: [Help-smalltalk] How to access environment variables ?, Paolo Bonzini, 2011/03/21
- Re: [Help-smalltalk] How to access environment variables ?, Mehul Sanghvi, 2011/03/25
- Re: [Help-smalltalk] How to access environment variables ?,
Mehul Sanghvi <=
- Re: [Help-smalltalk] How to access environment variables ?, Paolo Bonzini, 2011/03/26
- Re: [Help-smalltalk] How to access environment variables ?, Mehul Sanghvi, 2011/03/26
- Re: [Help-smalltalk] How to access environment variables ?, Mehul Sanghvi, 2011/03/26
- Re: [Help-smalltalk] How to access environment variables ?, Mehul Sanghvi, 2011/03/26
- Re: [Help-smalltalk] How to access environment variables ?, Mehul Sanghvi, 2011/03/26
- Re: [Help-smalltalk] How to access environment variables ?, Paolo Bonzini, 2011/03/27
- Re: [Help-smalltalk] How to access environment variables ?, Mehul Sanghvi, 2011/03/27
- Re: [Help-smalltalk] How to access environment variables ?, Paolo Bonzini, 2011/03/28
- Re: [Help-smalltalk] How to access environment variables ?, Mehul Sanghvi, 2011/03/28
- Re: [Help-smalltalk] How to access environment variables ?, Paolo Bonzini, 2011/03/28