summaryrefslogtreecommitdiff
path: root/glib/src/markup.ccg
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2005-01-20 16:28:17 +0000
committerMurray Cumming <murrayc@src.gnome.org>2005-01-20 16:28:17 +0000
commit5d783de9a21c0dd3e50ebbf16de41bea7a412027 (patch)
treee64865d4c9daba1733701025c27deddd71959bb2 /glib/src/markup.ccg
parentd3c5c7637ddf69bb1df177bde94b68e106d13a8b (diff)
downloadglibmm-5d783de9a21c0dd3e50ebbf16de41bea7a412027.tar.gz
Make C callacks separate extern C functions instead of static member
2005-01-20 Murray Cumming <murrayc@murrayc.com> * glib/src/iochannel.[hg|ccg], markup.[hg|ccg], optiongroup.ccg, spawn.ccg, thread.ccg: Make C callacks separate extern C functions instead of static member functions, to satisfy the IRIX MipsPro compiler. Unfortunately this means that we export some private API. * glib/src/optionentry.hg: Remove the include of value.h, because it is not used and it causes a MipsPro compile error in optioncontext.cc because its templates are included before the types that the template uses. * glib/src/optiongroup.ccg: Do not use the StringArrayHandle, because the MipsPro compiler has problems with it - see comments in code. * configure.in, scripts/cxx.m4, glibmm/glibmmconfig.h.in: Added a compiler test, because the IRIX MipsPro compiler does not allow us to define a template that uses an undefined type, even if we do not use it before defining the type. That's probably correct. * glib/glibmm/containerhandler_helpers.h: When the compiler does not alllow the GObject and GtkObject (dynamic_cast of) specializations here, then put them in glib/glibmm/object.h and gtkmm/gtk/src/object.hg instead.- needed by MipsPro (IRIX) compiler..
Diffstat (limited to 'glib/src/markup.ccg')
-rw-r--r--glib/src/markup.ccg55
1 files changed, 13 insertions, 42 deletions
diff --git a/glib/src/markup.ccg b/glib/src/markup.ccg
index 2b61a358..4b19f84e 100644
--- a/glib/src/markup.ccg
+++ b/glib/src/markup.ccg
@@ -51,47 +51,19 @@ class ParserCallbacks
{
public:
static const GMarkupParser vfunc_table;
-
- static void start_element(GMarkupParseContext* context,
- const char* element_name,
- const char** attribute_names,
- const char** attribute_values,
- void* user_data,
- GError** error);
-
- static void end_element(GMarkupParseContext* context,
- const char* element_name,
- void* user_data,
- GError** error);
-
- static void text(GMarkupParseContext* context,
- const char* text,
- gsize text_len,
- void* user_data,
- GError** error);
-
- static void passthrough(GMarkupParseContext* context,
- const char* passthrough_text,
- gsize text_len,
- void* user_data,
- GError** error);
-
- static void error(GMarkupParseContext* context,
- GError* error,
- void* user_data);
};
const GMarkupParser ParserCallbacks::vfunc_table =
{
- &ParserCallbacks::start_element,
- &ParserCallbacks::end_element,
- &ParserCallbacks::text,
- &ParserCallbacks::passthrough,
- &ParserCallbacks::error,
+ &ParserCallbacks_start_element,
+ &ParserCallbacks_end_element,
+ &ParserCallbacks_text,
+ &ParserCallbacks_passthrough,
+ &ParserCallbacks_error,
};
-void ParserCallbacks::start_element(GMarkupParseContext* context,
+void ParserCallbacks_start_element(GMarkupParseContext* context,
const char* element_name,
const char** attribute_names,
const char** attribute_values,
@@ -128,7 +100,7 @@ void ParserCallbacks::start_element(GMarkupParseContext* context,
}
}
-void ParserCallbacks::end_element(GMarkupParseContext* context,
+void ParserCallbacks_end_element(GMarkupParseContext* context,
const char* element_name,
void* user_data,
GError** error)
@@ -150,7 +122,7 @@ void ParserCallbacks::end_element(GMarkupParseContext* context,
}
}
-void ParserCallbacks::text(GMarkupParseContext* context,
+void ParserCallbacks_text(GMarkupParseContext* context,
const char* text,
gsize text_len,
void* user_data,
@@ -173,7 +145,7 @@ void ParserCallbacks::text(GMarkupParseContext* context,
}
}
-void ParserCallbacks::passthrough(GMarkupParseContext* context,
+void ParserCallbacks_passthrough(GMarkupParseContext* context,
const char* passthrough_text,
gsize text_len,
void* user_data,
@@ -197,7 +169,7 @@ void ParserCallbacks::passthrough(GMarkupParseContext* context,
}
}
-void ParserCallbacks::error(GMarkupParseContext* context,
+void ParserCallbacks_error(GMarkupParseContext* context,
GError* error,
void* user_data)
{
@@ -247,7 +219,7 @@ ParseContext::ParseContext(Parser& parser, ParseFlags flags)
:
parser_ (&parser),
gobject_ (g_markup_parse_context_new(&ParserCallbacks::vfunc_table, (GMarkupParseFlags) flags,
- this, &ParseContext::destroy_notify_callback))
+ this, &ParseContext_destroy_notify_callback))
{}
ParseContext::~ParseContext()
@@ -302,9 +274,8 @@ int ParseContext::get_char_number() const
g_markup_parse_context_get_position(gobject_, 0, &char_number);
return char_number;
}
-
-// static
-void ParseContext::destroy_notify_callback(void* data)
+
+void ParseContext_destroy_notify_callback(void* data)
{
ParseContext *const self = static_cast<ParseContext*>(data);