You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by GitBox <gi...@apache.org> on 2022/07/18 07:55:00 UTC

[GitHub] [qpid-proton] jiridanek commented on a diff in pull request #375: PROTON-2095 Move away from SWIG to CFFI (rebased from #318)

jiridanek commented on code in PR #375:
URL: https://github.com/apache/qpid-proton/pull/375#discussion_r923059274


##########
python/proton/_wrapper.py:
##########
@@ -138,6 +142,11 @@ def __repr__(self) -> str:
                                         self.__class__.__name__,
                                         id(self), addressof(self._impl))
 
+# print(f"log _wrapper line 144 {pn_py2void(Wrapper)=} ")
+# PYCTX = int(pn_py2void(Wrapper))
+# print(f"log _wrapper line 144 : type {type(Wrapper)} \n wrapper {Wrapper}")
+handle = ffi.new_handle(Wrapper)
+# PYCTX = int(Wrapper)
 
-PYCTX = int(pn_py2void(Wrapper))
-addressof = int

Review Comment:
   It is better to directly compare with `==`, but if I really address as an `int`, then
   
   ```
   int(ffi.cast("intptr_t", p))
   ```
   
   https://groups.google.com/g/python-cffi/c/lwmb1xUqJRQ



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org