Commit Graph

35 Commits

Author SHA1 Message Date
GrayJack d0acf6426d refactor(c-api): Requested changes from review 2024-04-21 17:29:33 -03:00
GrayJack 3f4f71cf87 refactor(c-api): Use `size_t` in other structures and functions used by lib 2024-04-18 20:15:42 -03:00
Calvin Rose 8df7364319 Quick fix for discussion #1253
Protect against garbage collection during connect.
2023-08-13 12:00:54 -05:00
wooosh 701913fb19 Use typedefs for strings, symbols, keywords, tuples, structs, and abstracts. 2023-08-09 16:09:34 -04:00
Calvin Rose a0f40042cb Update copyright year. 2023-01-07 15:03:35 -06:00
Calvin Rose 3715d7a184 Auto update copyright date. 2022-03-21 18:22:59 -05:00
Calvin Rose 1ef6db16ed Add janet_vm_save and janet_vm_load.
This lets a user multiplex multiple Janet VMs on a single
thread or process if they are willing to implement context switching
themselves.
2021-07-16 20:59:03 -05:00
Calvin Rose bbae43f259 Update copyright dates. 2021-05-31 13:46:02 -05:00
Andrew Chambers f4c9064b79 Add config support for custom allocators. 2021-03-23 23:00:48 +13:00
Calvin Rose a68ee7aac6 Update Copyright 2020. 2020-01-12 10:50:37 -06:00
Calvin Rose 6c7f376410 Try to remove potential overflow bugs.
Also make integer to size_t casts explicit rather than relying on
int32_t * sizeof(x) = size_t. This is kind of a personal preference for
this problem.
2020-01-02 22:08:17 -06:00
Calvin Rose 9dd152dc28 Add features.h for feature test macros.
Because we use an amalgated build, feature
test macros should be set in a single file that
is included before any other headers, and is placed
at the top of the amalgamated build.
2019-12-30 19:06:15 -05:00
Calvin Rose b18f1e8127 Keep count fo allocated memory via malloc.
We normally only track memory allocated with janet_gcalloc, but
if only a few very large normal memory blocks are allocated, the GC
will never run. Se simply need to increment a count when we allocate
memory so that the next time we enter the VM, we will be able to
run a collection if needed.
2019-07-31 00:24:13 -05:00
Calvin Rose 2e6ee39506 Fix windows build issues. 2019-07-12 08:47:11 -04:00
Calvin Rose 894877a0e3 Address issue #142
Also add janet_wrap_number_safe to API.
2019-07-12 07:23:24 -05:00
Calvin Rose 1cfc7b3b0d Add preliminary debugger to default repl.
Also upddate colors, and fix formatting.
2019-05-02 17:11:30 -04:00
Calvin Rose bfb354b469 Fix 32 bit platforms. 2019-04-28 16:22:24 -04:00
Calvin Rose 0bad523913 Fix wrap functions. 2019-04-27 19:47:32 -04:00
Calvin Rose f10028d41a Add function versions of macro API bindings.
This should help address #81. Also hide janet_exit
and janet_assert, as they are really meant for internal usage.
I have not verified that this yet actually works with Rust's
bindgen.
2019-04-27 15:47:12 -04:00
Calvin Rose 95e54c66b6 Use one tag type true and false
We moved the literals true and false into one tag
type, so we an extra tag for raw pointer types
(light userdata). These can be used from the C API via
janet_wrap_pointer and janet_unwrap_pointer.
2019-03-13 14:50:25 -04:00
Calvin Rose ed72dcf82d Rename the header <janet/janet.h> to <janet.h>
Makes it easier to use and remember, and makes the
variable `module/*headerpath*` make more sense.
2019-02-18 20:13:35 -05:00
Calvin Rose f161002390 Address #35 2019-02-15 13:20:20 -05:00
Calvin Rose 611543c48b Add source amalgamation
The amalgamated source concatenates all sources
to a file janet.c which can be used for
embedding janet, much in the same way as sqlite
or mongoose.
2019-01-24 00:15:58 -05:00
Calvin Rose 6f3bc3d577 Update copyright date, fix types, remove trailing whitespace. 2019-01-06 03:23:03 -05:00
Calvin Rose 337a498edb Fix some keyword related issues. 2019-01-02 22:08:51 -05:00
Calvin Rose d724c5b959 Update number representation so that wrapping numbers isn't
doesn't need to check for NaNs. Change ordering of types.
2018-12-30 12:37:50 -05:00
Calvin Rose 6b95326d7c First commit removing the integer number type. This should
remove some complexity and unexpected behavior around numbers in
general as all numbers are the same number type, IEEE 754 double
precision numbers. Also update examples and tests, some of which were
out of date.

Some more testing may be needed for new changes to numbers.
2018-12-27 13:05:29 -05:00
Calvin Rose 1532697b37 Revise 32 bit nanbox implementation. 2018-11-18 16:43:43 -05:00
Calvin Rose eb314ae903 Remove more casts. 2018-11-18 14:26:52 -05:00
Calvin Rose 4c4eff9390 Replace cast with type pun. 2018-11-18 14:17:50 -05:00
Calvin Rose c8ef2a0d88 Rename to janet 2018-09-05 22:18:42 -04:00
Calvin Rose b5ed4a875f Change some definitions and remove thoughts.md 2018-06-02 19:16:13 -04:00
Calvin Rose f295692b50 Update copyright to 2018. Add string methods. 2018-05-17 23:41:20 -04:00
Calvin Rose ccdf758e83 Get dst to compile on windows 2018-02-01 17:09:22 -08:00
bakpakin 30f62ca454 Major refactor and restructure. Add CMake for anticipated windows
support.
2018-01-19 16:43:19 -05:00