mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-10 18:05:41 +08:00
Fix python wrapper
This commit is contained in:
@ -24,6 +24,10 @@ def _loadLibrary(path):
|
|||||||
library_name = 'libdocbuilder.c.so'
|
library_name = 'libdocbuilder.c.so'
|
||||||
elif 'darwin' == os_name:
|
elif 'darwin' == os_name:
|
||||||
library_name = 'libdocbuilder.c.dylib'
|
library_name = 'libdocbuilder.c.dylib'
|
||||||
|
# if there is no dylib file, get library from framework
|
||||||
|
if not os.path.exists(path + '/' + library_name):
|
||||||
|
path = path + '/docbuilder.c.framework'
|
||||||
|
library_name = 'docbuilder.c'
|
||||||
|
|
||||||
_lib = ctypes.CDLL(path + '/' + library_name)
|
_lib = ctypes.CDLL(path + '/' + library_name)
|
||||||
|
|
||||||
@ -437,7 +441,7 @@ class CDocBuilderValue:
|
|||||||
return CDocBuilderValue(OBJECT_HANDLE(_lib.CDocBuilderValue_Call6(self._internal, ctypes.c_wchar_p(name), values[0]._internal, values[1]._internal, values[2]._internal, values[3]._internal, values[4]._internal, values[5]._internal)))
|
return CDocBuilderValue(OBJECT_HANDLE(_lib.CDocBuilderValue_Call6(self._internal, ctypes.c_wchar_p(name), values[0]._internal, values[1]._internal, values[2]._internal, values[3]._internal, values[4]._internal, values[5]._internal)))
|
||||||
else:
|
else:
|
||||||
raise TypeError("Call() expects at most 6 arguments")
|
raise TypeError("Call() expects at most 6 arguments")
|
||||||
|
|
||||||
def append(self, value):
|
def append(self, value):
|
||||||
if not self.IsArray():
|
if not self.IsArray():
|
||||||
raise TypeError("Object is not an array")
|
raise TypeError("Object is not an array")
|
||||||
|
|||||||
Reference in New Issue
Block a user