diff options
| author | 彭宣正 <[email protected]> | 2021-11-01 11:18:38 +0800 |
|---|---|---|
| committer | 彭宣正 <[email protected]> | 2021-11-01 13:03:45 +0000 |
| commit | 0b0292961eece87784fe5fc618fc55e9cb6f06ac (patch) | |
| tree | 10aefcb9c2d1b135b1a271c32f7e8ea5f638cacc /src/tsg_send_log.cpp | |
| parent | 092aba6df71849ddf72761f0d54cafc74bcff64a (diff) | |
✨ feat(TSG-8103):v5.4.10
Diffstat (limited to 'src/tsg_send_log.cpp')
| -rw-r--r-- | src/tsg_send_log.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/tsg_send_log.cpp b/src/tsg_send_log.cpp index c51d40e..1a5d3b6 100644 --- a/src/tsg_send_log.cpp +++ b/src/tsg_send_log.cpp @@ -890,6 +890,21 @@ int TLD_append(struct TLD_handle_t *handle, char *key, void *value, TLD_TYPE typ return 0; } +struct TLD_handle_t *TLD_duplicate(struct TLD_handle_t *handle) +{ + if (handle == NULL) + { + return NULL; + } + struct TLD_handle_t *_handle=(struct TLD_handle_t *)calloc(1, sizeof(struct TLD_handle_t)); + _handle->thread_id = handle->thread_id; + _handle->document = new Document(); + //_handle->document->SetObject(); + + _handle->document->CopyFrom(*handle->document, _handle->document->GetAllocator()); + return _handle; +} + struct TLD_handle_t *TLD_create(int thread_id) { //struct _tld_handle *_handle=(struct _tld_handle *)dictator_malloc(thread_id, sizeof(struct _tld_handle)); |
