1
0
mirror of https://github.com/janet-lang/janet synced 2025-11-19 08:45:11 +00:00

Compare commits

...

6 Commits

Author SHA1 Message Date
Calvin Rose
c3fa24c1e6 Add .circleci/config.yml 2021-02-15 11:24:05 -06:00
Calvin Rose
f1819c916a Fix build error for 1.15.2 2021-02-15 10:27:19 -06:00
Calvin Rose
dd14b24d2a 1.15.1 release. 2021-02-15 10:21:22 -06:00
Calvin Rose
050d7c12a3 Prepare for 1.15.1 release. 2021-02-15 10:19:24 -06:00
Calvin Rose
7e2c433abc Fix #636 2021-02-14 14:34:52 -06:00
Calvin Rose
6713b23a65 Change behavior of empty env table passed to os/execute on windows. 2021-02-14 11:22:20 -06:00
6 changed files with 26 additions and 10 deletions

14
.circleci/config.yml Normal file
View File

@@ -0,0 +1,14 @@
version: 2.1
orbs:
# for later
windows: circleci/windows@2.2.0
jobs:
build:
macos:
xcode: 11.3.0
steps:
- checkout
- run: make
- run: make test

View File

@@ -1,8 +1,9 @@
# Changelog
All notable changes to this project will be documented in this file.
## Unreleased - ???
- Fix documentation typos
## 1.15.2 - 2021-02-15
- Fix bug in windows version of `os/spawn` and `os/execute` with setting environment variables.
- Fix documentation typos.
- Fix peg integer reading combinators when used with capture tags.
## 1.15.0 - 2021-02-08

View File

@@ -20,7 +20,7 @@
project('janet', 'c',
default_options : ['c_std=c99', 'b_lundef=false', 'default_library=both'],
version : '1.15.1')
version : '1.15.2')
# Global settings
janet_path = join_paths(get_option('prefix'), get_option('libdir'), 'janet')

View File

@@ -5,9 +5,9 @@
#define JANET_VERSION_MAJOR 1
#define JANET_VERSION_MINOR 15
#define JANET_VERSION_PATCH 1
#define JANET_VERSION_EXTRA "-dev"
#define JANET_VERSION "1.15.1-dev"
#define JANET_VERSION_PATCH 2
#define JANET_VERSION_EXTRA ""
#define JANET_VERSION "1.15.2"
/* #define JANET_BUILD "local" */

View File

@@ -210,7 +210,6 @@ static EnvBlock os_execute_env(int32_t argc, const Janet *argv) {
janet_buffer_push_bytes(temp, vals, janet_string_length(vals));
janet_buffer_push_u8(temp, '\0');
}
if (temp->count == 0) return NULL;
janet_buffer_push_u8(temp, '\0');
char *ret = janet_smalloc(temp->count);
memcpy(ret, temp->data, temp->count);
@@ -250,13 +249,13 @@ static EnvBlock os_execute_env(int32_t argc, const Janet *argv) {
static void os_execute_cleanup(EnvBlock envp, const char **child_argv) {
#ifdef JANET_WINDOWS
(void) child_argv;
janet_sfree(envp);
if (NULL != envp) janet_sfree(envp);
#else
janet_sfree((void *)child_argv);
if (NULL != envp) {
char **envitem = envp;
while (*envitem != NULL) {
free(*envitem);
janet_sfree(*envitem);
envitem++;
}
}
@@ -942,7 +941,6 @@ static Janet os_execute_impl(int32_t argc, Janet *argv, int is_spawn) {
janet_unlock_environ();
}
/* Wait for child */
os_execute_cleanup(envp, child_argv);
if (status) {
janet_panicf("%p: %s", argv[0], strerror(errno));

View File

@@ -143,4 +143,7 @@
(assert (< 100 1e23) "greater than immediate 1")
(assert (< 1000 1e23) "greater than immediate 2")
# os/execute with environment variables
(assert (= 0 (os/execute [(dyn :executable) "-e" "(+ 1 2 3)"] :pe {"HELLO" "WORLD"})) "os/execute with env")
(end-suite)