help-smalltalk
[Top][All Lists]
Advanced

[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: Sun, 27 Mar 2011 18:19:39 -0400

On Sun, Mar 27, 2011 at 05:03, Paolo Bonzini <address@hidden> wrote:
>> +    environ: aString [
>
> This should be just "environ [".
>
> The method wasn't found because you were defining it with the wrong name.
>
> Paolo
>
>> +       <category: 'c call-outs'>
>> +       <cCall: 'environ' returning: #(#ptr #string) args: #()>
>> +
>> +    ]
>


I made that change, recompiled, and I get the following:

% gst
GNU Smalltalk ready

st> Smalltalk getenv: 'SHELL'
'/bin/bash'
st> Smalltalk environ
CPtr(16rBFFFF6BC)
st> Smalltalk environ:
st>


I am guessing some sort of pointer issue either in cint.c or CFuncs.st ?


-- 
Mehul N. Sanghvi
email: address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]