]> granicus.if.org Git - python/commitdiff
load_refcounts(),
authorFred Drake <fdrake@acm.org>
Mon, 10 Apr 2000 18:26:45 +0000 (18:26 +0000)
committerFred Drake <fdrake@acm.org>
Mon, 10 Apr 2000 18:26:45 +0000 (18:26 +0000)
do_env_cfuncdesc():  Support the "null" value for the refcounts field
        in refcounts.dat.

Doc/perl/python.perl

index c6306dc340eedab43ca36bf20c4e89faf99c779b..35d4da9a6a931d011367ff63d82b049bc645a1fe 100644 (file)
@@ -600,7 +600,7 @@ sub load_refcounts{
     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;
@@ -634,6 +634,10 @@ sub do_env_cfuncdesc{
         $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>";
     }