clibs / debug

Conditional debug logging for C
MIT License
17 stars 2 forks source link

Feature request: support non-alphanumberic characters in debug names #8

Open stephenmathieson opened 10 years ago

stephenmathieson commented 10 years ago

No idea how we'd handle it with the current impl (may need a rewrite :/), but I'd greatly appreciate being able to use non-alphanumberic chars when defining debugs.

For example:

debug_init(clib);
debug_init(clib:install);
debug_init(clib:search);
debug_init(clib:help);
jwerle commented 10 years ago

I'm not sure how we'd do this either, but that would be great. Do you have any implementation ideas ?

stephenmathieson commented 10 years ago

Nothing nice comes to mind. Maybe a hashmap of debuggers? Then, we could:

#define debug_get(name) (debug_t) hash_get(debugger_hash_map, #name)

On Mon, Jun 23, 2014 at 11:25 AM, Joseph Werle notifications@github.com wrote:

I'm not sure how we'd do this either, but that would be great. Do you have any implementation ideas ?

— Reply to this email directly or view it on GitHub https://github.com/clibs/debug/issues/8#issuecomment-46859960.

jwerle commented 10 years ago

Hmm I'll play with it later and see what I can come up with