svn commit: samba r7514 - in branches/SAMBA_4_0/source/lib/ldb: common include ldb_tdb

tridge at samba.org tridge at samba.org
Mon Jun 13 05:18:18 GMT 2005


Author: tridge
Date: 2005-06-13 05:18:17 +0000 (Mon, 13 Jun 2005)
New Revision: 7514

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7514

Log:
make the ldb_parse code not depend on a ldb_context, so we can now potentially use
it in our ldap client code, instead of replicating all the code

Modified:
   branches/SAMBA_4_0/source/lib/ldb/common/ldb_parse.c
   branches/SAMBA_4_0/source/lib/ldb/include/ldb_parse.h
   branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_search.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb_parse.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/common/ldb_parse.c	2005-06-13 00:06:40 UTC (rev 7513)
+++ branches/SAMBA_4_0/source/lib/ldb/common/ldb_parse.c	2005-06-13 05:18:17 UTC (rev 7514)
@@ -43,7 +43,6 @@
 
 #include "includes.h"
 #include "ldb/include/ldb.h"
-#include "ldb/include/ldb_private.h"
 #include "ldb/include/ldb_parse.h"
 #include <ctype.h>
 
@@ -327,22 +326,13 @@
 
   expression ::= <simple> | <filter>
 */
-struct ldb_parse_tree *ldb_parse_tree(struct ldb_context *ldb, const char *s)
+struct ldb_parse_tree *ldb_parse_tree(TALLOC_CTX *mem_ctx, const char *s)
 {
 	while (isspace(*s)) s++;
 
 	if (*s == '(') {
-		return ldb_parse_filter(ldb, &s);
+		return ldb_parse_filter(mem_ctx, &s);
 	}
 
-	return ldb_parse_simple(ldb, s);
+	return ldb_parse_simple(mem_ctx, s);
 }
-
-/*
-  free a parse tree returned from ldb_parse_tree()
-*/
-void ldb_parse_tree_free(struct ldb_context *ldb, struct ldb_parse_tree *tree)
-{
-	talloc_free(tree);
-}
-

Modified: branches/SAMBA_4_0/source/lib/ldb/include/ldb_parse.h
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/include/ldb_parse.h	2005-06-13 00:06:40 UTC (rev 7513)
+++ branches/SAMBA_4_0/source/lib/ldb/include/ldb_parse.h	2005-06-13 05:18:17 UTC (rev 7514)
@@ -54,7 +54,6 @@
 	} u;
 };
 
-struct ldb_parse_tree *ldb_parse_tree(struct ldb_context *ldb, const char *s);
-void ldb_parse_tree_free(struct ldb_context *ldb, struct ldb_parse_tree *tree);
+struct ldb_parse_tree *ldb_parse_tree(TALLOC_CTX *mem_ctx, const char *s);
 
 #endif

Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_search.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_search.c	2005-06-13 00:06:40 UTC (rev 7513)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_search.c	2005-06-13 05:18:17 UTC (rev 7514)
@@ -506,7 +506,7 @@
 		}
 	}
 
-	ldb_parse_tree_free(ldb, tree);
+	talloc_free(tree);
 	ltdb_unlock_read(module);
 
 	return ret;



More information about the samba-cvs mailing list