change blobctx to C++