The answer lies in the bindings file. Vala uses bindings (in .vapi files) to bind its constructs to C. In this case, you can grep via glib-2.0.vapi (on my system, which is located in /usr/share/vala-0.10/vapi ), and You will see that it is connected as:
unowned string? GLib.Environment.get_variable(string name)
It can be very useful to have the location of the main VAPI files, because if you know the C name of the function, you can just grep for it.
Michael trausch
source share