Skip to content

Commit

Permalink
patched xmlrpc.inc.php to enable i8 support
Browse files Browse the repository at this point in the history
git-svn-id: http://wtorrent-project.googlecode.com/svn/trunk@101 5a4c1571-8183-a91d-cfd1-48c08a65d015
  • Loading branch information
yllar committed Dec 27, 2009
1 parent 283c051 commit 8fb4df1
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion wtorrent/lib/xmlrpc/xmlrpc.inc.php
Expand Up @@ -50,6 +50,8 @@
// Milosch: 2005/08/07 - explicitly request these via $GLOBALS where used.
$GLOBALS['xmlrpcI4']='i4';
$GLOBALS['xmlrpcInt']='int';
$GLOBALS['xmlrpcI8']='i8';
$GLOBALS['xmlrpcApache']='ex.i8';
$GLOBALS['xmlrpcBoolean']='boolean';
$GLOBALS['xmlrpcDouble']='double';
$GLOBALS['xmlrpcString']='string';
Expand All @@ -62,6 +64,8 @@
$GLOBALS['xmlrpcTypes']=array(
$GLOBALS['xmlrpcI4'] => 1,
$GLOBALS['xmlrpcInt'] => 1,
$GLOBALS['xmlrpcI8'] => 1,
$GLOBALS['xmlrpcApache'] => 1,
$GLOBALS['xmlrpcBoolean'] => 1,
$GLOBALS['xmlrpcString'] => 1,
$GLOBALS['xmlrpcDouble'] => 1,
Expand All @@ -75,6 +79,8 @@
'VALUE' => array('MEMBER', 'DATA', 'PARAM', 'FAULT'),
'BOOLEAN' => array('VALUE'),
'I4' => array('VALUE'),
'I8' => array('VALUE'),
'EX.I8' => array('VALUE'),
'INT' => array('VALUE'),
'STRING' => array('VALUE'),
'DOUBLE' => array('VALUE'),
Expand Down Expand Up @@ -433,6 +439,8 @@ function xmlrpc_se($parser, $name, $attrs, $accept_single_vals=false)
$GLOBALS['_xh']['php_class']=null;
break;
case 'I4':
case 'I8':
case 'EX.I8':
case 'INT':
case 'STRING':
case 'BOOLEAN':
Expand Down Expand Up @@ -600,6 +608,8 @@ function xmlrpc_ee($parser, $name, $rebuild_xmlrpcvals = true)
break;
case 'BOOLEAN':
case 'I4':
case 'I8':
case 'EX.I8':
case 'INT':
case 'STRING':
case 'DOUBLE':
Expand Down Expand Up @@ -2728,6 +2738,8 @@ function xmlrpcval($val=-1, $type='')
$this->me['string']=$val;
break;
case 'i4':
case 'i8':
case 'ex.i8':
case 'int':
case 'double':
case 'string':
Expand Down Expand Up @@ -2944,6 +2956,8 @@ function serializedata($typ, $val, $charset_encoding='')
break;
case $GLOBALS['xmlrpcInt']:
case $GLOBALS['xmlrpcI4']:
case $GLOBALS['xmlrpcI8']:
case $GLOBALS['xmlrpcApache']:
$rs.="<${typ}>".(int)$val."</${typ}>";
break;
case $GLOBALS['xmlrpcDouble']:
Expand Down Expand Up @@ -3159,7 +3173,7 @@ function scalartyp()
{
reset($this->me);
list($a,)=each($this->me);
if($a==$GLOBALS['xmlrpcI4'])
if($a==$GLOBALS['xmlrpcI4'] || $a==$GLOBALS['xmlrpcI8'] || $a==$GLOBALS['xmlrpcApache'])
{
$a=$GLOBALS['xmlrpcInt'];
}
Expand Down

0 comments on commit 8fb4df1

Please sign in to comment.