> @@ -512,3 +512,180 @@ int db_virtual_insert_update(const db_con_t* _h, const 
> db_key_t* _k,
>  {
>      db_generic_operation2(insert_update(handle->con, _k, _v, _n),1, 1, 1);
>  }
> +
> +#define CURRCON(__ah__) (__ah__->current_con)
> +
> +#define db_generic_async_operation(__h,__ah, _resume_f, FUNC_WITH_ARGS)      
>    \

What's the deal with all the underscores in macro params? To prevent upper 
function variable overriding? If yes, working out the output of the following 
code before running it yourself will definitely be good exercise:

```
main() {
    int a = 1, b = 2;
    #define foo(a) a = 2
    foo(b);
    printf("%d %d\n", a, b);
}
```

As a side note, prefixing a C function with `__` is actually **useful** when 
intending to mark that function as *"a low-level function you should use with 
caution"*. Take for example `set_proc_log_level`, which makes use of 
`__set_proc_log_level` behind the curtains.

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/pull/715/files#r53200587
_______________________________________________
Devel mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel

Reply via email to