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
82e1a90b
Commit
82e1a90b
authored
Aug 14, 2014
by
Ghislain MARY
Browse files
Improve int types checking in the Python wrapper.
parent
61d1f7b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
tools/python/apixml2python/linphone.py
tools/python/apixml2python/linphone.py
+10
-10
No files found.
tools/python/apixml2python/linphone.py
View file @
82e1a90b
...
...
@@ -70,20 +70,20 @@ class ArgumentType:
elif
self
.
basic_type
==
'int'
:
if
'unsigned'
in
splitted_type
:
self
.
type_str
=
'unsigned int'
self
.
check_func
=
'Py
Long
_Check'
self
.
convert_func
=
'Py
Long
_AsUnsignedLong'
self
.
check_func
=
'Py
Int
_Check'
self
.
convert_func
=
'Py
Int
_AsUnsignedLong
Mask
'
self
.
fmt_str
=
'I'
self
.
cfmt_str
=
'%u'
else
:
self
.
type_str
=
'int'
self
.
check_func
=
'Py
Long
_Check'
self
.
convert_func
=
'Py
Long_AsLong
'
self
.
check_func
=
'Py
Int
_Check'
self
.
convert_func
=
'Py
Int_AS_LONG
'
self
.
fmt_str
=
'i'
self
.
cfmt_str
=
'%d'
elif
self
.
basic_type
in
[
'int8_t'
,
'int16_t'
'int32_t'
]:
self
.
type_str
=
'int'
self
.
check_func
=
'Py
Long
_Check'
self
.
convert_func
=
'Py
Long_AsLong
'
self
.
check_func
=
'Py
Int
_Check'
self
.
convert_func
=
'Py
Int_AS_LONG
'
if
self
.
basic_type
==
'int8_t'
:
self
.
fmt_str
=
'c'
elif
self
.
basic_type
==
'int16_t'
:
...
...
@@ -93,8 +93,8 @@ class ArgumentType:
self
.
cfmt_str
=
'%d'
elif
self
.
basic_type
in
[
'uint8_t'
,
'uint16_t'
,
'uint32_t'
]:
self
.
type_str
=
'unsigned int'
self
.
check_func
=
'Py
Long
_Check'
self
.
convert_func
=
'Py
Long
_AsUnsignedLong'
self
.
check_func
=
'Py
Int
_Check'
self
.
convert_func
=
'Py
Int
_AsUnsignedLong
Mask
'
if
self
.
basic_type
==
'uint8_t'
:
self
.
fmt_str
=
'b'
elif
self
.
basic_type
==
'uint16_t'
:
...
...
@@ -116,8 +116,8 @@ class ArgumentType:
self
.
cfmt_str
=
'%lu'
elif
self
.
basic_type
==
'size_t'
:
self
.
type_str
=
'size_t'
self
.
check_func
=
'Py
Long
_Check'
self
.
convert_func
=
'Py
Long
_AsSsize_t'
self
.
check_func
=
'Py
Int
_Check'
self
.
convert_func
=
'Py
Int
_AsSsize_t'
self
.
fmt_str
=
'n'
self
.
cfmt_str
=
'%lu'
elif
self
.
basic_type
in
[
'float'
,
'double'
]:
...
...
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