diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-02-19 15:05:20 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-02-19 15:05:20 +0300 |
commit | 9ee1b3930fef6404f197a56363bee4f846bc2bb7 (patch) | |
tree | 2b65826a8268656e02b0c54ec4c12ebd5b1df146 /source/blender/blenlib | |
parent | 48f232df73000c88d9eb6cf516d23afaa19f30f3 (diff) |
set main() argv functions to be const char *
also set minimum cmake version to 2.8
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_args.h | 6 | ||||
-rw-r--r-- | source/blender/blenlib/intern/BLI_args.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenlib/BLI_args.h b/source/blender/blenlib/BLI_args.h index 2e08c63cdfe..4cdb35dd675 100644 --- a/source/blender/blenlib/BLI_args.h +++ b/source/blender/blenlib/BLI_args.h @@ -39,9 +39,9 @@ struct bArgs; typedef struct bArgs bArgs; /* returns the number of extra arguments consumed by the function. 0 is normal value, -1 stops parsing arguments, other negative indicates skip */ -typedef int (*BA_ArgCallback)(int argc, char **argv, void *data); +typedef int (*BA_ArgCallback)(int argc, const char **argv, void *data); -struct bArgs *BLI_argsInit(int argc, char **argv); +struct bArgs *BLI_argsInit(int argc, const char **argv); void BLI_argsFree(struct bArgs *ba); /* pass starts at 1, -1 means valid all the time @@ -57,6 +57,6 @@ void BLI_argsPrintArgDoc(struct bArgs *ba, const char *arg); void BLI_argsPrintOtherDoc(struct bArgs *ba); void BLI_argsPrint(struct bArgs *ba); -char **BLI_argsArgv(struct bArgs *ba); +const char **BLI_argsArgv(struct bArgs *ba); #endif diff --git a/source/blender/blenlib/intern/BLI_args.c b/source/blender/blenlib/intern/BLI_args.c index 4a62e9d26fd..5237c66435b 100644 --- a/source/blender/blenlib/intern/BLI_args.c +++ b/source/blender/blenlib/intern/BLI_args.c @@ -67,7 +67,7 @@ struct bArgs { ListBase docs; GHash *items; int argc; - char **argv; + const char **argv; int *passes; }; @@ -113,7 +113,7 @@ static bArgument *lookUp(struct bArgs *ba, const char *arg, int pass, int case_s return BLI_ghash_lookup(ba->items, &key); } -bArgs *BLI_argsInit(int argc, char **argv) +bArgs *BLI_argsInit(int argc, const char **argv) { bArgs *ba = MEM_callocN(sizeof(bArgs), "bArgs"); ba->passes = MEM_callocN(sizeof(int) * argc, "bArgs passes"); @@ -146,7 +146,7 @@ void BLI_argsPrint(struct bArgs *ba) } } -char **BLI_argsArgv(struct bArgs *ba) +const char **BLI_argsArgv(struct bArgs *ba) { return ba->argv; } |