parameters: (context, builder, pointer, msg=None)
docstring: Guard against *pointer* being NULL (and raise a MemoryError).
docstring_summary: Guard against *pointer* being NULL (and raise a MemoryError).
docstring_tokens: Guard against * pointer * being NULL ( and raise a MemoryError ) .
function: def guard_memory_error(context, builder, pointer, msg=None):
      """
      Guard against *pointer* being NULL (and raise a MemoryError).
      """
      assert isinstance(pointer.type, ir.PointerType), pointer.type
      exc_args = (msg,) if msg else ()
      with builder.if_then(is_null(builder, pointer), likely=False):
          context.call_conv.return_user_exc(builder, MemoryError, exc_args)
function_tokens: def guard_memory_error ( context , builder , pointer , msg = None ) : assert isinstance ( pointer . type , ir . PointerType ) , pointer . type exc_args = ( msg , ) if msg else ( ) with builder . if_then ( is_null ( builder , pointer ) , likely = False ) : context . call_conv . return_user_exc ( builder , MemoryError , exc_args )