File: ros_memoryview.diff

package info (click to toggle)
morse-simulator 1.2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 169,784 kB
  • ctags: 3,593
  • sloc: python: 23,947; ansic: 1,370; cpp: 786; makefile: 120; xml: 34; sh: 7
file content (14 lines) | stat: -rw-r--r-- 731 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--- _PointCloud2.py 2012-12-12 12:06:41.965707194 +0100
+++ /opt/ros/fuerte/lib/python2.7/dist-packages/sensor_msgs/msg/_PointCloud2.py     2012-12-12 11:58:28.611260780 +0100
@@ -167,2 +167,4 @@
         buff.write(struct.pack('<I%sB'%length, length, *_x))
+      elif type(_x) is memoryview:
+        buff.write(struct.pack('<I', length); buff.write(_x)
       else:
--- _Image.py       2012-12-12 12:07:13.377862942 +0100
+++ /opt/ros/fuerte/lib/python2.7/dist-packages/sensor_msgs/msg/_Image.py   2012-12-12 11:58:33.751286258 +0100
@@ -137,2 +137,4 @@
         buff.write(struct.pack('<I%sB'%length, length, *_x))
+      elif type(_x) is memoryview:
+        buff.write(struct.pack('<I', length)); buff.write(_x)
       else: