mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-04 08:02:34 +03:00
apparently id() sometimes generate negative values and %X outputs -XXXX
* python/generator.py python/libxml.py: apparently id() sometimes generate negative values and %X outputs -XXXX :-( Daniel
This commit is contained in:
@ -1,9 +1,19 @@
|
||||
import libxml2mod
|
||||
import types
|
||||
import sys
|
||||
|
||||
# The root of all libxml2 errors.
|
||||
class libxmlError(Exception): pass
|
||||
|
||||
#
|
||||
# id() is sometimes negative ...
|
||||
#
|
||||
def pos_id(o):
|
||||
i = id(o)
|
||||
if (i < 0):
|
||||
return (sys.maxint - i)
|
||||
return i
|
||||
|
||||
#
|
||||
# Errors raised by the wrappers when some tree handling failed.
|
||||
#
|
||||
|
Reference in New Issue
Block a user