Commits

Fred Drake committed c59bdc7

load_refcounts(),
do_env_cfuncdesc(): Support the "null" value for the refcounts field
in refcounts.dat.

  • Participants
  • Parent commits e4349b6
  • Branches legacy-trunk

Comments (0)

Files changed (1)

File Doc/perl/python.perl

     open(REFCOUNT_FILE, "<$filename") || die "\n$!\n";
     print "[loading API refcount data]";
     while (<REFCOUNT_FILE>) {
-        if (/([a-zA-Z0-9_]+):PyObject\*:([a-zA-Z0-9_]*):(0|[-+]1):(.*)$/) {
+        if (/([a-zA-Z0-9_]+):PyObject\*:([a-zA-Z0-9_]*):(0|[-+]1|null):(.*)$/) {
             my($func, $param, $count, $comment) = ($1, $2, $3, $4);
             #print "\n$func($param) --> $count";
             $REFCOUNTS{"$func:$param"} = $count;
         $rcinfo = '<span class="label">Return value:</span>'
                   . "\n  <span class=\"value\">Borrowed reference.</span>";
     }
+    elsif ($result_rc eq 'null') {
+        $rcinfo = '<span class="label">Return value:</span>'
+                  . "\n  <span class=\"value\">Always NULL.</span>";
+    }
     if ($rcinfo ne '') {
         $rcinfo = "\n<div class=\"refcount-info\">\n  $rcinfo\n</div>";
     }