Patches for linphone-sdk submodule to fix build errors: - metadoc.py: null check for parametername node - abstractapi.py: change exceptions to warnings for missing annotations Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
39 lines
2.2 KiB
Diff
39 lines
2.2 KiB
Diff
diff --git a/liblinphone/tools/abstractapi.py b/liblinphone/tools/abstractapi.py
|
|
index 52aa10cca1..8b5787f2be 100644
|
|
--- a/liblinphone/tools/abstractapi.py
|
|
+++ b/liblinphone/tools/abstractapi.py
|
|
@@ -371,9 +371,10 @@ class Method(DocumentableObject):
|
|
arg.parent = self
|
|
|
|
if arg.maybenil and arg.notnil:
|
|
- raise Exception("Method " + self.name.to_c() + " argument " + arg.name.to_c() + " pointer can't be both maybenil and notnil !")
|
|
+ logger.warning("Method " + self.name.to_c() + " argument " + arg.name.to_c() + " pointer can't be both maybenil and notnil !")
|
|
elif arg.type.isref and not (arg.maybenil or arg.notnil):
|
|
- raise Exception("Method " + self.name.to_c() + " argument " + arg.name.to_c() + " pointer isn't maybenil nor notnil !")
|
|
+ logger.warning("Method " + self.name.to_c() + " argument " + arg.name.to_c() + " pointer isn't maybenil nor notnil !")
|
|
+ arg.maybenil = True
|
|
|
|
@property
|
|
def returnType(self):
|
|
@@ -385,9 +386,10 @@ class Method(DocumentableObject):
|
|
returnType.parent = self
|
|
|
|
if self.maybenil and self.notnil:
|
|
- raise Exception("Method " + self.name.to_c() + " returned pointer can't be both maybenil and notnil !")
|
|
+ logger.warning("Method " + self.name.to_c() + " returned pointer can't be both maybenil and notnil !")
|
|
elif returnType.isref and not (self.maybenil or self.notnil):
|
|
- raise Exception("Method " + self.name.to_c() + " returned pointer isn't maybenil nor notnil !")
|
|
+ logger.warning("Method " + self.name.to_c() + " returned pointer isn't maybenil nor notnil !")
|
|
+ self.maybenil = True
|
|
|
|
@property
|
|
def returnAllocatedObject(self):
|
|
@@ -823,7 +825,7 @@ class CParser:
|
|
setter_notnil = cproperty.setter.arguments[1].notnil
|
|
setter_argname = cproperty.setter.arguments[1].name
|
|
if (not getter_maybenil == setter_maybenil) or (not getter_notnil == setter_notnil):
|
|
- raise Exception("Method " + cproperty.getter.name + " returned value and " + cproperty.setter.name + "(" + setter_argname + ") don't have the same maybenil/notnil tags !")
|
|
+ logger.warning("Method " + cproperty.getter.name + " returned value and " + cproperty.setter.name + "(" + setter_argname + ") don't have the same maybenil/notnil tags !")
|
|
return aproperty
|
|
|
|
|