codegen/argtypes.py: Revert the UInt64Arg modifications from upstream. It forces us to give a PyLong, whereas we can ...

Original commit message from CVS:
* codegen/argtypes.py:
Revert the UInt64Arg modifications from upstream. It forces us to give
a PyLong, whereas we can directly use the 'K' argument parsing for that.
This commit is contained in:
Edward Hervey 2006-10-03 09:24:11 +00:00
parent 460307745b
commit c79185a013
3 changed files with 8 additions and 8 deletions

View file

@ -1,3 +1,9 @@
2006-10-03 Edward Hervey <edward@fluendo.com>
* codegen/argtypes.py:
Revert the UInt64Arg modifications from upstream. It forces us to give
a PyLong, whereas we can directly use the 'K' argument parsing for that.
2006-09-29 Edward Hervey <edward@fluendo.com>
* ltihooks.py:

View file

@ -320,19 +320,13 @@ class Int64Arg(ArgType):
info.codeafter.append(' return PyLong_FromLongLong(ret);')
class UInt64Arg(ArgType):
dflt = ' if (py_%(name)s)\n' \
' %(name)s = PyLong_AsUnsignedLongLong(py_%(name)s);\n'
before = ' %(name)s = PyLong_AsUnsignedLongLong(py_%(name)s);\n'
def write_param(self, ptype, pname, pdflt, pnull, keeprefcount, info):
if pdflt:
info.varlist.add('guint64', pname + ' = ' + pdflt)
info.codebefore.append(self.dflt % {'name':pname})
else:
info.varlist.add('guint64', pname)
info.codebefore.append(self.before % {'name':pname})
info.varlist.add('PyObject', "*py_" + pname + ' = NULL')
info.arglist.append(pname)
info.add_parselist('O!', ['&PyLong_Type', '&py_' + pname], [pname])
info.add_parselist('K', ['&' + pname], [pname])
def write_return(self, ptype, ownsreturn, info):
info.varlist.add('guint64', 'ret')
info.codeafter.append(' return PyLong_FromUnsignedLongLong(ret);')

2
common

@ -1 +1 @@
Subproject commit bdd0108b3540ffadeb82cee28b8867a8a6e7ae78
Subproject commit 9991f6fa61ee11475c390dd6675ef7952f079e43