Details
-
New Feature
-
Resolution: Done
-
Major - P3
-
None
-
0.8.1
-
None
-
None
-
win7 32
Description
I code it like this below, but no one can work.
========================================================
bson b2[1];
char * buffer;
int size;
size = bson_size(b);
buffer = (char *)malloc(size);
memcpy(buffer, bson_data(b), size);
//bson_init_unfinished_data(b2, buffer, size, 0); // no effect
//bson_init_unfinished_data(b2, buffer, size, 1); // with crash
//bson_init_finished_data_with_copy(b2, bson_data(b)); // no effect
bson_append_int(b2, "age", 18);
bson_finish( b2 );
bson_print( b2 );
======================================================
best regard and thanks.