提交 10719e58 authored 作者: Brian West's avatar Brian West

work around macro definition of fileno breaking our c++ code

上级 23259812
...@@ -76,7 +76,7 @@ sub DESTROY { ...@@ -76,7 +76,7 @@ sub DESTROY {
*send = *MCASTc::McastHandle_send; *send = *MCASTc::McastHandle_send;
*recv = *MCASTc::McastHandle_recv; *recv = *MCASTc::McastHandle_recv;
*fileno = *MCASTc::McastHandle_fileno; *filenum = *MCASTc::McastHandle_filenum;
sub DISOWN { sub DISOWN {
my $self = shift; my $self = shift;
my $ptr = tied(%$self); my $ptr = tied(%$self);
......
...@@ -63,7 +63,7 @@ char *McastHandle::recv(int ms) ...@@ -63,7 +63,7 @@ char *McastHandle::recv(int ms)
return NULL; return NULL;
} }
int McastHandle::fileno(void) int McastHandle::filenum(void)
{ {
return handle.sock; return handle.sock;
} }
...@@ -49,7 +49,7 @@ class McastHandle { ...@@ -49,7 +49,7 @@ class McastHandle {
virtual ~McastHandle(); virtual ~McastHandle();
int send(const char *data); int send(const char *data);
char *recv(int ms = 0); char *recv(int ms = 0);
int fileno(void); int filenum(void);
}; };
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -1888,7 +1888,7 @@ XS(_wrap_McastHandle_recv) { ...@@ -1888,7 +1888,7 @@ XS(_wrap_McastHandle_recv) {
} }
XS(_wrap_McastHandle_fileno) { XS(_wrap_McastHandle_filenum) {
{ {
McastHandle *arg1 = (McastHandle *) 0 ; McastHandle *arg1 = (McastHandle *) 0 ;
int result; int result;
...@@ -1898,14 +1898,14 @@ XS(_wrap_McastHandle_fileno) { ...@@ -1898,14 +1898,14 @@ XS(_wrap_McastHandle_fileno) {
dXSARGS; dXSARGS;
if ((items < 1) || (items > 1)) { if ((items < 1) || (items > 1)) {
SWIG_croak("Usage: McastHandle_fileno(self);"); SWIG_croak("Usage: McastHandle_filenum(self);");
} }
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_McastHandle, 0 | 0 ); res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_McastHandle, 0 | 0 );
if (!SWIG_IsOK(res1)) { if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "McastHandle_fileno" "', argument " "1"" of type '" "McastHandle *""'"); SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "McastHandle_filenum" "', argument " "1"" of type '" "McastHandle *""'");
} }
arg1 = reinterpret_cast< McastHandle * >(argp1); arg1 = reinterpret_cast< McastHandle * >(argp1);
result = (int)(arg1)->fileno(); result = (int)(arg1)->filenum();
ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
XSRETURN(argvi); XSRETURN(argvi);
...@@ -1952,7 +1952,7 @@ static swig_command_info swig_commands[] = { ...@@ -1952,7 +1952,7 @@ static swig_command_info swig_commands[] = {
{"MCASTc::delete_McastHandle", _wrap_delete_McastHandle}, {"MCASTc::delete_McastHandle", _wrap_delete_McastHandle},
{"MCASTc::McastHandle_send", _wrap_McastHandle_send}, {"MCASTc::McastHandle_send", _wrap_McastHandle_send},
{"MCASTc::McastHandle_recv", _wrap_McastHandle_recv}, {"MCASTc::McastHandle_recv", _wrap_McastHandle_recv},
{"MCASTc::McastHandle_fileno", _wrap_McastHandle_fileno}, {"MCASTc::McastHandle_filenum", _wrap_McastHandle_filenum},
{0,0} {0,0}
}; };
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论