]> git.cworth.org Git - apitrace/blobdiff - common/pickle.hpp
Add gui support for trace profiling.
[apitrace] / common / pickle.hpp
index 736025b2a1cd8b3ee6583e8bfac336b30edad876..60694fa83d92d8da1e9891e6865574d13d7e0ea2 100644 (file)
@@ -268,6 +268,16 @@ public:
         os.put(u.c[0]);
     }
 
+    inline void writeByteArray(const void *buf, size_t length) {
+        os.put(GLOBAL);
+        os << "__builtin__\nbytearray\n";
+        os.put(BINPUT);
+        os.put(1);
+        writeString(static_cast<const char *>(buf), length);
+        os.put(TUPLE1);
+        os.put(REDUCE);
+    }
+
 protected:
     inline void putInt16(uint16_t i) {
         os.put( i        & 0xff);