Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@wannacu
Copy link
Contributor

@wannacu wannacu commented Mar 6, 2023

No description provided.

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?


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.

2 participants