Commit 55167721 authored by Petr Štětka's avatar Petr Štětka
Browse files

Fix libgtop-2.0.vapi.

Fix crashing on Fedora 26.
parent 6d18dc1a
......@@ -48,7 +48,6 @@ vala_sources = [
'better-box.c']
vala_args = [
'--target-glib=2.38',
'--gresources=../data/org.gnome.Usage.gresource.xml',
'--pkg=rg',
'--pkg=egg',
......
......@@ -231,7 +231,7 @@ namespace Usage
{
GTop.ProcArgs proc_args;
GTop.ProcState proc_state;
var args = GTop.get_proc_argv (out proc_args, pid);
string[] args = GTop.get_proc_argv (out proc_args, pid, 0);
GTop.get_proc_state (out proc_state, pid);
string cmd = (string) proc_state.cmd;
cmd_parameter = "";
......@@ -241,14 +241,7 @@ namespace Usage
for(int i = 0; i < 2; i++)
{
if(args[i] != null)
{
secure_arguments[i] = args[i];
for (int j = 0; j < args[i].length; j++)
{
if(args[i][j] == ' ')
secure_arguments[i] = args[i].substring(0, j);
}
}
else
secure_arguments[i] = "";
}
......
......@@ -180,8 +180,8 @@ namespace GTop {
uint64 flags;
uint64 size;
}
[CCode(array_null_terminated = "true")]
public string[] get_proc_argv(out ProcArgs proc_args, GLib.Pid pid);
[CCode (array_length = false, array_null_terminated = true)]
public string[] get_proc_argv(out ProcArgs proc_args, GLib.Pid pid, uint length);
[CCode(cname = "glibtop_fsusage", cheader_filename = "glibtop/fsusage.h")]
public struct FsUsage {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment