github.com/bytedance/sonic@v1.11.7-0.20240517092252-d2edb31b167b/native/vstring.h (about) 1 2 #pragma once 3 4 #include "scanning.h" 5 6 static always_inline void vstring_1(const GoString *src, long *p, JsonState *ret, uint64_t flags) { 7 int64_t v = -1; 8 int64_t i = *p; 9 ssize_t e = advance_string(src, i, &v, flags); 10 11 /* check for errors */ 12 if (e < 0) { 13 *p = src->len; 14 ret->vt = e; 15 return; 16 } 17 18 /* update the result, and fix the escape position (escaping past the end of string) */ 19 *p = e; 20 ret->iv = i; 21 ret->vt = V_STRING; 22 ret->ep = v >= e ? -1 : v; 23 }