From 01cc99b35c00be86d832693776ee8ed880b59882 Mon Sep 17 00:00:00 2001
From: Sverker Eriksson
Date: Mon, 8 Dec 2014 20:36:28 +0100
Subject: erts: Make key argument constant for erl_drv_{get|put}env
This should be a harmless and compatible API change.
---
erts/doc/src/erl_driver.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'erts/doc')
diff --git a/erts/doc/src/erl_driver.xml b/erts/doc/src/erl_driver.xml
index 1f7fe0f961..d829aeda10 100644
--- a/erts/doc/src/erl_driver.xml
+++ b/erts/doc/src/erl_driver.xml
@@ -2811,7 +2811,7 @@ ERL_DRV_MAP int sz
- interl_drv_putenv(char *key, char *value)
+ interl_drv_putenv(const char *key, char *value)
Set the value of an environment variable
@@ -2840,7 +2840,7 @@ ERL_DRV_MAP int sz
- interl_drv_getenv(char *key, char *value, size_t *value_size)
+ interl_drv_getenv(const char *key, char *value, size_t *value_size)
Get the value of an environment variable
--
cgit v1.2.3
From ef45d2c9f874354b17c2aca96de7b3306a9eb943 Mon Sep 17 00:00:00 2001
From: Sverker Eriksson
Date: Mon, 8 Dec 2014 20:37:59 +0100
Subject: erts: Add enif_getenv
to read OS environment variables in a safe and portable way.
---
erts/doc/src/erl_nif.xml | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'erts/doc')
diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml
index 23c3d5fcee..3b77b1ffa0 100644
--- a/erts/doc/src/erl_nif.xml
+++ b/erts/doc/src/erl_nif.xml
@@ -791,6 +791,10 @@ typedef enum {
and return true, or return false if term is not an unsigned integer or is
outside the bounds of type unsigned long.
+ intenif_getenv(const char* key, char* value, size_t *value_size)
+ Get the value of an environment variable
+ Same as erl_drv_getenv.
+
intenif_has_pending_exception(ErlNifEnv* env, ERL_NIF_TERM* reason)
Check if an exception has been raised
Return true if a pending exception is associated
--
cgit v1.2.3