[libpeas] Drop peas_engine_new()
- From: Steve Frécinaux <sfre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpeas] Drop peas_engine_new()
- Date: Sun, 3 Oct 2010 21:31:20 +0000 (UTC)
commit 6b95f312ffa78734317e1f5540ea7eb6df359e02
Author: Steve Frécinaux <code istique net>
Date: Sun Oct 3 09:21:30 2010 +0200
Drop peas_engine_new()
People should not be using peas_engine_new() at all: either they should
use peas_engine_get_default() or provide their own subclass.
https://bugzilla.gnome.org/show_bug.cgi?id=628194
libpeas/peas-engine.c | 16 +---------------
libpeas/peas-engine.h | 1 -
2 files changed, 1 insertions(+), 16 deletions(-)
---
diff --git a/libpeas/peas-engine.c b/libpeas/peas-engine.c
index e88e690..6a0de42 100644
--- a/libpeas/peas-engine.c
+++ b/libpeas/peas-engine.c
@@ -1101,20 +1101,6 @@ peas_engine_set_loaded_plugins (PeasEngine *engine,
}
/**
- * peas_engine_new:
- *
- * Returns a new #PeasEngine object.
- *
- * Returns: a newly created #PeasEngine object.
- */
-PeasEngine *
-peas_engine_new (void)
-{
- return PEAS_ENGINE (g_object_new (PEAS_TYPE_ENGINE,
- NULL));
-}
-
-/**
* peas_engine_get_default:
*
* Return the existing instance of #PeasEngine or a subclass of it.
@@ -1127,7 +1113,7 @@ PeasEngine *
peas_engine_get_default (void)
{
if (default_engine == NULL)
- return peas_engine_new ();
+ return PEAS_ENGINE (g_object_new (PEAS_TYPE_ENGINE, NULL));
return default_engine;
}
diff --git a/libpeas/peas-engine.h b/libpeas/peas-engine.h
index 0e7bd86..eac4d0a 100644
--- a/libpeas/peas-engine.h
+++ b/libpeas/peas-engine.h
@@ -68,7 +68,6 @@ struct _PeasEngineClass {
};
GType peas_engine_get_type (void) G_GNUC_CONST;
-PeasEngine *peas_engine_new (void);
PeasEngine *peas_engine_get_default (void);
void peas_engine_add_search_path (PeasEngine *engine,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]