From fb6e5dce90e6404ffdcb2a3e35d110f5dae81337 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Fri, 26 Jul 2024 17:10:51 +0200 Subject: [PATCH] Fix undefined names in Python code (#99) * Fix undefined names in Python code * revert four files --- demo/_curses.py | 5 +++++ demo/bsdopendirtype.py | 1 + demo/recopendirtype.py | 1 + 3 files changed, 7 insertions(+) diff --git a/demo/_curses.py b/demo/_curses.py index 46443c24..d5e993f4 100644 --- a/demo/_curses.py +++ b/demo/_curses.py @@ -5,6 +5,11 @@ from _curses_cffi import ffi, lib +try: + unicode +except NameError: + unicode = str + def _copy_to_globals(name): globals()[name] = getattr(lib, name) diff --git a/demo/bsdopendirtype.py b/demo/bsdopendirtype.py index 75a996a2..283e33dc 100644 --- a/demo/bsdopendirtype.py +++ b/demo/bsdopendirtype.py @@ -1,3 +1,4 @@ +import os from _bsdopendirtype import ffi, lib diff --git a/demo/recopendirtype.py b/demo/recopendirtype.py index 768318bd..e22f92e9 100644 --- a/demo/recopendirtype.py +++ b/demo/recopendirtype.py @@ -1,3 +1,4 @@ +import os from _recopendirtype import ffi, lib