summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-06-13 05:18:17 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:18:02 -0500
commit87acba39f9e45eb6849cfd945ce6255bac5564c9 (patch)
treece5bf478de0a51ba246dbfdb6d21db12d6147a26 /source4/lib/ldb/common
parent2be36bb85d0278a1f27f7202ed2c0e88a5f85a31 (diff)
downloadsamba-87acba39f9e45eb6849cfd945ce6255bac5564c9.tar.gz
samba-87acba39f9e45eb6849cfd945ce6255bac5564c9.tar.bz2
samba-87acba39f9e45eb6849cfd945ce6255bac5564c9.zip
r7514: 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 (This used to be commit 5b3575d9303d54a771e080a670dcd2f444b10c20)
Diffstat (limited to 'source4/lib/ldb/common')
-rw-r--r--source4/lib/ldb/common/ldb_parse.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/source4/lib/ldb/common/ldb_parse.c b/source4/lib/ldb/common/ldb_parse.c
index 5221ef4556..e64e6d82d3 100644
--- a/source4/lib/ldb/common/ldb_parse.c
+++ b/source4/lib/ldb/common/ldb_parse.c
@@ -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 @@ static struct ldb_parse_tree *ldb_parse_filter(TALLOC_CTX *ctx, const char **s)
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);
-}
-