From ce39cdd4978f02c328637307bcb5395c508b3bfb Mon Sep 17 00:00:00 2001 From: yuqing Date: Mon, 16 May 2016 09:20:28 +0800 Subject: [PATCH] add comment --- php-fastcommon/fastcommon.c | 4 ++-- src/id_generator.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/php-fastcommon/fastcommon.c b/php-fastcommon/fastcommon.c index 0568bbf..f6e61d5 100644 --- a/php-fastcommon/fastcommon.c +++ b/php-fastcommon/fastcommon.c @@ -18,7 +18,7 @@ #define MAJOR_VERSION 1 #define MINOR_VERSION 0 -#define PATCH_VERSION 5 +#define PATCH_VERSION 6 #define DEFAULT_SN_FILENAME "/tmp/fastcommon_id_generator.sn" @@ -421,7 +421,7 @@ ZEND_FUNCTION(fastcommon_id_generator_init) } /* -long/string fastcommon_id_generator_next([int extra]) +long/string fastcommon_id_generator_next([int extra = 0]) return id for success, false for fail return long in 64 bits OS, return string in 32 bits Os */ diff --git a/src/id_generator.h b/src/id_generator.h index 3832ea0..831af2f 100644 --- a/src/id_generator.h +++ b/src/id_generator.h @@ -9,7 +9,7 @@ /** 64 bits id generator for multi processes, the generated id format: 32 bits timestamp + X bits machine id + Y bits of extra data + Z bits serial number - such as 12 bits machine id, 0 bits extra data and 20 bits serial number + such as 12 bits machine id, 0 bits extra data and 20 bits serial number */ #ifndef ID_GENERATOR_H