Files
Pyarmor-Static-Unpack-1shot/bytes/bytecode_map.h
Michael Hansen ab6aaf6da3 Convert opcode maps to C++ source with macros.
This removes the requirement to run a python script to preprocess the
input files before compiling pycdas/pycdc.
2023-12-05 14:30:33 -08:00

15 lines
281 B
C

#include "bytecode.h"
#define BEGIN_MAP(maj, min) \
int python_##maj##_##min##_map(int id) \
{ \
switch (id) {
#define MAP_OP(op, name) \
case op: return Pyc::name;
#define END_MAP() \
default: return Pyc::PYC_INVALID_OPCODE; \
} \
}