diff options
| author | Bob Jamison <ishmalius@gmail.com> | 2006-11-15 09:36:19 +0000 |
|---|---|---|
| committer | ishmal <ishmal@users.sourceforge.net> | 2006-11-15 09:36:19 +0000 |
| commit | f3a66fc3f15340a68c90667657f0a7cfd52a72e9 (patch) | |
| tree | d5ec286a5444368e0975f5c605ddf9573e89a86e /src/libcroco/cr-om-parser.c | |
| parent | color effects (diff) | |
| download | inkscape-f3a66fc3f15340a68c90667657f0a7cfd52a72e9.tar.gz inkscape-f3a66fc3f15340a68c90667657f0a7cfd52a72e9.zip | |
Make C++ - compilable. Mostly remove pointer casting problems. Fix a few places where C++ is stricter than C.
(bzr r1954)
Diffstat (limited to 'src/libcroco/cr-om-parser.c')
| -rw-r--r-- | src/libcroco/cr-om-parser.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/libcroco/cr-om-parser.c b/src/libcroco/cr-om-parser.c index 245f2d82f..b8d70e35a 100644 --- a/src/libcroco/cr-om-parser.c +++ b/src/libcroco/cr-om-parser.c @@ -112,9 +112,8 @@ struct _ParsingContext { static ParsingContext * new_parsing_context (void) { - ParsingContext *result = NULL; - - result = g_try_malloc (sizeof (ParsingContext)); + ParsingContext *result = + (ParsingContext *)g_try_malloc (sizeof (ParsingContext)); if (!result) { cr_utils_trace_info ("Out of Memory"); return NULL; @@ -778,10 +777,9 @@ unrecoverable_error (CRDocHandler * a_this) CROMParser * cr_om_parser_new (CRInput * a_input) { - CROMParser *result = NULL; enum CRStatus status = CR_OK; - result = g_try_malloc (sizeof (CROMParser)); + CROMParser *result = (CROMParser *)g_try_malloc (sizeof (CROMParser)); if (!result) { cr_utils_trace_info ("Out of memory"); @@ -789,7 +787,7 @@ cr_om_parser_new (CRInput * a_input) } memset (result, 0, sizeof (CROMParser)); - PRIVATE (result) = g_try_malloc (sizeof (CROMParserPriv)); + PRIVATE (result) = (CROMParserPriv *)g_try_malloc (sizeof (CROMParserPriv)); if (!PRIVATE (result)) { cr_utils_trace_info ("Out of memory"); |
