Streaming mode is not usable in C
ar-nelson opened this issue · comments
Although a streaming mode API (fetchData
and pushData
) exists in the generated C code, it is not usable. A flag called INTERNAL_FETH_DATA
(typo?) is #defined
in asn1crt_encoding.c
and then immediately used in an #ifdef
block to define no-op versions of fetchData
and pushData
; there is no way for the user to supply their own versions of these functions. This #ifdef
block is marked // DEBUG
, so this may be leftover debug code?
I have already submitted a pull request that attempts to fix this issue: https://github.com/ttsiodras/asn1scc/pull/225
Hi! Thanks for the pull request,
It was indeed a bug that appeared when the code was ported from .Net 4.6 to .Net core.
I made another commit (on top of your pull request) so that when the argument -sm is present then instead of changing asn1crt_encoding.c it now adds -DASN1SCC_STREAMING in the Makefile.
The command-line argument -sm is also required for the Ada backend.