|
|
@@ -53,6 +53,11 @@ namespace Tensorflow |
|
|
|
|
|
|
|
|
public unsafe static byte[] ByteStringPiece(IntPtr handle) |
|
|
public unsafe static byte[] ByteStringPiece(IntPtr handle) |
|
|
{ |
|
|
{ |
|
|
|
|
|
if (handle == IntPtr.Zero) |
|
|
|
|
|
{ |
|
|
|
|
|
return new byte[0]; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
byte* str_data = (byte*)handle.ToPointer(); |
|
|
byte* str_data = (byte*)handle.ToPointer(); |
|
|
List<byte> bytes = new List<byte>(); |
|
|
List<byte> bytes = new List<byte>(); |
|
|
byte current = 255; |
|
|
byte current = 255; |
|
|
|