Exemplo n.º 1
0
 def __init__(self, space, src_ctx):
     self.space = space
     self.types_dict = {}
     self.ctxobj = parse_c_type.allocate_ctxobj(src_ctx)
     self.is_static = bool(src_ctx)
     self.is_nonempty = bool(src_ctx)
     self._finalizer = FreeCtxObj(self.ctxobj)
     if src_ctx:
         self.cached_types = [None] * parse_c_type.get_num_types(src_ctx)
     else:
         self.cached_types = None
     self.w_FFIError = get_ffi_error(space)
     #
     # list of (W_FFIObject, W_LibObject) included in this ffi,
     # where the lib object may be None
     self.included_ffis_libs = []
Exemplo n.º 2
0
 def __init__(self, space, src_ctx):
     self.space = space
     self.types_dict = {}
     self.ctxobj = parse_c_type.allocate_ctxobj(src_ctx)
     self.is_static = bool(src_ctx)
     self.is_nonempty = bool(src_ctx)
     self._finalizer = FreeCtxObj(self.ctxobj)
     if src_ctx:
         self.cached_types = [None] * parse_c_type.get_num_types(src_ctx)
     else:
         self.cached_types = None
     self.w_FFIError = get_ffi_error(space)
     #
     # list of (W_FFIObject, W_LibObject) included in this ffi,
     # where the lib object may be None
     self.included_ffis_libs = []