On Mon, 27 Jun 2022 at 21:01, <yla...@apache.org> wrote:

> Author: ylavic
> Date: Mon Jun 27 18:01:27 2022
> New Revision: 1902285
>
> URL: http://svn.apache.org/viewvc?rev=1902285&view=rev
> Log:
> testencode: Follow up to r1902281: Correct call convention for encdec_fn
> (try 2).
>
>
> Modified:
>     apr/apr/trunk/test/testencode.c
>
> Modified: apr/apr/trunk/test/testencode.c
> URL:
> http://svn.apache.org/viewvc/apr/apr/trunk/test/testencode.c?rev=1902285&r1=1902284&r2=1902285&view=diff
>
> ==============================================================================
> --- apr/apr/trunk/test/testencode.c (original)
> +++ apr/apr/trunk/test/testencode.c Mon Jun 27 18:01:27 2022
> @@ -905,7 +905,11 @@ static void test_decode_base16_binary(ab
>      apr_pool_destroy(pool);
>  }
>
> -typedef APR_DECLARE(apr_status_t) (*encdec_fn)(char*, const char*,
> apr_ssize_t, int, apr_size_t*);
> +#ifdef WIN32
> +typedef apr_status_t (__stdcall *encdec_fn)(char*, const char*,
> apr_ssize_t, int, apr_size_t*);
> +#else
> +typedef apr_status_t (*encdec_fn)(char*, const char*, apr_ssize_t, int,
> apr_size_t*);
> +#endif
>
> This uses assumptions about calling convention used on the Win32 platform.
I don't think it's a good thing. Do we really need an array of callbacks?
May just inline all these calls?

-- 
Ivan Zhakov

Reply via email to