GNOME Bugzilla – Bug 734170
Python implementation of get_proclist in LibGTop2 returns int instead of list
Last modified: 2015-01-03 13:07:36 UTC
The C function get_proclist returns a pid_t*, but in Python it returns an int. The problem appeared on Ubuntu 14.04 with gir1.2-gtop-2.0 2.28.5-2 and seems to raise from missing annotations in proclist.h, is also present in current LibGTop2 master branch.
Created attachment 282322 [details] [review] Add missing annotations to make Python bindings work
Created attachment 282340 [details] Snippet of code to test the case Output on Ubuntu 14.04 with gir1.2-gtop-2.0 version 2.28.5-2: $ python test.py <type 'int'> Traceback (most recent call last):
+ Trace 233919
proc = proclist[0]
Output on the system with the patch applied: $ python test.py <type 'list'> 1 /sbin/init
*** Bug 711120 has been marked as a duplicate of this bug. ***
Review of attachment 282322 [details] [review]: Pushed a while ago, but seems like I forgot to update the patch status.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.