-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed mem leak and switched '_ptr' to '_p' to comply with bloomberg s…
…tyling
- Loading branch information
Jonathan Adotey
committed
Dec 6, 2023
1 parent
85adf3e
commit b09e215
Showing
19 changed files
with
399 additions
and
276 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
z_bmqa_queueid | ||
z_bmqa_session | ||
z_bmqa_event | ||
z_bmqa_confirmeventbuilder | ||
z_bmqa_event | ||
z_bmqa_message | ||
z_bmqa_messageevent | ||
z_bmqa_messageeventbuilder | ||
z_bmqa_messageproperties | ||
z_bmqa_message | ||
z_bmqa_queueid | ||
z_bmqa_session |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,40 @@ | ||
#include <bmqa_message.h> | ||
#include <z_bmqa_message.h> | ||
|
||
int z_bmqa_Message__delete(z_bmqa_Message** message_obj) { | ||
using namespace BloombergLP; | ||
|
||
bmqa::Message* message_p = reinterpret_cast<bmqa::Message*>(*message_obj); | ||
delete message_p; | ||
*message_obj = NULL; | ||
|
||
return 0; | ||
} | ||
|
||
int z_bmqa_Message__deleteConst(z_bmqa_Message const** message_obj) { | ||
using namespace BloombergLP; | ||
|
||
const bmqa::Message* message_p = reinterpret_cast<const bmqa::Message*>(*message_obj); | ||
delete message_p; | ||
*message_obj = NULL; | ||
|
||
return 0; | ||
} | ||
|
||
int z_bmqa_Message__createEmpty(z_bmqa_Message** message_obj){ | ||
using namespace BloombergLP; | ||
|
||
bmqa::Message* message_ptr = new bmqa::Message(); | ||
bmqa::Message* message_p = new bmqa::Message(); | ||
|
||
*message_obj = reinterpret_cast<z_bmqa_Message*>(message_ptr); | ||
*message_obj = reinterpret_cast<z_bmqa_Message*>(message_p); | ||
return 0; | ||
} | ||
|
||
int z_bmqa_Message__setDataRef(z_bmqa_Message* message_obj, const char* data, int length){ | ||
using namespace BloombergLP; | ||
|
||
bmqa::Message* message_ptr = reinterpret_cast<bmqa::Message*>(message_obj); | ||
bmqa::Message* message_p = reinterpret_cast<bmqa::Message*>(message_obj); | ||
|
||
message_ptr->setDataRef(data, length); | ||
message_p->setDataRef(data, length); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include <z_bmqa_messageevent.h> | ||
#include <bmqa_messageevent.h> | ||
|
||
int z_bmqa_MessageEvent__delete(z_bmqa_MessageEvent** event_obj) { | ||
using namespace BloombergLP; | ||
|
||
bmqa::MessageEvent* event_p = reinterpret_cast<bmqa::MessageEvent*>(*event_obj); | ||
delete event_p; | ||
*event_obj = NULL; | ||
|
||
return 0; | ||
} | ||
|
||
int z_bmqa_MessageEvent__deleteConst(z_bmqa_MessageEvent const** event_obj) { | ||
using namespace BloombergLP; | ||
|
||
const bmqa::MessageEvent* event_p = reinterpret_cast<const bmqa::MessageEvent*>(*event_obj); | ||
delete event_p; | ||
*event_obj = NULL; | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,18 @@ | ||
#ifndef INCLUDED_Z_BMQA_MESSAGEEVENT | ||
#define INCLUDED_Z_BMQA_MESSAGEEVENT | ||
|
||
#if defined(__cplusplus) | ||
extern "C" { | ||
#endif | ||
|
||
typedef struct z_bmqa_MessageEvent z_bmqa_MessageEvent; | ||
|
||
int z_bmqa_MessageEvent__delete(z_bmqa_MessageEvent** event_obj); | ||
|
||
int z_bmqa_MessageEvent__deleteConst(z_bmqa_MessageEvent const** event_obj); | ||
|
||
#if defined(__cplusplus) | ||
} | ||
#endif | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.