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.
void ovsdb_idl_txn_verify(const struct ovsdb_idl_row *,
const struct ovsdb_idl_column *);
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 *);
struct ovsdb_idl_txn *ovsdb_idl_txn_get(const struct ovsdb_idl_row *);
-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);
assert(row->new != NULL);
if (!row->old) {
ovsdb_idl_row_clear_new(row);
+const struct ovsdb_idl_row *
ovsdb_idl_txn_insert(struct ovsdb_idl_txn *txn,
const struct ovsdb_idl_table_class *class)
{
ovsdb_idl_txn_insert(struct ovsdb_idl_txn *txn,
const struct ovsdb_idl_table_class *class)
{
void ovsdb_idl_txn_write(const struct ovsdb_idl_row *,
const struct ovsdb_idl_column *,
struct ovsdb_datum *);
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 *);
-%(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_);
}
ovsdb_idl_txn_delete(&row->header_);
}