From ff93fd4f50321c6190e1659b19e64fef3045a484 Mon Sep 17 00:00:00 2001
From: Damien George <damien.p.george@gmail.com>
Date: Thu, 5 Oct 2017 10:48:23 +1100
Subject: [PATCH] py/persistentcode: Bump .mpy version number to version 3.

The binary and unary ops have changed bytecode encoding.
---
 ports/minimal/frozentest.mpy | Bin 255 -> 255 bytes
 py/persistentcode.c          |   2 +-
 tools/mpy-tool.py            |   2 +-
 3 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ports/minimal/frozentest.mpy b/ports/minimal/frozentest.mpy
index 87f9581bfe7290b67f473a49441fd25db204f459..7c6809bf6522f90339ec72ae0dcd16560ac5aafc 100644
GIT binary patch
delta 99
zcmey*_@6P_mzhaEhM55bc)1upGH7XNXlQFNF#MN3$RPHKA%)RM`XGZijAn%LnIN>t
juJ^M<Qy7gJO!*rOR6a9EA7qgJ3{u<p)S%`1#ONgeea9NG

delta 99
zcmey*_@6P_mx)O}hM55bc)1w9GiYgOXlQFNF#MN3&LH-KA%)RM`Z$9)jAn%LnIN>t
juJ^M<Qy7gJO!*rORDLo@A7_yM2~ykm(xBzT#ONgeh;SPS

diff --git a/py/persistentcode.c b/py/persistentcode.c
index d8b17c7e6..e0bb8f1d6 100644
--- a/py/persistentcode.c
+++ b/py/persistentcode.c
@@ -39,7 +39,7 @@
 #include "py/smallint.h"
 
 // The current version of .mpy files
-#define MPY_VERSION (2)
+#define MPY_VERSION (3)
 
 // The feature flags byte encodes the compile-time config options that
 // affect the generate bytecode.
diff --git a/tools/mpy-tool.py b/tools/mpy-tool.py
index ded962487..5de4ecf1c 100755
--- a/tools/mpy-tool.py
+++ b/tools/mpy-tool.py
@@ -57,7 +57,7 @@ class FreezeError(Exception):
         return 'error while freezing %s: %s' % (self.rawcode.source_file, self.msg)
 
 class Config:
-    MPY_VERSION = 2
+    MPY_VERSION = 3
     MICROPY_LONGINT_IMPL_NONE = 0
     MICROPY_LONGINT_IMPL_LONGLONG = 1
     MICROPY_LONGINT_IMPL_MPZ = 2
-- 
GitLab