summaryrefslogtreecommitdiff
path: root/src/analysis/db
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis/db')
-rw-r--r--src/analysis/db/items/bookmark.c23
-rw-r--r--src/analysis/db/items/bookmark.h2
2 files changed, 19 insertions, 6 deletions
diff --git a/src/analysis/db/items/bookmark.c b/src/analysis/db/items/bookmark.c
index 2afbbc0..a3da5b3 100644
--- a/src/analysis/db/items/bookmark.c
+++ b/src/analysis/db/items/bookmark.c
@@ -306,6 +306,11 @@ bool g_db_bookmark_fill(GDbBookmark *bookmark, const vmpa2t *addr, const char *c
{
bool result; /* Bilan à retourner */
+ /**
+ * Cette fonction est principalement destinée aux initialisations
+ * depuis l'extension Python.
+ */
+
result = true;
copy_vmpa(&bookmark->addr, addr);
@@ -645,9 +650,9 @@ static bool g_db_bookmark_load(GDbBookmark *bookmark, const bound_value *values,
result = G_DB_ITEM_CLASS(g_db_bookmark_parent_class)->load(G_DB_ITEM(bookmark), values, count);
- result &= load_vmpa(&bookmark->addr, NULL, values, count);
+ if (result) result = load_vmpa(&bookmark->addr, NULL, values, count);
- result &= load_rle_string(&bookmark->comment, "comment", values, count);
+ if (result) result = load_rle_string(&bookmark->comment, "comment", values, count);
return result;
@@ -710,9 +715,13 @@ static bool g_db_bookmark_store(const GDbBookmark *bookmark, bound_value **value
* *
******************************************************************************/
-const vmpa2t *g_db_bookmark_get_address(GDbBookmark *bookmark)
+const vmpa2t *g_db_bookmark_get_address(const GDbBookmark *bookmark)
{
- return &bookmark->addr;
+ const vmpa2t *result; /* Localisation à retourner */
+
+ result = &bookmark->addr;
+
+ return result;
}
@@ -731,7 +740,11 @@ const vmpa2t *g_db_bookmark_get_address(GDbBookmark *bookmark)
const char *g_db_bookmark_get_comment(const GDbBookmark *bookmark)
{
- return get_rle_string(&bookmark->comment);
+ const char *result; /* Commentaire à renvoyer */
+
+ result = get_rle_string(&bookmark->comment);
+
+ return result;
}
diff --git a/src/analysis/db/items/bookmark.h b/src/analysis/db/items/bookmark.h
index 1eb172e..7789144 100644
--- a/src/analysis/db/items/bookmark.h
+++ b/src/analysis/db/items/bookmark.h
@@ -61,7 +61,7 @@ GDbBookmark *g_db_bookmark_new(const vmpa2t *, const char *);
bool g_db_bookmark_fill(GDbBookmark *, const vmpa2t *, const char *);
/* Fournit l'adresse associée à un signet. */
-const vmpa2t *g_db_bookmark_get_address(GDbBookmark *);
+const vmpa2t *g_db_bookmark_get_address(const GDbBookmark *);
/* Fournit le commentaire associé à un signet. */
const char *g_db_bookmark_get_comment(const GDbBookmark *);