You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2011/10/25 08:45:21 UTC
[lucy-commits] svn commit: r1188532 - in
/incubator/lucy/branches/clownfish_lemon/clownfish: lib/Clownfish.xs
src/CFCParser.c src/CFCParser.h
Author: marvin
Date: Tue Oct 25 06:45:21 2011
New Revision: 1188532
URL: http://svn.apache.org/viewvc?rev=1188532&view=rev
Log:
Change CFCParser_parse_file to return a CFCFile.
Modified:
incubator/lucy/branches/clownfish_lemon/clownfish/lib/Clownfish.xs
incubator/lucy/branches/clownfish_lemon/clownfish/src/CFCParser.c
incubator/lucy/branches/clownfish_lemon/clownfish/src/CFCParser.h
Modified: incubator/lucy/branches/clownfish_lemon/clownfish/lib/Clownfish.xs
URL: http://svn.apache.org/viewvc/incubator/lucy/branches/clownfish_lemon/clownfish/lib/Clownfish.xs?rev=1188532&r1=1188531&r2=1188532&view=diff
==============================================================================
--- incubator/lucy/branches/clownfish_lemon/clownfish/lib/Clownfish.xs (original)
+++ incubator/lucy/branches/clownfish_lemon/clownfish/lib/Clownfish.xs Tue Oct 25 06:45:21 2011
@@ -2077,7 +2077,7 @@ _parse_file(self, string, source_class)
const char *string;
const char *source_class;
CODE:
- CFCBase *got = CFCParser_parse_file(self, string, source_class);
+ CFCFile *got = CFCParser_parse_file(self, string, source_class);
RETVAL = S_cfcbase_to_perlref(got);
OUTPUT: RETVAL
Modified: incubator/lucy/branches/clownfish_lemon/clownfish/src/CFCParser.c
URL: http://svn.apache.org/viewvc/incubator/lucy/branches/clownfish_lemon/clownfish/src/CFCParser.c?rev=1188532&r1=1188531&r2=1188532&view=diff
==============================================================================
--- incubator/lucy/branches/clownfish_lemon/clownfish/src/CFCParser.c (original)
+++ incubator/lucy/branches/clownfish_lemon/clownfish/src/CFCParser.c Tue Oct 25 06:45:21 2011
@@ -21,6 +21,7 @@
#include "CFCBase.h"
#include "CFCParser.h"
#include "CFCParcel.h"
+#include "CFCFile.h"
#include "CFCUtil.h"
#include "CFCLexHeader.h"
#include "CFCParseHeader.h"
@@ -111,17 +112,18 @@ CFCParser_parse(CFCParser *self, const c
return self->result;
}
-CFCBase*
+CFCFile*
CFCParser_parse_file(CFCParser *self, const char *string,
const char *source_class) {
CFCParser_set_parcel(NULL);
self->source_class = CFCUtil_strdup(source_class);
CFCParseHeader(self->header_parser, CFC_TOKENTYPE_FILE_START, NULL, self);
- CFCBase *result = CFCParser_parse(self, string);
+ CFCFile *result = (CFCFile*)CFCParser_parse(self, string);
FREEMEM(self->source_class);
self->source_class = NULL;
return result;
}
+
void
CFCParser_set_result(CFCParser *self, CFCBase *result)
{
Modified: incubator/lucy/branches/clownfish_lemon/clownfish/src/CFCParser.h
URL: http://svn.apache.org/viewvc/incubator/lucy/branches/clownfish_lemon/clownfish/src/CFCParser.h?rev=1188532&r1=1188531&r2=1188532&view=diff
==============================================================================
--- incubator/lucy/branches/clownfish_lemon/clownfish/src/CFCParser.h (original)
+++ incubator/lucy/branches/clownfish_lemon/clownfish/src/CFCParser.h Tue Oct 25 06:45:21 2011
@@ -24,6 +24,7 @@ extern "C" {
typedef struct CFCParser CFCParser;
struct CFCBase;
struct CFCParcel;
+struct CFCFile;
extern CFCParser *CFCParser_current_state;
extern void *CFCParser_current_parser;
@@ -40,7 +41,7 @@ CFCParser_destroy(CFCParser *self);
struct CFCBase*
CFCParser_parse(CFCParser *self, const char *string);
-struct CFCBase*
+struct CFCFile*
CFCParser_parse_file(CFCParser *self, const char *string,
const char *source_class);