mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-05 11:30:06 +01:00
Add support for using the /Constrained/ annotation
This commit is contained in:
@@ -596,6 +596,7 @@ class ParamDef(BaseDef):
|
||||
self.transferBack = False # transfer ownership of arg from C++ to Python?
|
||||
self.transferThis = False # ownership of 'this' pointer transferred to this arg
|
||||
self.keepReference = False # an extra reference to the arg is held
|
||||
self.constrained = False # limit auto-conversion of similar types (like float -> int)
|
||||
self.__dict__.update(kw)
|
||||
if element is not None:
|
||||
self.extract(element)
|
||||
|
||||
@@ -959,6 +959,8 @@ from .%s import *
|
||||
annotations.append('ArraySize')
|
||||
if item.keepReference:
|
||||
annotations.append('KeepReference')
|
||||
if item.constrained:
|
||||
annotations.append('Constrained')
|
||||
|
||||
if isinstance(item, (extractors.ParamDef, extractors.FunctionDef)):
|
||||
if item.transfer:
|
||||
|
||||
Reference in New Issue
Block a user