Rizin
unix-like reverse engineering framework and cli tools
opcode_37.c File Reference
#include "opcode.h"

Go to the source code of this file.

Functions

pyc_opcodesopcode_37 (void)
 

Function Documentation

◆ opcode_37()

pyc_opcodes* opcode_37 ( void  )

Definition at line 6 of file opcode_37.c.

6  {
7  pyc_opcodes *ret = opcode_36();
8  if (!ret) {
9  return NULL;
10  }
11 
12  ret->version_sig = (void *(*)())opcode_37;
13 
14  // These are removed since 3.6...
15  // and STORE_ANNOTATION introduced in 3.6!
16  rm_op(.op_obj = ret->opcodes, .op_name = "STORE_ANNOTATION", .op_code = 127);
17 
18  // These are new since Python 3.7
19  name_op(.op_obj = ret->opcodes, .op_name = "LOAD_METHOD", .op_code = 160);
20  nargs_op(.op_obj = ret->opcodes, .op_name = "CALL_METHOD", .op_code = 161);
21 
23  add_arg_fmt(ret, "CALL_FUNCTION_KW", format_CALL_FUNCTION_KW_36);
24  add_arg_fmt(ret, "CALL_FUNCTION_EX", format_CALL_FUNCTION_EX_36);
25  add_arg_fmt(ret, "MAKE_FUNCTION", format_MAKE_FUNCTION_arg_36);
26  add_arg_fmt(ret, "FORMAT_VALUE", format_value_flags_36);
27  add_arg_fmt(ret, "EXTENDED_ARG", format_extended_arg_36);
28 
29  return ret;
30 }
#define NULL
Definition: cris-opc.c:27
RZ_API void rz_list_purge(RZ_NONNULL RzList *list)
Empties the list without freeing the list pointer.
Definition: list.c:120
void add_arg_fmt(pyc_opcodes *ret, char *op_name, const char *(*formatter)(ut32 oparg))
Definition: opcode.c:234
pyc_opcodes * opcode_37(void)
Definition: opcode_37.c:6
#define nargs_op(...)
Definition: opcode.h:171
const char * format_MAKE_FUNCTION_arg_36(ut32 oparg)
const char * format_CALL_FUNCTION_KW_36(ut32 oparg)
const char * format_extended_arg_36(ut32 oparg)
pyc_opcodes * opcode_36(void)
Definition: opcode_36.c:6
#define rm_op(...)
Definition: opcode.h:175
const char * format_CALL_FUNCTION_EX_36(ut32 oparg)
const char * format_value_flags_36(ut32 oparg)
#define name_op(...)
Definition: opcode.h:133
char * op_name
Definition: opcode.h:38
void *(* version_sig)()
Definition: opcode.h:49
pyc_opcode_object * opcodes
Definition: opcode.h:51
RzList * opcode_arg_fmt
Definition: opcode.h:50

References add_arg_fmt(), format_CALL_FUNCTION_EX_36(), format_CALL_FUNCTION_KW_36(), format_extended_arg_36(), format_MAKE_FUNCTION_arg_36(), format_value_flags_36(), name_op, nargs_op, NULL, pyc_opcode_object::op_name, opcode_36(), opcode_37(), pyc_opcodes::opcode_arg_fmt, pyc_opcodes::opcodes, rm_op, rz_list_purge(), and pyc_opcodes::version_sig.

Referenced by opcode_37(), and opcode_38().