gst/arg-types.py (GstCapsArg.beforenull): py_caps can be NULL if it is an optional argument. Translate this python no...

Original commit message from CVS:
2006-04-07  Andy Wingo  <wingo@pobox.com>

* gst/arg-types.py (GstCapsArg.beforenull): py_caps can be NULL if
it is an optional argument. Translate this python non-value to the
C NULL.

* gst/gst.defs (get_compatible_pad): Filter caps is optional and
can be None. It defaults to None.
This commit is contained in:
Andy Wingo 2006-04-07 17:21:27 +00:00
parent 51352b1a2e
commit 8f0143c56e
3 changed files with 11 additions and 2 deletions

View file

@ -1,3 +1,12 @@
2006-04-07 Andy Wingo <wingo@pobox.com>
* gst/arg-types.py (GstCapsArg.beforenull): py_caps can be NULL if
it is an optional argument. Translate this python non-value to the
C NULL.
* gst/gst.defs (get_compatible_pad): Filter caps is optional and
can be None. It defaults to None.
2006-04-07 Edward Hervey <edward@fluendo.com>
* Makefile.am:

View file

@ -84,7 +84,7 @@ class GstCapsArg(ArgType):
before = (' %(name)s = pygst_caps_from_pyobject (py_%(name)s, %(namecopy)s);\n'
' if (PyErr_Occurred())\n'
' return NULL;\n')
beforenull = (' if (py_%(name)s == Py_None)\n'
beforenull = (' if (py_%(name)s == Py_None || py_%(name)s == NULL)\n'
' %(name)s = NULL;\n'
' else\n'
' ' + before)

View file

@ -6320,7 +6320,7 @@
(return-type "GstPad*")
(parameters
'("GstPad*" "pad")
'("const-GstCaps*" "caps")
'("const-GstCaps*" "caps" (null-ok) (default "NULL"))
)
)