aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2019-01-05 12:38:34 +0100
committerArmin Rigo <arigo@tunes.org>2019-01-05 12:38:34 +0100
commitea364df0cba2ead6ee61b82f4631cfc6ff36d4c7 (patch)
treef74ec2cc567d081f2a8efbad4059f32378527ac5 /lib_pypy/cffi
parenthappy new year - update copyright info (diff)
downloadpypy-ea364df0cba2ead6ee61b82f4631cfc6ff36d4c7.tar.gz
pypy-ea364df0cba2ead6ee61b82f4631cfc6ff36d4c7.tar.bz2
pypy-ea364df0cba2ead6ee61b82f4631cfc6ff36d4c7.zip
import cffi/a62ab002583f: ffi.release()
Diffstat (limited to 'lib_pypy/cffi')
-rw-r--r--lib_pypy/cffi/api.py3
-rw-r--r--lib_pypy/cffi/cparser.py7
2 files changed, 10 insertions, 0 deletions
diff --git a/lib_pypy/cffi/api.py b/lib_pypy/cffi/api.py
index 63468d06bc..326975d778 100644
--- a/lib_pypy/cffi/api.py
+++ b/lib_pypy/cffi/api.py
@@ -530,6 +530,9 @@ class FFI(object):
def from_handle(self, x):
return self._backend.from_handle(x)
+ def release(self, x):
+ self._backend.release(x)
+
def set_unicode(self, enabled_flag):
"""Windows: if 'enabled_flag' is True, enable the UNICODE and
_UNICODE defines in C, and declare the types like TCHAR and LPTCSTR
diff --git a/lib_pypy/cffi/cparser.py b/lib_pypy/cffi/cparser.py
index 1fc0ec6ed4..df6303d7b6 100644
--- a/lib_pypy/cffi/cparser.py
+++ b/lib_pypy/cffi/cparser.py
@@ -16,6 +16,13 @@ try:
except ImportError:
lock = None
+def _workaround_for_static_import_finders():
+ # Issue #392: packaging tools like cx_Freeze can not find these
+ # because pycparser uses exec dynamic import. This is an obscure
+ # workaround. This function is never called.
+ import pycparser.yacctab
+ import pycparser.lextab
+
CDEF_SOURCE_STRING = "<cdef source string>"
_r_comment = re.compile(r"/\*.*?\*/|//([^\n\\]|\\.)*?$",
re.DOTALL | re.MULTILINE)