diff --git a/pdb/app.pl b/pdb/app.pl index 4acca8daa9..3294a06ba3 100644 --- a/pdb/app.pl +++ b/pdb/app.pl @@ -472,11 +472,12 @@ g_param_spec_uint ("$name", CODE } elsif ($pdbtype eq 'guide') { + $min = exists $arg->{none_ok} ? 0 : 1, $pspec = < 'image', type => 'image', desc => 'The image' }, + # TODO: this should be changed to type 'guide' with none_ok => 1 when we can break API. { name => 'guide', type => '0 <= int32', default => 1, no_validate => 1, desc => 'The ID of the current guide (0 if first invocation)' } ); diff --git a/pdb/lib.pl b/pdb/lib.pl index 438539f4f4..8fe10e54f6 100644 --- a/pdb/lib.pl +++ b/pdb/lib.pl @@ -140,7 +140,7 @@ sub generate_fun { $annotate = " (array length=$retarg_len)"; } - if (exists $retarg->{none_ok} && $type ne 'sample_point') { + if (exists $retarg->{none_ok} && $type ne 'sample_point' && $type ne 'guide') { $annotate .= " (nullable)"; } @@ -294,7 +294,7 @@ sub generate_fun { $n_annotations++; } - if (exists $_->{none_ok} && $type ne 'sample_point') { + if (exists $_->{none_ok} && $type ne 'sample_point' && $type ne 'guide') { $argdesc .= " (nullable)"; $n_annotations++; }