Skip to content

Commit

Permalink
fixed RLP compilation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
glook committed Nov 11, 2013
1 parent 9c677e9 commit a6c33be
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions src/sphinx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29781,12 +29781,14 @@ class CSphSource_TSV : public CSphSource_BaseSV
class CSphSource_CSV : public CSphSource_BaseSV
{
public:
CSphSource_CSV ( const char * sName, const char * sDelimiter );
explicit CSphSource_CSV ( const char * sName, const char * sDelimiter = NULL );
virtual ~CSphSource_CSV();

virtual ESphParseResult SplitColumns ( CSphString & sError ); ///< parse incoming chunk and emit some hits
virtual void SetupSchema ( const CSphConfigSection & hSource, bool bWordDict );

void SetDelimiter ( const char * sDelimiter );

private:
BYTE m_iDelimiter;
};
Expand Down Expand Up @@ -29814,7 +29816,10 @@ CSphSource * sphCreateSourceCSVpipe ( const CSphConfigSection * pSource, FILE *

#if USE_RLP
if ( bProxy )
pCSV = new CSphSource_Proxy<CSphSource_CSV> ( sSourceName, sDelimiter );
{
pCSV = new CSphSource_Proxy<CSphSource_CSV> ( sSourceName );
pCSV->SetDelimiter ( sDelimiter );
}
else
#endif
pCSV = new CSphSource_CSV ( sSourceName, sDelimiter );
Expand Down Expand Up @@ -30239,8 +30244,7 @@ CSphSource_CSV::CSphSource_CSV ( const char * sName, const char * sDelimiter )
: CSphSource_BaseSV ( sName )
{
m_iDelimiter = BYTE ( ',' );
if ( sDelimiter && *sDelimiter )
m_iDelimiter = *sDelimiter;
SetDelimiter ( sDelimiter );
}

CSphSource_CSV::~CSphSource_CSV()
Expand Down Expand Up @@ -30412,6 +30416,13 @@ void CSphSource_CSV::SetupSchema ( const CSphConfigSection & hSource, bool bWord
}


void CSphSource_CSV::SetDelimiter ( const char * sDelimiter )
{
if ( sDelimiter && *sDelimiter )
m_iDelimiter = *sDelimiter;
}


/////////////////////////////////////////////////////////////////////////////

void sphSetQuiet ( bool bQuiet )
Expand Down

0 comments on commit a6c33be

Please sign in to comment.