summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2004-04-28 07:32:37 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:51:36 -0500
commitb0b97592be312b3553ac31cc3f3cb994de06e506 (patch)
treedc9d731c916eae81767883804c2d7d269bc56f3f
parent6411aa483f9233af098b4893ad67ebd2fd9d5868 (diff)
downloadsamba-b0b97592be312b3553ac31cc3f3cb994de06e506.tar.gz
samba-b0b97592be312b3553ac31cc3f3cb994de06e506.tar.bz2
samba-b0b97592be312b3553ac31cc3f3cb994de06e506.zip
r382: More C++ friendliness fixes.
(This used to be commit e96f3a2005cf6f4da2ecd4670a35eab1b4f250d0)
-rw-r--r--source4/lib/ldb/common/ldb_ldif.c10
-rw-r--r--source4/lib/ldb/include/ldb.h6
-rw-r--r--source4/lib/ldb/ldb_ldap/ldb_ldap.c2
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_index.c2
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_search.c6
5 files changed, 13 insertions, 13 deletions
diff --git a/source4/lib/ldb/common/ldb_ldif.c b/source4/lib/ldb/common/ldb_ldif.c
index 5f2fccfebc..2eaee28eb6 100644
--- a/source4/lib/ldb/common/ldb_ldif.c
+++ b/source4/lib/ldb/common/ldb_ldif.c
@@ -410,7 +410,7 @@ void ldif_read_free(struct ldb_ldif *ldif)
if (msg->elements[i].values) free(msg->elements[i].values);
}
if (msg->elements) free(msg->elements);
- if (msg->private) free(msg->private);
+ if (msg->private_data) free(msg->private_data);
free(ldif);
}
@@ -444,7 +444,7 @@ static int msg_add_empty(struct ldb_message *msg, const char *name, unsigned fla
/*
read from a LDIF source, creating a ldb_message
*/
-struct ldb_ldif *ldif_read(int (*fgetc_fn)(void *), void *private)
+struct ldb_ldif *ldif_read(int (*fgetc_fn)(void *), void *private_data)
{
struct ldb_ldif *ldif;
struct ldb_message *msg;
@@ -463,14 +463,14 @@ struct ldb_ldif *ldif_read(int (*fgetc_fn)(void *), void *private)
msg->dn = NULL;
msg->elements = NULL;
msg->num_elements = 0;
- msg->private = NULL;
+ msg->private_data = NULL;
- chunk = next_chunk(fgetc_fn, private);
+ chunk = next_chunk(fgetc_fn, private_data);
if (!chunk) {
goto failed;
}
- msg->private = chunk;
+ msg->private_data = chunk;
s = chunk;
if (next_attr(&s, &attr, &value) != 0) {
diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h
index d010d8dd40..ef00cdf32c 100644
--- a/source4/lib/ldb/include/ldb.h
+++ b/source4/lib/ldb/include/ldb.h
@@ -86,7 +86,7 @@ struct ldb_message {
char *dn;
unsigned int num_elements;
struct ldb_message_element *elements;
- void *private; /* private to the backend */
+ void *private_data; /* private to the backend */
};
enum ldb_changetype {
@@ -210,10 +210,10 @@ const char *ldb_errstring(struct ldb_context *ldb);
ldif manipulation functions
*/
int ldif_write(int (*fprintf_fn)(void *, const char *, ...),
- void *private,
+ void *private_data,
const struct ldb_ldif *ldif);
void ldif_read_free(struct ldb_ldif *);
-struct ldb_ldif *ldif_read(int (*fgetc_fn)(void *), void *private);
+struct ldb_ldif *ldif_read(int (*fgetc_fn)(void *), void *private_data);
struct ldb_ldif *ldif_read_file(FILE *f);
struct ldb_ldif *ldif_read_string(const char *s);
int ldif_write_file(FILE *f, const struct ldb_ldif *msg);
diff --git a/source4/lib/ldb/ldb_ldap/ldb_ldap.c b/source4/lib/ldb/ldb_ldap/ldb_ldap.c
index 510f28a45e..55c083b44c 100644
--- a/source4/lib/ldb/ldb_ldap/ldb_ldap.c
+++ b/source4/lib/ldb/ldb_ldap/ldb_ldap.c
@@ -264,7 +264,7 @@ static int lldb_search(struct ldb_context *ldb, const char *base,
(*res)[msg_count]->num_elements = 0;
(*res)[msg_count]->elements = NULL;
- (*res)[msg_count]->private = NULL;
+ (*res)[msg_count]->private_data = NULL;
/* loop over all attributes */
for (attr=ldap_first_attribute(lldb->ldap, msg, &berptr);
diff --git a/source4/lib/ldb/ldb_tdb/ldb_index.c b/source4/lib/ldb/ldb_tdb/ldb_index.c
index d4e6c95d63..a23fc2d525 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_index.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_index.c
@@ -576,7 +576,7 @@ static int ltdb_index_add1(struct ldb_context *ldb, const char *dn,
}
msg.num_elements = 0;
msg.elements = NULL;
- msg.private = NULL;
+ msg.private_data = NULL;
}
free(dn_key);
diff --git a/source4/lib/ldb/ldb_tdb/ldb_search.c b/source4/lib/ldb/ldb_tdb/ldb_search.c
index 9a2287e20e..fe84091303 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_search.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_search.c
@@ -166,7 +166,7 @@ static struct ldb_message *ltdb_pull_attrs(struct ldb_context *ldb,
ret->num_elements = 0;
ret->elements = NULL;
- ret->private = NULL;
+ ret->private_data = NULL;
if (!attrs) {
if (msg_add_all_elements(ret, msg) != 0) {
@@ -221,7 +221,7 @@ void ltdb_search_dn1_free(struct ldb_context *ldb, struct ldb_message *msg)
{
int i;
if (msg->dn) free(msg->dn);
- if (msg->private) free(msg->private);
+ if (msg->private_data) free(msg->private_data);
for (i=0;i<msg->num_elements;i++) {
if (msg->elements[i].values) free(msg->elements[i].values);
}
@@ -258,7 +258,7 @@ int ltdb_search_dn1(struct ldb_context *ldb, const char *dn, struct ldb_message
free(tdb_data.dptr);
return -1;
}
- msg->private = tdb_data.dptr;
+ msg->private_data = tdb_data.dptr;
msg->num_elements = 0;
msg->elements = NULL;