mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-14 15:40:19 +02:00
* Made some functions not accept symbols as input parameters any more.
* Replaced some calls to SCM_LENGTH.
This commit is contained in:
parent
bfa974f0a4
commit
9fd38a3d14
8 changed files with 75 additions and 59 deletions
|
@ -1134,13 +1134,13 @@ SCM_DEFINE (scm_putenv, "putenv", 1, 0, 0,
|
|||
int rv;
|
||||
char *ptr;
|
||||
|
||||
SCM_VALIDATE_ROSTRING (1,str);
|
||||
SCM_VALIDATE_STRING (1, str);
|
||||
/* must make a new copy to be left in the environment, safe from gc. */
|
||||
ptr = malloc (SCM_LENGTH (str) + 1);
|
||||
ptr = malloc (SCM_STRING_LENGTH (str) + 1);
|
||||
if (ptr == NULL)
|
||||
SCM_MEMORY_ERROR;
|
||||
strncpy (ptr, SCM_ROCHARS (str), SCM_LENGTH (str));
|
||||
ptr[SCM_LENGTH(str)] = 0;
|
||||
strncpy (ptr, SCM_ROCHARS (str), SCM_STRING_LENGTH (str));
|
||||
ptr[SCM_STRING_LENGTH (str)] = 0;
|
||||
rv = putenv (ptr);
|
||||
if (rv < 0)
|
||||
SCM_SYSERROR;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue