mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-06 02:45:25 +03:00
D dynamic compilation support
This commit is contained in:
parent
1c2271d00d
commit
42f283c221
41 changed files with 2058 additions and 9 deletions
20
runtime/jit-rt/cpp-so/callback_ostream.cpp
Normal file
20
runtime/jit-rt/cpp-so/callback_ostream.cpp
Normal file
|
@ -0,0 +1,20 @@
|
|||
|
||||
#include "callback_ostream.h"
|
||||
|
||||
void CallbackOstream::write_impl(const char *Ptr, size_t Size)
|
||||
{
|
||||
callback(Ptr, Size);
|
||||
currentPos += Size;
|
||||
}
|
||||
|
||||
uint64_t CallbackOstream::current_pos() const
|
||||
{
|
||||
return currentPos;
|
||||
}
|
||||
|
||||
CallbackOstream::CallbackOstream(CallbackOstream::CallbackT c):
|
||||
callback(c)
|
||||
{
|
||||
SetUnbuffered();
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue