Skip to content

Commit a774384

Browse files
committed
add macro with assertion as per Mark's recommendation
1 parent 1136a4e commit a774384

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Objects/codeobject.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ PyCode_ClearWatcher(int watcher_id)
108108
* generic helpers
109109
******************/
110110

111+
#define _PyCodeObject_CAST(op) (assert(PyCode_Check(op)), (PyCodeObject *)(op))
112+
111113
static int
112114
should_intern_string(PyObject *o)
113115
{

0 commit comments

Comments
 (0)