File tree 3 files changed +21
-3
lines changed
3 files changed +21
-3
lines changed Original file line number Diff line number Diff line change 1
1
cc_library (
2
- name = "transform-sdk " ,
2
+ name = "transform_sdk " ,
3
3
srcs = ["src/transform_sdk.cc" ],
4
4
hdrs = ["include/redpanda/transform_sdk.h" ],
5
5
copts = [
6
6
"-std=c++23" ,
7
7
"-fno-exceptions" ,
8
8
],
9
9
includes = ["include" ],
10
+ visibility = ["//visibility:public" ],
10
11
)
Original file line number Diff line number Diff line change @@ -22,3 +22,16 @@ cc_test(
22
22
"@googletest//:gtest_main" ,
23
23
],
24
24
)
25
+
26
+ cc_binary (
27
+ name = "main" ,
28
+ srcs = ["main.cc" ],
29
+ copts = [
30
+ "-std=c++23" ,
31
+ "-fno-exceptions" ,
32
+ ],
33
+ deps = [
34
+ ":js_vm" ,
35
+ "//src/transform-sdk/cpp:transform_sdk" ,
36
+ ],
37
+ )
Original file line number Diff line number Diff line change @@ -48,7 +48,9 @@ value& value::operator=(value&& other) noexcept {
48
48
if (this == &other) {
49
49
return *this ;
50
50
}
51
- JS_FreeValue (_ctx, _underlying);
51
+ if (_ctx != nullptr ) {
52
+ JS_FreeValue (_ctx, _underlying);
53
+ }
52
54
_ctx = std::exchange (other._ctx , nullptr );
53
55
_underlying = std::exchange (other._underlying , JS_UNINITIALIZED);
54
56
return *this ;
@@ -62,7 +64,9 @@ value& value::operator=(const value& other) noexcept {
62
64
if (this == &other) {
63
65
return *this ;
64
66
}
65
- JS_FreeValue (_ctx, _underlying);
67
+ if (_ctx != nullptr ) {
68
+ JS_FreeValue (_ctx, _underlying);
69
+ }
66
70
_ctx = other._ctx ;
67
71
_underlying = other.raw_dup ();
68
72
return *this ;
You can’t perform that action at this time.
0 commit comments