-
-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: basic object merging #650
Merged
Merged
Changes from 5 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
b10f908
feat: basic object merging
b439cce
Improve description
c70b496
Use the merging somewhere useful
826d322
Make this a bit more robust
96cd844
Maybe fix memory leak in tests?
ab5b056
Do not explicitly include sentry.h, bad clangd
15f3877
fix minor bug
relaxolotl 8d35cbb
use macros since they're there
relaxolotl 078c473
use deep merging for contexts on an event as well
relaxolotl 1d63196
use merging when starting transactions
relaxolotl a057d52
address leaks in unit tests
relaxolotl 86c2470
Merge remote-tracking branch 'origin/master' into feat-basic-obj-merging
relaxolotl 242704c
missed a spot
relaxolotl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,7 @@ | ||
#ifndef SENTRY_VALUE_H_INCLUDED | ||
#define SENTRY_VALUE_H_INCLUDED | ||
|
||
#include "sentry.h" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here I guess… Not sure why you added this in the first place? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i didn't, clangd did |
||
#include "sentry_boot.h" | ||
|
||
/** | ||
|
@@ -96,6 +97,22 @@ sentry_value_t sentry__value_clone(sentry_value_t value); | |
int sentry__value_append_bounded( | ||
sentry_value_t value, sentry_value_t v, size_t max); | ||
|
||
/** | ||
* Deep-merges object src into dst. | ||
* | ||
* For each key-value pair in the src object the same key in the dst object | ||
* will be set to the value from src. If both the dst value and the src value | ||
* are objects themselves they are stepped into recursively instead of | ||
* overriding the entire dst object. | ||
* | ||
* If src is null nothing needs to be merged and this is handled gracefully, | ||
* otherwise if dst is any other type than an object or src is neither an | ||
* object nor null an error is returned. | ||
* | ||
* Returns 0 on success. | ||
*/ | ||
int sentry__value_merge_objects(sentry_value_t dst, sentry_value_t src); | ||
|
||
/** | ||
* Parse the given JSON string into a new Value. | ||
*/ | ||
|
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this include. this is being pulled in via
sentry_boot.h
, and that should also magically fix your compile error.Don’t ask me to explain exactly whats going on. Just that in C include order matters, and defines that you set have an effect on includes, and
sentry_boot.h
sets some defines that are needed so the Windows SDK does not break on microsofts own compiler. Fun times! Rewrite it in Rust!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, thanks!