2
0
mirror of https://github.com/openvswitch/ovs synced 2025-09-03 15:55:19 +00:00

ovsdb-idl: Export ovsdb_idl_txn_delete() and ovsdb_idl_txn_insert().

ovs-vsctl wants to use these functions directly, so make them available
through the ovsdb-idl public header instead of only through the private
one.

Also, change the prototypes to make them usable without casts.
This commit is contained in:
Ben Pfaff
2010-01-27 13:04:56 -08:00
parent 557e37183d
commit 9e336f4910
4 changed files with 8 additions and 8 deletions

View File

@@ -71,10 +71,6 @@ struct ovsdb_idl_row *ovsdb_idl_get_row_arc(
void ovsdb_idl_txn_verify(const struct ovsdb_idl_row *,
const struct ovsdb_idl_column *);
void ovsdb_idl_txn_delete(struct ovsdb_idl_row *);
struct ovsdb_idl_row *ovsdb_idl_txn_insert(
struct ovsdb_idl_txn *,
const struct ovsdb_idl_table_class *);
struct ovsdb_idl_txn *ovsdb_idl_txn_get(const struct ovsdb_idl_row *);

View File

@@ -1300,8 +1300,10 @@ ovsdb_idl_txn_verify(const struct ovsdb_idl_row *row_,
}
void
ovsdb_idl_txn_delete(struct ovsdb_idl_row *row)
ovsdb_idl_txn_delete(const struct ovsdb_idl_row *row_)
{
struct ovsdb_idl_row *row = (struct ovsdb_idl_row *) row_;
assert(row->new != NULL);
if (!row->old) {
ovsdb_idl_row_clear_new(row);
@@ -1319,7 +1321,7 @@ ovsdb_idl_txn_delete(struct ovsdb_idl_row *row)
row->new = NULL;
}
struct ovsdb_idl_row *
const struct ovsdb_idl_row *
ovsdb_idl_txn_insert(struct ovsdb_idl_txn *txn,
const struct ovsdb_idl_table_class *class)
{

View File

@@ -74,5 +74,8 @@ void ovsdb_idl_txn_read(const struct ovsdb_idl_row *,
void ovsdb_idl_txn_write(const struct ovsdb_idl_row *,
const struct ovsdb_idl_column *,
struct ovsdb_datum *);
void ovsdb_idl_txn_delete(const struct ovsdb_idl_row *);
const struct ovsdb_idl_row *ovsdb_idl_txn_insert(
struct ovsdb_idl_txn *, const struct ovsdb_idl_table_class *);
#endif /* ovsdb-idl.h */

View File

@@ -524,9 +524,8 @@ const struct %(s)s *
print '''
void
%(s)s_delete(const struct %(s)s *row_)
%(s)s_delete(const struct %(s)s *row)
{
struct %(s)s *row = (struct %(s)s *) row_;
ovsdb_idl_txn_delete(&row->header_);
}