示例#1
0
/**
 * librdf_free_statement:
 * @statement: #librdf_statement object
 *
 * Destructor - destroy a #librdf_statement.
 * 
 **/
void
librdf_free_statement(librdf_statement* statement)
{
#ifdef WITH_THREADS
  librdf_world *world;
#endif

  LIBRDF_ASSERT_OBJECT_POINTER_RETURN(statement, librdf_statement);

#ifdef WITH_THREADS
  world = statement->world;
  pthread_mutex_lock(world->statements_mutex);
#endif

  librdf_statement_clear(statement);

#ifdef WITH_THREADS
  pthread_mutex_unlock(world->statements_mutex);
#endif

  LIBRDF_FREE(librdf_statement, statement);
}
示例#2
0
/**
 * librdf_free_statement:
 * @statement: #librdf_statement object
 *
 * Destructor - destroy a #librdf_statement.
 * 
 **/
void
librdf_free_statement(librdf_statement* statement)
{
#ifdef WITH_THREADS
  librdf_world *world;
#endif

  if(!statement)
    return;
  
#ifdef WITH_THREADS
  world = statement->world;
  pthread_mutex_lock(world->statements_mutex);
#endif

  librdf_statement_clear(statement);

#ifdef WITH_THREADS
  pthread_mutex_unlock(world->statements_mutex);
#endif

  LIBRDF_FREE(librdf_statement, statement);
}