MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / putBlobHdr

Function putBlobHdr

examples/interfaces/11.batch.cpp:70–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68// return pointer to blob size field - prefilled with BPB size
69
70static unsigned* putBlobHdr(unsigned char*& ptr, unsigned alignment, ISC_QUAD* id, unsigned bpbSize, const unsigned char* bpb)
71{
72 ptr = align(ptr, alignment);
73
74 memcpy(ptr, id, sizeof(ISC_QUAD));
75 ptr += sizeof(ISC_QUAD);
76
77 unsigned* rc = reinterpret_cast<unsigned*>(ptr);
78
79 memcpy(ptr, &bpbSize, sizeof(unsigned));
80 ptr += sizeof(unsigned);
81 memcpy(ptr, &bpbSize, sizeof(unsigned));
82 ptr += sizeof(unsigned);
83
84 memcpy(ptr, bpb, bpbSize);
85 ptr += bpbSize;
86
87 return rc;
88}
89
90
91// append given blob to buffer ptr

Callers 2

putBlobFunction · 0.85
mainFunction · 0.85

Calls 1

alignFunction · 0.70

Tested by

no test coverage detected