svn commit: samba r1983 - in branches/SAMBA_4_0/source: auth include lib lib/registry/common lib/registry/reg_backend_dir lib/registry/reg_backend_gconf lib/registry/reg_backend_ldb libads libcli libcli/ldap libcli/raw librpc/ndr librpc/rpc ntvfs/ipc ntvfs/reference ntvfs/simple rpc_server rpc_server/epmapper rpc_server/netlogon rpc_server/samr smb_server torture/rap torture/raw torture/rpc

tridge at samba.org tridge at samba.org
Sat Aug 21 01:54:46 GMT 2004


Author: tridge
Date: 2004-08-21 01:54:46 +0000 (Sat, 21 Aug 2004)
New Revision: 1983

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

Log:
a completely new implementation of talloc

This version does the following:

  1) talloc_free(), talloc_realloc() and talloc_steal() lose their
     (redundent) first arguments

  2) you can use _any_ talloc pointer as a talloc context to allocate
     more memory. This allows you to create complex data structures
     where the top level structure is the logical parent of the next
     level down, and those are the parents of the level below
     that. Then destroy either the lot with a single talloc_free() or
     destroy any sub-part with a talloc_free() of that part

  3) you can name any pointer. Use talloc_named() which is just like
     talloc() but takes the printf style name argument as well as the
     parent context and the size.

The whole thing ends up being a very simple piece of code, although
some of the pointer walking gets hairy.

So far, I'm just using the new talloc() like the old one. The next
step is to actually take advantage of the new interface
properly. Expect some new commits soon that simplify some common
coding styles in samba4 by using the new talloc().



Modified:
   branches/SAMBA_4_0/source/auth/auth_sam.c
   branches/SAMBA_4_0/source/include/talloc.h
   branches/SAMBA_4_0/source/lib/data_blob.c
   branches/SAMBA_4_0/source/lib/registry/common/reg_interface.c
   branches/SAMBA_4_0/source/lib/registry/reg_backend_dir/reg_backend_dir.c
   branches/SAMBA_4_0/source/lib/registry/reg_backend_gconf/reg_backend_gconf.c
   branches/SAMBA_4_0/source/lib/registry/reg_backend_ldb/reg_backend_ldb.c
   branches/SAMBA_4_0/source/lib/talloc.c
   branches/SAMBA_4_0/source/lib/tallocmsg.c
   branches/SAMBA_4_0/source/lib/util_str.c
   branches/SAMBA_4_0/source/lib/util_unistr.c
   branches/SAMBA_4_0/source/lib/util_uuid.c
   branches/SAMBA_4_0/source/libads/ldap.c
   branches/SAMBA_4_0/source/libcli/clilist.c
   branches/SAMBA_4_0/source/libcli/ldap/ldap.c
   branches/SAMBA_4_0/source/libcli/ldap/ldap_ldif.c
   branches/SAMBA_4_0/source/libcli/raw/clisession.c
   branches/SAMBA_4_0/source/libcli/raw/clisocket.c
   branches/SAMBA_4_0/source/libcli/raw/clitransport.c
   branches/SAMBA_4_0/source/libcli/raw/clitree.c
   branches/SAMBA_4_0/source/libcli/raw/raweas.c
   branches/SAMBA_4_0/source/libcli/raw/rawfile.c
   branches/SAMBA_4_0/source/libcli/raw/rawfileinfo.c
   branches/SAMBA_4_0/source/libcli/raw/rawreadwrite.c
   branches/SAMBA_4_0/source/libcli/raw/rawrequest.c
   branches/SAMBA_4_0/source/libcli/raw/rawtrans.c
   branches/SAMBA_4_0/source/librpc/ndr/ndr.c
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc.c
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc_smb.c
   branches/SAMBA_4_0/source/ntvfs/ipc/ipc_rap.c
   branches/SAMBA_4_0/source/ntvfs/reference/ref_util.c
   branches/SAMBA_4_0/source/ntvfs/simple/svfs_util.c
   branches/SAMBA_4_0/source/ntvfs/simple/vfs_simple.c
   branches/SAMBA_4_0/source/rpc_server/dcerpc_server.c
   branches/SAMBA_4_0/source/rpc_server/epmapper/rpc_epmapper.c
   branches/SAMBA_4_0/source/rpc_server/netlogon/dcerpc_netlogon.c
   branches/SAMBA_4_0/source/rpc_server/samr/dcesrv_samr.c
   branches/SAMBA_4_0/source/smb_server/request.c
   branches/SAMBA_4_0/source/smb_server/trans2.c
   branches/SAMBA_4_0/source/torture/rap/rap.c
   branches/SAMBA_4_0/source/torture/raw/open.c
   branches/SAMBA_4_0/source/torture/raw/search.c
   branches/SAMBA_4_0/source/torture/rpc/winreg.c


Changeset:
Sorry, the patch is too large (1712 lines) to include; please use WebSVN to see it!
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source&rev=1983&nolog=1


More information about the samba-cvs mailing list