Author: Wim Lavrijsen <[email protected]>
Branch: cppyy-packaging
Changeset: r94452:ae0244400329
Date: 2018-04-26 10:08 -0700
http://bitbucket.org/pypy/pypy/changeset/ae0244400329/
Log: anotator fixes
diff --git a/pypy/module/_cppyy/converter.py b/pypy/module/_cppyy/converter.py
--- a/pypy/module/_cppyy/converter.py
+++ b/pypy/module/_cppyy/converter.py
@@ -687,6 +687,8 @@
class FunctionPointerConverter(TypeConverter):
+ _immutable_fields_ = ['signature']
+
def __init__(self, space, signature):
self.signature = signature
@@ -780,7 +782,9 @@
return _converters["internal_enum_type_t"](space, default)
elif "(*)" in name or "::*)" in name:
# function pointer
- return FunctionPointerConverter(space, name[name.find("*)")+2:])
+ pos = name.find("*)")
+ if pos > 0:
+ return FunctionPointerConverter(space, name[pos+2:])
# 5) void* or void converter (which fails on use)
if 0 <= compound.find('*'):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit