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.
This commit is contained in:
wm4 2016-09-06 17:58:00 +02:00
parent 9ab0f60d44
commit 723e3ec8d9
2 changed files with 4 additions and 4 deletions

View File

@ -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);

View File

@ -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;