svn commit: samba r2491 - in branches/SAMBA_4_0/source/build/pidl: .

tpot at samba.org tpot at samba.org
Wed Sep 22 04:12:36 GMT 2004


Author: tpot
Date: 2004-09-22 04:12:36 +0000 (Wed, 22 Sep 2004)
New Revision: 2491

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/build/pidl&rev=2491&nolog=1

Log:
Handle pointers to scalars when converting to a Python dictionary (i.e
resume handles).

Remove some now unused debugging code.

Modified:
   branches/SAMBA_4_0/source/build/pidl/swig.pm


Changeset:
Modified: branches/SAMBA_4_0/source/build/pidl/swig.pm
===================================================================
--- branches/SAMBA_4_0/source/build/pidl/swig.pm	2004-09-22 03:42:58 UTC (rev 2490)
+++ branches/SAMBA_4_0/source/build/pidl/swig.pm	2004-09-22 04:12:36 UTC (rev 2491)
@@ -20,34 +20,6 @@
     return $unions{$name};
 }
 
-# Display properties of a structure field as commented out code
-
-sub DebugField($)
-{
-    my($e) = shift;
-    my($result) = "";
-
-    $result .= "\t// $e->{TYPE} $e->{NAME} ";
-
-    $result .= "(scalar) " 
-	if util::is_scalar_type($e->{TYPE});
-
-    $result .= "pointers=$e->{POINTERS} " 
-	if $e->{POINTERS} > 0;
-
-    my($size_is) = util::has_property($e, "size_is");
-    $result .= "size_is=" . $size_is . " " if $size_is;
-
-    my($length_is) = util::has_property($e, "length_is");
-    $result .= "length_is=" . $length_is . " " if $length_is;
-
-    $result .= "array_len=" . $e->{ARRAY_LEN} . " " if $e->{ARRAY_LEN};
-
-    $result .= "\n";
-
-    return $result;
-}
-
 # Generate code to convert a Python object to an array
 
 sub ArrayFromPython($$)
@@ -229,8 +201,7 @@
 	    if ($e->{ARRAY_LEN} or util::has_property($e, "size_is")) {
 		$result .= ArrayToPython($e, $prefix);
 	    } else {
-		$result .= "\t// Pointer to scalar\n";
-		$result .= DebugField($e);
+		$result .= "\tPyDict_SetItemString(obj, \"$e->{NAME}\", $e->{TYPE}_to_python(*s->$prefix$e->{NAME}));\n";
 	    }
 	}
     } else {



More information about the samba-cvs mailing list