diff options
author | wm4 <wm4@nowhere> | 2016-09-06 17:58:00 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-09-06 20:08:44 +0200 |
commit | 723e3ec8d9acbbb2ad12c8b458e8c43e55a9ec2d (patch) | |
tree | 0b20abb29048fbbd808d99e13319366e55fa07e5 /common | |
parent | 9ab0f60d444984581e188b9987faed9b80eda7e2 (diff) | |
download | mpv-723e3ec8d9acbbb2ad12c8b458e8c43e55a9ec2d.tar.bz2 mpv-723e3ec8d9acbbb2ad12c8b458e8c43e55a9ec2d.tar.xz |
common: use char array for version string
Use a char array instead of a pointer, which allows using the version
variables in a constant context.
Diffstat (limited to 'common')
-rw-r--r-- | common/common.h | 4 | ||||
-rw-r--r-- | common/version.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/common/common.h b/common/common.h index b687ffccf0..c78409b3f4 100644 --- a/common/common.h +++ b/common/common.h @@ -65,8 +65,8 @@ enum { DATA_EOF = -2, }; -extern const char *const mpv_version; -extern const char *const mpv_builddate; +extern const char mpv_version[]; +extern const char mpv_builddate[]; char *mp_format_time(double time, bool fractions); char *mp_format_time_fmt(const char *fmt, double time); diff --git a/common/version.c b/common/version.c index b1d42b9ab4..b98fe00ed1 100644 --- a/common/version.c +++ b/common/version.c @@ -22,5 +22,5 @@ #define BUILDDATE "UNKNOWN" #endif -const char *const mpv_version = "mpv " VERSION; -const char *const mpv_builddate = BUILDDATE; +const char mpv_version[] = "mpv " VERSION; +const char mpv_builddate[] = BUILDDATE; |