diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2025-11-08 11:05:17 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu.nakada@gmail.com> | 2025-12-09 23:41:50 +0900 |
| commit | 573896a40ac25bd9febb2bbc0502b43ef36f9b9b (patch) | |
| tree | bc893ac96eedf12685e42fe63fe35ad734d01c0b /internal | |
| parent | e8568bbcf20fafcb82d8b537b99762528dfbdc3e (diff) | |
Box: remove copied extension files
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/box.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/internal/box.h b/internal/box.h index c341f046d3..72263cc9dc 100644 --- a/internal/box.h +++ b/internal/box.h @@ -3,6 +3,16 @@ #include "ruby/ruby.h" /* for VALUE */ +#if SIZEOF_VALUE <= SIZEOF_LONG +# define SVALUE2NUM(x) LONG2NUM((long)(x)) +# define NUM2SVALUE(x) (SIGNED_VALUE)NUM2LONG(x) +#elif SIZEOF_VALUE <= SIZEOF_LONG_LONG +# define SVALUE2NUM(x) LL2NUM((LONG_LONG)(x)) +# define NUM2SVALUE(x) (SIGNED_VALUE)NUM2LL(x) +#else +# error Need integer for VALUE +#endif + /** * @author Ruby developers <ruby-core@ruby-lang.org> * @copyright This file is a part of the programming language Ruby. @@ -75,7 +85,8 @@ void rb_box_gc_update_references(void *ptr); rb_box_t * rb_get_box_t(VALUE ns); VALUE rb_get_box_object(rb_box_t *ns); -VALUE rb_box_local_extension(VALUE box, VALUE fname, VALUE path); +VALUE rb_box_local_extension(VALUE box, VALUE fname, VALUE path, VALUE *cleanup); +void rb_box_cleanup_local_extension(VALUE cleanup); void rb_initialize_main_box(void); void rb_box_init_done(void); |
