Home
last modified time | relevance | path

Searched refs:s (Results 1 – 14 of 14) sorted by relevance

/libnativehelper/
DExpandableString.c23 void ExpandableStringInitialize(struct ExpandableString *s) { in ExpandableStringInitialize() argument
24 memset(s, 0, sizeof(*s)); in ExpandableStringInitialize()
27 void ExpandableStringRelease(struct ExpandableString* s) { in ExpandableStringRelease() argument
28 free(s->data); in ExpandableStringRelease()
29 memset(s, 0, sizeof(*s)); in ExpandableStringRelease()
32 bool ExpandableStringAppend(struct ExpandableString* s, const char* text) { in ExpandableStringAppend() argument
34 size_t requiredSize = s->dataSize + textSize + 1; in ExpandableStringAppend()
35 char* data = (char*) realloc(s->data, requiredSize); in ExpandableStringAppend()
39 s->data = data; in ExpandableStringAppend()
40 memcpy(s->data + s->dataSize, text, textSize + 1); in ExpandableStringAppend()
[all …]
DExpandableString.h32 void ExpandableStringInitialize(struct ExpandableString* s);
35 void ExpandableStringRelease(struct ExpandableString* s);
39 bool ExpandableStringAppend(struct ExpandableString* s, const char* text);
43 bool ExpandableStringAssign(struct ExpandableString*s, const char* text);
DJniInvocation.c78 DlSymbol s = DlGetSymbol(library, symbol); in FindSymbol() local
79 if (s == NULL) { in FindSymbol()
82 return s; in FindSymbol()
DNOTICE93 Contribution(s) alone or by combination of their Contribution(s)
94 with the Work to which such Contribution(s) was submitted. If You
/libnativehelper/tests/
DExpandableString_test.cpp28 struct ExpandableString s; in TEST() local
29 ExpandableStringInitialize(&s); in TEST()
30 EXPECT_TRUE(s.data == NULL); in TEST()
31 EXPECT_EQ(s.dataSize, 0u); in TEST()
32 EXPECT_TRUE(ExpandableStringAppend(&s, kAhoy)); in TEST()
33 EXPECT_TRUE(s.data != NULL); in TEST()
34 EXPECT_GE(s.dataSize, strlen(kAhoy)); in TEST()
35 ExpandableStringRelease(&s); in TEST()
36 EXPECT_TRUE(s.data == NULL); in TEST()
37 EXPECT_GE(s.dataSize, 0u); in TEST()
[all …]
Dscoped_string_chars_test.cpp21 void TestCompilationScopedStringChars(JNIEnv* env, string s) { in TestCompilationScopedStringChars() argument
22 ScopedStringChars ssc(s); in TestCompilationScopedStringChars()
Dscoped_utf_chars_test.cpp21 void TestCompilationScopedUtfChars(JNIEnv* env, jstring s) { in TestCompilationScopedUtfChars() argument
22 ScopedUtfChars suc(env, s); in TestCompilationScopedUtfChars()
DJniSafeRegisterNativeMethods_test.cpp560 size_t s = 0; in SumUpVector() local
562 s += static_cast<size_t>(GetTestValue(elem)); in SumUpVector()
564 return s; in SumUpVector()
/libnativehelper/header_only_include/nativehelper/
Dscoped_local_ref.h32 ScopedLocalRef(ScopedLocalRef&& s) noexcept : mEnv(s.mEnv), mLocalRef(s.release()) { in ScopedLocalRef() argument
68 ScopedLocalRef& operator=(ScopedLocalRef&& s) noexcept {
69 reset(s.release());
70 mEnv = s.mEnv;
Dscoped_utf_chars.h37 ScopedUtfChars(JNIEnv* env, jstring s) : env_(env), string_(s) { in ScopedUtfChars() argument
38 if (s == nullptr) { in ScopedUtfChars()
42 utf_chars_ = env->GetStringUTFChars(s, nullptr); in ScopedUtfChars()
Dscoped_string_chars.h36 ScopedStringChars(JNIEnv* env, jstring s) : env_(env), string_(s), size_(0) { in ScopedStringChars() argument
37 if (s == nullptr) { in ScopedStringChars()
/libnativehelper/include/nativehelper/
DJNIHelp.h57 [[maybe_unused]] static void ExpandableStringInitialize(struct ExpandableString* s) { in ExpandableStringInitialize() argument
58 memset(s, 0, sizeof(*s)); in ExpandableStringInitialize()
61 [[maybe_unused]] static void ExpandableStringRelease(struct ExpandableString* s) { in ExpandableStringRelease() argument
62 free(s->data); in ExpandableStringRelease()
63 memset(s, 0, sizeof(*s)); in ExpandableStringRelease()
66 [[maybe_unused]] static bool ExpandableStringAppend(struct ExpandableString* s, const char* text) { in ExpandableStringAppend() argument
68 size_t requiredSize = s->dataSize + textSize + 1; in ExpandableStringAppend()
69 char* data = (char*)realloc(s->data, requiredSize); in ExpandableStringAppend()
73 s->data = data; in ExpandableStringAppend()
74 memcpy(s->data + s->dataSize, text, textSize + 1); in ExpandableStringAppend()
[all …]
DtoStringArray.h36 ScopedLocalRef<jstring> s(env, env->NewStringUTF(visitor(i))); in toStringArray()
40 env->SetObjectArrayElement(result.get(), i, s.get()); in toStringArray()
/libnativehelper/include_jni/
Djni.h113 jshort s; member