[SCM] Samba Shared Repository - branch v4-0-test updated -
release-4-0-0alpha3-162-gca72187
Jelmer Vernooij
jelmer at samba.org
Tue Apr 15 12:32:43 GMT 2008
The branch, v4-0-test has been updated
via ca72187b3e71a037780d42a57e46b60e75f724f6 (commit)
via f4de8d2c1c956bc85b91dc7aab20e5e7671f51bc (commit)
from 88013ca9775a6ff5e5a393f9d8238dbcd197f26f (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test
- Log -----------------------------------------------------------------
commit ca72187b3e71a037780d42a57e46b60e75f724f6
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Tue Apr 15 14:32:13 2008 +0200
Fix pointers when pushing strings to python during pidl generation.
commit f4de8d2c1c956bc85b91dc7aab20e5e7671f51bc
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Tue Apr 15 12:51:31 2008 +0200
Saner names for Python objects.
-----------------------------------------------------------------------
Summary of changes:
source/pidl/lib/Parse/Pidl/Samba4/Python.pm | 11 +++++------
source/scripting/python/pytalloc.c | 4 ++--
source/scripting/python/samba/tests/dcerpc/unix.py | 2 ++
3 files changed, 9 insertions(+), 8 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/pidl/lib/Parse/Pidl/Samba4/Python.pm b/source/pidl/lib/Parse/Pidl/Samba4/Python.pm
index acaea99..2d12da3 100644
--- a/source/pidl/lib/Parse/Pidl/Samba4/Python.pm
+++ b/source/pidl/lib/Parse/Pidl/Samba4/Python.pm
@@ -952,16 +952,15 @@ sub ConvertObjectToPythonLevel($$$$$)
$self->pidl("}");
}
} elsif ($l->{TYPE} eq "ARRAY") {
- if (is_charset_array($e, $l)) {
+ my $pl = GetPrevLevel($e, $l);
+ if ($pl && $pl->{TYPE} eq "POINTER") {
$var_name = get_pointer_to($var_name);
+ }
+
+ if (is_charset_array($e, $l)) {
# FIXME: Use Unix charset setting rather than utf-8
$self->pidl("$py_var = PyUnicode_Decode($var_name, strlen($var_name), \"utf-8\", \"ignore\");");
} else {
- my $pl = GetPrevLevel($e, $l);
- if ($pl && $pl->{TYPE} eq "POINTER") {
- $var_name = get_pointer_to($var_name);
- }
-
die("No SIZE_IS for array $var_name") unless (defined($l->{SIZE_IS}));
my $length = $l->{SIZE_IS};
if (defined($l->{LENGTH_IS})) {
diff --git a/source/scripting/python/pytalloc.c b/source/scripting/python/pytalloc.c
index d8d3efe..aa0ae9b 100644
--- a/source/scripting/python/pytalloc.c
+++ b/source/scripting/python/pytalloc.c
@@ -39,7 +39,7 @@ PyObject *py_talloc_import_ex(PyTypeObject *py_type, TALLOC_CTX *mem_ctx,
PyObject *py_talloc_default_repr(PyObject *py_obj)
{
py_talloc_Object *obj = (py_talloc_Object *)py_obj;
+ PyTypeObject *type = (PyTypeObject*)PyObject_Type((PyObject *)obj);
- return PyString_FromFormat("<talloc: %s>",
- talloc_get_name(obj->talloc_ctx));
+ return PyString_FromFormat("<%s>", type->tp_name);
}
diff --git a/source/scripting/python/samba/tests/dcerpc/unix.py b/source/scripting/python/samba/tests/dcerpc/unix.py
index bfddfdc..43978ac 100644
--- a/source/scripting/python/samba/tests/dcerpc/unix.py
+++ b/source/scripting/python/samba/tests/dcerpc/unix.py
@@ -27,6 +27,8 @@ class UnixinfoTests(RpcInterfaceTestCase):
def test_getpwuid(self):
infos = self.conn.GetPWUid(range(512))
self.assertEquals(512, len(infos))
+ self.assertEquals("", infos[0].shell)
+ self.assertEquals("", infos[0].homedir)
def test_gidtosid(self):
self.conn.GidToSid(1000)
--
Samba Shared Repository
More information about the samba-cvs
mailing list