1 | /* Copyright 2021 The TensorFlow Authors. All Rights Reserved. |
2 | |
3 | Licensed under the Apache License, Version 2.0 (the "License"); |
4 | you may not use this file except in compliance with the License. |
5 | You may obtain a copy of the License at |
6 | |
7 | http://www.apache.org/licenses/LICENSE-2.0 |
8 | |
9 | Unless required by applicable law or agreed to in writing, software |
10 | distributed under the License is distributed on an "AS IS" BASIS, |
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 | See the License for the specific language governing permissions and |
13 | limitations under the License. |
14 | ==============================================================================*/ |
15 | |
16 | #include "tensorflow/c/tf_tstring.h" |
17 | |
18 | #include "tensorflow/core/platform/ctstring_internal.h" |
19 | |
20 | void TF_StringInit(TF_TString *tstr) { TF_TString_Init(tstr); } |
21 | |
22 | void TF_StringCopy(TF_TString *dst, const char *src, size_t size) { |
23 | TF_TString_Copy(dst, src, size); |
24 | } |
25 | |
26 | void TF_StringAssignView(TF_TString *dst, const char *src, size_t size) { |
27 | TF_TString_AssignView(dst, src, size); |
28 | } |
29 | |
30 | const char *TF_StringGetDataPointer(const TF_TString *tstr) { |
31 | return TF_TString_GetDataPointer(tstr); |
32 | } |
33 | |
34 | TF_TString_Type TF_StringGetType(const TF_TString *str) { |
35 | return TF_TString_GetType(str); |
36 | } |
37 | |
38 | size_t TF_StringGetSize(const TF_TString *tstr) { |
39 | return TF_TString_GetSize(tstr); |
40 | } |
41 | |
42 | size_t TF_StringGetCapacity(const TF_TString *str) { |
43 | return TF_TString_GetCapacity(str); |
44 | } |
45 | |
46 | void TF_StringDealloc(TF_TString *tstr) { TF_TString_Dealloc(tstr); } |
47 | |