[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Git][xorg-team/proto/xcb-proto][upstream-unstable] 6 commits: Parse a field's "enum=" correctly



Title: GitLab

Timo Aaltonen pushed to branch upstream-unstable at X Strike Force / proto / xcb-proto

Commits:

7 changed files:

Changes:

  • NEWS
    1
    +Release 1.14.1 (2020-10-08)
    
    2
    +===========================
    
    3
    +* Python 3.9 compatibility (stop using removed interfaces)
    
    4
    +* Fix handling of enum attributes in fields
    
    5
    +
    
    1 6
     Release 1.14 (2020-02-22)
    
    2 7
     =========================
    
    3 8
     * Fix size computation of imported lists
    

  • configure.ac
    ... ... @@ -3,7 +3,7 @@
    3 3
     
    
    4 4
     AC_PREREQ(2.57)
    
    5 5
     AC_INIT([XCB Proto],
    
    6
    -        1.14,
    
    6
    +        1.14.1,
    
    7 7
             [xcb@lists.freedesktop.org])
    
    8 8
     AC_CONFIG_SRCDIR([xcb-proto.pc.in])
    
    9 9
     AM_INIT_AUTOMAKE([foreign dist-xz])
    

  • src/xproto.xml
    ... ... @@ -2624,7 +2624,7 @@ void my_example(xcb_connection_t *conn, xcb_screen_t *screen, xcb_cursor_t curso
    2624 2624
         if ((reply = xcb_grab_pointer_reply(conn, cookie, NULL))) {
    
    2625 2625
             if (reply->status == XCB_GRAB_STATUS_SUCCESS)
    
    2626 2626
                 printf("successfully grabbed the pointer\\n");
    
    2627
    -        free(preply);
    
    2627
    +        free(reply);
    
    2628 2628
         }
    
    2629 2629
     }
    
    2630 2630
           ]]></example>
    

  • xcbgen/align.py
    ... ... @@ -2,7 +2,12 @@
    2 2
     This module contains helper classes for alignment arithmetic and checks
    
    3 3
     '''
    
    4 4
     
    
    5
    -from fractions import gcd
    
    5
    +from sys import version_info
    
    6
    +
    
    7
    +if version_info[:2] >= (3, 5):
    
    8
    +    from math import gcd
    
    9
    +else:
    
    10
    +    from fractions import gcd
    
    6 11
     
    
    7 12
     class Alignment(object):
    
    8 13
     
    

  • xcbgen/matcher.py
    ... ... @@ -7,7 +7,12 @@ we do not create a new type object, we just record the existing one under a new
    7 7
     '''
    
    8 8
     
    
    9 9
     from os.path import join
    
    10
    -from xml.etree.cElementTree import parse
    
    10
    +from sys import version_info
    
    11
    +
    
    12
    +if version_info[:2] >= (3, 3):
    
    13
    +    from xml.etree.ElementTree import parse
    
    14
    +else:
    
    15
    +    from xml.etree.cElementTree import parse
    
    11 16
     
    
    12 17
     from xcbgen.xtypes import *
    
    13 18
     
    

  • xcbgen/state.py
    ... ... @@ -2,7 +2,12 @@
    2 2
     This module contains the namespace class and the singleton module class.
    
    3 3
     '''
    
    4 4
     from os.path import dirname, basename
    
    5
    -from xml.etree.cElementTree import parse
    
    5
    +from sys import version_info
    
    6
    +
    
    7
    +if version_info[:2] >= (3, 3):
    
    8
    +    from xml.etree.ElementTree import parse
    
    9
    +else:
    
    10
    +    from xml.etree.cElementTree import parse
    
    6 11
     
    
    7 12
     from xcbgen import matcher
    
    8 13
     from xcbgen.error import *
    

  • xcbgen/xtypes.py
    ... ... @@ -528,10 +528,10 @@ class ComplexType(Type):
    528 528
         def resolve(self, module):
    
    529 529
             if self.resolved:
    
    530 530
                 return
    
    531
    -        enum = None
    
    532 531
     
    
    533 532
             # Resolve all of our field datatypes.
    
    534 533
             for child in list(self.elt):
    
    534
    +            enum = None
    
    535 535
                 if child.tag == 'pad':
    
    536 536
                     field_name = 'pad' + str(module.pads)
    
    537 537
                     fkey = 'CARD8'
    


  • Reply to: