Update of
/cvsroot/playerstage/code/player/client_libs/libplayerc/bindings/python
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26136/client_libs/libplayerc/bindings/python
Modified Files:
playerc.i
Log Message:
Add a typemap for sending colour info to the graphics proxy
Index: playerc.i
===================================================================
RCS file:
/cvsroot/playerstage/code/player/client_libs/libplayerc/bindings/python/playerc.i,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** playerc.i 3 May 2006 23:34:49 -0000 1.20
--- playerc.i 8 May 2006 05:29:43 -0000 1.21
***************
*** 125,128 ****
--- 125,152 ----
}
+ // typemap for tuples to colours
+ %typemap(python,in) player_color_t (player_color_t temp)
+ {
+ // Check it is a tuple
+ if (PyTuple_Check ($input))
+ {
+ // Check the tuple has four elements
+ if (PyTuple_GET_SIZE ($input) != 4)
+ {
+ PyErr_SetString (PyExc_ValueError, "tuple must have 4
items");
+ return NULL;
+ }
+ temp.alpha = PyInt_AsLong (PyTuple_GET_ITEM ($input, 0));
+ temp.red = PyInt_AsLong (PyTuple_GET_ITEM ($input, 1));
+ temp.green = PyInt_AsLong (PyTuple_GET_ITEM ($input, 2));
+ temp.blue = PyInt_AsLong (PyTuple_GET_ITEM ($input, 3));
+ }
+ else
+ {
+ PyErr_SetString (PyExc_TypeError, "not a tuple");
+ return NULL;
+ }
+ }
+
// Provide array (write) access
%typemap(in) double [ANY][ANY] (double temp[$1_dim0][$1_dim1])
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Playerstage-commit mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit