Skip to content

Commit 3210d6c

Browse files
committed
Fix clang range error in Python test
1 parent a422d1d commit 3210d6c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

core/vm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2121,7 +2121,7 @@ class Interpreter {
21212121
const VmNativeCallback &cb = nit->second;
21222122

21232123
int succ;
2124-
std::unique_ptr<JsonnetJsonValue> r(cb.cb(cb.ctx, &args3[0], &succ));
2124+
std::unique_ptr<JsonnetJsonValue> r(cb.cb(cb.ctx, args3.data(), &succ));
21252125

21262126
if (succ) {
21272127
bool unused;

include/libjsonnet.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,10 @@ void jsonnet_json_destroy(struct JsonnetVm *vm, struct JsonnetJsonValue *v);
138138
*
139139
* The returned JsonnetJsonValue* should be allocated with jsonnet_realloc. It will be cleaned up
140140
* along with the objects rooted at argv by libjsonnet when no-longer needed. Return a string upon
141-
* failure, which will appear in Jsonnet as an error.
141+
* failure, which will appear in Jsonnet as an error. The argv pointer is an array whose size
142+
* matches the array of parameters supplied when the native callback was originally registered.
142143
*
143144
* \param ctx User pointer, given in jsonnet_native_callback.
144-
* \param argc The number of arguments from Jsonnet code.
145145
* \param argv Array of arguments from Jsonnet code.
146146
* \param success Set this byref param to 1 to indicate success and 0 for failure.
147147
* \returns The content of the imported file, or an error message.

0 commit comments

Comments
 (0)