projects
/
bluesky.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Debugging/refcount cleanups.
[bluesky.git]
/
bluesky
/
util.c
diff --git
a/bluesky/util.c
b/bluesky/util.c
index
f899420
..
d292634
100644
(file)
--- a/
bluesky/util.c
+++ b/
bluesky/util.c
@@
-75,14
+75,14
@@
BlueSkyRCStr *bluesky_string_new_from_gstring(GString *s)
}
/* Create a new BlueSkyRCStr from a memory-mapped buffer. */
}
/* Create a new BlueSkyRCStr from a memory-mapped buffer. */
-BlueSkyRCStr *bluesky_string_new_from_mmap(BlueSky
Mmap
*mmap,
+BlueSkyRCStr *bluesky_string_new_from_mmap(BlueSky
CacheFile
*mmap,
int offset, gsize len)
{
int offset, gsize len)
{
- g_assert(offset + len < mmap->len);
+ g_assert(offset + len <
=
mmap->len);
BlueSkyRCStr *string = g_new(BlueSkyRCStr, 1);
string->mmap = mmap;
BlueSkyRCStr *string = g_new(BlueSkyRCStr, 1);
string->mmap = mmap;
- g_atomic_int_inc(&mmap->
ref
count);
+ g_atomic_int_inc(&mmap->
map
count);
string->data = (char *)mmap->addr + offset;
string->len = len;
g_atomic_int_set(&string->refcount, 1);
string->data = (char *)mmap->addr + offset;
string->len = len;
g_atomic_int_set(&string->refcount, 1);