Skip to content

Commit 3928136

Browse files
committed
Begin update to 1.1.0.
1 parent 0dcae6c commit 3928136

File tree

7 files changed

+30
-6
lines changed

7 files changed

+30
-6
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4-
## Unreleased
4+
## 1.1.0 - 2019-07-08
55
- Change semantics of `-l` flag to be import rather than dofile.
6+
- Fix compiler regression in top level defs with destructuring.
7+
- Add `table/clone`.
8+
- Improve `jpm` tool with git and dependency capabilities, as well as better
9+
module uninstalls.
610

711
## 1.0.0 - 2019-07-01
812
- Add `with` macro for resource handling.

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ only_commits:
3333

3434
artifacts:
3535
- path: janet-installer.exe
36-
name: janet-v1.0.0-windows-installer.exe
36+
name: janet-v1.1.0-windows-installer.exe
3737
type: File
3838

3939
deploy:

janet-installer.nsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Version
2-
!define VERSION "1.0.0"
2+
!define VERSION "1.1.0"
33
!define PRODUCT_VERSION "${VERSION}.0"
44
VIProductVersion "${PRODUCT_VERSION}"
55
VIFileVersion "${PRODUCT_VERSION}"

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
project('janet', 'c',
2222
default_options : ['c_std=c99', 'b_lundef=false', 'default_library=both'],
23-
version : '1.0.0')
23+
version : '1.1.0')
2424

2525
# Global settings
2626
janet_path = join_paths(get_option('prefix'), get_option('libdir'), 'janet')

src/conf/janetconf.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
#define JANETCONF_H
2828

2929
#define JANET_VERSION_MAJOR 1
30-
#define JANET_VERSION_MINOR 0
30+
#define JANET_VERSION_MINOR 1
3131
#define JANET_VERSION_PATCH 0
3232
#define JANET_VERSION_EXTRA "-dev"
33-
#define JANET_VERSION "1.0.0-dev"
33+
#define JANET_VERSION "1.1.0-dev"
3434

3535
/* #define JANET_BUILD "local" */
3636

src/core/table.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,12 @@ static Janet cfun_table_rawget(int32_t argc, Janet *argv) {
280280
return janet_table_rawget(table, argv[1]);
281281
}
282282

283+
static Janet cfun_table_clone(int32_t argc, Janet *argv) {
284+
janet_fixarity(argc, 1);
285+
JanetTable *table = janet_gettable(argv, 0);
286+
return janet_wrap_table(janet_table_clone(table));
287+
}
288+
283289
static const JanetReg table_cfuns[] = {
284290
{
285291
"table/new", cfun_table_new,
@@ -313,6 +319,12 @@ static const JanetReg table_cfuns[] = {
313319
"If a table tab does not contain t directly, the function will return "
314320
"nil without checking the prototype. Returns the value in the table.")
315321
},
322+
{
323+
"table/clone", cfun_table_clone,
324+
JDOC("(table/clone tab)\n\n"
325+
"Create a copy of a table. Updates to the new table will not change the old table, "
326+
"and vice versa.")
327+
},
316328
{NULL, NULL, NULL}
317329
};
318330

test/suite7.janet

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,12 @@
105105
(def res (resume f))
106106
(assert-error :abc (propagate res f) "propagate 1")
107107

108+
# table/clone
109+
110+
(defn check-table-clone [x msg]
111+
(assert (= (table/to-struct x) (table/to-struct (table/clone x))) msg))
112+
113+
(check-table-clone @{:a 123 :b 34 :c :hello : 945 0 1 2 3 4 5} "table/clone 1")
114+
(check-table-clone @{} "table/clone 1")
115+
108116
(end-suite)

0 commit comments

Comments
 (0)