[SCM] Samba Shared Repository - branch master updated
Stefan Metzmacher
metze at samba.org
Thu Jan 6 06:35:02 MST 2011
The branch, master has been updated
via 2778130 pidl:Samba4/Python: fix memory leak in _ndr_print functions
via ce7cb97 pidl/wscript: only warn about grammar file changes
from 4de4703 s3: Fix some nonempty blank lines
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 2778130d45006a8cc04c11814070839e922bcc31
Author: Stefan Metzmacher <metze at samba.org>
Date: Thu Jan 6 13:45:55 2011 +0100
pidl:Samba4/Python: fix memory leak in _ndr_print functions
metze
Autobuild-User: Stefan Metzmacher <metze at samba.org>
Autobuild-Date: Thu Jan 6 14:34:31 CET 2011 on sn-devel-104
commit ce7cb972b0ba7ec20d05bb1c4243fa0e2b5f05c0
Author: Stefan Metzmacher <metze at samba.org>
Date: Thu Jan 6 13:41:08 2011 +0100
pidl/wscript: only warn about grammar file changes
autobuild should protect us from having grammar files
and generated files out of sync.
metze
-----------------------------------------------------------------------
Summary of changes:
pidl/lib/Parse/Pidl/Samba4/Python.pm | 7 ++++++-
pidl/wscript | 8 ++++----
2 files changed, 10 insertions(+), 5 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 d6eab12..7f6f94e 100644
--- a/pidl/lib/Parse/Pidl/Samba4/Python.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm
@@ -297,9 +297,14 @@ sub PythonStruct($$$$$$)
$self->pidl("{");
$self->indent;
$self->pidl("$cname *object = ($cname *)py_talloc_get_ptr(py_obj);");
+ $self->pidl("PyObject *ret;");
$self->pidl("char *retstr;");
+ $self->pidl("");
$self->pidl("retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_$name, \"$name\", object);");
- $self->pidl("return PyString_FromString(retstr);");
+ $self->pidl("ret = PyString_FromString(retstr);");
+ $self->pidl("talloc_free(retstr);");
+ $self->pidl("");
+ $self->pidl("return ret;");
$self->deindent;
$self->pidl("}");
$self->pidl("");
diff --git a/pidl/wscript b/pidl/wscript
index 150ef41..5b3e07c 100644
--- a/pidl/wscript
+++ b/pidl/wscript
@@ -64,20 +64,20 @@ def build(bld):
bld.IS_NEWER('expr.yp', 'lib/Parse/Pidl/Expr.pm')))
if need_yapp_build:
- Logs.error('''
+ Logs.warn('''
Pidl grammar files have changed. Please use the pidl standalone build
to regenerate them with yapp.
-$ cd pidl
+$ cd ../pidl
$ perl Makefile.PL
$ make lib/Parse/Pidl/IDL.pm lib/Parse/Pidl/Expr.pm
$ git add lib/Parse/Pidl/IDL.pm lib/Parse/Pidl/Expr.pm
$ git commit
+$ cd -
If your 100% sure you haven't changed idl.yp and expr.yp
try this to avoid this message:
-$ touch lib/Parse/Pidl/IDL.pm lib/Parse/Pidl/Expr.pm
+$ touch ../pidl/lib/Parse/Pidl/IDL.pm ../pidl/lib/Parse/Pidl/Expr.pm
''')
- sys.exit(1)
--
Samba Shared Repository
More information about the samba-cvs
mailing list