[SCM] Samba Shared Repository - branch master updated
Jelmer Vernooij
jelmer at samba.org
Thu Nov 4 20:49:02 MDT 2010
The branch, master has been updated
via cd172e7 talloc: Add python talloc module, move convenience functions to it.
via 4edabb3 talloc: rename pytalloc.c to pytalloc_util.c
via c9756ca waf: Put private libraries in a separate directory when building.
via 21233bb wafsamba: Use project name variable rather than hardcoding 'samba4'.
via afc332f wafsamba: Drop private library prefix when installing private libraries to a custom path.
via ec7501e wafsamba: Support expanding variables in LIBDIR/PRIVATELIBDIR variables.
via e84e870 Add --disable-rpath-private-install flag.
via e15cd9c Add --with-privatelibdir build option.
via 0d4fa85 samba_utils: Use LIBDIR rather than assuming it is set to $prefix/lib.
via 228a9c1 selftest: Allow some tests to output empty subunit data.
from 4000ec2 s4-ldap_server Don't DEBUG() at level 2 every time a caller disconnects
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit cd172e77248968c48d2ff7f18a2366c35dd51697
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Fri Nov 5 03:00:45 2010 +0100
talloc: Add python talloc module, move convenience functions to it.
Autobuild-User: Jelmer Vernooij <jelmer at samba.org>
Autobuild-Date: Fri Nov 5 02:48:21 UTC 2010 on sn-devel-104
commit 4edabb3256734dcef4ad0d7a910f1729cd5c956e
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Fri Nov 5 02:35:55 2010 +0100
talloc: rename pytalloc.c to pytalloc_util.c
commit c9756cac057444ff7c3a77b9260fa30c35267529
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Fri Nov 5 02:30:01 2010 +0100
waf: Put private libraries in a separate directory when building.
Thanks to Tridge for pointing out what exactly I had to change. :-)
commit 21233bba9663f684cfa1ad129baa988cb52dea4d
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Fri Nov 5 02:08:44 2010 +0100
wafsamba: Use project name variable rather than hardcoding 'samba4'.
Suggested-By: Andrew Tridgell <tridge at samba.org>
commit afc332fdb1327d07488552d01316804bff614748
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Fri Nov 5 00:33:51 2010 +0100
wafsamba: Drop private library prefix when installing private libraries
to a custom path.
commit ec7501ea4fe7e7d2bbb94ef5353b8059be3ae0fb
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Fri Nov 5 00:20:16 2010 +0100
wafsamba: Support expanding variables in LIBDIR/PRIVATELIBDIR variables.
commit e84e8705a98f3525f680a3d7e35ad55ae5370f51
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Fri Nov 5 00:03:20 2010 +0100
Add --disable-rpath-private-install flag.
commit e15cd9c6d5262b516b43208fd41ac398606caa46
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Thu Nov 4 23:23:39 2010 +0100
Add --with-privatelibdir build option.
commit 0d4fa8514b4825c9b3d2383a9e12197b69b2e80f
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Thu Nov 4 23:02:50 2010 +0100
samba_utils: Use LIBDIR rather than assuming it is set to $prefix/lib.
commit 228a9c10d048add9630c8868bcc0939ba26f4d51
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Thu Nov 4 02:07:57 2010 +0100
selftest: Allow some tests to output empty subunit data.
-----------------------------------------------------------------------
Summary of changes:
buildtools/wafsamba/samba_bundled.py | 7 +-
buildtools/wafsamba/samba_install.py | 13 ++-
buildtools/wafsamba/samba_utils.py | 14 ++-
buildtools/wafsamba/wafsamba.py | 1 +
buildtools/wafsamba/wscript | 20 +++-
lib/talloc/pytalloc.c | 143 +++++++-------------
lib/talloc/{pytalloc.c => pytalloc_util.c} | 0
lib/talloc/wscript | 9 +-
source4/scripting/python/pyglue.c | 50 -------
source4/scripting/python/samba/__init__.py | 3 -
source4/scripting/python/samba/join.py | 3 +-
.../python/samba/tests/dcerpc/rpc_talloc.py | 7 +-
.../scripting/python/samba/tests/dcerpc/testrpc.py | 11 +-
source4/selftest/tests.py | 2 +-
source4/selftest/wscript | 1 +
source4/wscript | 4 +-
16 files changed, 114 insertions(+), 174 deletions(-)
copy lib/talloc/{pytalloc.c => pytalloc_util.c} (100%)
Changeset truncated at 500 lines:
diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py
index d395b82..4f6590e 100644
--- a/buildtools/wafsamba/samba_bundled.py
+++ b/buildtools/wafsamba/samba_bundled.py
@@ -4,12 +4,15 @@ from Configure import conf
import Logs
from samba_utils import *
-def PRIVATE_NAME(bld, name, bundled_extension, private_library):
+def PRIVATE_NAME(bld, name, private_extension, private_library):
'''possibly rename a library to include a bundled extension'''
- if bld.env.DISABLE_SHARED or not bundled_extension:
+ if bld.env.DISABLE_SHARED or not private_extension:
return name
if name in bld.env.PRIVATE_EXTENSION_EXCEPTION and not private_library:
return name
+ if private_library and bld.EXPAND_VARIABLES(bld.env.LIBDIR) != bld.EXPAND_VARIABLES(bld.env.PRIVATELIBDIR):
+ # Private libraries already have their own namespace in another way
+ return name
extension = getattr(bld.env, 'PRIVATE_EXTENSION', '')
if extension:
return name + '-' + extension
diff --git a/buildtools/wafsamba/samba_install.py b/buildtools/wafsamba/samba_install.py
index 0d43236..9401d22 100644
--- a/buildtools/wafsamba/samba_install.py
+++ b/buildtools/wafsamba/samba_install.py
@@ -64,7 +64,12 @@ def install_library(self):
return
# setup the install path, expanding variables
- install_path = getattr(self, 'samba_inst_path', None) or '${LIBDIR}'
+ install_path = getattr(self, 'samba_inst_path', None)
+ if install_path is None:
+ if getattr(self, 'private_library', False):
+ install_path = '${PRIVATELIBDIR}'
+ else:
+ install_path = '${LIBDIR}'
install_path = bld.EXPAND_VARIABLES(install_path)
if install_ldflags != build_ldflags:
@@ -155,7 +160,11 @@ def symlink_lib(self):
link_target = getattr(self, 'link_name', '')
if link_target == '':
- link_target = '%s/%s' % (LIB_PATH, self.bld.make_libname(self.target, version=soext))
+ basename = self.bld.make_libname(self.target, version=soext)
+ if getattr(self, "private_library", False):
+ link_target = '%s/private/%s' % (LIB_PATH, basename)
+ else:
+ link_target = '%s/%s' % (LIB_PATH, basename)
link_target = os.path.join(blddir, link_target)
diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py
index a25393b..7006381 100644
--- a/buildtools/wafsamba/samba_utils.py
+++ b/buildtools/wafsamba/samba_utils.py
@@ -66,18 +66,22 @@ def ADD_LD_LIBRARY_PATH(path):
def install_rpath(bld):
'''the rpath value for installation'''
bld.env['RPATH'] = []
+ ret = set()
if bld.env.RPATH_ON_INSTALL:
- return ['%s/lib' % bld.env.PREFIX]
- return []
+ ret.add(bld.EXPAND_VARIABLES(bld.env.LIBDIR))
+ if bld.env.RPATH_ON_INSTALL_PRIVATE:
+ ret.add(bld.EXPAND_VARIABLES(bld.env.PRIVATELIBDIR))
+ return list(ret)
def build_rpath(bld):
'''the rpath value for build'''
- rpath = os.path.normpath('%s/%s' % (bld.env.BUILD_DIRECTORY, LIB_PATH))
+ rpaths = [os.path.normpath('%s/%s' % (bld.env.BUILD_DIRECTORY, d)) for d in ("shared", "shared/private")]
bld.env['RPATH'] = []
if bld.env.RPATH_ON_BUILD:
- return [rpath]
- ADD_LD_LIBRARY_PATH(rpath)
+ return rpaths
+ for rpath in rpaths:
+ ADD_LD_LIBRARY_PATH(rpath)
return []
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index daab00c..dc25145 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -56,6 +56,7 @@ def SAMBA_BUILD_ENV(conf):
'''create the samba build environment'''
conf.env.BUILD_DIRECTORY = conf.blddir
mkdir_p(os.path.join(conf.blddir, LIB_PATH))
+ mkdir_p(os.path.join(conf.blddir, LIB_PATH, "private"))
mkdir_p(os.path.join(conf.blddir, "modules"))
mkdir_p(os.path.join(conf.blddir, 'python/samba/dcerpc'))
# this allows all of the bin/shared and bin/python targets
diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript
index b9b06ab..6913f63 100644
--- a/buildtools/wafsamba/wscript
+++ b/buildtools/wafsamba/wscript
@@ -53,8 +53,11 @@ def set_options(opt):
help=("Disable use of rpath for build binaries"),
action="store_true", dest='disable_rpath_build', default=False)
gr.add_option('--disable-rpath-install',
- help=("Disable use of rpath for installed binaries"),
+ help=("Disable use of rpath for library path in installed files"),
action="store_true", dest='disable_rpath_install', default=False)
+ gr.add_option('--disable-rpath-private-install',
+ help=("Disable use of rpath for private library path in installed files"),
+ action="store_true", dest='disable_rpath_private_install', default=False)
gr.add_option('--nonshared-binary',
help=("Disable use of shared libs for the listed binaries"),
action="store", dest='NONSHARED_BINARIES', default='')
@@ -63,6 +66,10 @@ def set_options(opt):
help=("modules directory [PREFIX/modules]"),
action="store", dest='MODULESDIR', default='${PREFIX}/modules')
+ opt.add_option('--with-privatelibdir',
+ help=("private library directory [PREFIX/lib/%s]" % Utils.g_module.APPNAME),
+ action="store", dest='PRIVATELIBDIR', default=None)
+
gr = opt.option_group('developer options')
gr.add_option('-C',
@@ -201,6 +208,7 @@ def configure(conf):
conf.env.BINDIR = Options.options.BINDIR or '${PREFIX}/bin'
conf.env.SBINDIR = Options.options.SBINDIR or '${PREFIX}/sbin'
conf.env.MODULESDIR = Options.options.MODULESDIR
+ conf.env.PRIVATELIBDIR = Options.options.PRIVATELIBDIR
conf.env.BUNDLED_LIBS = Options.options.BUNDLED_LIBS.split(',')
conf.env.BUILTIN_LIBRARIES = Options.options.BUILTIN_LIBRARIES.split(',')
conf.env.DISABLE_SHARED = Options.options.disable_shared
@@ -259,9 +267,19 @@ def configure(conf):
conf.env.RPATH_ON_BUILD = not Options.options.disable_rpath_build
conf.env.RPATH_ON_INSTALL = (conf.env.RPATH_ON_BUILD and
not Options.options.disable_rpath_install)
+ if not conf.env.PRIVATELIBDIR:
+ conf.env.PRIVATELIBDIR = '${PREFIX}/lib/%s' % Utils.g_module.APPNAME
+ conf.env.RPATH_ON_INSTALL_PRIVATE = (
+ not Options.options.disable_rpath_private_install)
else:
conf.env.RPATH_ON_INSTALL = False
conf.env.RPATH_ON_BUILD = False
+ conf.env.RPATH_ON_INSTALL_PRIVATE = False
+ if not conf.env.PRIVATELIBDIR:
+ # rpath is not possible so there is no sense in having a
+ # private library directory by default.
+ # the user can of course always override it.
+ conf.env.PRIVATELIBDIR = conf.env.LIBDIR
# we should use the PIC options in waf instead
# Some compilo didn't support -fPIC but just print a warning
diff --git a/lib/talloc/pytalloc.c b/lib/talloc/pytalloc.c
index d5ef919..69a2c2f 100644
--- a/lib/talloc/pytalloc.c
+++ b/lib/talloc/pytalloc.c
@@ -1,135 +1,84 @@
/*
Unix SMB/CIFS implementation.
- Python/Talloc glue
- Copyright (C) Jelmer Vernooij <jelmer at samba.org> 2008
-
+ Python Talloc Module
+ Copyright (C) Jelmer Vernooij <jelmer at samba.org> 2010
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <Python.h>
-#include "replace.h"
#include <talloc.h>
-#include "pytalloc.h"
-#include <assert.h>
+#include <pytalloc.h>
-/**
- * Simple dealloc for talloc-wrapping PyObjects
- */
-void py_talloc_dealloc(PyObject* self)
+/* print a talloc tree report for a talloc python object */
+static PyObject *py_talloc_report_full(PyObject *self, PyObject *args)
{
- py_talloc_Object *obj = (py_talloc_Object *)self;
- assert(talloc_unlink(NULL, obj->talloc_ctx) != -1);
- obj->talloc_ctx = NULL;
- self->ob_type->tp_free(self);
-}
+ PyObject *py_obj;
+ PyTypeObject *type;
-/**
- * Import an existing talloc pointer into a Python object.
- */
-PyObject *py_talloc_steal_ex(PyTypeObject *py_type, TALLOC_CTX *mem_ctx,
- void *ptr)
-{
- py_talloc_Object *ret = (py_talloc_Object *)py_type->tp_alloc(py_type, 0);
- ret->talloc_ctx = talloc_new(NULL);
- if (ret->talloc_ctx == NULL) {
- return NULL;
- }
- if (talloc_steal(ret->talloc_ctx, mem_ctx) == NULL) {
+ if (!PyArg_ParseTuple(args, "O", &py_obj))
return NULL;
+
+ if (py_obj == Py_None) {
+ talloc_report_full(NULL, stdout);
+ } else {
+ type = (PyTypeObject*)PyObject_Type(py_obj);
+ talloc_report_full(py_talloc_get_mem_ctx(py_obj), stdout);
}
- talloc_set_name_const(ret->talloc_ctx, py_type->tp_name);
- ret->ptr = ptr;
- return (PyObject *)ret;
+ return Py_None;
}
-/**
- * Import an existing talloc pointer into a Python object.
- */
-PyObject *py_talloc_steal(PyTypeObject *py_type, void *ptr)
+/* enable null tracking */
+static PyObject *py_talloc_enable_null_tracking(PyObject *self, PyObject *args)
{
- return py_talloc_steal_ex(py_type, ptr, ptr);
+ talloc_enable_null_tracking();
+ return Py_None;
}
-
-/**
- * Import an existing talloc pointer into a Python object, leaving the
- * original parent, and creating a reference to the object in the python
- * object
- */
-PyObject *py_talloc_reference_ex(PyTypeObject *py_type, TALLOC_CTX *mem_ctx, void *ptr)
+/* return the number of talloc blocks */
+static PyObject *py_talloc_total_blocks(PyObject *self, PyObject *args)
{
- py_talloc_Object *ret;
-
- if (ptr == NULL) {
- Py_RETURN_NONE;
- }
+ PyObject *py_obj;
+ PyTypeObject *type;
- ret = (py_talloc_Object *)py_type->tp_alloc(py_type, 0);
- ret->talloc_ctx = talloc_new(NULL);
- if (ret->talloc_ctx == NULL) {
- return NULL;
- }
- if (talloc_reference(ret->talloc_ctx, mem_ctx) == NULL) {
+ if (!PyArg_ParseTuple(args, "O", &py_obj))
return NULL;
+
+ if (py_obj == Py_None) {
+ return PyLong_FromLong(talloc_total_blocks(NULL));
}
- talloc_set_name_const(ret->talloc_ctx, py_type->tp_name);
- ret->ptr = ptr;
- return (PyObject *)ret;
-}
-/**
- * Default (but only slightly more useful than the default) implementation of Repr().
- */
-PyObject *py_talloc_default_repr(PyObject *obj)
-{
- py_talloc_Object *talloc_obj = (py_talloc_Object *)obj;
- PyTypeObject *type = (PyTypeObject*)PyObject_Type(obj);
+ type = (PyTypeObject*)PyObject_Type(py_obj);
- return PyString_FromFormat("<%s talloc object at 0x%p>",
- type->tp_name, talloc_obj->ptr);
+ return PyLong_FromLong(talloc_total_blocks(py_talloc_get_mem_ctx(py_obj)));
}
-/**
- * Default (but only slightly more useful than the default) implementation of cmp.
- */
-int py_talloc_default_cmp(PyObject *_obj1, PyObject *_obj2)
-{
- py_talloc_Object *obj1 = (py_talloc_Object *)_obj1,
- *obj2 = (py_talloc_Object *)_obj2;
- if (obj1->ob_type != obj2->ob_type)
- return (obj1->ob_type - obj2->ob_type);
+static PyMethodDef talloc_methods[] = {
+ { "report_full", (PyCFunction)py_talloc_report_full, METH_VARARGS,
+ "show a talloc tree for an object"},
+ { "enable_null_tracking", (PyCFunction)py_talloc_enable_null_tracking, METH_VARARGS,
+ "enable tracking of the NULL object"},
+ { "total_blocks", (PyCFunction)py_talloc_total_blocks, METH_VARARGS,
+ "return talloc block count"},
+ { NULL }
+};
- return ((char *)py_talloc_get_ptr(obj1) - (char *)py_talloc_get_ptr(obj2));
-}
-
-static void py_cobject_talloc_free(void *ptr)
+void inittalloc(void)
{
- talloc_free(ptr);
-}
+ PyObject *m;
-PyObject *PyCObject_FromTallocPtr(void *ptr)
-{
- if (ptr == NULL) {
- Py_RETURN_NONE;
- }
- return PyCObject_FromVoidPtr(ptr, py_cobject_talloc_free);
-}
-
-PyObject *PyString_FromString_check_null(const char *ptr)
-{
- if (ptr == NULL) {
- Py_RETURN_NONE;
- }
- return PyString_FromString(ptr);
+ m = Py_InitModule3("talloc", talloc_methods, "Debug utilities for talloc-wrapped objects.");
+ if (m == NULL)
+ return;
}
diff --git a/lib/talloc/pytalloc.c b/lib/talloc/pytalloc_util.c
similarity index 100%
copy from lib/talloc/pytalloc.c
copy to lib/talloc/pytalloc_util.c
diff --git a/lib/talloc/wscript b/lib/talloc/wscript
index a931e1e..264c345 100644
--- a/lib/talloc/wscript
+++ b/lib/talloc/wscript
@@ -32,7 +32,7 @@ def set_options(opt):
action="store_true", dest='TALLOC_COMPAT1', default=False)
if opt.IN_LAUNCH_DIR():
opt.add_option('--disable-python',
- help=("disable the pytevent module"),
+ help=("disable the pytalloc module"),
action="store_true", dest='disable_python', default=False)
@@ -106,12 +106,17 @@ def build(bld):
if not bld.CONFIG_SET('USING_SYSTEM_PYTALLOC_UTIL') and not bld.env.disable_python:
bld.SAMBA_LIBRARY('pytalloc-util',
- source='pytalloc.c',
+ source='pytalloc_util.c',
public_deps='talloc',
pyext=True,
vnum=VERSION,
)
bld.INSTALL_FILES('${INCLUDEDIR}', 'pytalloc.h')
+ bld.SAMBA_PYTHON('pytalloc',
+ 'pytalloc.c',
+ deps='talloc pytalloc-util',
+ enabled=True,
+ realname='talloc.so')
if not getattr(bld.env, '_SAMBA_BUILD_', 0) == 4:
# s4 already has the talloc testsuite builtin to smbtorture
diff --git a/source4/scripting/python/pyglue.c b/source4/scripting/python/pyglue.c
index 627443d..b77ce2b 100644
--- a/source4/scripting/python/pyglue.c
+++ b/source4/scripting/python/pyglue.c
@@ -166,50 +166,6 @@ static PyObject *py_interface_ips(PyObject *self, PyObject *args)
return pylist;
}
-/* print a talloc tree report for a talloc python object */
-static PyObject *py_talloc_report_full(PyObject *self, PyObject *args)
-{
- PyObject *py_obj;
- PyTypeObject *type;
-
- if (!PyArg_ParseTuple(args, "O", &py_obj))
- return NULL;
-
- if (py_obj == Py_None) {
- talloc_report_full(NULL, stdout);
- } else {
- type = (PyTypeObject*)PyObject_Type(py_obj);
- talloc_report_full(py_talloc_get_mem_ctx(py_obj), stdout);
- }
- return Py_None;
-}
-
-/* enable null tracking */
-static PyObject *py_talloc_enable_null_tracking(PyObject *self, PyObject *args)
-{
- talloc_enable_null_tracking();
- return Py_None;
-}
-
-/* return the number of talloc blocks */
-static PyObject *py_talloc_total_blocks(PyObject *self, PyObject *args)
-{
- PyObject *py_obj;
- PyTypeObject *type;
-
- if (!PyArg_ParseTuple(args, "O", &py_obj))
- return NULL;
-
- if (py_obj == Py_None) {
- return PyLong_FromLong(talloc_total_blocks(NULL));
- }
-
- type = (PyTypeObject*)PyObject_Type(py_obj);
-
- return PyLong_FromLong(talloc_total_blocks(py_talloc_get_mem_ctx(py_obj)));
-}
-
-
static PyMethodDef py_misc_methods[] = {
{ "generate_random_str", (PyCFunction)py_generate_random_str, METH_VARARGS,
"generate_random_str(len) -> string\n"
@@ -227,12 +183,6 @@ static PyMethodDef py_misc_methods[] = {
"set debug level" },
{ "interface_ips", (PyCFunction)py_interface_ips, METH_VARARGS,
"get interface IP address list"},
- { "talloc_report_full", (PyCFunction)py_talloc_report_full, METH_VARARGS,
- "show a talloc tree for an object"},
- { "talloc_enable_null_tracking", (PyCFunction)py_talloc_enable_null_tracking, METH_VARARGS,
- "enable tracking of the NULL object"},
- { "talloc_total_blocks", (PyCFunction)py_talloc_total_blocks, METH_VARARGS,
- "return talloc block count"},
{ NULL }
};
diff --git a/source4/scripting/python/samba/__init__.py b/source4/scripting/python/samba/__init__.py
index 5a9df50..079dad7 100644
--- a/source4/scripting/python/samba/__init__.py
+++ b/source4/scripting/python/samba/__init__.py
@@ -327,6 +327,3 @@ interface_ips = _glue.interface_ips
set_debug_level = _glue.set_debug_level
unix2nttime = _glue.unix2nttime
generate_random_password = _glue.generate_random_password
-talloc_report_full = _glue.talloc_report_full
-talloc_enable_null_tracking = _glue.talloc_enable_null_tracking
-talloc_total_blocks = _glue.talloc_total_blocks
diff --git a/source4/scripting/python/samba/join.py b/source4/scripting/python/samba/join.py
index 2e6edca..4fe0774 100644
--- a/source4/scripting/python/samba/join.py
+++ b/source4/scripting/python/samba/join.py
@@ -32,9 +32,10 @@ from samba.net import Net
import logging
from samba.drs_utils import drs_Replicate
from samba.dsdb import DS_DOMAIN_FUNCTION_2008_R2
+import talloc
# this makes debugging easier
-samba.talloc_enable_null_tracking()
+talloc.enable_null_tracking()
class join_ctx:
'''hold join context variables'''
diff --git a/source4/scripting/python/samba/tests/dcerpc/rpc_talloc.py b/source4/scripting/python/samba/tests/dcerpc/rpc_talloc.py
index 5058e08..d561dde 100755
--- a/source4/scripting/python/samba/tests/dcerpc/rpc_talloc.py
+++ b/source4/scripting/python/samba/tests/dcerpc/rpc_talloc.py
@@ -17,15 +17,16 @@ sys.path.insert(0, "bin/python")
import samba
import samba.tests
from samba.dcerpc import drsuapi
+import talloc
-samba.talloc_enable_null_tracking()
+talloc.enable_null_tracking()
class TallocTests(samba.tests.TestCase):
'''test talloc behaviour of pidl generated python code'''
def check_blocks(self, object, num_expected):
'''check that the number of allocated blocks is correct'''
- nblocks = samba.talloc_total_blocks(object)
+ nblocks = talloc.total_blocks(object)
if object is None:
nblocks -= self.initial_blocks
self.assertEquals(nblocks, num_expected)
@@ -61,7 +62,7 @@ class TallocTests(samba.tests.TestCase):
self.check_blocks(None, 6)
def test_run(self):
- self.initial_blocks = samba.talloc_total_blocks(None)
+ self.initial_blocks = talloc.total_blocks(None)
self.check_blocks(None, 0)
--
Samba Shared Repository
More information about the samba-cvs
mailing list