Skip to content
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

Fix some wrapping error #771

Merged
merged 1 commit into from
Mar 6, 2023
Merged

Fix some wrapping error #771

merged 1 commit into from
Mar 6, 2023

Conversation

wannacu
Copy link
Contributor

@wannacu wannacu commented Mar 6, 2023

No description provided.

@@ -309,6 +352,13 @@ EXPORT void* my_jpeg_std_error(x86emu_t* emu, void* errmgr)

wrapErrorMgr(my_lib->w.bridge, ret);

my->jpeg_std_error(&native_err_mgr);
ret->error_exit = (void*)AddBridge(my_lib->w.bridge, vFp, native_error_exit, 0, NULL);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's probably better to use AddCheckBridge here, to avoid adding multiple time the same value?

@@ -12,6 +13,7 @@ void FreeBridge(bridge_t** bridge);

uintptr_t AddBridge(bridge_t* bridge, wrapper_t w, void* fnc, int N, const char* name);
uintptr_t CheckBridged(bridge_t* bridge, void* fnc);
bool IsBridge(void* func);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it's nitspicking, but can we avoid the use of bool? a simple int will do just fine.

Copy link
Owner

@ptitSeb ptitSeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please just use int, no need for c++ like feature like bool.

And use AddCheckBridge instead of AddBridge to avoid duplication.

Looks good appart from that, thanks :)

@wannacu
Copy link
Contributor Author

wannacu commented Mar 6, 2023

Ok, I will improve it

@ptitSeb
Copy link
Owner

ptitSeb commented Mar 6, 2023

Thanks :)

@ptitSeb ptitSeb merged commit f682ca6 into ptitSeb:master Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants