Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
fc0fb0ba
Commit
fc0fb0ba
authored
Mar 24, 2014
by
Salvatore Sanfilippo
Browse files
Merge pull request #1635 from mattsta/lruclock-instead-of-getlruclock
Use LRU_CLOCK() instead of function getLRUClock()
parents
7f1c3607
78782ed5
Changes
1
Show whitespace changes
Inline
Side-by-side
src/object.c
View file @
fc0fb0ba
...
@@ -40,7 +40,7 @@ robj *createObject(int type, void *ptr) {
...
@@ -40,7 +40,7 @@ robj *createObject(int type, void *ptr) {
o
->
refcount
=
1
;
o
->
refcount
=
1
;
/* Set the LRU to the current lruclock (minutes resolution). */
/* Set the LRU to the current lruclock (minutes resolution). */
o
->
lru
=
getLRUClock
();
o
->
lru
=
LRU_CLOCK
();
return
o
;
return
o
;
}
}
...
@@ -61,7 +61,7 @@ robj *createEmbeddedStringObject(char *ptr, size_t len) {
...
@@ -61,7 +61,7 @@ robj *createEmbeddedStringObject(char *ptr, size_t len) {
o
->
encoding
=
REDIS_ENCODING_EMBSTR
;
o
->
encoding
=
REDIS_ENCODING_EMBSTR
;
o
->
ptr
=
sh
+
1
;
o
->
ptr
=
sh
+
1
;
o
->
refcount
=
1
;
o
->
refcount
=
1
;
o
->
lru
=
getLRUClock
();
o
->
lru
=
LRU_CLOCK
();
sh
->
len
=
len
;
sh
->
len
=
len
;
sh
->
free
=
0
;
sh
->
free
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment