Skip to content

Commit 26e1fd1

Browse files
committed
Fix invalid format in PyCapsule.__repr__
1 parent c5cf190 commit 26e1fd1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

graalpython/lib-graalpython/python_cext.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
22
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
33
#
44
# The Universal Permissive License (UPL), Version 1.0
@@ -816,7 +816,7 @@ def __init__(self, name, pointer, destructor):
816816
def __repr__(self):
817817
name = "NULL" if self.name is None else self.name
818818
quote = "" if self.name is None else '"'
819-
return "<capsule object %s%s%s at %p>" % (quote, name, quote, self.pointer)
819+
return "<capsule object %s%s%s at 0x%x>" % (quote, name, quote, id(self))
820820

821821

822822
@may_raise

0 commit comments

Comments
 (0)