emscripten icon indicating copy to clipboard operation
emscripten copied to clipboard

Conflict with embind internal functions

Open AlexPerrot opened this issue 11 years ago • 1 comments

Hi,

I have a code using Embind to bind a function called clone. However, Embind internally has a function called ClassHandle_clone that is registered as clone in the object's prototype. So, it results in an overloadTable being used. Fortunately, my clone and the embind clonehave different number of arguments, so it works fine for me (aside from #3436 , since the embind clone is now in overloadTable['undefined']). But this prevents any user from using its own clone with the same number of arguments as the embind clone.

Furthermore, I suspect this is valid for any internal embind functions added to the objects prototypes that are NOT reserved C++ keywords (such as delete). Wouldn't it be better to prefix such functions with embind_ to avoid (or at least greatly reduce the probability of) such conflicts ?

AlexPerrot avatar Jun 30 '15 07:06 AlexPerrot

This issue has been automatically marked as stale because there has been no activity in the past 2 years. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant.

stale[bot] avatar Aug 31 '19 03:08 stale[bot]