summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShivank98 <shivankgautam98@gmail.com>2018-10-18 19:53:18 (GMT)
committerZachary Ware <zachary.ware@gmail.com>2018-10-18 19:53:18 (GMT)
commite3d1455fe472589c92b9e57b7d35addbb579edba (patch)
treecf853b3426147d3a95e7dd63f3c2e3acc3f439f6
parent1deea5e53991b46351f6bb395b22365c9455ed88 (diff)
downloadcpython-e3d1455fe472589c92b9e57b7d35addbb579edba.zip
cpython-e3d1455fe472589c92b9e57b7d35addbb579edba.tar.gz
cpython-e3d1455fe472589c92b9e57b7d35addbb579edba.tar.bz2
Update opcode.h header comment to mention the source data file (GH-9935)
This is intended to help code explorers find out more about what's defined there.
-rw-r--r--Include/opcode.h2
-rw-r--r--Tools/scripts/generate_opcode_h.py5
2 files changed, 4 insertions, 3 deletions
diff --git a/Include/opcode.h b/Include/opcode.h
index e564bb9..2a29e97 100644
--- a/Include/opcode.h
+++ b/Include/opcode.h
@@ -1,4 +1,4 @@
-/* Auto-generated by Tools/scripts/generate_opcode_h.py */
+/* Auto-generated by Tools/scripts/generate_opcode_h.py from Lib/opcode.py */
#ifndef Py_OPCODE_H
#define Py_OPCODE_H
#ifdef __cplusplus
diff --git a/Tools/scripts/generate_opcode_h.py b/Tools/scripts/generate_opcode_h.py
index 6622a3c..b184ffa 100644
--- a/Tools/scripts/generate_opcode_h.py
+++ b/Tools/scripts/generate_opcode_h.py
@@ -3,7 +3,8 @@
import sys
import tokenize
-header = """/* Auto-generated by Tools/scripts/generate_opcode_h.py */
+header = """
+/* Auto-generated by Tools/scripts/generate_opcode_h.py from Lib/opcode.py */
#ifndef Py_OPCODE_H
#define Py_OPCODE_H
#ifdef __cplusplus
@@ -12,7 +13,7 @@ extern "C" {
/* Instruction opcodes for compiled code */
-"""
+""".lstrip()
footer = """
/* EXCEPT_HANDLER is a special, implicit block type which is created when