コード例 #1
0
ファイル: ctypeptr.py プロジェクト: juokaz/pypy
 def __init__(self, space, size, extra, extra_position, ctitem,
              could_cast_anything=True):
     name, name_position = ctitem.insert_name(extra, extra_position)
     W_CType.__init__(self, space, size, name, name_position)
     # this is the "underlying type":
     #  - for pointers, it is the pointed-to type
     #  - for arrays, it is the array item type
     #  - for functions, it is the return type
     self.ctitem = ctitem
     self.can_cast_anything = could_cast_anything and ctitem.cast_anything
コード例 #2
0
ファイル: ctypeptr.py プロジェクト: charred/pypy
 def __init__(self, space, size, extra, extra_position, ctitem,
              could_cast_anything=True):
     from pypy.module._cffi_backend.ctypestruct import W_CTypeStructOrUnion
     name, name_position = ctitem.insert_name(extra, extra_position)
     W_CType.__init__(self, space, size, name, name_position)
     # this is the "underlying type":
     #  - for pointers, it is the pointed-to type
     #  - for arrays, it is the array item type
     #  - for functions, it is the return type
     self.ctitem = ctitem
     self.can_cast_anything = could_cast_anything and ctitem.cast_anything
     self.is_struct_ptr = isinstance(ctitem, W_CTypeStructOrUnion)
コード例 #3
0
 def __init__(self, space, size, extra, extra_position, ctitem):
     name, name_position = ctitem.insert_name(extra, extra_position)
     W_CType.__init__(self, space, size, name, name_position)
     # this is the "underlying type":
     #  - for pointers, it is the pointed-to type
     #  - for arrays, it is the array item type
     #  - for functions, it is the return type
     self.ctitem = ctitem
     self.accept_str = (self.is_nonfunc_pointer_or_array and
             (isinstance(ctitem, ctypevoid.W_CTypeVoid) or
              isinstance(ctitem, ctypeprim.W_CTypePrimitiveChar) or
              (ctitem.is_primitive_integer and
               ctitem.size == rffi.sizeof(lltype.Char))))
コード例 #4
0
ファイル: ctypestruct.py プロジェクト: Qointum/pypy
 def __init__(self, space, name):
     W_CType.__init__(self, space, -1, name, len(name))
コード例 #5
0
ファイル: ctypestruct.py プロジェクト: bukzor/pypy
 def __init__(self, space, name):
     W_CType.__init__(self, space, -1, name, len(name))
コード例 #6
0
ファイル: ctypeprim.py プロジェクト: zielmicha/pypy
 def __init__(self, space, size, name, name_position, align):
     W_CType.__init__(self, space, size, name, name_position)
     self.align = align
コード例 #7
0
 def __init__(self, space):
     W_CType.__init__(self, space, -1, "void", len("void"))