@@ -295,9 +295,7 @@ public static native void TF_TString_Copy(TF_TString dst, String src,
295295// #define TENSORFLOW_TSL_C_TSL_STATUS_H_
296296
297297// #ifdef __cplusplus
298- // Targeting ../TSL_Status.java
299-
300-
298+ // #endif
301299
302300// --------------------------------------------------------------------------
303301// TSL_Code holds an error code. The enum values here are identical to
@@ -325,43 +323,30 @@ public static native void TF_TString_Copy(TF_TString dst, String src,
325323// --------------------------------------------------------------------------
326324
327325// Return a new status object.
328- public static native TSL_Status TSL_NewStatus ();
329326
330327// Delete a previously created status object.
331- public static native void TSL_DeleteStatus (TSL_Status arg0 );
332328
333329// Record <code, msg> in *s. Any previous information is lost.
334330// A common use is to clear a status: TSL_SetStatus(s, TSL_OK, "");
335- public static native void TSL_SetStatus (TSL_Status s , @ Cast ("TSL_Code" ) int code , @ Cast ("const char*" ) BytePointer msg );
336- public static native void TSL_SetStatus (TSL_Status s , @ Cast ("TSL_Code" ) int code , String msg );
337331
338332// Record <key, value> as a payload in *s. The previous payload having the
339333// same key (if any) is overwritten. Payload will not be added if the Status
340334// is OK.
341- public static native void TSL_SetPayload (TSL_Status s , @ Cast ("const char*" ) BytePointer key , @ Cast ("const char*" ) BytePointer value );
342- public static native void TSL_SetPayload (TSL_Status s , String key , String value );
343- // Targeting ../TSL_PayloadVisitor.java
344335
345-
346- public static native void TSL_ForEachPayload ( @ Const TSL_Status s , TSL_PayloadVisitor visitor ,
347- Pointer capture );
336+ // Iterates over the stored payloads and calls the `visitor(key, value)`
337+ // callable for each one. `key` and `value` is only usable during the callback.
338+ // `capture` will be passed to the callback without modification.
348339
349340// Convert from an I/O error code (e.g., errno) to a TSL_Status value.
350341// Any previous information is lost. Prefer to use this instead of TSL_SetStatus
351342// when the error comes from I/O operations.
352- public static native void TSL_SetStatusFromIOError (TSL_Status s , int error_code ,
353- @ Cast ("const char*" ) BytePointer context );
354- public static native void TSL_SetStatusFromIOError (TSL_Status s , int error_code ,
355- String context );
356343
357344// Return the code record in *s.
358- public static native @ Cast ("TSL_Code" ) int TSL_GetCode (@ Const TSL_Status s );
359345
360346// Return a pointer to the (null-terminated) error message in *s. The
361347// return value points to memory that is only usable until the next
362348// mutation to *s. Always returns an empty string if TSL_GetCode(s) is
363349// TSL_OK.
364- public static native @ Cast ("const char*" ) BytePointer TSL_Message (@ Const TSL_Status s );
365350
366351// #ifdef __cplusplus /* end extern "C" */
367352// #endif
@@ -3891,8 +3876,7 @@ public static native void TFE_ContextExportRunMetadata(TFE_Context ctx,
38913876
38923877 // namespace tensorflow
38933878
3894- public static native TFE_TensorHandle TFE_NewTensorHandle (@ Const @ ByRef Tensor t ,
3895- TF_Status status );
3879+
38963880// #endif
38973881
38983882// #endif // TENSORFLOW_C_EAGER_C_API_H_
@@ -4823,6 +4807,8 @@ public static native void TFE_InitializeLocalOnlyContext(TFE_Context ctx,
48234807// #ifndef TENSORFLOW_JAVA_SCOPE_H_
48244808// #define TENSORFLOW_JAVA_SCOPE_H_
48254809
4810+ // #include <string>
4811+
48264812// #include "tensorflow/c/c_api.h"
48274813// Targeting ../TFJ_Scope.java
48284814
0 commit comments