mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-19 20:46:22 +00:00
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:
parent
460307745b
commit
c79185a013
3 changed files with 8 additions and 8 deletions
|
@ -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>
|
2006-09-29 Edward Hervey <edward@fluendo.com>
|
||||||
|
|
||||||
* ltihooks.py:
|
* ltihooks.py:
|
||||||
|
|
|
@ -320,19 +320,13 @@ class Int64Arg(ArgType):
|
||||||
info.codeafter.append(' return PyLong_FromLongLong(ret);')
|
info.codeafter.append(' return PyLong_FromLongLong(ret);')
|
||||||
|
|
||||||
class UInt64Arg(ArgType):
|
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):
|
def write_param(self, ptype, pname, pdflt, pnull, keeprefcount, info):
|
||||||
if pdflt:
|
if pdflt:
|
||||||
info.varlist.add('guint64', pname + ' = ' + pdflt)
|
info.varlist.add('guint64', pname + ' = ' + pdflt)
|
||||||
info.codebefore.append(self.dflt % {'name':pname})
|
|
||||||
else:
|
else:
|
||||||
info.varlist.add('guint64', pname)
|
info.varlist.add('guint64', pname)
|
||||||
info.codebefore.append(self.before % {'name':pname})
|
|
||||||
info.varlist.add('PyObject', "*py_" + pname + ' = NULL')
|
|
||||||
info.arglist.append(pname)
|
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):
|
def write_return(self, ptype, ownsreturn, info):
|
||||||
info.varlist.add('guint64', 'ret')
|
info.varlist.add('guint64', 'ret')
|
||||||
info.codeafter.append(' return PyLong_FromUnsignedLongLong(ret);')
|
info.codeafter.append(' return PyLong_FromUnsignedLongLong(ret);')
|
||||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
||||||
Subproject commit bdd0108b3540ffadeb82cee28b8867a8a6e7ae78
|
Subproject commit 9991f6fa61ee11475c390dd6675ef7952f079e43
|
Loading…
Reference in a new issue