konpeito 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/konpeito/codegen/llvm_generator.rb +1 -5
- data/lib/konpeito/codegen/mruby_helpers.c +12 -3
- data/lib/konpeito/stdlib/clay/clay_native.c +8 -0
- data/lib/konpeito/stdlib/clay_tui/clay_tui_native.c +12 -3
- data/lib/konpeito/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2d4e25daf950c4a2c5c60e4a646f4c0f74a959e1557761feb3327245ec995bee
|
|
4
|
+
data.tar.gz: f0e5571b58a2316a729c15872be3e0bfa9cba03573f96f51b79e4b384e2af675
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6c7fd35077041ff22737b3b72a101771f597ebe813a61fbc47b2c5bd29245afd4df77d60d1a0fef50005631fbed9932bb6d9599a9f5d50ed8f833a3691157a36
|
|
7
|
+
data.tar.gz: 539a02d11cebfc1ad35e0df912fa49043aa8f4cd310088ee5c2f419d6cd14c59a1ed5ec603fa7974fb947f95a6c42d390516f54849d727400707cb218a52484b
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,13 @@ All notable changes to Konpeito will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.9.1] - 2026-03-16
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **mruby standalone build without Clay** failed with linker error
|
|
12
|
+
(`_konpeito_clay_set_resize_frame_fn` undefined). Replaced extern reference
|
|
13
|
+
with function pointer registration pattern so Clay-free builds link cleanly.
|
|
14
|
+
|
|
8
15
|
## [0.9.0] - 2026-03-16
|
|
9
16
|
|
|
10
17
|
### Added
|
|
@@ -404,6 +411,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
404
411
|
- `%a{extern}` - external C struct wrappers
|
|
405
412
|
- `%a{simd}` - SIMD vectorization
|
|
406
413
|
|
|
414
|
+
[0.9.1]: https://github.com/i2y/konpeito/compare/v0.9.0...v0.9.1
|
|
407
415
|
[0.9.0]: https://github.com/i2y/konpeito/compare/v0.8.0...v0.9.0
|
|
408
416
|
[0.8.0]: https://github.com/i2y/konpeito/compare/v0.7.1...v0.8.0
|
|
409
417
|
[0.7.1]: https://github.com/i2y/konpeito/compare/v0.7.0...v0.7.1
|
|
@@ -5211,11 +5211,7 @@ module Konpeito
|
|
|
5211
5211
|
@builder.position_at_end(llvm_block)
|
|
5212
5212
|
# Return the last value in the block, or Qnil
|
|
5213
5213
|
# For while_exit blocks, the last instruction loads the break value
|
|
5214
|
-
|
|
5215
|
-
@builder.ret(last_instr)
|
|
5216
|
-
else
|
|
5217
|
-
@builder.ret(qnil)
|
|
5218
|
-
end
|
|
5214
|
+
@builder.ret(last_instr || qnil)
|
|
5219
5215
|
end
|
|
5220
5216
|
end
|
|
5221
5217
|
|
|
@@ -1141,9 +1141,16 @@ mrb_value konpeito_mrb_top_self(mrb_state *mrb) { return mrb_top_self(mrb); }
|
|
|
1141
1141
|
* Live resize bridge — calls Ruby _kui_resize_frame() from C
|
|
1142
1142
|
* ================================================================ */
|
|
1143
1143
|
|
|
1144
|
-
/* Forward declaration from clay_native.c
|
|
1144
|
+
/* Forward declaration from clay_native.c — resolved via function pointer to avoid
|
|
1145
|
+
link errors when Clay is not linked */
|
|
1145
1146
|
typedef void (*clay_frame_fn)(void);
|
|
1146
|
-
|
|
1147
|
+
typedef void (*set_resize_fn_t)(clay_frame_fn);
|
|
1148
|
+
|
|
1149
|
+
static set_resize_fn_t konpeito_clay_set_resize_frame_fn_ptr = NULL;
|
|
1150
|
+
|
|
1151
|
+
void konpeito_set_clay_resize_fn(set_resize_fn_t fn) {
|
|
1152
|
+
konpeito_clay_set_resize_frame_fn_ptr = fn;
|
|
1153
|
+
}
|
|
1147
1154
|
|
|
1148
1155
|
static void konpeito_resize_frame_bridge(void) {
|
|
1149
1156
|
mrb_state *mrb = konpeito_mrb_state;
|
|
@@ -1157,5 +1164,7 @@ static void konpeito_resize_frame_bridge(void) {
|
|
|
1157
1164
|
}
|
|
1158
1165
|
|
|
1159
1166
|
void konpeito_register_resize_callback(void) {
|
|
1160
|
-
|
|
1167
|
+
if (konpeito_clay_set_resize_frame_fn_ptr) {
|
|
1168
|
+
konpeito_clay_set_resize_frame_fn_ptr(konpeito_resize_frame_bridge);
|
|
1169
|
+
}
|
|
1161
1170
|
}
|
|
@@ -154,6 +154,11 @@ static void live_resize_refresh_callback(GLFWwindow *window);
|
|
|
154
154
|
* Lifecycle
|
|
155
155
|
* ═══════════════════════════════════════════ */
|
|
156
156
|
|
|
157
|
+
/* mruby_helpers.c exposes this so Clay can register its resize function */
|
|
158
|
+
typedef void (*set_resize_fn_t)(clay_frame_fn);
|
|
159
|
+
extern void konpeito_set_clay_resize_fn(set_resize_fn_t fn);
|
|
160
|
+
void konpeito_clay_set_resize_frame_fn(clay_frame_fn fn); /* defined below */
|
|
161
|
+
|
|
157
162
|
void konpeito_clay_init(double w, double h) {
|
|
158
163
|
uint32_t min_mem = Clay_MinMemorySize();
|
|
159
164
|
g_arena = Clay_CreateArenaWithCapacityAndMemory(min_mem, malloc(min_mem));
|
|
@@ -174,6 +179,9 @@ void konpeito_clay_init(double w, double h) {
|
|
|
174
179
|
glfwSetFramebufferSizeCallback(glfw_win, live_resize_framebuffer_callback);
|
|
175
180
|
glfwSetWindowRefreshCallback(glfw_win, live_resize_refresh_callback);
|
|
176
181
|
}
|
|
182
|
+
|
|
183
|
+
/* Register resize function pointer into mruby_helpers.c */
|
|
184
|
+
konpeito_set_clay_resize_fn(konpeito_clay_set_resize_frame_fn);
|
|
177
185
|
}
|
|
178
186
|
|
|
179
187
|
void konpeito_clay_destroy(void) {
|
|
@@ -101,6 +101,12 @@ static void clay_error_handler(Clay_ErrorData error) {
|
|
|
101
101
|
* Lifecycle
|
|
102
102
|
* ═══════════════════════════════════════════ */
|
|
103
103
|
|
|
104
|
+
/* mruby_helpers.c exposes this so ClayTUI can register its resize function */
|
|
105
|
+
typedef void (*clay_frame_fn_fwd)(void);
|
|
106
|
+
typedef void (*set_resize_fn_t)(clay_frame_fn_fwd);
|
|
107
|
+
extern void konpeito_set_clay_resize_fn(set_resize_fn_t fn);
|
|
108
|
+
static void konpeito_clay_set_resize_frame_fn(clay_frame_fn_fwd fn);
|
|
109
|
+
|
|
104
110
|
void konpeito_clay_tui_init(double w, double h) {
|
|
105
111
|
tb_init();
|
|
106
112
|
tb_set_output_mode(TB_OUTPUT_TRUECOLOR);
|
|
@@ -110,6 +116,9 @@ void konpeito_clay_tui_init(double w, double h) {
|
|
|
110
116
|
g_arena = Clay_CreateArenaWithCapacityAndMemory(min_mem, malloc(min_mem));
|
|
111
117
|
g_ctx = Clay_Initialize(g_arena, (Clay_Dimensions){(float)w, (float)h},
|
|
112
118
|
(Clay_ErrorHandler){ .errorHandlerFunction = clay_error_handler });
|
|
119
|
+
|
|
120
|
+
/* Register resize function pointer into mruby_helpers.c */
|
|
121
|
+
konpeito_set_clay_resize_fn(konpeito_clay_set_resize_frame_fn);
|
|
113
122
|
}
|
|
114
123
|
|
|
115
124
|
void konpeito_clay_tui_destroy(void) {
|
|
@@ -706,10 +715,10 @@ void konpeito_clay_tui_textbuf_set_str(int id, const char *str, int len) {
|
|
|
706
715
|
g_textbuf_cursors[id] = len;
|
|
707
716
|
}
|
|
708
717
|
|
|
709
|
-
/* ── Stubs for GUI-only features
|
|
718
|
+
/* ── Stubs for GUI-only features ── */
|
|
710
719
|
|
|
711
|
-
typedef void (*clay_frame_fn)(void);
|
|
712
|
-
void konpeito_clay_set_resize_frame_fn(clay_frame_fn fn) { (void)fn; }
|
|
713
720
|
void konpeito_clay_set_bg_color(int r, int g, int b) { (void)r; (void)g; (void)b; }
|
|
714
721
|
int konpeito_clay_is_resizing(void) { return 0; }
|
|
722
|
+
/* konpeito_clay_set_resize_frame_fn: no-op stub for TUI (forward-declared above) */
|
|
723
|
+
static void konpeito_clay_set_resize_frame_fn(clay_frame_fn_fwd fn) { (void)fn; }
|
|
715
724
|
|
data/lib/konpeito/version.rb
CHANGED