Commit 9a1af670 authored by Michal Kurowski's avatar Michal Kurowski
Browse files

CreateStream uses BitStream_Init

parent 74b182d0
Pipeline #3432 passed with stage
in 3 minutes and 1 second
......@@ -109,11 +109,10 @@ def OnStartup(unused_modelingLanguage: str, asnFile: str, outputDir: str, badTyp
g_outputGetSetC.write('BitStream *CreateStream(size_t bufferSize) {\n')
g_outputGetSetC.write(' BitStream *pBitStrm = malloc(sizeof(BitStream));\n')
g_outputGetSetC.write(' assert(pBitStrm);\n')
g_outputGetSetC.write(' pBitStrm->buf = malloc(bufferSize);\n')
g_outputGetSetC.write(' assert(pBitStrm->buf);\n')
g_outputGetSetC.write(' pBitStrm->count = bufferSize;\n')
g_outputGetSetC.write(' memset(pBitStrm->buf, 0x0, bufferSize);\n')
g_outputGetSetC.write(' ResetStream(pBitStrm);\n')
g_outputGetSetC.write(' unsigned char* buf = malloc(bufferSize);\n')
g_outputGetSetC.write(' assert(buf);\n')
g_outputGetSetC.write(' memset(buf, 0x0, bufferSize);\n')
g_outputGetSetC.write(' BitStream_Init(pBitStrm, buf, bufferSize);\n')
g_outputGetSetC.write(' return pBitStrm;\n')
g_outputGetSetC.write('}\n\n')
g_outputGetSetC.write('void DestroyStream(BitStream *pBitStrm) {\n')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment