[SCM] Samba Shared Repository - branch master updated - 791459f61b2487c6f233a1d32695a805627d86dc

Stefan Metzmacher metze at samba.org
Mon Dec 29 22:24:08 GMT 2008


The branch, master has been updated
       via  791459f61b2487c6f233a1d32695a805627d86dc (commit)
      from  7516ba860c160e8b971b6f5bc1036370169e6e8a (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 791459f61b2487c6f233a1d32695a805627d86dc
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 29 21:07:11 2008 +0100

    pidl: don't generate invalid C code
    
    When we don't know how to handle a type for the python bindings,
    we should not generate invalid C code.
    
    Jelmer: please fix do the full fix for this.
    
    metze

-----------------------------------------------------------------------

Summary of changes:
 pidl/lib/Parse/Pidl/Samba4/Python.pm |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm
index 68e9c95..2474bf4 100644
--- a/pidl/lib/Parse/Pidl/Samba4/Python.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm
@@ -789,7 +789,9 @@ sub register_module_object($$$)
 sub assign($$$)
 {
 	my ($self, $dest, $src) = @_;
-	if ($dest =~ /^\&/) {
+	if ($dest =~ /^\&/ and $src eq "NULL") {
+		$self->pidl("memset($dest, 0, sizeof(" . get_value_of($dest) . "));");
+	} elsif ($dest =~ /^\&/) {
 		$self->pidl("memcpy($dest, $src, sizeof(" . get_value_of($dest) . "));");
 	} else {
 		$self->pidl("$dest = $src;");


-- 
Samba Shared Repository


More information about the samba-cvs mailing list