From: Duilio J. P. <dp...@fc...> - 2004-06-25 03:06:08
|
I have found a major issue about libvisual interface. The signature of visual_init() is: int visual_init (int *argc, char **argv[]) and the comment says: @param argv Pointer to a list of strings that make up the argument vector or NULL. which is not true. That would be true if argv was it a pointer to an array of pointers to char. But argv is an array of pointers to pointers to char. I have found that error trying to set visual_init() from XMMS plugin to show the correct program name when showing debug messages (which I have added to keep track of the bug that make XMMS crash on plugin disabling). Has anybody used this interface? I couldn't make it work. However, changing the interface signature to: int visual_init (int *argc, char ***argv) and changing the client accordingly, everything works fine. Dennis, do you think we must change the interface? A question would be: why not use the signature int visual_init (int *argc, char *(*argv)[]) which express exactly "a pointer to an array of pointers to char"? Because it doesn't compile. Compiler needs the array size for this to work. Duilio. |