change void* -> char* for string attr
This commit is contained in:
parent
21135f9a88
commit
c7f3d3f943
@ -388,7 +388,7 @@ DEFINE_TF_GETATTR(Float, float, float, "float", f)
|
|||||||
DEFINE_TF_GETATTR(Bool, TF_Bool, bool, "bool", b)
|
DEFINE_TF_GETATTR(Bool, TF_Bool, bool, "bool", b)
|
||||||
|
|
||||||
void TF_OpKernelConstruction_GetAttrString(TF_OpKernelConstruction* ctx,
|
void TF_OpKernelConstruction_GetAttrString(TF_OpKernelConstruction* ctx,
|
||||||
const char* attr_name, void* value,
|
const char* attr_name, char* value,
|
||||||
size_t max_length,
|
size_t max_length,
|
||||||
TF_Status* status) {
|
TF_Status* status) {
|
||||||
std::string v;
|
std::string v;
|
||||||
@ -406,7 +406,7 @@ void TF_OpKernelConstruction_GetAttrString(TF_OpKernelConstruction* ctx,
|
|||||||
|
|
||||||
void TF_OpKernelConstruction_GetAttrStringList(TF_OpKernelConstruction* ctx,
|
void TF_OpKernelConstruction_GetAttrStringList(TF_OpKernelConstruction* ctx,
|
||||||
const char* attr_name,
|
const char* attr_name,
|
||||||
void** values, size_t* lengths,
|
char** values, size_t* lengths,
|
||||||
int max_values, void* storage,
|
int max_values, void* storage,
|
||||||
size_t storage_size,
|
size_t storage_size,
|
||||||
TF_Status* status) {
|
TF_Status* status) {
|
||||||
|
@ -256,7 +256,7 @@ TF_CAPI_EXPORT extern void TF_OpKernelConstruction_GetAttrBool(
|
|||||||
// If the attribute could not be found or could not be interpreted as
|
// If the attribute could not be found or could not be interpreted as
|
||||||
// string, *status is populated with an error.
|
// string, *status is populated with an error.
|
||||||
TF_CAPI_EXPORT extern void TF_OpKernelConstruction_GetAttrString(
|
TF_CAPI_EXPORT extern void TF_OpKernelConstruction_GetAttrString(
|
||||||
TF_OpKernelConstruction* ctx, const char* attr_name, void* val,
|
TF_OpKernelConstruction* ctx, const char* attr_name, char* val,
|
||||||
size_t max_length, TF_Status* status);
|
size_t max_length, TF_Status* status);
|
||||||
|
|
||||||
// Interprets the named kernel construction attribute as a TF_DataType array and
|
// Interprets the named kernel construction attribute as a TF_DataType array and
|
||||||
@ -318,7 +318,7 @@ TF_CAPI_EXPORT extern void TF_OpKernelConstruction_GetAttrBoolList(
|
|||||||
// TF_OpKernelConstruction_GetAttrSize(ctx, attr_name, list_size,
|
// TF_OpKernelConstruction_GetAttrSize(ctx, attr_name, list_size,
|
||||||
// total_size).
|
// total_size).
|
||||||
TF_CAPI_EXPORT extern void TF_OpKernelConstruction_GetAttrStringList(
|
TF_CAPI_EXPORT extern void TF_OpKernelConstruction_GetAttrStringList(
|
||||||
TF_OpKernelConstruction* ctx, const char* attr_name, void** vals,
|
TF_OpKernelConstruction* ctx, const char* attr_name, char** vals,
|
||||||
size_t* lengths, int max_values, void* storage, size_t storage_size,
|
size_t* lengths, int max_values, void* storage, size_t storage_size,
|
||||||
TF_Status* status);
|
TF_Status* status);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user