{"action":"opened","issue":{"url":"https://api.github.com/repos/qdtroy/DuiLib_Ultimate/issues/29","repository_url":"https://api.github.com/repos/qdtroy/DuiLib_Ultimate","labels_url":"https://api.github.com/repos/qdtroy/DuiLib_Ultimate/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/qdtroy/DuiLib_Ultimate/issues/29/comments","events_url":"https://api.github.com/repos/qdtroy/DuiLib_Ultimate/issues/29/events","html_url":"https://github.com/qdtroy/DuiLib_Ultimate/issues/29","id":173365899,"number":29,"title":"同一pFn用&pFn得到的void*地址可能不同，请教原因？","user":{"login":"GitHub63419875","id":4132888,"avatar_url":"https://avatars.githubusercontent.com/u/4132888?v=3","gravatar_id":"","url":"https://api.github.com/users/GitHub63419875","html_url":"https://github.com/GitHub63419875","followers_url":"https://api.github.com/users/GitHub63419875/followers","following_url":"https://api.github.com/users/GitHub63419875/following{/other_user}","gists_url":"https://api.github.com/users/GitHub63419875/gists{/gist_id}","starred_url":"https://api.github.com/users/GitHub63419875/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GitHub63419875/subscriptions","organizations_url":"https://api.github.com/users/GitHub63419875/orgs","repos_url":"https://api.github.com/users/GitHub63419875/repos","events_url":"https://api.github.com/users/GitHub63419875/events{/privacy}","received_events_url":"https://api.github.com/users/GitHub63419875/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-26T04:04:11Z","updated_at":"2016-08-26T04:04:11Z","closed_at":null,"body":"同一pFn用&pFn得到的void*地址可能不同，请教原因？\r\n正常DUILIB版本下不会碰到这个BUG，我是扩展了事件源的使用（带条件判断的委托调用），才碰到这个bug的。\r\n\r\n`template <class O, class T>\r\nclass CDelegate : public CDelegateBase\r\n{\r\n    typedef bool (T::* Fn)(void*);\r\npublic:\r\n\t// 不同调用情况下，同一pFn用&pFn得到的void*可能不同;原因未知\r\n\t//CDelegate(O* pObj, Fn pFn) : CDelegateBase(pObj, (void*)(&pFn)), m_pFn(pFn) { }\t\r\n    CDelegate(O* pObj, Fn pFn) : CDelegateBase(pObj, (void*)(*((int*)((void*)&pFn)))), m_pFn(pFn) { }\r\n    CDelegate(const CDelegate& rhs) : CDelegateBase(rhs) { m_pFn = rhs.m_pFn; } \r\n    virtual CDelegateBase* Copy() const { return new CDelegate(*this); }\r\n\r\nprotected:\r\n    virtual bool Invoke(void* param)\r\n    {\r\n        O* pObject = (O*) GetObject();\r\n        return (pObject->*m_pFn)(param); \r\n    }  \r\n\r\nprivate:\r\n    Fn m_pFn;\r\n};`"}}
{"actor":{"display_login":"GitHub63419875"}}