gnome-config vectors



I'm having trouble setting these creatures.
The _gnome_config_set_vector() function (which I am accessing through the
wrapper macros) receives as a third argument a "const char const
argv[]".  How do I send anything besides a static, compile-time-defined,
string array? That is:

...

const char const blah[] = { "foo", "bar" };
...
gnome_config_set_vector("appcfg/section/key",2,blah);

That'll work... but if I want to construct the array in run-time, it won't
work.  Or rather, it will, but it generates warnings when compiling
(either that I'm discarding "const" if I declare the array as const, or
incompatible pointer type if I don't declare it as const).

Any ideas? And why was that argument made so strict?

--Tonio


"It's true that every time you hear a bell, an angel gets its wings.  But 
what they don't tell you is that every time you hear a mouse trap snap, 
and Angel gets set on fire."

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS/E d-(+)>-- s:++>:+ a-- C++++ UL++++$ P++ L++ E>++ W+ N o?
K++>++++++ w--- O? M-(+) V-- !PS !PE Y?>++ PGP t+ 5>++ X-- R++
tv-- b++++ DI+ D+ G e>+++++ h* r-- y+*
------END GEEK CODE BLOCK------






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]