mirror of
https://github.com/janet-lang/janet
synced 2025-01-27 07:34:44 +00:00
Begin update to 1.1.0.
This commit is contained in:
parent
0dcae6c3d6
commit
3928136670
@ -1,8 +1,12 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
## Unreleased
|
## 1.1.0 - 2019-07-08
|
||||||
- Change semantics of `-l` flag to be import rather than dofile.
|
- Change semantics of `-l` flag to be import rather than dofile.
|
||||||
|
- Fix compiler regression in top level defs with destructuring.
|
||||||
|
- Add `table/clone`.
|
||||||
|
- Improve `jpm` tool with git and dependency capabilities, as well as better
|
||||||
|
module uninstalls.
|
||||||
|
|
||||||
## 1.0.0 - 2019-07-01
|
## 1.0.0 - 2019-07-01
|
||||||
- Add `with` macro for resource handling.
|
- Add `with` macro for resource handling.
|
||||||
|
@ -33,7 +33,7 @@ only_commits:
|
|||||||
|
|
||||||
artifacts:
|
artifacts:
|
||||||
- path: janet-installer.exe
|
- path: janet-installer.exe
|
||||||
name: janet-v1.0.0-windows-installer.exe
|
name: janet-v1.1.0-windows-installer.exe
|
||||||
type: File
|
type: File
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Version
|
# Version
|
||||||
!define VERSION "1.0.0"
|
!define VERSION "1.1.0"
|
||||||
!define PRODUCT_VERSION "${VERSION}.0"
|
!define PRODUCT_VERSION "${VERSION}.0"
|
||||||
VIProductVersion "${PRODUCT_VERSION}"
|
VIProductVersion "${PRODUCT_VERSION}"
|
||||||
VIFileVersion "${PRODUCT_VERSION}"
|
VIFileVersion "${PRODUCT_VERSION}"
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
project('janet', 'c',
|
project('janet', 'c',
|
||||||
default_options : ['c_std=c99', 'b_lundef=false', 'default_library=both'],
|
default_options : ['c_std=c99', 'b_lundef=false', 'default_library=both'],
|
||||||
version : '1.0.0')
|
version : '1.1.0')
|
||||||
|
|
||||||
# Global settings
|
# Global settings
|
||||||
janet_path = join_paths(get_option('prefix'), get_option('libdir'), 'janet')
|
janet_path = join_paths(get_option('prefix'), get_option('libdir'), 'janet')
|
||||||
|
@ -27,10 +27,10 @@
|
|||||||
#define JANETCONF_H
|
#define JANETCONF_H
|
||||||
|
|
||||||
#define JANET_VERSION_MAJOR 1
|
#define JANET_VERSION_MAJOR 1
|
||||||
#define JANET_VERSION_MINOR 0
|
#define JANET_VERSION_MINOR 1
|
||||||
#define JANET_VERSION_PATCH 0
|
#define JANET_VERSION_PATCH 0
|
||||||
#define JANET_VERSION_EXTRA "-dev"
|
#define JANET_VERSION_EXTRA "-dev"
|
||||||
#define JANET_VERSION "1.0.0-dev"
|
#define JANET_VERSION "1.1.0-dev"
|
||||||
|
|
||||||
/* #define JANET_BUILD "local" */
|
/* #define JANET_BUILD "local" */
|
||||||
|
|
||||||
|
@ -280,6 +280,12 @@ static Janet cfun_table_rawget(int32_t argc, Janet *argv) {
|
|||||||
return janet_table_rawget(table, argv[1]);
|
return janet_table_rawget(table, argv[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Janet cfun_table_clone(int32_t argc, Janet *argv) {
|
||||||
|
janet_fixarity(argc, 1);
|
||||||
|
JanetTable *table = janet_gettable(argv, 0);
|
||||||
|
return janet_wrap_table(janet_table_clone(table));
|
||||||
|
}
|
||||||
|
|
||||||
static const JanetReg table_cfuns[] = {
|
static const JanetReg table_cfuns[] = {
|
||||||
{
|
{
|
||||||
"table/new", cfun_table_new,
|
"table/new", cfun_table_new,
|
||||||
@ -313,6 +319,12 @@ static const JanetReg table_cfuns[] = {
|
|||||||
"If a table tab does not contain t directly, the function will return "
|
"If a table tab does not contain t directly, the function will return "
|
||||||
"nil without checking the prototype. Returns the value in the table.")
|
"nil without checking the prototype. Returns the value in the table.")
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"table/clone", cfun_table_clone,
|
||||||
|
JDOC("(table/clone tab)\n\n"
|
||||||
|
"Create a copy of a table. Updates to the new table will not change the old table, "
|
||||||
|
"and vice versa.")
|
||||||
|
},
|
||||||
{NULL, NULL, NULL}
|
{NULL, NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -105,4 +105,12 @@
|
|||||||
(def res (resume f))
|
(def res (resume f))
|
||||||
(assert-error :abc (propagate res f) "propagate 1")
|
(assert-error :abc (propagate res f) "propagate 1")
|
||||||
|
|
||||||
|
# table/clone
|
||||||
|
|
||||||
|
(defn check-table-clone [x msg]
|
||||||
|
(assert (= (table/to-struct x) (table/to-struct (table/clone x))) msg))
|
||||||
|
|
||||||
|
(check-table-clone @{:a 123 :b 34 :c :hello : 945 0 1 2 3 4 5} "table/clone 1")
|
||||||
|
(check-table-clone @{} "table/clone 1")
|
||||||
|
|
||||||
(end-suite)
|
(end-suite)
|
||||||
|
Loading…
Reference in New Issue
Block a user