Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
9a2f3268
提交
9a2f3268
authored
6月 27, 2017
作者:
Mike Jerris
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-10427: move mod_python to use swig3.0 so we can reswig on debian9
上级
38a215d2
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
34 行增加
和
26 行删除
+34
-26
Makefile.am
src/mod/languages/mod_python/Makefile.am
+1
-1
freeswitch.py
src/mod/languages/mod_python/freeswitch.py
+1
-1
mod_python_wrap.cpp
src/mod/languages/mod_python/mod_python_wrap.cpp
+32
-24
没有找到文件。
src/mod/languages/mod_python/Makefile.am
浏览文件 @
9a2f3268
...
@@ -20,7 +20,7 @@ swigclean: clean
...
@@ -20,7 +20,7 @@ swigclean: clean
rm
-f
mod_python_wrap.
*
freeswitch.py
rm
-f
mod_python_wrap.
*
freeswitch.py
mod_python_wrap.cpp
:
mod_python_extra.c hack.diff
mod_python_wrap.cpp
:
mod_python_extra.c hack.diff
swig
2
.0
-python
-c
++
-I
../../../../src/include
-oh
mod_python_wrap.h
-o
mod_python_wrap.cpp mod_python.i
swig
3
.0
-python
-c
++
-I
../../../../src/include
-oh
mod_python_wrap.h
-o
mod_python_wrap.cpp mod_python.i
echo
"#include
\"
mod_python_extra.c
\"
"
>>
mod_python_wrap.cpp
echo
"#include
\"
mod_python_extra.c
\"
"
>>
mod_python_wrap.cpp
patch
-s
-p0
-i
hack.diff
patch
-s
-p0
-i
hack.diff
...
...
src/mod/languages/mod_python/freeswitch.py
浏览文件 @
9a2f3268
# This file was automatically generated by SWIG (http://www.swig.org).
# This file was automatically generated by SWIG (http://www.swig.org).
# Version
2.0.1
2
# Version
3.0.
2
#
#
# Do not make changes to this file unless you know what you are doing--modify
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
# the SWIG interface file instead.
...
...
src/mod/languages/mod_python/mod_python_wrap.cpp
浏览文件 @
9a2f3268
/* ----------------------------------------------------------------------------
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* This file was automatically generated by SWIG (http://www.swig.org).
* Version
2.0.1
2
* Version
3.0.
2
*
*
* This file is not intended to be easily readable and contains a number of
* This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make
* coding conventions designed to improve portability and efficiency. Do not make
...
@@ -560,14 +560,14 @@ SWIG_MangledTypeQueryModule(swig_module_info *start,
...
@@ -560,14 +560,14 @@ SWIG_MangledTypeQueryModule(swig_module_info *start,
swig_module_info
*
iter
=
start
;
swig_module_info
*
iter
=
start
;
do
{
do
{
if
(
iter
->
size
)
{
if
(
iter
->
size
)
{
register
size_t l = 0;
size_t
l
=
0
;
register
size_t r = iter->size - 1;
size_t
r
=
iter
->
size
-
1
;
do
{
do
{
/* since l+r >= 0, we can (>> 1) instead (/ 2) */
/* since l+r >= 0, we can (>> 1) instead (/ 2) */
register
size_t i = (l + r) >> 1;
size_t
i
=
(
l
+
r
)
>>
1
;
const
char
*
iname
=
iter
->
types
[
i
]
->
name
;
const
char
*
iname
=
iter
->
types
[
i
]
->
name
;
if
(
iname
)
{
if
(
iname
)
{
register
int compare = strcmp(name, iname);
int
compare
=
strcmp
(
name
,
iname
);
if
(
compare
==
0
)
{
if
(
compare
==
0
)
{
return
iter
->
types
[
i
];
return
iter
->
types
[
i
];
}
else
if
(
compare
<
0
)
{
}
else
if
(
compare
<
0
)
{
...
@@ -611,7 +611,7 @@ SWIG_TypeQueryModule(swig_module_info *start,
...
@@ -611,7 +611,7 @@ SWIG_TypeQueryModule(swig_module_info *start,
of the str field (the human readable name) */
of the str field (the human readable name) */
swig_module_info
*
iter
=
start
;
swig_module_info
*
iter
=
start
;
do
{
do
{
register
size_t i = 0;
size_t
i
=
0
;
for
(;
i
<
iter
->
size
;
++
i
)
{
for
(;
i
<
iter
->
size
;
++
i
)
{
if
(
iter
->
types
[
i
]
->
str
&&
(
SWIG_TypeEquiv
(
iter
->
types
[
i
]
->
str
,
name
)))
if
(
iter
->
types
[
i
]
->
str
&&
(
SWIG_TypeEquiv
(
iter
->
types
[
i
]
->
str
,
name
)))
return
iter
->
types
[
i
];
return
iter
->
types
[
i
];
...
@@ -630,10 +630,10 @@ SWIG_TypeQueryModule(swig_module_info *start,
...
@@ -630,10 +630,10 @@ SWIG_TypeQueryModule(swig_module_info *start,
SWIGRUNTIME
char
*
SWIGRUNTIME
char
*
SWIG_PackData
(
char
*
c
,
void
*
ptr
,
size_t
sz
)
{
SWIG_PackData
(
char
*
c
,
void
*
ptr
,
size_t
sz
)
{
static
const
char
hex
[
17
]
=
"0123456789abcdef"
;
static
const
char
hex
[
17
]
=
"0123456789abcdef"
;
register
const unsigned char *u = (unsigned char *) ptr;
const
unsigned
char
*
u
=
(
unsigned
char
*
)
ptr
;
register
const unsigned char *eu = u + sz;
const
unsigned
char
*
eu
=
u
+
sz
;
for
(;
u
!=
eu
;
++
u
)
{
for
(;
u
!=
eu
;
++
u
)
{
register
unsigned char uu = *u;
unsigned
char
uu
=
*
u
;
*
(
c
++
)
=
hex
[(
uu
&
0xf0
)
>>
4
];
*
(
c
++
)
=
hex
[(
uu
&
0xf0
)
>>
4
];
*
(
c
++
)
=
hex
[
uu
&
0xf
];
*
(
c
++
)
=
hex
[
uu
&
0xf
];
}
}
...
@@ -645,11 +645,11 @@ SWIG_PackData(char *c, void *ptr, size_t sz) {
...
@@ -645,11 +645,11 @@ SWIG_PackData(char *c, void *ptr, size_t sz) {
*/
*/
SWIGRUNTIME
const
char
*
SWIGRUNTIME
const
char
*
SWIG_UnpackData
(
const
char
*
c
,
void
*
ptr
,
size_t
sz
)
{
SWIG_UnpackData
(
const
char
*
c
,
void
*
ptr
,
size_t
sz
)
{
register
unsigned char *u = (unsigned char *) ptr;
unsigned
char
*
u
=
(
unsigned
char
*
)
ptr
;
register
const unsigned char *eu = u + sz;
const
unsigned
char
*
eu
=
u
+
sz
;
for
(;
u
!=
eu
;
++
u
)
{
for
(;
u
!=
eu
;
++
u
)
{
register
char d = *(c++);
char
d
=
*
(
c
++
);
register
unsigned char uu;
unsigned
char
uu
;
if
((
d
>=
'0'
)
&&
(
d
<=
'9'
))
if
((
d
>=
'0'
)
&&
(
d
<=
'9'
))
uu
=
((
d
-
'0'
)
<<
4
);
uu
=
((
d
-
'0'
)
<<
4
);
else
if
((
d
>=
'a'
)
&&
(
d
<=
'f'
))
else
if
((
d
>=
'a'
)
&&
(
d
<=
'f'
))
...
@@ -1326,7 +1326,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
...
@@ -1326,7 +1326,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
}
}
if
(
!
PyTuple_Check
(
args
))
{
if
(
!
PyTuple_Check
(
args
))
{
if
(
min
<=
1
&&
max
>=
1
)
{
if
(
min
<=
1
&&
max
>=
1
)
{
register
int i;
int
i
;
objs
[
0
]
=
args
;
objs
[
0
]
=
args
;
for
(
i
=
1
;
i
<
max
;
++
i
)
{
for
(
i
=
1
;
i
<
max
;
++
i
)
{
objs
[
i
]
=
0
;
objs
[
i
]
=
0
;
...
@@ -1336,7 +1336,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
...
@@ -1336,7 +1336,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
PyErr_SetString
(
PyExc_SystemError
,
"UnpackTuple() argument list is not a tuple"
);
PyErr_SetString
(
PyExc_SystemError
,
"UnpackTuple() argument list is not a tuple"
);
return
0
;
return
0
;
}
else
{
}
else
{
register
Py_ssize_t l = PyTuple_GET_SIZE(args);
Py_ssize_t
l
=
PyTuple_GET_SIZE
(
args
);
if
(
l
<
min
)
{
if
(
l
<
min
)
{
PyErr_Format
(
PyExc_TypeError
,
"%s expected %s%d arguments, got %d"
,
PyErr_Format
(
PyExc_TypeError
,
"%s expected %s%d arguments, got %d"
,
name
,
(
min
==
max
?
""
:
"at least "
),
(
int
)
min
,
(
int
)
l
);
name
,
(
min
==
max
?
""
:
"at least "
),
(
int
)
min
,
(
int
)
l
);
...
@@ -1346,7 +1346,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
...
@@ -1346,7 +1346,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
name
,
(
min
==
max
?
""
:
"at most "
),
(
int
)
max
,
(
int
)
l
);
name
,
(
min
==
max
?
""
:
"at most "
),
(
int
)
max
,
(
int
)
l
);
return
0
;
return
0
;
}
else
{
}
else
{
register
int i;
int
i
;
for
(
i
=
0
;
i
<
l
;
++
i
)
{
for
(
i
=
0
;
i
<
l
;
++
i
)
{
objs
[
i
]
=
PyTuple_GET_ITEM
(
args
,
i
);
objs
[
i
]
=
PyTuple_GET_ITEM
(
args
,
i
);
}
}
...
@@ -2461,7 +2461,7 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
...
@@ -2461,7 +2461,7 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
}
}
}
else
{
}
else
{
#if PY_VERSION_HEX >= 0x03000000
#if PY_VERSION_HEX >= 0x03000000
inst =
PyBaseObject_Type.
tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
inst
=
((
PyTypeObject
*
)
data
->
newargs
)
->
tp_new
((
PyTypeObject
*
)
data
->
newargs
,
Py_None
,
Py_None
);
if
(
inst
)
{
if
(
inst
)
{
PyObject_SetAttr
(
inst
,
SWIG_This
(),
swig_this
);
PyObject_SetAttr
(
inst
,
SWIG_This
(),
swig_this
);
Py_TYPE
(
inst
)
->
tp_flags
&=
~
Py_TPFLAGS_VALID_VERSION_TAG
;
Py_TYPE
(
inst
)
->
tp_flags
&=
~
Py_TPFLAGS_VALID_VERSION_TAG
;
...
@@ -2987,7 +2987,7 @@ static swig_module_info swig_module = {swig_types, 28, 0, 0, 0, 0};
...
@@ -2987,7 +2987,7 @@ static swig_module_info swig_module = {swig_types, 28, 0, 0, 0, 0};
#endif
#endif
#define SWIG_name "_freeswitch"
#define SWIG_name "_freeswitch"
#define SWIGVERSION 0x0
2001
2
#define SWIGVERSION 0x0
3000
2
#define SWIG_VERSION SWIGVERSION
#define SWIG_VERSION SWIGVERSION
...
@@ -3166,7 +3166,11 @@ SWIG_FromCharPtrAndSize(const char* carray, size_t size)
...
@@ -3166,7 +3166,11 @@ SWIG_FromCharPtrAndSize(const char* carray, size_t size)
SWIG_InternalNewPointerObj
(
const_cast
<
char
*
>
(
carray
),
pchar_descriptor
,
0
)
:
SWIG_Py_Void
();
SWIG_InternalNewPointerObj
(
const_cast
<
char
*
>
(
carray
),
pchar_descriptor
,
0
)
:
SWIG_Py_Void
();
}
else
{
}
else
{
#if PY_VERSION_HEX >= 0x03000000
#if PY_VERSION_HEX >= 0x03000000
#if PY_VERSION_HEX >= 0x03010000
return
PyUnicode_DecodeUTF8
(
carray
,
static_cast
<
int
>
(
size
),
"surrogateescape"
);
#else
return
PyUnicode_FromStringAndSize
(
carray
,
static_cast
<
int
>
(
size
));
return
PyUnicode_FromStringAndSize
(
carray
,
static_cast
<
int
>
(
size
));
#endif
#else
#else
return
PyString_FromStringAndSize
(
carray
,
static_cast
<
int
>
(
size
));
return
PyString_FromStringAndSize
(
carray
,
static_cast
<
int
>
(
size
));
#endif
#endif
...
@@ -3349,7 +3353,8 @@ SWIG_AsCharArray(PyObject * obj, char *val, size_t size)
...
@@ -3349,7 +3353,8 @@ SWIG_AsCharArray(PyObject * obj, char *val, size_t size)
char
*
cptr
=
0
;
size_t
csize
=
0
;
int
alloc
=
SWIG_OLDOBJ
;
char
*
cptr
=
0
;
size_t
csize
=
0
;
int
alloc
=
SWIG_OLDOBJ
;
int
res
=
SWIG_AsCharPtrAndSize
(
obj
,
&
cptr
,
&
csize
,
&
alloc
);
int
res
=
SWIG_AsCharPtrAndSize
(
obj
,
&
cptr
,
&
csize
,
&
alloc
);
if
(
SWIG_IsOK
(
res
))
{
if
(
SWIG_IsOK
(
res
))
{
if ((csize == size + 1) && cptr && !(cptr[csize-1])) --csize;
/* special case of single char conversion when we don't need space for NUL */
if
(
size
==
1
&&
csize
==
2
&&
cptr
&&
!
cptr
[
1
])
--
csize
;
if
(
csize
<=
size
)
{
if
(
csize
<=
size
)
{
if
(
val
)
{
if
(
val
)
{
if
(
csize
)
memcpy
(
val
,
cptr
,
csize
*
sizeof
(
char
));
if
(
csize
)
memcpy
(
val
,
cptr
,
csize
*
sizeof
(
char
));
...
@@ -3478,7 +3483,10 @@ SWIGINTERNINLINE PyObject*
...
@@ -3478,7 +3483,10 @@ SWIGINTERNINLINE PyObject*
SWIGINTERN
int
SWIGINTERN
int
SWIG_AsVal_bool
(
PyObject
*
obj
,
bool
*
val
)
SWIG_AsVal_bool
(
PyObject
*
obj
,
bool
*
val
)
{
{
int r = PyObject_IsTrue(obj);
int
r
;
if
(
!
PyBool_Check
(
obj
))
return
SWIG_ERROR
;
r
=
PyObject_IsTrue
(
obj
);
if
(
r
==
-
1
)
if
(
r
==
-
1
)
return
SWIG_ERROR
;
return
SWIG_ERROR
;
if
(
val
)
*
val
=
r
?
true
:
false
;
if
(
val
)
*
val
=
r
?
true
:
false
;
...
@@ -5947,7 +5955,7 @@ SWIGINTERN PyObject *_wrap_EventConsumer_enodes_set(PyObject *SWIGUNUSEDPARM(sel
...
@@ -5947,7 +5955,7 @@ SWIGINTERN PyObject *_wrap_EventConsumer_enodes_set(PyObject *SWIGUNUSEDPARM(sel
{
{
if
(
arg2
)
{
if
(
arg2
)
{
size_t
ii
=
0
;
size_t
ii
=
0
;
for (; ii < (size_t)SWITCH_EVENT_ALL+1; ++ii)
arg1->enodes[ii] = arg2[ii]
;
for
(;
ii
<
(
size_t
)
SWITCH_EVENT_ALL
+
1
;
++
ii
)
*
(
switch_event_node_t
*
*
)
&
arg1
->
enodes
[
ii
]
=
*
((
switch_event_node_t
*
*
)
arg2
+
ii
)
;
}
else
{
}
else
{
SWIG_exception_fail
(
SWIG_ValueError
,
"invalid null reference "
"in variable '""enodes""' of type '""switch_event_node_t *[SWITCH_EVENT_ALL+1]""'"
);
SWIG_exception_fail
(
SWIG_ValueError
,
"invalid null reference "
"in variable '""enodes""' of type '""switch_event_node_t *[SWITCH_EVENT_ALL+1]""'"
);
}
}
...
@@ -10490,7 +10498,7 @@ static swig_const_info swig_const_table[] = {
...
@@ -10490,7 +10498,7 @@ static swig_const_info swig_const_table[] = {
* array with the correct data and linking the correct swig_cast_info
* array with the correct data and linking the correct swig_cast_info
* structures together.
* structures together.
*
*
* The generated swig_type_info structures are assigned staticly to an initial
* The generated swig_type_info structures are assigned static
al
ly to an initial
* array. We just loop through that array, and handle each type individually.
* array. We just loop through that array, and handle each type individually.
* First we lookup if this type has been already loaded, and if so, use the
* First we lookup if this type has been already loaded, and if so, use the
* loaded structure instead of the generated one. Then we have to fill in the
* loaded structure instead of the generated one. Then we have to fill in the
...
@@ -10820,7 +10828,7 @@ extern "C" {
...
@@ -10820,7 +10828,7 @@ extern "C" {
var
=
var
->
next
;
var
=
var
->
next
;
}
}
if
(
res
==
NULL
&&
!
PyErr_Occurred
())
{
if
(
res
==
NULL
&&
!
PyErr_Occurred
())
{
PyErr_
SetString(PyExc_NameError,"Unknown C global variable"
);
PyErr_
Format
(
PyExc_AttributeError
,
"Unknown C global variable '%s'"
,
n
);
}
}
return
res
;
return
res
;
}
}
...
@@ -10837,7 +10845,7 @@ extern "C" {
...
@@ -10837,7 +10845,7 @@ extern "C" {
var
=
var
->
next
;
var
=
var
->
next
;
}
}
if
(
res
==
1
&&
!
PyErr_Occurred
())
{
if
(
res
==
1
&&
!
PyErr_Occurred
())
{
PyErr_
SetString(PyExc_NameError,"Unknown C global variable"
);
PyErr_
Format
(
PyExc_AttributeError
,
"Unknown C global variable '%s'"
,
n
);
}
}
return
res
;
return
res
;
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论