Exemplo n.º 1
0
void job_queue_node_free(job_queue_node_type * node) {
  job_queue_node_free_data(node);
  job_queue_node_free_error_info(node);
  util_safe_free(node->run_path);

  // Since the type of the callback_arg is void* it should maybe be
  // registered with a private destructor - or the type should be
  // changed to arg_pack?
  if (arg_pack_is_instance( node->callback_arg ))
      arg_pack_free( node->callback_arg );

  free(node);
}
Exemplo n.º 2
0
bool plplot_driver_check_init_arg( const void * init_arg ) {
  if (arg_pack_is_instance( init_arg )) {
    const arg_pack_type * arg_pack = arg_pack_safe_cast_const( init_arg );
    if (arg_pack_size( arg_pack ) == 2) {
      if ((arg_pack_iget_ctype( arg_pack , 0 ) == CTYPE_VOID_POINTER) &&
          (arg_pack_iget_ctype( arg_pack , 1 ) == CTYPE_VOID_POINTER))
        return true;
      else
        return false;
    } else
      return false;
  } else
    return false;
}