Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
0130de40
Commit
0130de40
authored
Sep 07, 2017
by
François Grisez
Browse files
Makes the CSharp wrapper generator to work with Python 3
parent
daa9ed3f
Changes
1
Hide whitespace changes
Inline
Side-by-side
wrappers/csharp/genwrapper.py
View file @
0130de40
...
...
@@ -22,7 +22,7 @@ import sys
import
pystache
sys
.
path
.
insert
(
0
,
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'..'
,
'..'
,
'tools'
))
print
sys
.
path
print
(
sys
.
path
)
import
genapixml
as
CApi
import
abstractapi
as
AbsApi
import
metadoc
...
...
@@ -604,17 +604,18 @@ def main():
interfaces
=
[]
classes
=
[]
for
_class
in
parser
.
classesIndex
.
values
()
+
parser
.
interfacesIndex
.
values
():
if
_class
is
not
None
:
try
:
if
type
(
_class
)
is
AbsApi
.
Class
:
impl
=
ClassImpl
(
_class
,
translator
)
classes
.
append
(
impl
)
else
:
impl
=
InterfaceImpl
(
_class
,
translator
)
interfaces
.
append
(
impl
)
except
AbsApi
.
Error
as
e
:
print
(
'Could not translate {0}: {1}'
.
format
(
_class
.
name
.
to_camel_case
(
fullName
=
True
),
e
.
args
[
0
]))
for
index
in
[
parser
.
classesIndex
,
parser
.
interfacesIndex
]:
for
_class
in
index
.
values
():
if
_class
is
not
None
:
try
:
if
type
(
_class
)
is
AbsApi
.
Class
:
impl
=
ClassImpl
(
_class
,
translator
)
classes
.
append
(
impl
)
else
:
impl
=
InterfaceImpl
(
_class
,
translator
)
interfaces
.
append
(
impl
)
except
AbsApi
.
Error
as
e
:
print
(
'Could not translate {0}: {1}'
.
format
(
_class
.
name
.
to_camel_case
(
fullName
=
True
),
e
.
args
[
0
]))
wrapper
=
WrapperImpl
(
enums
,
interfaces
,
classes
)
render
(
renderer
,
wrapper
,
args
.
outputdir
+
"/"
+
args
.
outputfile
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment