[xiph-cvs] cvs commit: ogg-python2/src general.c
Arc
arc at xiph.org
Sat Nov 29 22:32:08 PST 2003
arc 03/11/30 01:32:08
Modified: include/pyogg pyogg2.h
src general.c
Log:
code cleanup.
Revision Changes Path
1.3 +2 -0 ogg-python2/include/pyogg/pyogg2.h
Index: pyogg2.h
===================================================================
RCS file: /usr/local/cvsroot/ogg-python2/include/pyogg/pyogg2.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- pyogg2.h 29 Nov 2003 18:49:19 -0000 1.2
+++ pyogg2.h 30 Nov 2003 06:32:08 -0000 1.3
@@ -24,5 +24,7 @@
Returns 0 on failure (a Python error will be set)
*/
int arg_to_int64(PyObject *longobj, ogg_int64_t *val);
+int arg_to_int32(PyObject *intobj, ogg_int32_t *val);
+PyObject * Py_TrueFalse(int value);
#endif // __PYOGG_H__
<p><p>1.2 +12 -0 ogg-python2/src/general.c
Index: general.c
===================================================================
RCS file: /usr/local/cvsroot/ogg-python2/src/general.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- general.c 29 Nov 2003 09:21:57 -0000 1.1
+++ general.c 30 Nov 2003 06:32:08 -0000 1.2
@@ -31,3 +31,15 @@
}
return 1;
}
+
+PyObject *
+Py_TrueFalse(int value)
+{
+ if (value) {
+ Py_INCREF(Py_True);
+ return Py_True;
+ } else {
+ Py_INCREF(Py_False);
+ return Py_False;
+ }
+}
<p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list