mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-07 14:19:10 -04:00
Eliminate call to strlen() in favour of SvPV()
This commit is contained in:
parent
740ba861f9
commit
2fb0329bbd
1 changed files with 2 additions and 3 deletions
|
@ -508,7 +508,6 @@ static int perl_fts5_tokenizer_Tokenize(
|
|||
PUTBACK;
|
||||
call_sv(c->coderef, G_VOID);
|
||||
|
||||
printf("Returned from tokenization CB, returning to SQLite\n");
|
||||
SPAGAIN;
|
||||
|
||||
PUTBACK;
|
||||
|
@ -525,8 +524,8 @@ int perl_fts5_xToken(pTHX_
|
|||
int iStart, /* Byte offset of token within input text */
|
||||
int iEnd /* Byte offset of end of token within input text */
|
||||
) {
|
||||
const char* chrToken = SvPV_nolen(svToken);
|
||||
STRLEN nToken = strlen(chrToken);
|
||||
STRLEN nToken;
|
||||
const char* chrToken = SvPV(svToken, nToken);
|
||||
perl_cb_ctx * p = (perl_cb_ctx *)SvPV_nolen( pCtx );
|
||||
return p->xToken(p->Ctx,tflags,chrToken,nToken,iStart,iEnd);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue