MCPcopy Create free account
hub / github.com/ReadyTalk/avian / add

Function add

classpath/java-lang.cpp:93–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91namespace {
92
93void add(JNIEnv* e, jobjectArray array, unsigned index, const char* format, ...)
94{
95 int size = 256;
96 while (true) {
97 va_list a;
98 va_start(a, format);
99 RUNTIME_ARRAY(char, buffer, size);
100 int r = vsnprintf(RUNTIME_ARRAY_BODY(buffer), size - 1, format, a);
101 va_end(a);
102 if (r >= 0 and r < size - 1) {
103 e->SetObjectArrayElement(
104 array, index++, e->NewStringUTF(RUNTIME_ARRAY_BODY(buffer)));
105 return;
106 }
107
108 size *= 2;
109 }
110}
111
112#ifdef PLATFORM_WINDOWS
113

Calls 1

vsnprintfFunction · 0.85

Tested by

no test coverage detected